Bug 1365760 - Fix two tiny issues in mozJSComponentLoader::ImportInto(). r=kmag
MozReview-Commit-ID: 84I37uRi11H
--- a/js/xpconnect/loader/mozJSComponentLoader.cpp
+++ b/js/xpconnect/loader/mozJSComponentLoader.cpp
@@ -1147,17 +1147,17 @@ mozJSComponentLoader::ImportInto(const n
mod = newEntry;
}
MOZ_ASSERT(mod->obj, "Import table contains entry with no object");
vp.set(mod->obj);
if (targetObj) {
- // cxhelper must be created before jsapi, so that jsapi is detroyed and
+ // cxhelper must be created before jsapi, so that jsapi is destroyed and
// pops any context it has pushed before we report to the caller context.
JSCLContextHelper cxhelper(callercx);
// Even though we are calling JS_SetPropertyById on targetObj, we want
// to ensure that we never run script here, so we use an AutoJSAPI and
// not an AutoEntryScript.
dom::AutoJSAPI jsapi;
jsapi.Init();
@@ -1231,17 +1231,17 @@ mozJSComponentLoader::ImportInto(const n
rv = info.GetLocation(location);
NS_ENSURE_SUCCESS(rv, rv);
return ReportOnCallerUTF8(cxhelper, ERROR_GETTING_SYMBOL,
location.get(), bytes.ptr());
}
JSAutoCompartment target_ac(cx, targetObj);
- JS_MarkCrossZoneId(cx, symbolId);
+ JS_MarkCrossZoneId(cx, symbolId);
if (!JS_WrapValue(cx, &value) ||
!JS_SetPropertyById(cx, targetObj, symbolId, value)) {
JSAutoByteString bytes;
RootedString symbolStr(cx, JSID_TO_STRING(symbolId));
if (!bytes.encodeUtf8(cx, symbolStr))
return NS_ERROR_FAILURE;
nsCString location;