mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 977900: Add collide method back in Array.scatterPar; r=shu
This commit is contained in:
parent
9be1d4b017
commit
20c3ec5a1a
@ -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