mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 868130 - Make sure to push the context in the ObjectWrapperChild constructor. r=gabor
This commit is contained in:
parent
750d6364fd
commit
cfe8b9c5d2
@ -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