diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/saved-stacks/bug1813533.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/saved-stacks/bug1813533.js b/js/src/jit-test/tests/saved-stacks/bug1813533.js new file mode 100644 index 0000000000..e16587413c --- /dev/null +++ b/js/src/jit-test/tests/saved-stacks/bug1813533.js @@ -0,0 +1,22 @@ +async function foo() { + // Suspend this function until later. + await undefined; + + // Capture the stack using JS::AllFrames. + saveStack(); + + // Capture the stack using JS::FirstSubsumedFrame. + var g = newGlobal({principal: {}}); + captureFirstSubsumedFrame(g); +} + +// Invoke foo. This will capture the stack and mark the bit +// on the top-level script, but we clear it below. +foo(); + +// Tier up to blinterp, clearing the hasCachedSavedFrame bit +// on the top-level script. +for (var i = 0; i < 20; i++) {} + +// Continue execution of foo. +drainJobQueue(); |