summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Cornu <ccornu>2004-01-28 23:34:21 +0000
committerChristophe Cornu <ccornu>2004-01-28 23:34:21 +0000
commit4767abc4826ca61a61f158d51348211d689b8c24 (patch)
tree2991ec8ff550688e0d88beb4263830e2ce5da5ef
parenta58bf761fdf40f146514ac742d38a781704bf158 (diff)
downloadeclipse.platform.swt-4767abc4826ca61a61f158d51348211d689b8c24.tar.gz
eclipse.platform.swt-4767abc4826ca61a61f158d51348211d689b8c24.tar.xz
eclipse.platform.swt-4767abc4826ca61a61f158d51348211d689b8c24.zip
49828
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Browser.java35
1 files changed, 19 insertions, 16 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Browser.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Browser.java
index 5b1114b902..e9b3268614 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Browser.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/Browser.java
@@ -237,27 +237,30 @@ public Browser(Composite parent, int style) {
}
}
} else {
- varResult = event.arguments[1];
- String url = varResult.getString();
- LocationEvent locationEvent = new LocationEvent(Browser.this);
- locationEvent.location = url;
- for (int i = 0; i < locationListeners.length; i++)
- locationListeners[i].changed(locationEvent);
+ Variant variant = new Variant(auto);
+ IDispatch top = variant.getDispatch();
+ if (top.getAddress() == dispatch.getAddress()) {
+ varResult = event.arguments[1];
+ String url = varResult.getString();
+ LocationEvent locationEvent = new LocationEvent(Browser.this);
+ locationEvent.location = url;
+ for (int i = 0; i < locationListeners.length; i++)
+ locationListeners[i].changed(locationEvent);
+ }
+ /*
+ * This code is intentionally commented. A Variant constructed from an
+ * OleAutomation object does not increase its reference count. The IDispatch
+ * obtained from this Variant did not increase the reference count for the
+ * OleAutomation instance either.
+ */
+ //top.Release();
+ //variant.dispose();
ProgressEvent progressEvent = new ProgressEvent(Browser.this);
for (int i = 0; i < progressListeners.length; i++)
progressListeners[i].completed(progressEvent);
}
}
-
- /*
- * This code is intentionally commented. A Variant constructed from an
- * OleAutomation object does not increase its reference count. The IDispatch
- * obtained from this Variant did not increase the reference count for the
- * OleAutomation instance either.
- */
- //top.Release();
- //variant.dispose();
-
+
/*
* This code is intentionally commented. This IDispatch was received
* as an argument from the OleEvent and it will be disposed along with