Bug 1283855 part 10 - Make some GC callback APIs take JSContext instead of JSRuntime. r=jonco

This commit is contained in:
Jan de Mooij
2016-07-05 14:35:16 +02:00
parent 2c3e8d241a
commit 7db749e17a
7 changed files with 44 additions and 43 deletions

View File

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