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

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

Issue 1484313003: [runtime] [proxy] Fix Object.prototype.propertyIsEnumerable to support proxies (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: more tests + proper argument conversion Created 5 years 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/js/v8natives.js ('k') | test/mjsunit/harmony/proxies-property-is-enumerable.js » ('j') | 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 26a55ac75b36489e84028946e265318abce52fbb..6bb9bd5d9216d1d61036f0dc7baad0c6f810a7b1 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -750,13 +750,13 @@ RUNTIME_FUNCTION(Runtime_IsPropertyEnumerable) {
HandleScope scope(isolate);
DCHECK(args.length() == 2);
- CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
+ CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0);
CONVERT_ARG_HANDLE_CHECKED(Name, key, 1);
Maybe<PropertyAttributes> maybe =
JSReceiver::GetOwnPropertyAttributes(object, key);
if (!maybe.IsJust()) return isolate->heap()->exception();
- if (maybe.FromJust() == ABSENT) maybe = Just(DONT_ENUM);
+ if (maybe.FromJust() == ABSENT) return isolate->heap()->false_value();
return isolate->heap()->ToBoolean((maybe.FromJust() & DONT_ENUM) == 0);
}
« no previous file with comments | « src/js/v8natives.js ('k') | test/mjsunit/harmony/proxies-property-is-enumerable.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698