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
This commit is contained in:
parent
54cc492225
commit
323f15c5a9
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user