Bug 1339406 - Part 1: Remove Rhino specific functions from jstest harness. r=arai
authorAndré Bargull <andre.bargull@gmail.com>
Tue, 14 Feb 2017 10:26:06 -0800
changeset 342909 cce05a2b630810369ba6a342e2adcdc72e4dc32e
parent 342908 f450c9a5dac1da32d521265bbbff3fa721462bf4
child 342910 f34ed6a5b9cae8a4147fde4710ce7f9ec4933058
push id31366
push usercbook@mozilla.com
push dateWed, 15 Feb 2017 11:25:19 +0000
treeherdermozilla-central@c0807d6938c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarai
bugs1339406
milestone54.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 1339406 - Part 1: Remove Rhino specific functions from jstest harness. r=arai
js/src/tests/ecma/shell.js
js/src/tests/js1_5/Array/regress-157652.js
js/src/tests/shell.js
--- a/js/src/tests/ecma/shell.js
+++ b/js/src/tests/ecma/shell.js
@@ -631,21 +631,8 @@ function ToInteger( t ) {
   return ( sign * Math.floor( Math.abs( t ) ) );
 }
 function Enumerate ( o ) {
   var p;
   for ( p in o ) {
     print( p +": " + o[p] );
   }
 }
-
-/* these functions are useful for running tests manually in Rhino */
-
-function GetContext() {
-  return Packages.com.netscape.javascript.Context.getCurrentContext();
-}
-function OptLevel( i ) {
-  i = Number(i);
-  var cx = GetContext();
-  cx.setOptimizationLevel(i);
-}
-/* end of Rhino functions */
-
--- a/js/src/tests/js1_5/Array/regress-157652.js
+++ b/js/src/tests/js1_5/Array/regress-157652.js
@@ -88,26 +88,21 @@ var expect = 'No Crash';
 var actual = 'No Crash';
 
 printBugNumber(BUGNUMBER);
 printStatus(summary);
 
 expectExitCode(0);
 expectExitCode(5);
 
-var IN_RHINO = inRhino();
-
 try
 {
-  if (!IN_RHINO)
-  {
-    var a1=Array(0xFFFFFFFF);
-    a1.sort();
-    a1 = null;
-  }
+  var a1=Array(0xFFFFFFFF);
+  a1.sort();
+  a1 = null;
 
   var a2 = Array(0x40000000);
   a2.sort();
   a2=null;
 
   var a3=Array(0x10000000/4);
   a3.sort();
   a3=null;
--- a/js/src/tests/shell.js
+++ b/js/src/tests/shell.js
@@ -749,37 +749,16 @@
       dump('jsTestDriverEnd ' + ex);
     }
 
     for (var i = 0; i < gTestcases.length; i++) {
       gTestcases[i].dump();
     }
   }
   global.jsTestDriverEnd = jsTestDriverEnd;
-
-  /*****************************************************
-   * RHINO-SPECIFIC EXPORTS (are these used any more?) *
-   *****************************************************/
-
-  function inRhino() {
-    return typeof global.defineClass === "function";
-  }
-  global.inRhino = inRhino;
-
-  function GetContext() {
-    return global.Packages.com.netscape.javascript.Context.getCurrentContext();
-  }
-  global.GetContext = GetContext;
-
-  function OptLevel(i) {
-    i = Number(i);
-    var cx = GetContext();
-    cx.setOptimizationLevel(i);
-  }
-  global.OptLevel = OptLevel;
 })(this);
 
 (function(global) {
   function getPromiseResult(promise) {
     var result, error, caught = false;
     promise.then(r => { result = r; },
                  e => { caught = true; error = e; });
     drainJobQueue();