Bug 1102498 - "SavedStacks sees extra frame on stack when resuming generator" [r=nfitzgerald]
authorJan de Mooij <jdemooij>
Fri, 21 Nov 2014 06:44:00 -0800
changeset 241277 24ab00570a33bf0f3d4e05021a1dea97f1b8188a
parent 241276 276ed454c4cd4c994293003431bf3a357497a65d
child 241278 5d23df58a42fef07aa81169e7cfd5c0c562f2e27
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnfitzgerald
bugs1102498
milestone36.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
Bug 1102498 - "SavedStacks sees extra frame on stack when resuming generator" [r=nfitzgerald]
js/src/jit-test/tests/saved-stacks/generators.js
--- a/js/src/jit-test/tests/saved-stacks/generators.js
+++ b/js/src/jit-test/tests/saved-stacks/generators.js
@@ -3,14 +3,17 @@
 const { value: frame } = (function iife1() {
   return (function* generator() {
     yield (function iife2() {
       return saveStack();
     }());
   }()).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);