Bug 1404714 - inIon() should return false when in wasm. r=nbp, a=test-only
☠☠ backed out by c8ec00d6c623 ☠ ☠
authorBenjamin Bouvier <benj@benj.me>
Tue, 03 Oct 2017 19:57:05 +0200
changeset 434603 d5f57ad0a0fb5b362ed6abc150aa1038a1555fa5
parent 434602 99093bf0203f20a8be90862946acb21d3926af13
child 434604 9aaa0404ca567a6bae5dd2e6c78805efe7966c2c
push id1567
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 12:36:05 +0000
treeherdermozilla-release@e512c14a0406 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp, test-only
bugs1404714
milestone57.0
Bug 1404714 - inIon() should return false when in wasm. r=nbp, a=test-only MozReview-Commit-ID: 76qU9UjcROt
js/src/builtin/TestingFunctions.cpp
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -2194,16 +2194,23 @@ testingFunc_inIon(JSContext* cx, unsigne
         JSString* error = JS_NewStringCopyZ(cx, "Ion is disabled.");
         if (!error)
             return false;
 
         args.rval().setString(error);
         return true;
     }
 
+    if (cx->activation()->hasWasmExitFP()) {
+        // Exited through wasm. Note this is false when the fast wasm->jit exit
+        // was taken, in which case we actually have jit frames on the stack.
+        args.rval().setBoolean(false);
+        return true;
+    }
+
     ScriptFrameIter iter(cx);
     if (!iter.done() && iter.isIon()) {
         // Reset the counter of the IonScript's script.
         jit::JSJitFrameIter jitIter(cx);
         ++jitIter;
         jitIter.script()->resetWarmUpResetCounter();
     } else {
         // Check if we missed multiple attempts at compiling the innermost script.