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

Unified Diff: src/runtime.cc

Issue 229973004: Remove calls to non-handlified version of GetProperty(name). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: update 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
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 2a78181d64442ed745d23a92ce02e1f5ea682e67..479531e4ceccb3522906d4e4a3f43ac1a776639a 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -6045,14 +6045,16 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetArgumentsProperty) {
return frame->GetParameter(index);
}
+ HandleScope scope(isolate);
if (args[0]->IsSymbol()) {
// Lookup in the initial Object.prototype object.
- return isolate->initial_object_prototype()->GetProperty(
- Symbol::cast(args[0]));
+ Handle<Object> result = Object::GetProperty(
+ isolate->initial_object_prototype(), args.at<Symbol>(0));
+ RETURN_IF_EMPTY_HANDLE(isolate, result);
+ return *result;
}
// Convert the key to a string.
- HandleScope scope(isolate);
bool exception = false;
Handle<Object> converted =
Execution::ToString(isolate, args.at<Object>(0), &exception);
@@ -6084,7 +6086,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetArgumentsProperty) {
}
// Lookup in the initial Object.prototype object.
- return isolate->initial_object_prototype()->GetProperty(*key);
+ Handle<Object> result = Object::GetProperty(
+ isolate->initial_object_prototype(), key);
+ RETURN_IF_EMPTY_HANDLE(isolate, result);
+ return *result;
}
@@ -9342,8 +9347,10 @@ static ObjectPair LoadContextSlotHelper(Arguments args,
// No need to unhole the value here. This is taken care of by the
// GetProperty function.
- MaybeObject* value = object->GetProperty(*name);
- return MakePair(value, *receiver_handle);
+ Handle<Object> value = Object::GetProperty(object, name);
+ RETURN_IF_EMPTY_HANDLE_VALUE(
+ isolate, value, MakePair(Failure::Exception(), NULL));
+ return MakePair(*value, *receiver_handle);
}
if (throw_error) {
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698