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

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

Issue 863443005: Support old and new weak handle API (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Undo cast that was not needed. 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
« no previous file with comments | « 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 4d39aa543d6f79e96d1e5879f94d53638e1eebc4..63edb01de0404792e4da1f8d5c21c68b97595b6f 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -7715,12 +7715,12 @@ class Trivial2 {
};
-void CheckInternalFields(const v8::PhantomCallbackData<
- v8::Persistent<v8::Object>, Trivial, Trivial2>& data) {
+void CheckInternalFields(
+ const v8::PhantomCallbackData<v8::Persistent<v8::Object>>& data) {
v8::Persistent<v8::Object>* handle = data.GetParameter();
handle->Reset();
- Trivial* t1 = data.GetInternalField1();
- Trivial2* t2 = data.GetInternalField2();
+ Trivial* t1 = reinterpret_cast<Trivial*>(data.GetInternalField1());
+ Trivial2* t2 = reinterpret_cast<Trivial2*>(data.GetInternalField2());
CHECK_EQ(42, t1->x());
CHECK_EQ(103, t2->x());
t1->set_x(1729);
@@ -7756,8 +7756,8 @@ void InternalFieldCallback(bool global_gc) {
reinterpret_cast<Trivial2*>(obj->GetAlignedPointerFromInternalField(1));
CHECK_EQ(103, t2->x());
- handle.SetPhantom<v8::Persistent<v8::Object>, Trivial, Trivial2>(
- &handle, 0, 1, CheckInternalFields);
+ handle.SetPhantom<v8::Persistent<v8::Object>>(&handle, CheckInternalFields,
+ 0, 1);
if (!global_gc) {
handle.MarkIndependent();
}
« no previous file with comments | « src/global-handles.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698