| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 97f00ade4da389da6f87be5f7f4fd2ea47fe983d..05df48fd16de3cc212967ec04ae8c3f11e2fe0bc 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -927,7 +927,8 @@ bool Object::IsJSGlobalProxy() {
|
| bool result = IsHeapObject() &&
|
| (HeapObject::cast(this)->map()->instance_type() ==
|
| JS_GLOBAL_PROXY_TYPE);
|
| - ASSERT(!result || IsAccessCheckNeeded());
|
| + ASSERT(!result ||
|
| + HeapObject::cast(this)->map()->is_access_check_needed());
|
| return result;
|
| }
|
|
|
| @@ -952,8 +953,14 @@ bool Object::IsUndetectableObject() {
|
|
|
|
|
| bool Object::IsAccessCheckNeeded() {
|
| - return IsHeapObject()
|
| - && HeapObject::cast(this)->map()->is_access_check_needed();
|
| + if (!IsHeapObject()) return false;
|
| + if (IsJSGlobalProxy()) {
|
| + JSGlobalProxy* proxy = JSGlobalProxy::cast(this);
|
| + GlobalObject* global =
|
| + proxy->GetIsolate()->context()->global_object();
|
| + return proxy->IsDetachedFrom(global);
|
| + }
|
| + return HeapObject::cast(this)->map()->is_access_check_needed();
|
| }
|
|
|
|
|
|
|