Commit fff120db authored by ager@chromium.org's avatar ager@chromium.org

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
parent a81dca85
......@@ -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++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment