mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 968335 - Use an AutoCxPusher directly in Auto{Entry,Incumbent}Global. r=bz
This will let us ask whether the AutoCxPusher is stack-top.
This commit is contained in:
parent
0f0ffa8525
commit
36891c136e
@ -177,7 +177,7 @@ AutoEntryScript::AutoEntryScript(nsIGlobalObject* aGlobalObject,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (aIsMainThread) {
|
if (aIsMainThread) {
|
||||||
mCxPusher.Push(aCx);
|
mCxPusher.construct(aCx);
|
||||||
}
|
}
|
||||||
mAc.construct(aCx, aGlobalObject->GetGlobalJSObject());
|
mAc.construct(aCx, aGlobalObject->GetGlobalJSObject());
|
||||||
mStack.Push(&mEntry);
|
mStack.Push(&mEntry);
|
||||||
@ -207,7 +207,7 @@ AutoSystemCaller::AutoSystemCaller(bool aIsMainThread)
|
|||||||
: mStack(ScriptSettingsStack::Ref())
|
: mStack(ScriptSettingsStack::Ref())
|
||||||
{
|
{
|
||||||
if (aIsMainThread) {
|
if (aIsMainThread) {
|
||||||
mCxPusher.PushNull();
|
mCxPusher.construct(nullptr, /* aAllowNull = */ true);
|
||||||
}
|
}
|
||||||
mStack.PushSystem();
|
mStack.PushSystem();
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
dom::ScriptSettingsStack& mStack;
|
dom::ScriptSettingsStack& mStack;
|
||||||
dom::ScriptSettingsStackEntry mEntry;
|
dom::ScriptSettingsStackEntry mEntry;
|
||||||
nsCxPusher mCxPusher;
|
mozilla::Maybe<AutoCxPusher> mCxPusher;
|
||||||
mozilla::Maybe<JSAutoCompartment> mAc; // This can de-Maybe-fy when mCxPusher
|
mozilla::Maybe<JSAutoCompartment> mAc; // This can de-Maybe-fy when mCxPusher
|
||||||
// goes away.
|
// goes away.
|
||||||
};
|
};
|
||||||
@ -111,7 +111,7 @@ public:
|
|||||||
~AutoSystemCaller();
|
~AutoSystemCaller();
|
||||||
private:
|
private:
|
||||||
dom::ScriptSettingsStack& mStack;
|
dom::ScriptSettingsStack& mStack;
|
||||||
nsCxPusher mCxPusher;
|
mozilla::Maybe<AutoCxPusher> mCxPusher;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
|
Loading…
Reference in New Issue
Block a user