Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Unified Diff: src/objects.cc

Issue 328007: Stop throwing exceptions for out-of-range accesses to CanvasArrays.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/messages.js ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
===================================================================
--- src/objects.cc (revision 3113)
+++ src/objects.cc (working copy)
@@ -6050,7 +6050,7 @@
int8_t value = array->get(index);
return Smi::FromInt(value);
}
- return Top::Throw(*Factory::NewIndexError(index));
+ break;
}
case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: {
ExternalUnsignedByteArray* array =
@@ -6059,7 +6059,7 @@
uint8_t value = array->get(index);
return Smi::FromInt(value);
}
- return Top::Throw(*Factory::NewIndexError(index));
+ break;
}
case EXTERNAL_SHORT_ELEMENTS: {
ExternalShortArray* array = ExternalShortArray::cast(elements());
@@ -6067,7 +6067,7 @@
int16_t value = array->get(index);
return Smi::FromInt(value);
}
- return Top::Throw(*Factory::NewIndexError(index));
+ break;
}
case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: {
ExternalUnsignedShortArray* array =
@@ -6076,7 +6076,7 @@
uint16_t value = array->get(index);
return Smi::FromInt(value);
}
- return Top::Throw(*Factory::NewIndexError(index));
+ break;
}
case EXTERNAL_INT_ELEMENTS: {
ExternalIntArray* array = ExternalIntArray::cast(elements());
@@ -6084,7 +6084,7 @@
int32_t value = array->get(index);
return Heap::NumberFromInt32(value);
}
- return Top::Throw(*Factory::NewIndexError(index));
+ break;
}
case EXTERNAL_UNSIGNED_INT_ELEMENTS: {
ExternalUnsignedIntArray* array =
@@ -6093,7 +6093,7 @@
uint32_t value = array->get(index);
return Heap::NumberFromUint32(value);
}
- return Top::Throw(*Factory::NewIndexError(index));
+ break;
}
case EXTERNAL_FLOAT_ELEMENTS: {
ExternalFloatArray* array = ExternalFloatArray::cast(elements());
@@ -6101,7 +6101,7 @@
float value = array->get(index);
return Heap::AllocateHeapNumber(value);
}
- return Top::Throw(*Factory::NewIndexError(index));
+ break;
}
case DICTIONARY_ELEMENTS: {
NumberDictionary* dictionary = element_dictionary();
@@ -7320,8 +7320,6 @@
ASSERT(value->IsUndefined());
}
receiver->set(index, cast_value);
- } else {
- return Top::Throw(*Factory::NewIndexError(index));
}
return Heap::NumberFromInt32(cast_value);
}
@@ -7372,8 +7370,6 @@
ASSERT(value->IsUndefined());
}
set(index, cast_value);
- } else {
- return Top::Throw(*Factory::NewIndexError(index));
}
return Heap::NumberFromUint32(cast_value);
}
@@ -7394,8 +7390,6 @@
ASSERT(value->IsUndefined());
}
set(index, cast_value);
- } else {
- return Top::Throw(*Factory::NewIndexError(index));
}
return Heap::AllocateHeapNumber(cast_value);
}
« no previous file with comments | « src/messages.js ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698