Bug 810987: Followup bustage fix.

This commit is contained in:
Kyle Huey 2012-11-13 10:24:08 -08:00
parent aae89c91b3
commit a63f21401a

View File

@ -182,8 +182,10 @@ mozJSSubScriptLoader::LoadSubScript(const nsAString& url,
if (!targetObj) {
// If the user didn't provide an object to eval onto, find one.
mozJSComponentLoader* loader = mozJSComponentLoader::Get();
rv = loader->FindTargetObject(cx, &targetObj);
NS_ENSURE_SUCCESS(rv, rv);
if (loader) {
rv = loader->FindTargetObject(cx, &targetObj);
NS_ENSURE_SUCCESS(rv, rv);
}
}
// Remember an object out of the calling compartment so that we