Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Ufimtsev2018-04-25 18:46:40 +0000
committerLeo Ufimtsev2018-04-25 18:46:40 +0000
commit1a130fd611a7d7d7abf532ad3a6068615a28daff (patch)
treec441f7ea4e1c98b0268ae0072b065652ba8ed017 /bundles/org.eclipse.swt/Eclipse SWT PI/gtk
parentbb024cd77be3fa3fcc4d79505111013abd4f77b7 (diff)
downloadeclipse.platform.swt-1a130fd611a7d7d7abf532ad3a6068615a28daff.tar.gz
eclipse.platform.swt-1a130fd611a7d7d7abf532ad3a6068615a28daff.tar.xz
eclipse.platform.swt-1a130fd611a7d7d7abf532ad3a6068615a28daff.zip
Bug 533833 – [Webkit2] Should not use G_TYPE_CHECK_INSTANCE_TYPE(..)I20180425-1650
I adopted the code so that webkit2 no longer uses the macro. But I didn't take the time to remove it's use from webkit1 as I don't think it's worth the time. I left some notes warning not to use the macro. Upon removal of webkit1, it should be removed. Tests: - Fedora 27, Webkit2.18, jUnits & child eclipse. - Not tested on webkit1, but should work as there are no logic changes. Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=533833 Change-Id: I825825c02413a35592dcf3e21114ed774cf146f0 Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index b2cb13fe65..48160eb14c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -1090,12 +1090,14 @@ public static final long /*int*/ G_OBJECT_TYPE_NAME (long /*int*/ object) {
}
}
+public static final native boolean _G_TYPE_CHECK_INSTANCE_TYPE (long /*int*/ instance, long /*int*/ type);
/**
- * This method is not a reliable way to test for a type.
- * Use G_OBJECT_TYPE type instead or use alternate means (e.g custom userdata).
- * TODO: remove usage of this call.
+ * Note: G_TYPE_CHECK_INSTANCE_TYPE is not a good way to check for instance type,
+ * The C-Macro doesn't seem to work reliably in the context of being invoked from Java
+ * via JNI on a dynamically loaded library.
+ * But webkit1 development has halted and it's not worth the effort to change this.
+ * I.e, kept for legacy reason but don't use this. Instead, to identify type, use user_data. (see Webkit proc3 as example).
*/
-public static final native boolean _G_TYPE_CHECK_INSTANCE_TYPE (long /*int*/ instance, long /*int*/ type);
public static final boolean G_TYPE_CHECK_INSTANCE_TYPE (long /*int*/ instance, long /*int*/ type) {
lock.lock();
try {

Back to the top