mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Followup for bug 534341 (XPConnect should not unroot globals of non-main thread contexts). r=bent, sr=jst.
--HG-- extra : rebase_source : 1a21a5b4646b0d1bd4b2a20bbbe460bba7fc78fc
This commit is contained in:
parent
48bc8e7aca
commit
812feed9d8
@ -444,7 +444,7 @@ void XPCJSRuntime::UnrootContextGlobals()
|
||||
{
|
||||
NS_ASSERTION(!JS_HAS_OPTION(acx, JSOPTION_UNROOTED_GLOBAL),
|
||||
"unrooted global should be set only during CC");
|
||||
if(XPCPerThreadData::IsMainThreadContext(acx) &&
|
||||
if(XPCPerThreadData::IsMainThread(acx) &&
|
||||
nsXPConnect::GetXPConnect()->GetRequestDepth(acx) == 0)
|
||||
{
|
||||
JS_ClearNewbornRoots(acx);
|
||||
|
@ -3441,11 +3441,6 @@ public:
|
||||
return GetDataImpl(cx);
|
||||
}
|
||||
|
||||
static inline JSBool IsMainThreadContext(JSContext *cx)
|
||||
{
|
||||
return cx->thread == sMainJSThread;
|
||||
}
|
||||
|
||||
static void CleanupAllThreads();
|
||||
|
||||
~XPCPerThreadData();
|
||||
|
Loading…
Reference in New Issue
Block a user