Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: src/profile-generator.cc

Issue 12033011: Add Isolate parameter to Persistent class. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added new kind of callback Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698