Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index d5815f2ecffa12f71ad39ab5a89c21088d92bf4e..ab9ce1af127c07043a0909ec3908cb1b90a14696 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -134,6 +134,14 @@ bool Object::IsFixedArrayBase() { |
} |
+// External objects are not extensible, so the map check is enough. |
+bool Object::IsExternal() { |
+ return Object::IsHeapObject() && |
+ HeapObject::cast(this)->map() == |
+ HeapObject::cast(this)->GetHeap()->external_map(); |
+} |
+ |
+ |
bool Object::IsInstanceOf(FunctionTemplateInfo* expected) { |
// There is a constraint on the object; check. |
if (!this->IsJSObject()) return false; |