Bug 1283855 part 12 - Make some GC APIs take JSContext instead of JSRuntime. r=sfink

This commit is contained in:
Jan de Mooij
2016-07-05 14:35:21 +02:00
parent 24d5a9da4c
commit 22f78cde9e
14 changed files with 51 additions and 50 deletions

View File

@@ -517,7 +517,7 @@ CycleCollectedJSRuntime::Initialize(JSRuntime* aParentRuntime,
MOZ_CRASH("JS_AddExtraGCRootsTracer failed");
}
JS_SetGrayGCRootsTracer(mJSRuntime, TraceGrayJS, this);
JS_SetGCCallback(mJSRuntime, GCCallback, this);
JS_SetGCCallback(mJSContext, GCCallback, this);
mPrevGCSliceCallback = JS::SetGCSliceCallback(mJSRuntime, GCSliceCallback);
if (NS_IsMainThread()) {
@@ -534,7 +534,7 @@ CycleCollectedJSRuntime::Initialize(JSRuntime* aParentRuntime,
JS_SetObjectsTenuredCallback(mJSContext, JSObjectsTenuredCb, this);
JS::SetOutOfMemoryCallback(mJSContext, OutOfMemoryCallback, this);
JS::SetLargeAllocationFailureCallback(mJSRuntime,
JS::SetLargeAllocationFailureCallback(mJSContext,
LargeAllocationFailureCallback, this);
JS_SetDestroyZoneCallback(mJSContext, XPCStringConvert::FreeZoneCache);
JS_SetSweepZoneCallback(mJSContext, XPCStringConvert::ClearZoneCache);