Always invoke the default Array.sort functions from builtin functions, part 2.

R=vegorov@chromium.org
BUG=v8:2372

Review URL: https://chromiumcodereview.appspot.com/11175007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2012-10-19 12:30:18 +00:00
parent 063609280e
commit f910052543
2 changed files with 3 additions and 2 deletions

View File

@ -62,7 +62,7 @@ function GetSortedArrayKeys(array, intervals) {
}
}
}
ArraySort.call(keys, function(a, b) { return a - b; });
%_CallFunction(keys, function(a, b) { return a - b; }, ArraySort);
return keys;
}

View File

@ -29,7 +29,8 @@
// array operations.
var foo = "hest";
Array.prototype.sort = function(fn) { foo = "fisk"; }
Array.prototype.sort = function(fn) { foo = "fisk"; };
Function.prototype.call = function() { foo = "caramel"; };
var a = [2,3,1];
a[100000] = 0;
a.join();