http://codereview.chromium.org/2841023/diff/21002/34016 File src/heap.cc (right):
http://codereview.chromium.org/2841023/diff/21002/34016#newcode4484 src/heap.cc:4484: void Heap::PreInit() { On 2010/06/23 13:55:08, Vitaly wrote:
Are there any other planned usages of PreInit? If not, make debug
utils
initialization a part of the constructor.
HeapDebugUtils must be constructed after global_isolate is set, in particular because HeapDebugUtils contains a List<Object*>, which uses a FreeStoreAllocationPolicy, which relies on NativeAllocationChecker, which must check Isolate::allocation_disallowed(). Since Heap is inlined in Isolate, Heap's constructor is called before Isolate's constructor is complete. We can't set global_isolate to the not-yet-constructed isolate. (This is why Isolate::PreInit exists-- Heap::PreInit is just an analog that prevents us from having to hike out HeapDebugUtils to somewhere Isolate can see it.) http://codereview.chromium.org/2841023/show -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev