Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 9113e7bd4058619526361c01b4482174b463b413..e3e2944ff73e18d7dbaa15b47921ba215a6d2d36 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -2852,6 +2852,15 @@ bool Heap::CreateInitialObjects() { |
} |
set_natives_source_cache(FixedArray::cast(obj)); |
+ // Allocate object to hold object observation state. |
+ { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); |
+ if (!maybe_obj->ToObject(&obj)) return false; |
+ } |
+ { MaybeObject* maybe_obj = AllocateJSObjectFromMap(Map::cast(obj)); |
+ if (!maybe_obj->ToObject(&obj)) return false; |
+ } |
+ set_observation_state(JSObject::cast(obj)); |
+ |
// Handling of script id generation is in FACTORY->NewScript. |
set_last_script_id(undefined_value()); |