Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 4c49170182a3888f7ef07ef8e456f28ca09754a0..2db83f2ba0225a4910bbb340d3b6bb436e7068a1 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -927,8 +927,7 @@ bool Object::IsJSGlobalProxy() { |
bool result = IsHeapObject() && |
(HeapObject::cast(this)->map()->instance_type() == |
JS_GLOBAL_PROXY_TYPE); |
- ASSERT(!result || |
- HeapObject::cast(this)->map()->is_access_check_needed()); |
+ ASSERT(!result || IsAccessCheckNeeded()); |
return result; |
} |
@@ -953,14 +952,8 @@ bool Object::IsUndetectableObject() { |
bool Object::IsAccessCheckNeeded() { |
- 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(); |
+ return IsHeapObject() |
+ && HeapObject::cast(this)->map()->is_access_check_needed(); |
} |