Bug 612408: return NS_ERROR_FAILURE instead of NULL in failure case within mozJSComponentLoader::ImportInto. r=gal
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 20 Jan 2011 20:19:19 -0800
changeset 61067 64274de90e2d279d923b89199d761d197b1feec8
parent 61066 ccd420e49864c24f889afa6ef0521f446b8a01ce
child 61068 aa618e93942e2491f5f19d14b70d13b12fcaad13
push idunknown
push userunknown
push dateunknown
reviewersgal
bugs612408
milestone2.0b10pre
Bug 612408: return NS_ERROR_FAILURE instead of NULL in failure case within mozJSComponentLoader::ImportInto. r=gal
js/src/xpconnect/loader/mozJSComponentLoader.cpp
--- a/js/src/xpconnect/loader/mozJSComponentLoader.cpp
+++ b/js/src/xpconnect/loader/mozJSComponentLoader.cpp
@@ -1492,17 +1492,17 @@ mozJSComponentLoader::ImportInto(const n
     *_retval = mod->global;
 
     jsval symbols;
     if (targetObj) {
         JSCLContextHelper cxhelper(this);
 
         JSAutoEnterCompartment ac;
         if (!ac.enter(mContext, mod->global))
-            return NULL;
+            return NS_ERROR_FAILURE;
 
         if (!JS_GetProperty(mContext, mod->global,
                             "EXPORTED_SYMBOLS", &symbols)) {
             return ReportOnCaller(cxhelper, ERROR_NOT_PRESENT,
                                   PromiseFlatCString(aLocation).get());
         }
 
         JSObject *symbolsObj = nsnull;