Bug 989373, part 8 - mLoaderGlobal is always null. r=kmag

This field can be eliminated for now.

MozReview-Commit-ID: 9xyxoTwBfXU

--HG--
extra : rebase_source : e71660452286d383ba9738e7c0f7e09ae134a01e
This commit is contained in:
Andrew McCreight 2017-05-15 15:51:20 -07:00
parent 016441faf0
commit 1ed03a415f
2 changed files with 2 additions and 8 deletions

View File

@ -531,14 +531,9 @@ mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx,
nsIURI* aURI,
bool* aRealFile)
{
bool createdNewGlobal = false;
RootedObject globalObj(aCx);
if (!mLoaderGlobal) {
CreateLoaderGlobal(aCx, MapURIToAddonID(aURI), &globalObj);
if (globalObj)
createdNewGlobal = true;
}
// |thisObj| is the object we set properties on for a particular .jsm.
// XXX Right now, thisObj is always globalObj, but if we start
@ -590,7 +585,7 @@ mozJSComponentLoader::PrepareObjectForLocation(JSContext* aCx,
if (!JS_DefineProperty(aCx, thisObj, "__URI__", exposedUri, 0))
return nullptr;
if (createdNewGlobal) {
{
// AutoEntryScript required to invoke debugger hook, which is a
// Gecko-specific concept at present.
dom::AutoEntryScript aes(globalObj,

View File

@ -86,7 +86,6 @@ class mozJSComponentLoader : public mozilla::ModuleLoader,
nsCOMPtr<nsIComponentManager> mCompMgr;
nsCOMPtr<nsIPrincipal> mSystemPrincipal;
nsCOMPtr<nsIXPConnectJSObjectHolder> mLoaderGlobal;
class ModuleEntry : public mozilla::Module
{