Fix ObjectWrapperChild bustage

This commit is contained in:
Robert Sayre
2010-07-02 18:17:06 -07:00
parent 24c91b1a80
commit 1ba9c43470
2 changed files with 3 additions and 4 deletions

View File

@@ -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