Bug 1547923 part 6. Make nsIGlobalObject::GetGlobalJSObject always expose to active JS. r=mccr8

See callsite audit in https://bugzilla.mozilla.org/attachment.cgi?id=9061976
for details on why the remaining GetGlobalJSObject callers should switch to the
"always expose" behavior.

Differential Revision: https://phabricator.services.mozilla.com/D29707
This commit is contained in:
Boris Zbarsky
2019-05-02 21:36:15 +00:00
parent 204bfb5dd2
commit ed7925a057
9 changed files with 17 additions and 17 deletions

View File

@@ -297,7 +297,7 @@ void AutoJSAPI::InitInternal(nsIGlobalObject* aGlobalObject, JSObject* aGlobal,
mIsMainThread = aIsMainThread;
mGlobalObject = aGlobalObject;
if (aGlobal) {
JS::ExposeObjectToActiveJS(aGlobal);
JS::AssertObjectIsNotGray(aGlobal);
}
mAutoNullableRealm.emplace(mCx, aGlobal);