зеркало из https://github.com/mozilla/pjs.git
Fix ObjectWrapperChild bustage
This commit is contained in:
Родитель
0fb4de7a31
Коммит
3e92f5449e
|
@ -152,8 +152,7 @@ ObjectWrapperChild::ObjectWrapperChild(JSContext* cx, JSObject* obj)
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
bool added =
|
bool added =
|
||||||
#endif
|
#endif
|
||||||
JS_AddNamedRoot(cx, (void*)&mObj,
|
JS_AddObjectRoot(cx, &mObj);
|
||||||
"mozilla::jsipc::ObjectWrapperChild-rooted JSObject*");
|
|
||||||
NS_ASSERTION(added, "ObjectWrapperChild constructor failed to root JSObject*");
|
NS_ASSERTION(added, "ObjectWrapperChild constructor failed to root JSObject*");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +161,7 @@ ObjectWrapperChild::ActorDestroy(ActorDestroyReason why)
|
||||||
{
|
{
|
||||||
JSContext* cx = Manager()->GetContext();
|
JSContext* cx = Manager()->GetContext();
|
||||||
JSAutoRequest request(cx);
|
JSAutoRequest request(cx);
|
||||||
JS_RemoveRoot(cx, (void*)&mObj);
|
JS_RemoveObjectRoot(cx, &mObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -67,7 +67,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
JSObject* const mObj;
|
JSObject* mObj;
|
||||||
|
|
||||||
bool JSObject_to_JSVariant(JSContext* cx, JSObject* from, JSVariant* to);
|
bool JSObject_to_JSVariant(JSContext* cx, JSObject* from, JSVariant* to);
|
||||||
bool jsval_to_JSVariant(JSContext* cx, jsval from, JSVariant* to);
|
bool jsval_to_JSVariant(JSContext* cx, jsval from, JSVariant* to);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче