summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2008-01-28 18:01:33 +0000
committerGrant Gayed <ggayed>2008-01-28 18:01:33 +0000
commitd2f7132d22cb4deb06b3493827bc6e53f330e845 (patch)
tree5ef8c69cd3b29d26397013d405f46b6a518b403c /bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon
parent179cb4746eb2ca02a1c9e405e35a1b68de18b344 (diff)
downloadeclipse.platform.swt-d2f7132d22cb4deb06b3493827bc6e53f330e845.tar.gz
eclipse.platform.swt-d2f7132d22cb4deb06b3493827bc6e53f330e845.tar.xz
eclipse.platform.swt-d2f7132d22cb4deb06b3493827bc6e53f330e845.zip
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java
index 92d52018da..9d1c7710d8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java
@@ -89,7 +89,10 @@ static int eventProc3 (int nextHandler, int theEvent, int userData) {
int getHandle () {
int embedHandle = Cocoa.objc_msgSend (Cocoa.C_NSImageView, Cocoa.S_alloc);
- if (embedHandle == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (embedHandle == 0) {
+ browser.dispose ();
+ SWT.error (SWT.ERROR_NO_HANDLES);
+ }
NSRect r = new NSRect ();
embedHandle = Cocoa.objc_msgSend (embedHandle, Cocoa.S_initWithFrame, r);
int rc;
@@ -102,7 +105,10 @@ int getHandle () {
} catch (UnsatisfiedLinkError e) {}
rc = Cocoa.HIJavaViewCreateWithCocoaView (outControl, embedHandle);
}
- if (rc != OS.noErr || outControl[0] == 0) SWT.error (SWT.ERROR_NO_HANDLES);
+ if (rc != OS.noErr || outControl[0] == 0) {
+ browser.dispose ();
+ SWT.error (SWT.ERROR_NO_HANDLES);
+ }
int subHIView = outControl[0];
HILayoutInfo newLayoutInfo = new HILayoutInfo ();
newLayoutInfo.version = 0;
@@ -136,7 +142,10 @@ int getHandle () {
if (Callback3 == null) Callback3 = new Callback (this.getClass (), "eventProc3", 3); //$NON-NLS-1$
int callback3Address = Callback3.getAddress ();
- if (callback3Address == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ if (callback3Address == 0) {
+ browser.dispose ();
+ SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
+ }
int [] mask = new int [] {
OS.kEventClassMouse, OS.kEventMouseDown,
};