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

Unified Diff: src/isolate.cc

Issue 768633002: Add infrastructure to keep track of references to prototypes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use WeakCellForMap() when appropriate Created 6 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/isolate.h ('k') | src/lookup.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 4c30fd539ec7c8296217f9e1efb628b15cc87fb6..e5aed8b3ab2b762ad02d5cc0f7471cae6e908a42 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -802,14 +802,26 @@ static MayAccessDecision MayAccessPreCheck(Isolate* isolate,
}
+bool Isolate::IsInternallyUsedPropertyName(Handle<Object> name) {
+ return name.is_identical_to(factory()->hidden_string()) ||
+ name.is_identical_to(factory()->prototype_users_symbol());
+}
+
+
+bool Isolate::IsInternallyUsedPropertyName(Object* name) {
+ return name == heap()->hidden_string() ||
+ name == heap()->prototype_users_symbol();
+}
+
+
bool Isolate::MayNamedAccess(Handle<JSObject> receiver,
Handle<Object> key,
v8::AccessType type) {
DCHECK(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded());
- // Skip checks for hidden properties access. Note, we do not
+ // Skip checks for internally used properties. Note, we do not
// require existence of a context in this case.
- if (key.is_identical_to(factory()->hidden_string())) return true;
+ if (IsInternallyUsedPropertyName(key)) return true;
// Check for compatibility between the security tokens in the
// current lexical context and the accessed object.
« no previous file with comments | « src/isolate.h ('k') | src/lookup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698