Prevent GC from occuring during IC linking (bug 837714, r=bhackett).
authorDavid Anderson <danderson@mozilla.com>
Thu, 21 Feb 2013 13:52:09 -0800
changeset 123090 e6c86595edbadd844e3388072cb8a3c819a174d8
parent 123089 a0d8482e5532348572e05f63bc07e593cba81c84
child 123091 a212819b76b7c9e85fedc31aeda7ebdf58ce7fd1
push id24372
push useremorley@mozilla.com
push dateWed, 27 Feb 2013 13:22:59 +0000
treeherdermozilla-central@0a91da5f5eab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs837714
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Prevent GC from occuring during IC linking (bug 837714, r=bhackett).
js/src/ion/IonLinker.h
--- a/js/src/ion/IonLinker.h
+++ b/js/src/ion/IonLinker.h
@@ -9,32 +9,34 @@
 #define jsion_linker_h__
 
 #include "jscntxt.h"
 #include "jscompartment.h"
 #include "ion/IonCode.h"
 #include "ion/IonCompartment.h"
 #include "assembler/jit/ExecutableAllocator.h"
 #include "ion/IonMacroAssembler.h"
+#include "jsgcinlines.h"
 
 namespace js {
 namespace ion {
 
 static const int CodeAlignment = 8;
 class Linker
 {
     MacroAssembler &masm;
 
     IonCode *fail(JSContext *cx) {
         js_ReportOutOfMemory(cx);
         return NULL;
     }
 
     IonCode *newCode(JSContext *cx, IonCompartment *comp) {
         AssertCanGC();
+        gc::AutoSuppressGC suppressGC(cx);
         if (masm.oom())
             return fail(cx);
 
         JSC::ExecutablePool *pool;
         size_t bytesNeeded = masm.bytesNeeded() + sizeof(IonCode *) + CodeAlignment;
         if (bytesNeeded >= MAX_BUFFER_SIZE)
             return fail(cx);