Bug 688646 - Followup fix to make recent test changes feature-test for shell-only functionality. r=orange
authorJeff Walden <jwalden@mit.edu>
Mon, 26 Sep 2011 18:28:57 -0700
changeset 78961 6d691de3932bf3d3a6b1a244ab7cb17aa8e226f7
parent 78960 db9f10c18560f582e2e5b064362e6ff950f8906b
child 78962 e2f5052798cc825f726ac083ed438724a5ef57b5
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersorange
bugs688646
milestone9.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 688646 - Followup fix to make recent test changes feature-test for shell-only functionality. r=orange
js/src/tests/ecma_3/Function/15.3.4.4-1.js
--- a/js/src/tests/ecma_3/Function/15.3.4.4-1.js
+++ b/js/src/tests/ecma_3/Function/15.3.4.4-1.js
@@ -147,25 +147,27 @@ addThis();
  * Function.prototype.call() and
  * Function.prototype.call(null) should return the same result
  */
 status = inSection(10);
 actual = F2.call(null);
 expect = F2.call();
 addThis();
 
-/*
- * Function.prototype.call gets lexical globals, not caller globals
- */
-status = inSection(11);
-actual = g2 = newGlobal('new-compartment');
-g2.eval("boundMethod = Function('return this');");
-expect = g2.boundMethod.call();
-addThis();
-
+if (typeof newGlobal === "function")
+{
+  /*
+   * Function.prototype.call gets lexical globals, not caller globals
+   */
+  status = inSection(11);
+  actual = g2 = newGlobal('new-compartment');
+  g2.eval("boundMethod = Function('return this');");
+  expect = g2.boundMethod.call();
+  addThis();
+}
 
 
 //-----------------------------------------------------------------------------
 test();
 //-----------------------------------------------------------------------------