From cfe8b9c5d27bf551f22362fa10446d026c55d409 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Wed, 22 May 2013 10:05:24 -0600 Subject: [PATCH] Bug 868130 - Make sure to push the context in the ObjectWrapperChild constructor. r=gabor --- js/ipc/ObjectWrapperChild.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/ipc/ObjectWrapperChild.cpp b/js/ipc/ObjectWrapperChild.cpp index f69262d4d564..a8d490c90870 100644 --- a/js/ipc/ObjectWrapperChild.cpp +++ b/js/ipc/ObjectWrapperChild.cpp @@ -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); }