Index: src/profile-generator.cc |
diff --git a/src/profile-generator.cc b/src/profile-generator.cc |
index a4e6596b4b9304b10b79db26e7fb26bb7c668851..0c7dc1457d3ca668aa32baf8d31022ea19426ab3 100644 |
--- a/src/profile-generator.cc |
+++ b/src/profile-generator.cc |
@@ -66,7 +66,9 @@ int TokenEnumerator::GetTokenId(Object* token) { |
Handle<Object> handle = isolate->global_handles()->Create(token); |
// handle.location() points to a memory cell holding a pointer |
// to a token object in the V8's heap. |
- isolate->global_handles()->MakeWeak(handle.location(), this, |
+ isolate->global_handles()->MakeWeak(handle.location(), |
+ this, |
+ NULL, |
TokenRemovedCallback); |
token_locations_.Add(handle.location()); |
token_removed_.Add(false); |
@@ -74,11 +76,12 @@ int TokenEnumerator::GetTokenId(Object* token) { |
} |
-void TokenEnumerator::TokenRemovedCallback(v8::Persistent<v8::Value> handle, |
+void TokenEnumerator::TokenRemovedCallback(v8::Isolate* isolate, |
+ v8::Persistent<v8::Value> handle, |
void* parameter) { |
reinterpret_cast<TokenEnumerator*>(parameter)->TokenRemoved( |
Utils::OpenHandle(*handle).location()); |
- handle.Dispose(); |
+ handle.Dispose(isolate); |
} |