Bug 1257387 - Move OOM callback annotation to the common runtime for workers; r=mccr8

This commit is contained in:
Terrence Cole
2016-09-13 10:57:07 -07:00
parent a20173e54d
commit ed6cbf49d1
2 changed files with 4 additions and 4 deletions

View File

@@ -3493,10 +3493,6 @@ XPCJSRuntime::Initialize()
js::SetActivityCallback(cx, ActivityCallback, this);
JS_SetInterruptCallback(cx, InterruptCallback);
js::SetWindowProxyClass(cx, &OuterWindowProxyClass);
#ifdef MOZ_CRASHREPORTER
js::AutoEnterOOMUnsafeRegion::setAnnotateOOMAllocationSizeCallback(
CrashReporter::AnnotateOOMAllocationSize);
#endif
// The JS engine needs to keep the source code around in order to implement
// Function.prototype.toSource(). It'd be nice to not have to do this for

View File

@@ -539,6 +539,10 @@ CycleCollectedJSRuntime::Initialize(JSContext* aParentContext,
JS_SetSweepZoneCallback(mJSContext, XPCStringConvert::ClearZoneCache);
JS::SetBuildIdOp(mJSContext, GetBuildId);
JS::SetWarningReporter(mJSContext, MozCrashWarningReporter);
#ifdef MOZ_CRASHREPORTER
js::AutoEnterOOMUnsafeRegion::setAnnotateOOMAllocationSizeCallback(
CrashReporter::AnnotateOOMAllocationSize);
#endif
static js::DOMCallbacks DOMcallbacks = {
InstanceClassHasProtoAtDepth