Commit e3c3c162 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Add missing VMState(EXTERNAL) for DOM GC callbacks

BUG=

Review URL: https://chromiumcodereview.appspot.com/11958011
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 36a26b53
...@@ -888,6 +888,7 @@ bool Heap::PerformGarbageCollection(GarbageCollector collector, ...@@ -888,6 +888,7 @@ bool Heap::PerformGarbageCollection(GarbageCollector collector,
if (collector == MARK_COMPACTOR && global_gc_prologue_callback_) { if (collector == MARK_COMPACTOR && global_gc_prologue_callback_) {
ASSERT(!allocation_allowed_); ASSERT(!allocation_allowed_);
GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL); GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL);
VMState state(isolate_, EXTERNAL);
global_gc_prologue_callback_(); global_gc_prologue_callback_();
} }
...@@ -896,6 +897,7 @@ bool Heap::PerformGarbageCollection(GarbageCollector collector, ...@@ -896,6 +897,7 @@ bool Heap::PerformGarbageCollection(GarbageCollector collector,
{ {
GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL); GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL);
VMState state(isolate_, EXTERNAL);
for (int i = 0; i < gc_prologue_callbacks_.length(); ++i) { for (int i = 0; i < gc_prologue_callbacks_.length(); ++i) {
if (gc_type & gc_prologue_callbacks_[i].gc_type) { if (gc_type & gc_prologue_callbacks_[i].gc_type) {
gc_prologue_callbacks_[i].callback(gc_type, kNoGCCallbackFlags); gc_prologue_callbacks_[i].callback(gc_type, kNoGCCallbackFlags);
...@@ -1009,6 +1011,7 @@ bool Heap::PerformGarbageCollection(GarbageCollector collector, ...@@ -1009,6 +1011,7 @@ bool Heap::PerformGarbageCollection(GarbageCollector collector,
{ {
GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL); GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL);
VMState state(isolate_, EXTERNAL);
GCCallbackFlags callback_flags = kNoGCCallbackFlags; GCCallbackFlags callback_flags = kNoGCCallbackFlags;
for (int i = 0; i < gc_epilogue_callbacks_.length(); ++i) { for (int i = 0; i < gc_epilogue_callbacks_.length(); ++i) {
if (gc_type & gc_epilogue_callbacks_[i].gc_type) { if (gc_type & gc_epilogue_callbacks_[i].gc_type) {
...@@ -1020,6 +1023,7 @@ bool Heap::PerformGarbageCollection(GarbageCollector collector, ...@@ -1020,6 +1023,7 @@ bool Heap::PerformGarbageCollection(GarbageCollector collector,
if (collector == MARK_COMPACTOR && global_gc_epilogue_callback_) { if (collector == MARK_COMPACTOR && global_gc_epilogue_callback_) {
ASSERT(!allocation_allowed_); ASSERT(!allocation_allowed_);
GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL); GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL);
VMState state(isolate_, EXTERNAL);
global_gc_epilogue_callback_(); global_gc_epilogue_callback_();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment