From 6eb3399d078b0e13b43ab5162d8ab776e02c4082 Mon Sep 17 00:00:00 2001 From: "dbragg%netscape.com" Date: Mon, 28 Aug 2000 22:26:18 +0000 Subject: [PATCH] Fix for bug 45885. The js prototype gFileSpecProto was defined locally and so was set to null. Wrong! r=sgehani git-svn-id: svn://10.0.0.236/trunk@77378 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpinstall/src/nsJSFile.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mozilla/xpinstall/src/nsJSFile.cpp b/mozilla/xpinstall/src/nsJSFile.cpp index 9c0446ac11d..9ede072e9af 100644 --- a/mozilla/xpinstall/src/nsJSFile.cpp +++ b/mozilla/xpinstall/src/nsJSFile.cpp @@ -63,7 +63,7 @@ extern PRBool ConvertJSValToObj(nsISupports** aSupports, JSContext* aContext, jsval aValue); - +extern JSObject *gFileSpecProto; // // Native method DirCreate // @@ -157,9 +157,8 @@ InstallFileOpDirGetParent(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, { /* Now create the new JSObject */ JSObject *fileSpecObject; - JSObject *FileSpecProto = nsnull; - fileSpecObject = JS_NewObject(cx, &FileSpecObjectClass, FileSpecProto, NULL); + fileSpecObject = JS_NewObject(cx, &FileSpecObjectClass, gFileSpecProto, NULL); if (fileSpecObject == NULL) return JS_FALSE;