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

Unified Diff: src/lookup.cc

Issue 2498973002: Merged: Squashed multiple commits. (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 | « no previous file | src/property.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lookup.cc
diff --git a/src/lookup.cc b/src/lookup.cc
index 3921e1657c8511b5de5a1d96b6f802ae1649bbf0..b6c0b92a1751fdb7711b4a6a8ab2466159db9f09 100644
--- a/src/lookup.cc
+++ b/src/lookup.cc
@@ -307,6 +307,11 @@ void LookupIterator::PrepareTransitionToDataProperty(
PropertyAttributes attributes, Object::StoreFromKeyed store_mode) {
DCHECK(receiver.is_identical_to(GetStoreTarget()));
if (state_ == TRANSITION) return;
+
+ if (!IsElement() && name()->IsPrivate()) {
+ attributes = static_cast<PropertyAttributes>(attributes | DONT_ENUM);
+ }
+
DCHECK(state_ != LookupIterator::ACCESSOR ||
(GetAccessors()->IsAccessorInfo() &&
AccessorInfo::cast(*GetAccessors())->is_special_data_property()));
@@ -441,6 +446,9 @@ void LookupIterator::TransitionToAccessorProperty(
// handled via a trap. Adding properties to primitive values is not
// observable.
Handle<JSObject> receiver = GetStoreTarget();
+ if (!IsElement() && name()->IsPrivate()) {
+ attributes = static_cast<PropertyAttributes>(attributes | DONT_ENUM);
+ }
if (!IsElement() && !receiver->map()->is_dictionary_map()) {
Handle<Map> old_map(receiver->map(), isolate_);
« no previous file with comments | « no previous file | src/property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698