Index: src/profile-generator.cc |
diff --git a/src/profile-generator.cc b/src/profile-generator.cc |
index e14e0f3948c5e88dccaa48686c4c94c0d9bec454..d8277dc7ab5321a18f8ba2d85b5478c6f02175b8 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); |
} |