mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 977900: Add collide method back in Array.scatterPar; r=shu
This commit is contained in:
parent
49c57363fd
commit
ab1b53739b
@ -890,6 +890,13 @@ function ArrayScatterPar(targets, defaultValue, conflictFunc, length, mode) {
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function collide(elem1, elem2) {
|
||||
if (conflictFunc === undefined)
|
||||
ThrowError(JSMSG_PAR_ARRAY_SCATTER_CONFLICT);
|
||||
|
||||
return conflictFunc(elem1, elem2);
|
||||
}
|
||||
|
||||
function checkTarget(i, t) {
|
||||
if (TO_INT32(t) !== t)
|
||||
ThrowError(JSMSG_PAR_ARRAY_SCATTER_BAD_TARGET, i);
|
||||
|
5
js/src/jit-test/tests/parallel/bug977900.js
Normal file
5
js/src/jit-test/tests/parallel/bug977900.js
Normal file
@ -0,0 +1,5 @@
|
||||
if (!getBuildConfiguration().parallelJS)
|
||||
quit();
|
||||
|
||||
function chooseMax(a, b) { return a>b?a:b;};
|
||||
var a = [1,2].scatterPar([0,0], -1, chooseMax);
|
Loading…
Reference in New Issue
Block a user