mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fixing bug 414658. Make sure to not use a context from a different thread when calling functions on a wrapped JS object. r+sr=peterv@propagandism.org
This commit is contained in:
parent
30be9b9e5c
commit
58f7d84c76
@ -516,7 +516,15 @@ GetContextFromObject(JSObject *obj)
|
||||
XPCWrappedNativeScope* scope =
|
||||
XPCWrappedNativeScope::FindInJSObjectScope(ccx, obj);
|
||||
XPCContext *xpcc = scope->GetContext();
|
||||
return xpcc ? xpcc->GetJSContext() : nsnull;
|
||||
|
||||
if(xpcc)
|
||||
{
|
||||
JSContext *cx = xpcc->GetJSContext();
|
||||
if(cx->thread->id == js_CurrentThreadId())
|
||||
return cx;
|
||||
}
|
||||
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
Reference in New Issue
Block a user