Use RUNTIME_ASSERT instead of CHECK in runtime.cc.
Remove unused function from array.js. Review URL: http://codereview.chromium.org/1659 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
a81dca8597
commit
fff120dbaa
@ -31,15 +31,6 @@
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// Determines if the array contains the element.
|
||||
function Contains(array, element) {
|
||||
var length = array.length;
|
||||
for (var i = 0; i < length; i++) {
|
||||
if (array[i] === element) return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
// Global list of arrays visited during toString, toLocaleString and
|
||||
// join invocations.
|
||||
|
@ -3450,7 +3450,7 @@ static Object* Runtime_PushIfAbsent(Arguments args) {
|
||||
ASSERT(args.length() == 2);
|
||||
CONVERT_CHECKED(JSArray, array, args[0]);
|
||||
CONVERT_CHECKED(JSArray, element, args[1]);
|
||||
CHECK(array->HasFastElements());
|
||||
RUNTIME_ASSERT(array->HasFastElements());
|
||||
int length = Smi::cast(array->length())->value();
|
||||
FixedArray* elements = FixedArray::cast(array->elements());
|
||||
for (int i = 0; i < length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user