diff options
| author | Nikita Nemkin | 2019-06-05 14:33:53 +0000 |
|---|---|---|
| committer | Niraj Modi | 2020-01-22 06:47:56 +0000 |
| commit | 112b3dd931b79a7d96cacf7b8b8044b975e63876 (patch) | |
| tree | b0e8c28af996804b449b8762872251f6a0af7249 | |
| parent | 5513fa626a173b9988dd6bbd833111d5b9d351a4 (diff) | |
| download | eclipse.platform.swt-112b3dd931b79a7d96cacf7b8b8044b975e63876.tar.gz eclipse.platform.swt-112b3dd931b79a7d96cacf7b8b8044b975e63876.tar.xz eclipse.platform.swt-112b3dd931b79a7d96cacf7b8b8044b975e63876.zip | |
Bug 559376 - [Win32] Remove obsolete workarounds for IBM JVM bugs
IBM JVM 1.3.1 and IBM JVM 1.6 code generation bugs can't be reproduced
with J9-based OpenJDK 8.
Change-Id: I844ea30784feedc1ccfa5f904ecdea4860c6e702
Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
3 files changed, 3 insertions, 72 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java index b1e275c72e..eef0ff69f8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java @@ -729,27 +729,7 @@ protected void checkSubclass () { @Override protected void checkDevice () { if (thread == null) error (SWT.ERROR_WIDGET_DISPOSED); - if (thread != Thread.currentThread ()) { - /* - * Bug in IBM JVM 1.6. For some reason, under - * conditions that are yet to be full understood, - * Thread.currentThread() is either returning null - * or a different instance from the one that was - * saved when the Display was created. This is - * possibly a JIT problem because modifying this - * method to print logging information when the - * error happens seems to fix the problem. The - * fix is to use operating system calls to verify - * that the current thread is not the Display thread. - * - * NOTE: Despite the fact that Thread.currentThread() - * is used in other places, the failure has not been - * observed in all places where it is called. - */ - if (threadId != OS.GetCurrentThreadId ()) { - error (SWT.ERROR_THREAD_INVALID_ACCESS); - } - } + if (thread != Thread.currentThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS); if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java index e3c6560f55..6d8cf654b9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Menu.java @@ -198,21 +198,6 @@ Menu (Decorations parent, int style, long handle) { super (parent, checkStyle (style)); this.parent = parent; this.handle = handle; - /* - * Bug in IBM JVM 1.3.1. For some reason, when the checkOrientation() is - * called from createWidget(), the JVM issues this error: - * - * JVM Exception 0x2 (subcode 0x0) occurred in thread "main" (TID:0x9F19D8) - * - * In addition, on Windows XP, a dialog appears with following error message, - * indicating that the problem may be in the JIT: - * - * AppName: java.exe AppVer: 0.0.0.0 ModName: jitc.dll - * ModVer: 0.0.0.0 Offset: 000b6912 - * - * The fix is to call checkOrientation() from here. - */ - checkOrientation (parent); createWidget (); } @@ -387,21 +372,7 @@ void createItem (MenuItem item, int index) { } void createWidget () { - /* - * Bug in IBM JVM 1.3.1. For some reason, when the following code is called - * from this method, the JVM issues this error: - * - * JVM Exception 0x2 (subcode 0x0) occurred in thread "main" (TID:0x9F19D8) - * - * In addition, on Windows XP, a dialog appears with following error message, - * indicating that the problem may be in the JIT: - * - * AppName: java.exe AppVer: 0.0.0.0 ModName: jitc.dll - * ModVer: 0.0.0.0 Offset: 000b6912 - * - * The fix is to move the code to the caller of this method. - */ -// checkOrientation (parent); + checkOrientation (parent); createHandle (); parent.addMenu (this); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java index 8909095816..f92a249a3e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java @@ -349,27 +349,7 @@ protected void checkSubclass () { protected void checkWidget () { Display display = this.display; if (display == null) error (SWT.ERROR_WIDGET_DISPOSED); - if (display.thread != Thread.currentThread ()) { - /* - * Bug in IBM JVM 1.6. For some reason, under - * conditions that are yet to be full understood, - * Thread.currentThread() is either returning null - * or a different instance from the one that was - * saved when the Display was created. This is - * possibly a JIT problem because modifying this - * method to print logging information when the - * error happens seems to fix the problem. The - * fix is to use operating system calls to verify - * that the current thread is not the Display thread. - * - * NOTE: Despite the fact that Thread.currentThread() - * is used in other places, the failure has not been - * observed in all places where it is called. - */ - if (display.threadId != OS.GetCurrentThreadId ()) { - error (SWT.ERROR_THREAD_INVALID_ACCESS); - } - } + if (display.thread != Thread.currentThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS); if ((state & DISPOSED) != 0) error (SWT.ERROR_WIDGET_DISPOSED); } |
