From 528dc79f841cb3bf47261a3ddc200aedbb1a1ce4 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Tue, 22 Sep 2015 14:03:19 +0100 Subject: [PATCH] Bug 1191576 - Fix JIT invalidation spew to work when called while compacting r=terrence --- js/src/jit-test/tests/gc/bug-1191576.js | 17 +++++++++++++++++ js/src/jit/Ion.cpp | 8 +++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 js/src/jit-test/tests/gc/bug-1191576.js diff --git a/js/src/jit-test/tests/gc/bug-1191576.js b/js/src/jit-test/tests/gc/bug-1191576.js new file mode 100644 index 000000000000..6a3369cc424f --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-1191576.js @@ -0,0 +1,17 @@ +// |jit-test| allow-oom + +if (!('gczeal' in this && 'oomAfterAllocations' in this)) + quit(); + +var lfcode = new Array(); +gczeal(14); +loadFile(` +for each(let e in newGlobal()) { + if (oomAfterAllocations(100)) + continue; +} +`); +function loadFile(lfVarx) { + for (lfLocal in this) {} + evaluate(lfVarx); +} diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp index d7c875436960..381cfc33891a 100644 --- a/js/src/jit/Ion.cpp +++ b/js/src/jit/Ion.cpp @@ -2839,9 +2839,11 @@ InvalidateActivation(FreeOp* fop, const JitActivationIterator& activations, bool type = "Baseline"; else if (it.isBailoutJS()) type = "Bailing"; - JitSpew(JitSpew_IonInvalidate, "#%d %s JS frame @ %p, %s:%" PRIuSIZE " (fun: %p, script: %p, pc %p)", - frameno, type, it.fp(), it.script()->filename(), it.script()->lineno(), - it.maybeCallee(), (JSScript*)it.script(), it.returnAddressToFp()); + JitSpew(JitSpew_IonInvalidate, + "#%d %s JS frame @ %p, %s:%" PRIuSIZE " (fun: %p, script: %p, pc %p)", + frameno, type, it.fp(), it.script()->maybeForwardedFilename(), + it.script()->lineno(), it.maybeCallee(), (JSScript*)it.script(), + it.returnAddressToFp()); break; } case JitFrame_IonStub: