mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
Fix ObjectWrapperChild bustage
This commit is contained in:
parent
2fd899ed0f
commit
422d275bc6
@ -152,8 +152,7 @@ ObjectWrapperChild::ObjectWrapperChild(JSContext* cx, JSObject* obj)
|
||||
#ifdef DEBUG
|
||||
bool added =
|
||||
#endif
|
||||
JS_AddNamedRoot(cx, (void*)&mObj,
|
||||
"mozilla::jsipc::ObjectWrapperChild-rooted JSObject*");
|
||||
JS_AddObjectRoot(cx, &mObj);
|
||||
NS_ASSERTION(added, "ObjectWrapperChild constructor failed to root JSObject*");
|
||||
}
|
||||
|
||||
@ -162,7 +161,7 @@ ObjectWrapperChild::ActorDestroy(ActorDestroyReason why)
|
||||
{
|
||||
JSContext* cx = Manager()->GetContext();
|
||||
JSAutoRequest request(cx);
|
||||
JS_RemoveRoot(cx, (void*)&mObj);
|
||||
JS_RemoveObjectRoot(cx, &mObj);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
JSObject* const mObj;
|
||||
JSObject* mObj;
|
||||
|
||||
bool JSObject_to_JSVariant(JSContext* cx, JSObject* from, JSVariant* to);
|
||||
bool jsval_to_JSVariant(JSContext* cx, jsval from, JSVariant* to);
|
||||
|
Loading…
Reference in New Issue
Block a user