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

Unified Diff: src/lookup.cc

Issue 1573143002: Do not leak private property names to proxy traps and interceptors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Typo 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 | « no previous file | src/messages.h » ('j') | src/objects.cc » ('J')
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 3b953c9d71f7f70f1c37ffc3d760740d8d316c2c..1ffd888350bda9c46c8b5b6de434edb4d8d74db0 100644
--- a/src/lookup.cc
+++ b/src/lookup.cc
@@ -610,6 +610,7 @@ LookupIterator::State LookupIterator::LookupInHolder(Map* const map,
switch (state_) {
case NOT_FOUND:
if (map->IsJSProxyMap()) {
+ // Do not leak private property names.
if (!name_.is_null() && name_->IsPrivate()) return NOT_FOUND;
return JSPROXY;
}
@@ -625,6 +626,8 @@ LookupIterator::State LookupIterator::LookupInHolder(Map* const map,
}
if (check_interceptor() && HasInterceptor(map) &&
!SkipInterceptor(JSObject::cast(holder))) {
+ // Do not leak private property names.
+ if (!name_.is_null() && name_->IsPrivate()) return NOT_FOUND;
return INTERCEPTOR;
}
// Fall through.
« no previous file with comments | « no previous file | src/messages.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698