Bug 1620646 - Changes fixed for test failure. r=jorendorff
authorSonia Singla <soniasingla.1812@gmail.com>
Thu, 07 May 2020 21:31:12 +0000
changeset 528702 1f11ec544f47a503d67a0048a736a1e77489130c
parent 528701 0a20dd1935d76508b35f7c875eceecb93aad8a9c
child 528703 c353fa62a27b965c34c7c8008a22d1d42ecaa3dc
push id37393
push userrmaries@mozilla.com
push dateFri, 08 May 2020 03:38:07 +0000
treeherdermozilla-central@ead8f0367372 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1620646
milestone78.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 1620646 - Changes fixed for test failure. r=jorendorff Differential Revision: https://phabricator.services.mozilla.com/D73436
js/src/jit-test/tests/debug/Object-forceLexicalInitializationByName.js
js/src/jit-test/tests/debug/optimized-out-03.js
js/src/jit-test/tests/debug/optimized-out-arrow-this.js
js/src/jit-test/tests/parser/redeclaration-message.js
js/src/js.msg
js/src/tests/non262/extensions/regress-465443.js
js/src/tests/non262/regress/regress-452498-112.js
--- a/js/src/jit-test/tests/debug/Object-forceLexicalInitializationByName.js
+++ b/js/src/jit-test/tests/debug/Object-forceLexicalInitializationByName.js
@@ -13,17 +13,17 @@ function evalErrorStr(global, evalString
     } catch (e) {
         return e.toString();
     }
 }
 
 
 assertEq(evalErrorStr(g, "let y = IDONTEXIST;"), "ReferenceError: IDONTEXIST is not defined");
 assertEq(evalErrorStr(g, "y = 1;"),
-         "ReferenceError: can't access lexical declaration `y' before initialization");
+         "ReferenceError: can't access lexical declaration 'y' before initialization");
 
 // Here we flip the uninitialized binding to undfined.
 assertEq(gw.forceLexicalInitializationByName("y"), true);
 assertEq(g.evaluate("y"), undefined);
 g.evaluate("y = 1;");
 assertEq(g.evaluate("y"), 1);
 
 // Ensure that bogus bindings return false, but otherwise trigger no error or
