Do not make heap iterable eagerly.
R=jarin@chromium.org BUG=379740 LOG=Y Review URL: https://codereview.chromium.org/318863004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21691 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
22af061a83
commit
3888b2fe0c
17
src/heap.h
17
src/heap.h
@ -764,10 +764,6 @@ class Heap {
|
|||||||
// Check whether the heap is currently iterable.
|
// Check whether the heap is currently iterable.
|
||||||
bool IsHeapIterable();
|
bool IsHeapIterable();
|
||||||
|
|
||||||
// Ensure that we have swept all spaces in such a way that we can iterate
|
|
||||||
// over all objects. May cause a GC.
|
|
||||||
void MakeHeapIterable();
|
|
||||||
|
|
||||||
// Notify the heap that a context has been disposed.
|
// Notify the heap that a context has been disposed.
|
||||||
int NotifyContextDisposed();
|
int NotifyContextDisposed();
|
||||||
|
|
||||||
@ -1707,6 +1703,10 @@ class Heap {
|
|||||||
// with the allocation memento of the object at the top
|
// with the allocation memento of the object at the top
|
||||||
void EnsureFillerObjectAtTop();
|
void EnsureFillerObjectAtTop();
|
||||||
|
|
||||||
|
// Ensure that we have swept all spaces in such a way that we can iterate
|
||||||
|
// over all objects. May cause a GC.
|
||||||
|
void MakeHeapIterable();
|
||||||
|
|
||||||
// Performs garbage collection operation.
|
// Performs garbage collection operation.
|
||||||
// Returns whether there is a chance that another major GC could
|
// Returns whether there is a chance that another major GC could
|
||||||
// collect more garbage.
|
// collect more garbage.
|
||||||
@ -2171,10 +2171,11 @@ class Heap {
|
|||||||
|
|
||||||
int gc_callbacks_depth_;
|
int gc_callbacks_depth_;
|
||||||
|
|
||||||
friend class Factory;
|
|
||||||
friend class GCTracer;
|
|
||||||
friend class AlwaysAllocateScope;
|
friend class AlwaysAllocateScope;
|
||||||
friend class Page;
|
friend class Factory;
|
||||||
|
friend class GCCallbacksScope;
|
||||||
|
friend class GCTracer;
|
||||||
|
friend class HeapIterator;
|
||||||
friend class Isolate;
|
friend class Isolate;
|
||||||
friend class MarkCompactCollector;
|
friend class MarkCompactCollector;
|
||||||
friend class MarkCompactMarkingVisitor;
|
friend class MarkCompactMarkingVisitor;
|
||||||
@ -2182,7 +2183,7 @@ class Heap {
|
|||||||
#ifdef VERIFY_HEAP
|
#ifdef VERIFY_HEAP
|
||||||
friend class NoWeakObjectVerificationScope;
|
friend class NoWeakObjectVerificationScope;
|
||||||
#endif
|
#endif
|
||||||
friend class GCCallbacksScope;
|
friend class Page;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(Heap);
|
DISALLOW_COPY_AND_ASSIGN(Heap);
|
||||||
};
|
};
|
||||||
|
@ -1188,8 +1188,6 @@ void LiveEdit::ReplaceFunctionCode(
|
|||||||
|
|
||||||
Handle<SharedFunctionInfo> shared_info = shared_info_wrapper.GetInfo();
|
Handle<SharedFunctionInfo> shared_info = shared_info_wrapper.GetInfo();
|
||||||
|
|
||||||
isolate->heap()->MakeHeapIterable();
|
|
||||||
|
|
||||||
if (IsJSFunctionCode(shared_info->code())) {
|
if (IsJSFunctionCode(shared_info->code())) {
|
||||||
Handle<Code> code = compile_info_wrapper.GetFunctionCode();
|
Handle<Code> code = compile_info_wrapper.GetFunctionCode();
|
||||||
ReplaceCodeObject(Handle<Code>(shared_info->code()), code);
|
ReplaceCodeObject(Handle<Code>(shared_info->code()), code);
|
||||||
@ -1425,8 +1423,6 @@ void LiveEdit::PatchFunctionPositions(Handle<JSArray> shared_info_array,
|
|||||||
info->set_end_position(new_function_end);
|
info->set_end_position(new_function_end);
|
||||||
info->set_function_token_position(new_function_token_pos);
|
info->set_function_token_position(new_function_token_pos);
|
||||||
|
|
||||||
info->GetIsolate()->heap()->MakeHeapIterable();
|
|
||||||
|
|
||||||
if (IsJSFunctionCode(info->code())) {
|
if (IsJSFunctionCode(info->code())) {
|
||||||
// Patch relocation info section of the code.
|
// Patch relocation info section of the code.
|
||||||
Handle<Code> patched_code = PatchPositionsInCode(Handle<Code>(info->code()),
|
Handle<Code> patched_code = PatchPositionsInCode(Handle<Code>(info->code()),
|
||||||
|
Loading…
Reference in New Issue
Block a user