Bug 723445 - StackIter should ExpandInlineFrames in all compartments, not just the current one (r=bhackett)

--HG--
extra : rebase_source : 4dfa9962367f0cc6cf3b5657c9fbc5a425f15f41
This commit is contained in:
Luke Wagner 2012-04-09 09:11:26 -07:00
parent a2d4142fe0
commit 1ec6909fdb
2 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,10 @@
var global = newGlobal('new-compartment');
global.eval("function f(b) { if (b) { new Error }; }");
function f(b) { global.f(b) }
function g(b) { f(b) }
function h() {
for (var i = 0; i < 1000; ++i)
g(i > 900);
}
h();

View File

@ -1198,7 +1198,9 @@ StackIter::StackIter(JSContext *cx, SavedOption savedOption)
savedOption_(savedOption)
{
#ifdef JS_METHODJIT
mjit::ExpandInlineFrames(cx->compartment);
CompartmentVector &v = cx->runtime->compartments;
for (size_t i = 0; i < v.length(); i++)
mjit::ExpandInlineFrames(v[i]);
#endif
if (StackSegment *seg = cx->stack.seg_) {