diff options
author | Grant Gayed | 2011-03-23 19:45:23 +0000 |
---|---|---|
committer | Grant Gayed | 2011-03-23 19:45:23 +0000 |
commit | aa8b43b03fe23f1aa811f829b70f14fe4b3c985c (patch) | |
tree | 8aeed188b37c9d267f04e5db20c6da012aa3464c /bundles | |
parent | 55a22ab9240db91b3cefd3f1694927c9a71b6ad8 (diff) | |
download | eclipse.platform.swt-aa8b43b03fe23f1aa811f829b70f14fe4b3c985c.tar.gz eclipse.platform.swt-aa8b43b03fe23f1aa811f829b70f14fe4b3c985c.tar.xz eclipse.platform.swt-aa8b43b03fe23f1aa811f829b70f14fe4b3c985c.zip |
340799 - WebKit on Windows crashes with IBM JRE
Diffstat (limited to 'bundles')
5 files changed, 41 insertions, 35 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com.c b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com.c index 026c3f6ecf..6fbda3b2cd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/com.c @@ -3059,7 +3059,7 @@ JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_RE COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2II_FUNC); #endif if (arg2) if ((lparg2 = getRECTFields(env, arg2, &_arg2)) == NULL) goto fail; - rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, RECT *, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, arg4); + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, RECT, jint, jint))(*(jintLong **)arg1)[arg0])(arg1, *lparg2, arg3, arg4); fail: if (arg2 && lparg2) setRECTFields(env, arg2, lparg2); #ifndef JNI64 @@ -3113,7 +3113,7 @@ JNIEXPORT jint JNICALL COM_NATIVE(VtblCall__IJLorg_eclipse_swt_internal_win32_RE COM_NATIVE_ENTER(env, that, VtblCall__IJLorg_eclipse_swt_internal_win32_RECT_2JJ_FUNC); #endif if (arg2) if ((lparg2 = getRECTFields(env, arg2, &_arg2)) == NULL) goto fail; - rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, RECT *, jlong, jlong))(*(jintLong **)arg1)[arg0])(arg1, lparg2, arg3, arg4); + rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, RECT, jlong, jlong))(*(jintLong **)arg1)[arg0])(arg1, *lparg2, arg3, arg4); fail: if (arg2 && lparg2) setRECTFields(env, arg2, lparg2); #ifndef JNI64 diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COM.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COM.java index 51fb54c739..cbcd1c3dc6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COM.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/ole/win32/COM.java @@ -746,7 +746,13 @@ public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, LICIN public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, RECT arg0, int arg1, boolean arg2); public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, RECT arg0, long arg1, boolean arg2); +/** + * @param arg0 flags=struct + */ public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, RECT arg0, int arg1, int arg2); +/** + * @param arg0 flags=struct + */ public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, RECT arg0, long arg1, long arg2); public static final native int VtblCall(int fnNumber, int /*long*/ ppVtbl, RECT arg0, RECT arg1); diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.cpp b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.cpp index 2e8ed2c777..21a0b6cc0f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.cpp +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32.cpp @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 IBM Corporation and others. All rights reserved. + * Copyright (c) 2009, 2011 IBM Corporation and others. All rights reserved. * The contents of this file are made available under the terms * of the GNU Lesser General Public License (LGPL) Version 2.1 that * accompanies this distribution (lgpl-v21.txt). The LGPL is also @@ -752,37 +752,6 @@ fail: } #endif -#ifndef NO_WebKitCreateInstance -extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(WebKitCreateInstance)(JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1, jbyteArray arg2, jintLongArray arg3); -JNIEXPORT jint JNICALL WebKit_win32_NATIVE(WebKitCreateInstance) - (JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1, jbyteArray arg2, jintLongArray arg3) -{ - jbyte *lparg0=NULL; - jbyte *lparg2=NULL; - jintLong *lparg3=NULL; - jint rc = 0; - WebKit_win32_NATIVE_ENTER(env, that, WebKitCreateInstance_FUNC); - if (arg0) if ((lparg0 = env->GetByteArrayElements(arg0, NULL)) == NULL) goto fail; - if (arg2) if ((lparg2 = env->GetByteArrayElements(arg2, NULL)) == NULL) goto fail; - if (arg3) if ((lparg3 = env->GetIntLongArrayElements(arg3, NULL)) == NULL) goto fail; -/* - rc = (jint)WebKitCreateInstance(lparg0, arg1, lparg2, lparg3); -*/ - { - LOAD_FUNCTION(fp, WebKitCreateInstance) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(jbyte *, jintLong, jbyte *, jintLong *))fp)(lparg0, arg1, lparg2, lparg3); - } - } -fail: - if (arg3 && lparg3) env->ReleaseIntLongArrayElements(arg3, lparg3, 0); - if (arg2 && lparg2) env->ReleaseByteArrayElements(arg2, lparg2, 0); - if (arg0 && lparg0) env->ReleaseByteArrayElements(arg0, lparg0, 0); - WebKit_win32_NATIVE_EXIT(env, that, WebKitCreateInstance_FUNC); - return rc; -} -#endif - #ifndef NO_kCFCopyStringDictionaryKeyCallBacks extern "C" JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(kCFCopyStringDictionaryKeyCallBacks)(JNIEnv *env, jclass that); JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(kCFCopyStringDictionaryKeyCallBacks) diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_custom.cpp b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_custom.cpp index 71f8535e2c..a979a11aa2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_custom.cpp +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/library/webkit_win32_custom.cpp @@ -70,3 +70,34 @@ JNIEXPORT jintLong JNICALL WebKit_win32_NATIVE(JSObjectHasPropertyProc_1CALLBACK return (jintLong)JSObjectHasPropertyProc; } #endif + +#ifndef NO_WebKitCreateInstance +extern "C" JNIEXPORT jint JNICALL WebKit_win32_NATIVE(WebKitCreateInstance)(JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1, jbyteArray arg2, jintLongArray arg3); +JNIEXPORT jint JNICALL WebKit_win32_NATIVE(WebKitCreateInstance) + (JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1, jbyteArray arg2, jintLongArray arg3) +{ + jbyte *lparg0=NULL; + jbyte *lparg2=NULL; + jintLong *lparg3=NULL; + jint rc = 0; + WebKit_win32_NATIVE_ENTER(env, that, WebKitCreateInstance_FUNC); + if (arg0) if ((lparg0 = env->GetByteArrayElements(arg0, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = env->GetByteArrayElements(arg2, NULL)) == NULL) goto fail; + if (arg3) if ((lparg3 = env->GetIntLongArrayElements(arg3, NULL)) == NULL) goto fail; +/* + rc = (jint)WebKitCreateInstance(lparg0, arg1, lparg2, lparg3); +*/ + { + LOAD_FUNCTION(fp, WebKitCreateInstance) + if (fp) { + rc = (jint)((jint (*)(jbyte *, jintLong, jbyte *, jintLong *))fp)(lparg0, arg1, lparg2, lparg3); + } + } +fail: + if (arg3 && lparg3) env->ReleaseIntLongArrayElements(arg3, lparg3, 0); + if (arg2 && lparg2) env->ReleaseByteArrayElements(arg2, lparg2, 0); + if (arg0 && lparg0) env->ReleaseByteArrayElements(arg0, lparg0, 0); + WebKit_win32_NATIVE_EXIT(env, that, WebKitCreateInstance_FUNC); + return rc; +} +#endif diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/WebKit_win32.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/WebKit_win32.java index c4fe3c7aec..f76ea9f2c4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/WebKit_win32.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/win32/org/eclipse/swt/internal/webkit/WebKit_win32.java @@ -344,7 +344,7 @@ public static final native int JSClassDefinition_sizeof (); * @param size cast=(size_t) */ public static final native void memmove (int /*long*/ dest, JSClassDefinition src, int /*long*/ size); -/** @method flags=dynamic*/ +/** @method flags=no_gen */ public static final native int WebKitCreateInstance (byte[] rclsid, int /*long*/ pUnkOuter, byte[] refiid, int /*long*/[] ppvObject); public static final int WebKitCreateInstance (GUID clsid, int /*long*/ pUnkOuter, GUID iid, int /*long*/[] ppvObject) { byte[] rclsid = new byte[GUID.sizeof]; |