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

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

Issue 1606783002: [builtins] Migrate Object.getOwnPropertyDescriptor to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE Created 4 years, 11 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.h ('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 d5e57562551a8944b11cc613909bd349c03ac9be..9d0b4d17eb134bde88aa96ec687ae9b94a6a70cc 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -266,31 +266,6 @@ RUNTIME_FUNCTION(Runtime_GetOwnProperty_Legacy) {
}
-// ES6 19.1.2.6
-RUNTIME_FUNCTION(Runtime_GetOwnProperty) {
- HandleScope scope(isolate);
- DCHECK(args.length() == 2);
- CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
- CONVERT_ARG_HANDLE_CHECKED(Object, raw_name, 1);
- // 1. Let obj be ? ToObject(O).
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, object,
- Object::ToObject(isolate, object));
- // 2. Let key be ? ToPropertyKey(P).
- Handle<Name> key;
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, key,
- Object::ToName(isolate, raw_name));
-
- // 3. Let desc be ? obj.[[GetOwnProperty]](key).
- PropertyDescriptor desc;
- Maybe<bool> found = JSReceiver::GetOwnPropertyDescriptor(
- isolate, Handle<JSReceiver>::cast(object), key, &desc);
- MAYBE_RETURN(found, isolate->heap()->exception());
- // 4. Return FromPropertyDescriptor(desc).
- if (!found.FromJust()) return isolate->heap()->undefined_value();
- return *desc.ToObject(isolate);
-}
-
-
RUNTIME_FUNCTION(Runtime_OptimizeObjectForAddingMultipleProperties) {
HandleScope scope(isolate);
DCHECK(args.length() == 2);
« no previous file with comments | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698