Index: src/runtime.cc |
=================================================================== |
--- src/runtime.cc (revision 3112) |
+++ src/runtime.cc (working copy) |
@@ -2580,18 +2580,6 @@ |
return GetElementOrCharAt(object, index); |
} |
- // If the target object is a JSObject and has an ExternalArray as |
- // its elements, we need to check for negative indices and report |
- // exceptions. Indices larger than the array's length will be caught |
- // elsewhere. |
- if (key->IsSmi() && Smi::cast(*key)->value() < 0) { |
- if (object->IsJSObject() && |
- JSObject::cast(*object)->HasExternalArrayElements()) { |
- uint32_t index = static_cast<uint32_t>(Smi::cast(*key)->value()); |
- return Top::Throw(*Factory::NewIndexError(index)); |
- } |
- } |
- |
// Convert the key to a string - possibly by calling back into JavaScript. |
Handle<String> name; |
if (key->IsString()) { |
@@ -2726,18 +2714,6 @@ |
return *value; |
} |
- // If the target object is a JSObject and has an ExternalArray as |
- // its elements, we need to check for negative indices and report |
- // exceptions. Indices larger than the array's length will be caught |
- // elsewhere. |
- if (key->IsSmi() && Smi::cast(*key)->value() < 0) { |
- if (object->IsJSObject() && |
- JSObject::cast(*object)->HasExternalArrayElements()) { |
- uint32_t index = static_cast<uint32_t>(Smi::cast(*key)->value()); |
- return Top::Throw(*Factory::NewIndexError(index)); |
- } |
- } |
- |
if (key->IsString()) { |
Handle<Object> result; |
if (Handle<String>::cast(key)->AsArrayIndex(&index)) { |