Bug 1145997 - Suppress GC in debugger GC callback r=sfink

This commit is contained in:
Jon Coppeard 2015-04-01 10:09:56 +01:00
parent 8e0dc8b734
commit 67ba4cd61f

View File

@ -874,6 +874,10 @@ Debugger::wrapDebuggeeValue(JSContext* cx, MutableHandleValue vp)
JSObject*
Debugger::translateGCStatistics(JSContext* cx, const gcstats::Statistics& stats)
{
// If this functions triggers a GC then the statistics object will change
// underneath us.
gc::AutoSuppressGC suppressGC(cx);
RootedObject obj(cx, NewBuiltinClassInstance<PlainObject>(cx));
if (!obj)
return nullptr;