Bug 717216 - Don't return nsnull from nsXBLDocGlobalObject::EnsureScriptEnvironment; r=volkmar

This commit is contained in:
Ms2ger 2012-01-15 09:13:11 +01:00
parent c08e28ffbb
commit 835800e350

View File

@ -305,7 +305,7 @@ nsXBLDocGlobalObject::EnsureScriptEnvironment(PRUint32 aLangID)
if (mScriptContext)
return NS_OK; // already initialized for this lang
nsCOMPtr<nsIDOMScriptObjectFactory> factory = do_GetService(kDOMScriptObjectFactoryCID);
NS_ENSURE_TRUE(factory, nsnull);
NS_ENSURE_TRUE(factory, NS_OK);
nsresult rv;
@ -328,7 +328,7 @@ nsXBLDocGlobalObject::EnsureScriptEnvironment(PRUint32 aLangID)
rv = xpc_CreateGlobalObject(cx, &gSharedGlobalClass, principal, nsnull,
false, &mJSObject, &compartment);
NS_ENSURE_SUCCESS(rv, nsnull);
NS_ENSURE_SUCCESS(rv, NS_OK);
::JS_SetGlobalObject(cx, mJSObject);