Bug 944975: regression test (r=shu).
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Fri, 07 Feb 2014 17:56:45 +0100
changeset 167564 24ad87cccbe5ce0cdb8b94991917b1226477d9e1
parent 167563 6df8e0c99c787b6f1826f026b36e80a185c2c602
child 167565 d2afdb4177dd84980ecf89370aaa68f9e34f8f01
push id26174
push userkwierso@gmail.com
push dateSat, 08 Feb 2014 00:55:48 +0000
treeherdermozilla-central@2c873eff7dc2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu
bugs944975
milestone30.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 944975: regression test (r=shu). Note that this test may only be interest on builds that have been configured with --enable-more-determinstic; otherwise the toSource method is not necessarily invoked when the |new| fails.
js/src/jit-test/tests/parallel/bug944975.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/parallel/bug944975.js
@@ -0,0 +1,17 @@
+if (getBuildConfiguration().parallelJS) {
+  var map_toSource_called = false;
+  var mapPar_toSource_called = false;
+
+  Array.prototype.mapPar.toSource = function() {
+    mapPar_toSource_called = true;
+  };
+
+  Array.prototype.map.toSource = function() {
+    map_toSource_called = true;
+  };
+
+  try { new Array.prototype.mapPar; } catch (e) {}
+  try { new Array.prototype.map; } catch (e) {}
+
+  assertEq(map_toSource_called, mapPar_toSource_called);
+}