Bug 1283855 part 10 - Make some GC callback APIs take JSContext instead of JSRuntime. r=jonco
This commit is contained in:
@@ -34,7 +34,8 @@ JavaScriptChild::JavaScriptChild(JSRuntime* rt)
|
||||
|
||||
JavaScriptChild::~JavaScriptChild()
|
||||
{
|
||||
JS_RemoveWeakPointerZoneGroupCallback(rt_, UpdateChildWeakPointersBeforeSweepingZoneGroup);
|
||||
JSContext* cx = JS_GetContext(rt_);
|
||||
JS_RemoveWeakPointerZoneGroupCallback(cx, UpdateChildWeakPointersBeforeSweepingZoneGroup);
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -45,7 +46,8 @@ JavaScriptChild::init()
|
||||
if (!WrapperAnswer::init())
|
||||
return false;
|
||||
|
||||
JS_AddWeakPointerZoneGroupCallback(rt_, UpdateChildWeakPointersBeforeSweepingZoneGroup, this);
|
||||
JSContext* cx = JS_GetContext(rt_);
|
||||
JS_AddWeakPointerZoneGroupCallback(cx, UpdateChildWeakPointersBeforeSweepingZoneGroup, this);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user