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

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

Issue 842153004: Unify phantom and internal fields weak handle callbacks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« src/global-handles.cc ('K') | « src/global-handles.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-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index d18059cd54bdadb05e6309e198682391d63496f0..e98e632c9e3e932e7cc18890a5c121d34aa4a4ec 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -7797,7 +7797,7 @@ class Trivial2 {
void CheckInternalFields(
- const v8::InternalFieldsCallbackData<Trivial, Trivial2>& data) {
+ const v8::PhantomCallbackData<void, Trivial, Trivial2>& data) {
Trivial* t1 = data.GetInternalField1();
Trivial2* t2 = data.GetInternalField2();
CHECK_EQ(42, t1->x());
@@ -7835,7 +7835,7 @@ void InternalFieldCallback(bool global_gc) {
reinterpret_cast<Trivial2*>(obj->GetAlignedPointerFromInternalField(1));
CHECK_EQ(103, t2->x());
- handle.SetPhantom(CheckInternalFields, 0, 1);
+ handle.SetPhantom<void, Trivial, Trivial2>(0, 0, 1, CheckInternalFields);
if (!global_gc) {
handle.MarkIndependent();
}
« src/global-handles.cc ('K') | « src/global-handles.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698