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

Unified Diff: src/runtime/runtime-object.cc

Issue 1431443003: Refactor Object::SetSuperProperty and others. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Revert unintended change to test262 status file. Created 5 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/runtime/runtime-classes.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index 28726cba56672788e404fa8a0e72af92cd48ec54..9624aa03e3b7d3a874713752bb1864273053d57d 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -148,8 +148,9 @@ MaybeHandle<Object> Runtime::SetObjectProperty(Isolate* isolate,
LookupIterator::PropertyOrElement(isolate, object, key, &success);
if (!success) return MaybeHandle<Object>();
- return Object::SetProperty(&it, value, language_mode,
- Object::MAY_BE_STORE_FROM_KEYED);
+ MAYBE_RETURN_NULL(Object::SetProperty(&it, value, language_mode,
+ Object::MAY_BE_STORE_FROM_KEYED));
+ return value;
}
@@ -387,12 +388,10 @@ Object* StoreGlobalViaContext(Isolate* isolate, int slot, Handle<Object> value,
script_context->set(slot, isolate->heap()->empty_property_cell());
}
- Handle<Object> result;
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, result,
- Object::SetProperty(&it, value, language_mode,
- Object::CERTAINLY_NOT_STORE_FROM_KEYED));
- return *result;
+ MAYBE_RETURN(Object::SetProperty(&it, value, language_mode,
+ Object::CERTAINLY_NOT_STORE_FROM_KEYED),
+ isolate->heap()->exception());
+ return *value;
}
} // namespace
« no previous file with comments | « src/runtime/runtime-classes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698