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

Unified Diff: src/ic/ic.cc

Issue 2455953002: [ic] Remove unnecessary access rights checks from the IC handlers. (Closed)
Patch Set: Addressing comments and rebasing Created 4 years, 2 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 | « src/ic/ia32/handler-compiler-ia32.cc ('k') | src/ic/mips/handler-compiler-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 82d14f147cc4e1866ce986c1a45cd09d5b139372..9ff374b8f7f56c933b48c6b3906f47ea2ae8069a 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -855,10 +855,12 @@ int InitPrototypeChecks(Isolate* isolate, Handle<Map> receiver_map,
DCHECK(holder->HasFastProperties());
// The following kinds of receiver maps require custom handler compilation.
- if (receiver_map->IsPrimitiveMap() || receiver_map->IsJSGlobalProxyMap() ||
- receiver_map->IsJSGlobalObjectMap()) {
+ if (receiver_map->IsPrimitiveMap() || receiver_map->IsJSGlobalObjectMap()) {
return -1;
}
+ // We don't encode the requirement to check access rights because we already
+ // passed the access check for current native context and the access
+ // can't be revoked.
HandleScope scope(isolate);
int checks_count = 0;
@@ -870,11 +872,6 @@ int InitPrototypeChecks(Isolate* isolate, Handle<Map> receiver_map,
if (*current == *holder) break;
Handle<Map> current_map(current->map(), isolate);
- // Only global objects and objects that do not require access
- // checks are allowed in stubs.
- DCHECK(current_map->IsJSGlobalProxyMap() ||
- !current_map->is_access_check_needed());
-
if (current_map->IsJSGlobalObjectMap()) {
if (fill_array) {
Handle<JSGlobalObject> global = Handle<JSGlobalObject>::cast(current);
@@ -918,8 +915,7 @@ Handle<Object> LoadIC::SimpleLoadFromPrototype(Handle<Map> receiver_map,
int checks_count = GetPrototypeCheckCount(receiver_map, holder);
DCHECK_LE(0, checks_count);
- if (receiver_map->IsJSGlobalProxyMap() ||
- receiver_map->IsJSGlobalObjectMap()) {
+ if (receiver_map->IsJSGlobalObjectMap()) {
UNREACHABLE();
} else if (receiver_map->is_dictionary_map()) {
smi_handler =
« no previous file with comments | « src/ic/ia32/handler-compiler-ia32.cc ('k') | src/ic/mips/handler-compiler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698