Bug 1102498 - "SavedStacks sees extra frame on stack when resuming generator" [r=nfitzgerald]

--HG--
extra : rebase_source : 5e83c965f69fc0c129745514023c220b31419aee
This commit is contained in:
Jan de Mooij 2014-11-21 06:44:00 -08:00
parent 07e906c474
commit fc1173705d

View File

@ -8,9 +8,12 @@ const { value: frame } = (function iife1() {
}()).next();
}());
assertEq(frame.functionDisplayName, "iife2");
assertEq(frame.parent.functionDisplayName, "generator");
assertEq(frame.parent.parent.functionDisplayName, "next");
assertEq(frame.parent.parent.parent.functionDisplayName, "iife1");
assertEq(frame.parent.parent.parent.parent.functionDisplayName, null);
assertEq(frame.parent.parent.parent.parent.parent, null);
// Bug 1102498 - toString does not include self-hosted frames, which can appear
// depending on GC timing. This may end up changing in the future, see
// bug 1103155.
var lines = frame.toString().split("\n");
assertEq(lines[0].startsWith("iife2@"), true);
assertEq(lines[1].startsWith("generator@"), true);
assertEq(lines[2].startsWith("iife1@"), true);
assertEq(lines[3].startsWith("@"), true);