diff --git a/js/src/jit-test/tests/saved-stacks/generators.js b/js/src/jit-test/tests/saved-stacks/generators.js index 7d75c5685ccc..2878997580a9 100644 --- a/js/src/jit-test/tests/saved-stacks/generators.js +++ b/js/src/jit-test/tests/saved-stacks/generators.js @@ -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);