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

Unified Diff: src/property.h

Issue 2499593002: Make private symbols non-enumerable (Closed)
Patch Set: Created 4 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
« no previous file with comments | « src/lookup.cc ('k') | test/mjsunit/harmony/private.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/property.h
diff --git a/src/property.h b/src/property.h
index da015794df01f916101cc0f3be590b32cac3d947..233233c5d4f95cf6146d1976e9a4726775ed1852 100644
--- a/src/property.h
+++ b/src/property.h
@@ -36,6 +36,7 @@ class Descriptor BASE_EMBEDDED {
void Init(Handle<Name> key, Handle<Object> value, PropertyDetails details) {
DCHECK(key->IsUniqueName());
+ DCHECK_IMPLIES(key->IsPrivate(), !details.IsEnumerable());
key_ = key;
value_ = value;
details_ = details;
@@ -44,6 +45,7 @@ class Descriptor BASE_EMBEDDED {
Descriptor(Handle<Name> key, Handle<Object> value, PropertyDetails details)
: key_(key), value_(value), details_(details) {
DCHECK(key->IsUniqueName());
+ DCHECK_IMPLIES(key->IsPrivate(), !details_.IsEnumerable());
}
Descriptor(Handle<Name> key, Handle<Object> value,
@@ -53,6 +55,7 @@ class Descriptor BASE_EMBEDDED {
value_(value),
details_(attributes, type, representation, field_index) {
DCHECK(key->IsUniqueName());
+ DCHECK_IMPLIES(key->IsPrivate(), !details_.IsEnumerable());
}
friend class DescriptorArray;
« no previous file with comments | « src/lookup.cc ('k') | test/mjsunit/harmony/private.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698