Commit 323f15c5 authored by dcarney@chromium.org's avatar dcarney@chromium.org

wrap gc callbacks in handlescopes

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/19845007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 54cc4922
......@@ -262,6 +262,7 @@ class GlobalHandles::Node {
ExternalTwoByteString::cast(object_)->resource() != NULL);
// Leaving V8.
VMState<EXTERNAL> state(isolate);
HandleScope handle_scope(isolate);
weak_reference_callback_(reinterpret_cast<v8::Isolate*>(isolate),
reinterpret_cast<Persistent<Value>*>(&object),
par);
......
......@@ -920,6 +920,7 @@ bool Heap::PerformGarbageCollection(GarbageCollector collector,
{
GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL);
VMState<EXTERNAL> state(isolate_);
HandleScope handle_scope(isolate_);
CallGCPrologueCallbacks(gc_type, kNoGCCallbackFlags);
}
......@@ -1025,6 +1026,7 @@ bool Heap::PerformGarbageCollection(GarbageCollector collector,
{
GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL);
VMState<EXTERNAL> state(isolate_);
HandleScope handle_scope(isolate_);
CallGCEpilogueCallbacks(gc_type);
}
......
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