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

Unified Diff: src/global-handles.h

Issue 753553002: Phantom references support internal fields (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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/debug.cc ('k') | src/global-handles.cc » ('j') | src/global-handles.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/global-handles.h
diff --git a/src/global-handles.h b/src/global-handles.h
index aacdcbc072d0ae26af7ce6264767d8366ee17f7a..f6fc0b017c4db2e72d745a5b1ffc74be840b39cd 100644
--- a/src/global-handles.h
+++ b/src/global-handles.h
@@ -111,6 +111,7 @@ class GlobalHandles {
static void Destroy(Object** location);
typedef WeakCallbackData<v8::Value, void>::Callback WeakCallback;
+ typedef PhantomCallbackData<void>::Callback PhantomCallback;
// For a phantom weak reference, the callback does not have access to the
// dying object. Phantom weak references are preferred because they allow
@@ -128,8 +129,12 @@ class GlobalHandles {
// before the callback is invoked, but the handle can still be identified
// in the callback by using the location() of the handle.
static void MakeWeak(Object** location, void* parameter,
- WeakCallback weak_callback,
- PhantomState phantom = Nonphantom);
+ WeakCallback weak_callback);
+
+ static void MakePhantom(Object** location, void* parameter,
+ PhantomCallback weak_callback,
+ int internal_field_index1 = v8::Object::kNoInternalFieldIndex,
+ int internal_field_index2 = v8::Object::kNoInternalFieldIndex);
void RecordStats(HeapStats* stats);
« no previous file with comments | « src/debug.cc ('k') | src/global-handles.cc » ('j') | src/global-handles.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698