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

Unified Diff: src/runtime.cc

Issue 233233004: Handlify GetProperty. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index f2e2650ce7d9e7c7c5a6d1c266a8ffead5f8e24a..6feef71f5ce86267446277fa6d6c89fbddfef7d6 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -6057,9 +6057,11 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetArgumentsProperty) {
HandleScope scope(isolate);
if (args[0]->IsSymbol()) {
// Lookup in the initial Object.prototype object.
- Handle<Object> result = Object::GetProperty(
- isolate->initial_object_prototype(), args.at<Symbol>(0));
- RETURN_IF_EMPTY_HANDLE(isolate, result);
+ Handle<Object> result;
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, result,
+ Object::GetProperty(
+ isolate->initial_object_prototype(), args.at<Symbol>(0)));
return *result;
}
@@ -6096,9 +6098,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetArgumentsProperty) {
}
// Lookup in the initial Object.prototype object.
- Handle<Object> result = Object::GetProperty(
- isolate->initial_object_prototype(), key);
- RETURN_IF_EMPTY_HANDLE(isolate, result);
+ Handle<Object> result;
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, result,
+ Object::GetProperty(isolate->initial_object_prototype(), key));
return *result;
}
@@ -9343,9 +9346,11 @@ static ObjectPair LoadContextSlotHelper(Arguments args,
// No need to unhole the value here. This is taken care of by the
// GetProperty function.
- Handle<Object> value = Object::GetProperty(object, name);
- RETURN_IF_EMPTY_HANDLE_VALUE(
- isolate, value, MakePair(Failure::Exception(), NULL));
+ Handle<Object> value;
+ ASSIGN_RETURN_ON_EXCEPTION_VALUE(
+ isolate, value,
+ Object::GetProperty(object, name),
+ MakePair(Failure::Exception(), NULL));
return MakePair(*value, *receiver_handle);
}
« src/objects.cc ('K') | « src/objects-inl.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698