Bug 1530031 - Summary: Allow ARM64 Simulator to return a different error message. r=nbp
authorSean Stangl <sean.stangl@gmail.com>
Wed, 27 Feb 2019 10:52:42 +0000
changeset 461489 5580674b0d5fb1fe26d9d47b56f49e8e28635804
parent 461488 4d4fca2edcb5c8184a3eea20366c43cb8d2a59cb
child 461490 e767399d23cc15bfeae586546f3b9cfb9df573e5
push id35625
push usercsabou@mozilla.com
push dateThu, 28 Feb 2019 10:55:23 +0000
treeherdermozilla-central@fd53d5e80bca [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs1530031
milestone67.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 1530031 - Summary: Allow ARM64 Simulator to return a different error message. r=nbp Differential Revision: https://phabricator.services.mozilla.com/D21288
js/src/jsapi-tests/testChromeBuffer.cpp
--- a/js/src/jsapi-tests/testChromeBuffer.cpp
+++ b/js/src/jsapi-tests/testChromeBuffer.cpp
@@ -154,21 +154,27 @@ BEGIN_TEST(testChromeBuffer) {
 
     JS::AutoObjectVector emptyScopeChain(cx);
     CHECK(JS::CompileFunctionUtf8(cx, emptyScopeChain, options, "untrusted", 1,
                                   &paramName, bytes, strlen(bytes), &fun));
     CHECK(JS_DefineProperty(cx, global, "untrusted", fun, JSPROP_ENUMERATE));
 
     JS::RootedValue rval(cx);
     CHECK(JS_CallFunction(cx, nullptr, fun, JS::HandleValueArray(v), &rval));
+#ifndef JS_SIMULATOR_ARM64
+    // The ARM64 simulator does not share a common implementation with the other
+    // simulators, and has slightly different end-of-stack behavior. Instead of
+    // failing with "too much recursion," it executes one more function call and
+    // fails with a type error. This behavior is not incorrect.
     bool match;
     CHECK(JS_StringEqualsAscii(
         cx, rval.toString(), "From trusted: InternalError: too much recursion",
         &match));
     CHECK(match);
+#endif
   }
 
   {
     {
       JSAutoRealm ar(cx, trusted_glob);
 
       const char* bytes = "return 42";