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

Unified Diff: test/cctest/test-heap-profiler.cc

Issue 101523002: Remove deprecated Persistent::MakeWeak usage from V8 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
index 88be69366ac166962e355fb078e7346c4c500cf8..236d12259c11f1965adc5217ded7afb4383fdd33 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -1763,10 +1763,10 @@ bool HasWeakGlobalHandle() {
}
-static void PersistentHandleCallback(v8::Isolate* isolate,
- v8::Persistent<v8::Value>* handle,
- void*) {
- handle->Reset();
+static void PersistentHandleCallback(
+ const v8::WeakCallbackData<v8::Object, v8::Persistent<v8::Object> >& data) {
+ data.GetParameter()->Reset();
+ delete data.GetParameter();
}
@@ -1776,8 +1776,9 @@ TEST(WeakGlobalHandle) {
CHECK(!HasWeakGlobalHandle());
- v8::Persistent<v8::Object> handle(env->GetIsolate(), v8::Object::New());
- handle.MakeWeak<v8::Value, void>(NULL, PersistentHandleCallback);
+ v8::Persistent<v8::Object>* handle =
+ new v8::Persistent<v8::Object>(env->GetIsolate(), v8::Object::New());
+ handle->SetWeak(handle, PersistentHandleCallback);
CHECK(HasWeakGlobalHandle());
}
« no previous file with comments | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698