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

Unified Diff: src/objects.cc

Issue 204693002: Handlify callers to GetElementNoException. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Created 6 years, 9 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/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 897c52ade6b9003b309307e939e9456267cd8e2e..47c629e1e147f602d82c5aa38644ffe16b12e539 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -5190,8 +5190,7 @@ Handle<Object> JSObject::DeleteElement(Handle<JSObject> object,
if (object->GetLocalElementAccessorPair(index) != NULL) {
old_value = Handle<Object>::cast(factory->the_hole_value());
} else {
- old_value = Object::GetElement(isolate, object, index);
- CHECK_NOT_EMPTY_HANDLE(isolate, old_value);
+ old_value = Object::GetElementNoExceptionThrown(isolate, object, index);
}
}
}
@@ -6360,8 +6359,7 @@ void JSObject::DefineAccessor(Handle<JSObject> object,
if (is_element) {
preexists = HasLocalElement(object, index);
if (preexists && object->GetLocalElementAccessorPair(index) == NULL) {
- old_value = Object::GetElement(isolate, object, index);
- CHECK_NOT_EMPTY_HANDLE(isolate, old_value);
+ old_value = Object::GetElementNoExceptionThrown(isolate, object, index);
}
} else {
LookupResult lookup(isolate);
@@ -11343,8 +11341,7 @@ static bool GetOldValue(Isolate* isolate,
if (object->GetLocalElementAccessorPair(index) != NULL) {
value = Handle<Object>::cast(isolate->factory()->the_hole_value());
} else {
- value = Object::GetElement(isolate, object, index);
- CHECK_NOT_EMPTY_HANDLE(isolate, value);
+ value = Object::GetElementNoExceptionThrown(isolate, object, index);
}
old_values->Add(value);
indices->Add(index);
@@ -12564,8 +12561,7 @@ Handle<Object> JSObject::SetElement(Handle<JSObject> object,
if (old_attributes != ABSENT) {
if (object->GetLocalElementAccessorPair(index) == NULL) {
- old_value = Object::GetElement(isolate, object, index);
- CHECK_NOT_EMPTY_HANDLE(isolate, old_value);
+ old_value = Object::GetElementNoExceptionThrown(isolate, object, index);
}
} else if (object->IsJSArray()) {
// Store old array length in case adding an element grows the array.
@@ -12611,8 +12607,8 @@ Handle<Object> JSObject::SetElement(Handle<JSObject> object,
} else if (old_value->IsTheHole()) {
EnqueueChangeRecord(object, "reconfigure", name, old_value);
} else {
- Handle<Object> new_value = Object::GetElement(isolate, object, index);
- CHECK_NOT_EMPTY_HANDLE(isolate, new_value);
+ Handle<Object> new_value =
+ Object::GetElementNoExceptionThrown(isolate, object, index);
bool value_changed = !old_value->SameValue(*new_value);
if (old_attributes != new_attributes) {
if (!value_changed) old_value = isolate->factory()->the_hole_value();
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698