summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2011-02-22 21:50:22 +0000
committerGrant Gayed <ggayed>2011-02-22 21:50:22 +0000
commitf8d214632226fe30e5dedb11397a3be1f8629823 (patch)
treee3b3244f7be1db36fd2cc26fd14911f3f89ce5d2
parent87330b10800601c0b12e6edda61ce1010ad6b657 (diff)
downloadeclipse.platform.swt-f8d214632226fe30e5dedb11397a3be1f8629823.tar.gz
eclipse.platform.swt-f8d214632226fe30e5dedb11397a3be1f8629823.tar.xz
eclipse.platform.swt-f8d214632226fe30e5dedb11397a3be1f8629823.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java40
1 files changed, 20 insertions, 20 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
index 1c6d79353e..1ce63af419 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
@@ -3397,27 +3397,27 @@ int OnStateChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateF
nsIRequest request = new nsIRequest (aRequest);
int rc = request.QueryInterface (nsIChannel.NS_ICHANNEL_IID, result);
- if (rc != XPCOM.NS_OK) error (rc);
- if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
- nsIChannel channel = new nsIChannel (result[0]);
- result[0] = 0;
- rc = channel.GetURI (result);
- if (rc != XPCOM.NS_OK) error (rc);
- if (result[0] == 0) error (XPCOM.NS_ERROR_NULL_POINTER);
- channel.Release ();
+ if (rc == XPCOM.NS_OK && result[0] != 0) {
+ nsIChannel channel = new nsIChannel (result[0]);
+ result[0] = 0;
+ rc = channel.GetURI (result);
+ if (rc != XPCOM.NS_OK) error (rc);
+ if (result[0] == 0) error (XPCOM.NS_ERROR_NULL_POINTER);
+ channel.Release ();
- nsIURI uri = new nsIURI (result[0]);
- result[0] = 0;
- int /*long*/ aSpec = XPCOM.nsEmbedCString_new ();
- rc = uri.GetSpec (aSpec);
- if (rc != XPCOM.NS_OK) error (rc);
- int length = XPCOM.nsEmbedCString_Length (aSpec);
- int /*long*/ buffer = XPCOM.nsEmbedCString_get (aSpec);
- byte[] bytes = new byte[length];
- XPCOM.memmove (bytes, buffer, length);
- lastNavigateURL = new String (bytes);
- XPCOM.nsEmbedCString_delete (aSpec);
- uri.Release ();
+ nsIURI uri = new nsIURI (result[0]);
+ result[0] = 0;
+ int /*long*/ aSpec = XPCOM.nsEmbedCString_new ();
+ rc = uri.GetSpec (aSpec);
+ if (rc != XPCOM.NS_OK) error (rc);
+ int length = XPCOM.nsEmbedCString_Length (aSpec);
+ int /*long*/ buffer = XPCOM.nsEmbedCString_get (aSpec);
+ byte[] bytes = new byte[length];
+ XPCOM.memmove (bytes, buffer, length);
+ lastNavigateURL = new String (bytes);
+ XPCOM.nsEmbedCString_delete (aSpec);
+ uri.Release ();
+ }
}
/*