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 = |