Bug 810987: Followup bustage fix.

This commit is contained in:
Kyle Huey 2012-11-13 10:24:08 -08:00
parent 8b2523d2c3
commit d4d9b2dcd8

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