Bug 1365760 - Fix two tiny issues in mozJSComponentLoader::ImportInto(). r=kmag
authorAndrew McCreight <continuation@gmail.com>
Tue, 16 May 2017 15:51:14 -0700
changeset 359070 bcb8a85c4663
parent 359069 515c3f15cf30
child 359071 94f5cca9efba
push id42947
push useramccreight@mozilla.com
push date2017-05-18 19:51 +0000
treeherderautoland@bcb8a85c4663 [default view] [failures only]
reviewerskmag
bugs1365760
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1365760 - Fix two tiny issues in mozJSComponentLoader::ImportInto(). r=kmag MozReview-Commit-ID: 84I37uRi11H
js/xpconnect/loader/mozJSComponentLoader.cpp
--- a/js/xpconnect/loader/mozJSComponentLoader.cpp
+++ b/js/xpconnect/loader/mozJSComponentLoader.cpp
@@ -1149,17 +1149,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();
@@ -1233,17 +1233,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;