mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 06:45:33 +00:00
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.
This commit is contained in:
parent
ff17d0edab
commit
b2909d49d2
17
js/src/jit-test/tests/parallel/bug944975.js
Normal file
17
js/src/jit-test/tests/parallel/bug944975.js
Normal file
@ -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);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user