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

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

Issue 1949393006: Remove deprecated uses of WeakCallbackData from tests. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | test/cctest/heap/test-mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/heap/test-heap.cc
diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc
index 2259f8e2ffb4f7133bcdd7fef6f36c33bf4ca598..030ef5c6160a3121662e43376eb583f1b372292b 100644
--- a/test/cctest/heap/test-heap.cc
+++ b/test/cctest/heap/test-heap.cc
@@ -578,7 +578,7 @@ TEST(GlobalHandles) {
static bool WeakPointerCleared = false;
static void TestWeakGlobalHandleCallback(
- const v8::WeakCallbackData<v8::Value, void>& data) {
+ const v8::WeakCallbackInfo<void>& data) {
std::pair<v8::Persistent<v8::Value>*, int>* p =
reinterpret_cast<std::pair<v8::Persistent<v8::Value>*, int>*>(
data.GetParameter());
@@ -611,9 +611,9 @@ TEST(WeakGlobalHandlesScavenge) {
}
std::pair<Handle<Object>*, int> handle_and_id(&h2, 1234);
- GlobalHandles::MakeWeak(h2.location(),
- reinterpret_cast<void*>(&handle_and_id),
- &TestWeakGlobalHandleCallback);
+ GlobalHandles::MakeWeak(
+ h2.location(), reinterpret_cast<void*>(&handle_and_id),
+ &TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
// Scavenge treats weak pointers as normal roots.
heap->CollectGarbage(NEW_SPACE);
@@ -658,9 +658,9 @@ TEST(WeakGlobalHandlesMark) {
CHECK(!heap->InNewSpace(*h1) && !heap->InNewSpace(*h2));
std::pair<Handle<Object>*, int> handle_and_id(&h2, 1234);
- GlobalHandles::MakeWeak(h2.location(),
- reinterpret_cast<void*>(&handle_and_id),
- &TestWeakGlobalHandleCallback);
+ GlobalHandles::MakeWeak(
+ h2.location(), reinterpret_cast<void*>(&handle_and_id),
+ &TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
CHECK(!GlobalHandles::IsNearDeath(h1.location()));
CHECK(!GlobalHandles::IsNearDeath(h2.location()));
@@ -696,9 +696,9 @@ TEST(DeleteWeakGlobalHandle) {
}
std::pair<Handle<Object>*, int> handle_and_id(&h, 1234);
- GlobalHandles::MakeWeak(h.location(),
- reinterpret_cast<void*>(&handle_and_id),
- &TestWeakGlobalHandleCallback);
+ GlobalHandles::MakeWeak(h.location(), reinterpret_cast<void*>(&handle_and_id),
+ &TestWeakGlobalHandleCallback,
+ v8::WeakCallbackType::kParameter);
// Scanvenge does not recognize weak reference.
heap->CollectGarbage(NEW_SPACE);
« no previous file with comments | « no previous file | test/cctest/heap/test-mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698