Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: src/heap.cc

Issue 11274014: Store Object.observe state per-isolate rather than per-context (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use ObjectHashTable directly Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap.h ('k') | src/object-observe.js » ('j') | src/objects-inl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 76084cfd58ac23b7b3a350049830a80bb9f664ed..1440e0dc9c932fc7e922407e2dc7f08dfddb1a6f 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -2856,6 +2856,16 @@ bool Heap::CreateInitialObjects() {
}
set_natives_source_cache(FixedArray::cast(obj));
+ // Allocate object to hold object observation state.
+ Map* object_observation_map;
+ { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
+ if (!maybe_obj->To(&object_observation_map)) return false;
+ }
+ { MaybeObject* maybe_obj = AllocateJSObjectFromMap(object_observation_map);
+ if (!maybe_obj->ToObject(&obj)) return false;
+ }
+ set_object_observation_state(JSObject::cast(obj));
+
// Handling of script id generation is in FACTORY->NewScript.
set_last_script_id(undefined_value());
« no previous file with comments | « src/heap.h ('k') | src/object-observe.js » ('j') | src/objects-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698