mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset b1f8365b8a92 (bug 1081038) for dt Test Failures on a CLOSED TREE
This commit is contained in:
parent
8077efd4ab
commit
345714ca5e
@ -463,22 +463,14 @@ AutoEntryScript::AutoEntryScript(nsIGlobalObject* aGlobalObject,
|
|||||||
aCx ? aCx : FindJSContext(aGlobalObject))
|
aCx ? aCx : FindJSContext(aGlobalObject))
|
||||||
, ScriptSettingsStackEntry(aGlobalObject, /* aCandidate = */ true)
|
, ScriptSettingsStackEntry(aGlobalObject, /* aCandidate = */ true)
|
||||||
, mWebIDLCallerPrincipal(nullptr)
|
, mWebIDLCallerPrincipal(nullptr)
|
||||||
, mIsMainThread(aIsMainThread)
|
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aGlobalObject);
|
MOZ_ASSERT(aGlobalObject);
|
||||||
MOZ_ASSERT_IF(!aCx, aIsMainThread); // cx is mandatory off-main-thread.
|
MOZ_ASSERT_IF(!aCx, aIsMainThread); // cx is mandatory off-main-thread.
|
||||||
MOZ_ASSERT_IF(aCx && aIsMainThread, aCx == FindJSContext(aGlobalObject));
|
MOZ_ASSERT_IF(aCx && aIsMainThread, aCx == FindJSContext(aGlobalObject));
|
||||||
if (aIsMainThread) {
|
|
||||||
nsContentUtils::EnterMicroTask();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AutoEntryScript::~AutoEntryScript()
|
AutoEntryScript::~AutoEntryScript()
|
||||||
{
|
{
|
||||||
if (mIsMainThread) {
|
|
||||||
nsContentUtils::LeaveMicroTask();
|
|
||||||
}
|
|
||||||
|
|
||||||
// GC when we pop a script entry point. This is a useful heuristic that helps
|
// GC when we pop a script entry point. This is a useful heuristic that helps
|
||||||
// us out on certain (flawed) benchmarks like sunspider, because it lets us
|
// us out on certain (flawed) benchmarks like sunspider, because it lets us
|
||||||
// avoid GCing during the timing loop.
|
// avoid GCing during the timing loop.
|
||||||
|
@ -330,7 +330,6 @@ private:
|
|||||||
// bit up the stack, and which will outlive us. So we know the principal
|
// bit up the stack, and which will outlive us. So we know the principal
|
||||||
// can't go away until then either.
|
// can't go away until then either.
|
||||||
nsIPrincipal* mWebIDLCallerPrincipal;
|
nsIPrincipal* mWebIDLCallerPrincipal;
|
||||||
bool mIsMainThread;
|
|
||||||
friend nsIPrincipal* GetWebIDLCallerPrincipal();
|
friend nsIPrincipal* GetWebIDLCallerPrincipal();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user