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

Unified Diff: src/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 | « include/v8-util.h ('k') | src/global-handles.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index d1e782f7d35af10bfb47e28b6e3f060449cbe06d..7d3479e391db869e1302b508e97a550e56966a3f 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -434,20 +434,19 @@ void V8::MakeWeak(i::Object** object, void* parameter,
}
-void V8::MakePhantom(
- i::Object** object, void* parameter, int internal_field_index1,
- int internal_field_index2,
- PhantomCallbackData<void, void, void>::Callback weak_callback) {
+void V8::MakePhantom(i::Object** object, void* parameter,
+ int internal_field_index1, int internal_field_index2,
+ PhantomCallbackData<void>::Callback weak_callback) {
if (internal_field_index1 == 0) {
if (internal_field_index2 == 1) {
i::GlobalHandles::MakePhantom(object, parameter, 2, weak_callback);
} else {
- DCHECK_EQ(internal_field_index2, Object::kNoInternalFieldIndex);
+ DCHECK_EQ(internal_field_index2, kNoInternalFieldIndex);
i::GlobalHandles::MakePhantom(object, parameter, 1, weak_callback);
}
} else {
- DCHECK_EQ(internal_field_index1, Object::kNoInternalFieldIndex);
- DCHECK_EQ(internal_field_index2, Object::kNoInternalFieldIndex);
+ DCHECK_EQ(internal_field_index1, kNoInternalFieldIndex);
+ DCHECK_EQ(internal_field_index2, kNoInternalFieldIndex);
i::GlobalHandles::MakePhantom(object, parameter, 0, weak_callback);
}
}
« no previous file with comments | « include/v8-util.h ('k') | src/global-handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698