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

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

Issue 1438233002: [proxies] Teach ToPropertyDescriptor to deal with Proxies (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
« src/property-descriptor.cc ('K') | « src/property-descriptor.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 5db4eeea2ea846a6d5fd7fdad000e441cbb28b53..0b919327b6189af5a75b105eb1979936a4110f51 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -251,6 +251,9 @@ MUST_USE_RESULT static MaybeHandle<Object> GetOwnProperty(Isolate* isolate,
// if args[1] is an accessor on args[0]
// [true, GetFunction, SetFunction, Enumerable, Configurable]
RUNTIME_FUNCTION(Runtime_GetOwnProperty) {
+ // TODO(jkummerow): Support Proxies.
+ // TODO(jkummerow): Use JSReceiver::GetOwnPropertyDescriptor() and
+ // PropertyDescriptor::ToObject().
HandleScope scope(isolate);
DCHECK(args.length() == 2);
CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
@@ -656,6 +659,8 @@ RUNTIME_FUNCTION(Runtime_HasOwnProperty) {
// Fast case: either the key is a real named property or it is not
// an array index and there are no interceptors or hidden
// prototypes.
+ // TODO(jkummerow): Make JSReceiver::HasOwnProperty fast enough to
+ // handle all cases directly (without this custom fast path).
Maybe<bool> maybe = Nothing<bool>();
if (key_is_array_index) {
maybe = JSObject::HasOwnElement(js_obj, index);
@@ -757,6 +762,8 @@ RUNTIME_FUNCTION(Runtime_GetPropertyNamesFast) {
// Return the names of the own named properties.
// args[0]: object
// args[1]: PropertyAttributes as int
+// TODO(cbruni/jkummerow): Use JSReceiver::GetKeys() internally, merge with
+// Runtime_GetOwnElementNames.
RUNTIME_FUNCTION(Runtime_GetOwnPropertyNames) {
HandleScope scope(isolate);
DCHECK(args.length() == 2);
« src/property-descriptor.cc ('K') | « src/property-descriptor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698