--- a/js/src/jit-test/tests/debug/optimized-out-03.js
+++ b/js/src/jit-test/tests/debug/optimized-out-03.js
@@ -7,17 +7,17 @@ if (!jitTogglesMatch(Opts_IonEagerNoOfft
 
 withJitOptions(Opts_IonEagerNoOffthreadCompilation, function() {
   var dbgGlobal = newGlobal({newCompartment: true});
   var dbg = new dbgGlobal.Debugger();
   dbg.addDebuggee(this);
 
   function f() {
     assertEq(dbg.getNewestFrame().older.eval("print(a)").throw.unsafeDereference().toString(),
-             "Error: variable `a' has been optimized out");
+             "Error: variable 'a' has been optimized out");
   }
 
   // Test optimized out binding in function scope.
   (function () {
     var a = 1;
     for (var i = 0; i < 1; i++) { f(); a = 2; }
   })();
 
--- a/js/src/jit-test/tests/debug/optimized-out-arrow-this.js
+++ b/js/src/jit-test/tests/debug/optimized-out-arrow-this.js
@@ -30,9 +30,9 @@ function enterFrame(frame) {
 };
 
 dbg.onEnterFrame = enterFrame;
 
 g.f();
 
 assertEq(errors.length, 1);
 assertEq(errors[0].unsafeDereference().toString(),
-         "Error: variable `this' has been optimized out");
+         "Error: variable 'this' has been optimized out");
--- a/js/src/jit-test/tests/parser/redeclaration-message.js
+++ b/js/src/jit-test/tests/parser/redeclaration-message.js
@@ -1,10 +1,10 @@
 var aVar = 56;
 try {
     console.log(aLet);
     let aLet = 56;
     // We cannot add `caught` variable on the toplevel for this testcase.
     // We use assertEq here to catch non-throwing case.
     assertEq(true, false);
 } catch (e) {
-    assertEq(e.message, "can't access lexical declaration `aLet' before initialization");
+    assertEq(e.message, "can't access lexical declaration 'aLet' before initialization");
 }
--- a/js/src/js.msg
+++ b/js/src/js.msg
@@ -122,19 +122,19 @@ MSG_DEF(JSMSG_JSON_CYCLIC_VALUE,       0
 // Runtime errors
 MSG_DEF(JSMSG_ASSIGN_TO_CALL,          0, JSEXN_REFERENCEERR, "cannot assign to function call")
 MSG_DEF(JSMSG_BAD_INSTANCEOF_RHS,      1, JSEXN_TYPEERR, "invalid 'instanceof' operand {0}")
 MSG_DEF(JSMSG_BAD_PROTOTYPE,           1, JSEXN_TYPEERR, "'prototype' property of {0} is not an object")
 MSG_DEF(JSMSG_IN_NOT_OBJECT,           1, JSEXN_TYPEERR, "right-hand side of 'in' should be an object, got {0}")
 MSG_DEF(JSMSG_IN_STRING,               2, JSEXN_TYPEERR, "cannot use 'in' operator to search for {0} in {1}")
 MSG_DEF(JSMSG_TOO_MANY_CON_SPREADARGS, 0, JSEXN_RANGEERR, "too many constructor arguments")
 MSG_DEF(JSMSG_TOO_MANY_FUN_SPREADARGS, 0, JSEXN_RANGEERR, "too many function arguments")
-MSG_DEF(JSMSG_UNINITIALIZED_LEXICAL,   1, JSEXN_REFERENCEERR, "can't access lexical declaration `{0}' before initialization")
-MSG_DEF(JSMSG_BAD_CONST_ASSIGN,        1, JSEXN_TYPEERR, "invalid assignment to const `{0}'")
-MSG_DEF(JSMSG_CANT_DECLARE_GLOBAL_BINDING, 2, JSEXN_TYPEERR, "cannot declare global binding `{0}': {1}")
+MSG_DEF(JSMSG_UNINITIALIZED_LEXICAL,   1, JSEXN_REFERENCEERR, "can't access lexical declaration '{0}' before initialization")
+MSG_DEF(JSMSG_BAD_CONST_ASSIGN,        1, JSEXN_TYPEERR, "invalid assignment to const '{0}'")
+MSG_DEF(JSMSG_CANT_DECLARE_GLOBAL_BINDING, 2, JSEXN_TYPEERR, "cannot declare global binding '{0}': {1}")
 
 // Date
 MSG_DEF(JSMSG_INVALID_DATE,            0, JSEXN_RANGEERR, "invalid date")
 MSG_DEF(JSMSG_BAD_TOISOSTRING_PROP,    0, JSEXN_TYPEERR, "toISOString property is not callable")
 
 // String
 MSG_DEF(JSMSG_BAD_URI,                 0, JSEXN_URIERR, "malformed URI sequence")
 MSG_DEF(JSMSG_INVALID_NORMALIZE_FORM,  0, JSEXN_RANGEERR, "form must be one of 'NFC', 'NFD', 'NFKC', or 'NFKD'")
@@ -500,29 +500,29 @@ MSG_DEF(JSMSG_DEBUG_LOOP,              0
 MSG_DEF(JSMSG_DEBUG_NOT_DEBUGGEE,      2, JSEXN_ERR, "{0} is not a debuggee {1}")
 MSG_DEF(JSMSG_DEBUG_NOT_DEBUGGING,     0, JSEXN_ERR, "can't set breakpoint: script global is not a debuggee")
 MSG_DEF(JSMSG_DEBUG_NOT_IDLE,          0, JSEXN_ERR, "can't start debugging: a debuggee script is on the stack")
 MSG_DEF(JSMSG_DEBUG_NOT_ON_STACK,      1, JSEXN_ERR, "{0} is not on stack")
 MSG_DEF(JSMSG_DEBUG_NOT_ON_STACK_OR_SUSPENDED, 1, JSEXN_ERR, "{0} is not on stack or suspended")
 MSG_DEF(JSMSG_DEBUG_NO_ENV_OBJECT,     0, JSEXN_TYPEERR, "declarative Environments don't have binding objects")
 MSG_DEF(JSMSG_DEBUG_PROTO,             2, JSEXN_TYPEERR, "{0}.prototype is not a valid {1} instance")
 MSG_DEF(JSMSG_DEBUG_WRONG_OWNER,       1, JSEXN_TYPEERR, "{0} belongs to a different Debugger")
-MSG_DEF(JSMSG_DEBUG_OPTIMIZED_OUT,     1, JSEXN_ERR, "variable `{0}' has been optimized out")
+MSG_DEF(JSMSG_DEBUG_OPTIMIZED_OUT,     1, JSEXN_ERR, "variable '{0}' has been optimized out")
 MSG_DEF(JSMSG_DEBUG_OPTIMIZED_OUT_FUN, 0, JSEXN_ERR, "function is optimized out")
 MSG_DEF(JSMSG_DEBUG_FORCED_RETURN_DISALLOWED, 0, JSEXN_TYPEERR, "can't force return from a generator before the initial yield")
 MSG_DEF(JSMSG_DEBUG_RESUMPTION_VALUE_DISALLOWED, 0, JSEXN_TYPEERR, "resumption values are disallowed in this hook")
 MSG_DEF(JSMSG_DEBUG_VARIABLE_NOT_FOUND,0, JSEXN_TYPEERR, "variable not found in environment")
 MSG_DEF(JSMSG_DEBUG_WRAPPER_IN_WAY,    3, JSEXN_TYPEERR, "{0} is {1}{2}a global object, but a direct reference is required")
-MSG_DEF(JSMSG_DEBUGGEE_WOULD_RUN,      2, JSEXN_DEBUGGEEWOULDRUN, "debuggee `{0}:{1}' would run")
+MSG_DEF(JSMSG_DEBUGGEE_WOULD_RUN,      2, JSEXN_DEBUGGEEWOULDRUN, "debuggee '{0}:{1}' would run")
 MSG_DEF(JSMSG_NOT_CALLABLE_OR_UNDEFINED, 0, JSEXN_TYPEERR, "value is not a function or undefined")
 MSG_DEF(JSMSG_NOT_TRACKING_ALLOCATIONS, 1, JSEXN_ERR, "Cannot call {0} without setting trackingAllocationSites to true")
 MSG_DEF(JSMSG_OBJECT_METADATA_CALLBACK_ALREADY_SET, 0, JSEXN_ERR, "Cannot track object allocation, because other tools are already doing so")
 MSG_DEF(JSMSG_QUERY_INNERMOST_WITHOUT_LINE_URL, 0, JSEXN_TYPEERR, "findScripts query object with 'innermost' property must have 'line' and either 'displayURL', 'url', or 'source'")
 MSG_DEF(JSMSG_QUERY_LINE_WITHOUT_URL, 0, JSEXN_TYPEERR, "findScripts query object has 'line' property, but no 'displayURL', 'url', or 'source' property")
-MSG_DEF(JSMSG_DEBUG_CANT_SET_OPT_ENV, 1, JSEXN_REFERENCEERR, "can't set `{0}' in an optimized-out environment")
+MSG_DEF(JSMSG_DEBUG_CANT_SET_OPT_ENV, 1, JSEXN_REFERENCEERR, "can't set '{0}' in an optimized-out environment")
 MSG_DEF(JSMSG_DEBUG_INVISIBLE_COMPARTMENT, 0, JSEXN_TYPEERR, "object in compartment marked as invisible to Debugger")
 MSG_DEF(JSMSG_DEBUG_CENSUS_BREAKDOWN,  1, JSEXN_TYPEERR, "unrecognized 'by' value in takeCensus breakdown: {0}")
 MSG_DEF(JSMSG_DEBUG_PROMISE_NOT_RESOLVED, 0, JSEXN_TYPEERR, "Promise hasn't been resolved")
 MSG_DEF(JSMSG_DEBUG_PROMISE_NOT_FULFILLED, 0, JSEXN_TYPEERR, "Promise hasn't been fulfilled")
 MSG_DEF(JSMSG_DEBUG_PROMISE_NOT_REJECTED, 0, JSEXN_TYPEERR, "Promise hasn't been rejected")
 MSG_DEF(JSMSG_DEBUG_NO_BINARY_SOURCE,  0, JSEXN_ERR, "WebAssembly binary source is not available")
 
 // Testing functions
--- a/js/src/tests/non262/extensions/regress-465443.js
+++ b/js/src/tests/non262/extensions/regress-465443.js
@@ -14,17 +14,17 @@ var expect = '';
 test();
 //-----------------------------------------------------------------------------
 
 function test()
 {
   printBugNumber(BUGNUMBER);
   printStatus (summary);
 
-  expect = 'TypeError: invalid assignment to const `b\'';
+  expect = 'TypeError: invalid assignment to const \'b\'';
 
 
   try
   {
     eval('(function () { const b = 16; var out = []; for (b of [true, "", true, "", true, ""]) out.push(b >> 1) })();');
   }
   catch(ex)
   {
--- a/js/src/tests/non262/regress/regress-452498-112.js
+++ b/js/src/tests/non262/regress/regress-452498-112.js
@@ -16,17 +16,17 @@ test();
 
 function test()
 {
   printBugNumber(BUGNUMBER);
   printStatus (summary);
 
 // ------- Comment #112 From Jesse Ruderman
 
-  expect = 'ReferenceError: can\'t access lexical declaration `q\' before initialization';
+  expect = 'ReferenceError: can\'t access lexical declaration \'q\' before initialization';
 
   try
   {
     q = new Function("(function() { q(3); })(); const q = undefined;"); q();
   }
   catch(ex)
   {
     actual = ex + '';