Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2015-08-04 10:41:51 -0400
committerNiraj Modi2015-08-04 10:41:51 -0400
commit7f06bcc9272e3f52d260aa46737a9a13b768fac4 (patch)
tree80e95a65c2e771c765cd04f31a6f7b019d465826
parente93cc9585134967a74c41f976f4fe2ee20bb4c16 (diff)
downloadeclipse.platform.swt-7f06bcc9272e3f52d260aa46737a9a13b768fac4.tar.gz
eclipse.platform.swt-7f06bcc9272e3f52d260aa46737a9a13b768fac4.tar.xz
eclipse.platform.swt-7f06bcc9272e3f52d260aa46737a9a13b768fac4.zip
Bug 472956 - [Regression][XULRunner] XULRunner crashes when profile path
does not exist Change-Id: I48a6cc7236c8000fbfbf3f8698d5741d95845740 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIFile.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIFile.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIFile.java
index 4938dc0792..b4f56cd27f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIFile.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIFile.java
@@ -56,7 +56,13 @@ public class nsIFile extends nsISupports {
public static final int DIRECTORY_TYPE = 1;
public int Create(int type, int permissions) {
- return XPCOM.VtblCall(this.getMethodIndex("create"), getAddress(), type, permissions);
+ /*
+ * Finding the method index by name using getMethodIndex() fails if
+ * mozilla profile directory is missing. Hence, use method index
+ * directly to support nsIFile.Create operation in the absence of
+ * profile directory.
+ */
+ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), type, permissions);
}
public int GetLeafName(long /*int*/ aLeafName) {

Back to the top