Bug 1406897: Use JitFrameIter::operator++ in OnlyJSJitFrameIter::settle; r=luke
authorBenjamin Bouvier <benj@benj.me>
Wed, 11 Oct 2017 16:45:32 +0200
changeset 385579 34557043bd33edddbe98e158d4f1dfcabfbb3f37
parent 385578 ab5dcb5b8f1f09cff4c52880ea0c1281cce8d77d
child 385580 e0c112aed854cc1a44cb5a00553debf85ab74ed0
push id32662
push userryanvm@gmail.com
push dateWed, 11 Oct 2017 21:53:47 +0000
treeherdermozilla-central@3d918ff5d634 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1406897
milestone58.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 1406897: Use JitFrameIter::operator++ in OnlyJSJitFrameIter::settle; r=luke
js/src/jit-test/tests/wasm/regress/onlyjsiter-while-wasm.js
js/src/vm/Stack.h
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/wasm/regress/onlyjsiter-while-wasm.js
@@ -0,0 +1,14 @@
+if (typeof evalInCooperativeThread === 'undefined')
+    return;
+
+try {
+    evalInCooperativeThread(`
+        var { f } = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(\`
+        (module
+         (func $f (export "f") call $f)
+        )
+        \`))).exports;
+        gczeal(9);
+        f();
+    `);
+} catch(e) {}
--- a/js/src/vm/Stack.h
+++ b/js/src/vm/Stack.h
@@ -1816,17 +1816,17 @@ class JitFrameIter
 
 // A JitFrameIter that skips all the non-JSJit frames, skipping interleaved
 // frames of any another kind.
 
 class OnlyJSJitFrameIter : public JitFrameIter
 {
     void settle() {
         while (!done() && !isJSJit())
-            ++(*this);
+            JitFrameIter::operator++();
     }
 
   public:
     explicit OnlyJSJitFrameIter(jit::JitActivation* act);
     explicit OnlyJSJitFrameIter(JSContext* cx);
     explicit OnlyJSJitFrameIter(const ActivationIterator& cx);
 
     void operator++() {