mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 868130 - Make sure to push the context in the ObjectWrapperChild constructor. r=gabor
This commit is contained in:
parent
2e08885c40
commit
e8d172db93
@ -115,6 +115,7 @@ ObjectWrapperChild::CheckOperation(JSContext*,
|
||||
ObjectWrapperChild::ObjectWrapperChild(JSContext* cx, JSObject* obj)
|
||||
: mObj(obj)
|
||||
{
|
||||
AutoContextPusher acp(cx);
|
||||
JSAutoRequest request(cx);
|
||||
#ifdef DEBUG
|
||||
bool added =
|
||||
@ -127,6 +128,7 @@ void
|
||||
ObjectWrapperChild::ActorDestroy(ActorDestroyReason why)
|
||||
{
|
||||
JSContext* cx = Manager()->GetContext();
|
||||
AutoContextPusher acp(cx);
|
||||
JSAutoRequest request(cx);
|
||||
JS_RemoveObjectRoot(cx, &mObj);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user