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

Unified Diff: include/v8-util.h

Issue 2371733002: Introduce EmbedderReachableReferenceReporter (Closed)
Patch Set: Fix UsingEmbedderHeapTracer Created 4 years, 3 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.h ('k') | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8-util.h
diff --git a/include/v8-util.h b/include/v8-util.h
index 8133fdd49dcf4fac4e340997e4cac21c7db70806..99c59fe302963daa19ad46b513feb1cf2f5819ed 100644
--- a/include/v8-util.h
+++ b/include/v8-util.h
@@ -206,14 +206,19 @@ class PersistentValueMapBase {
}
/**
- * Call V8::RegisterExternallyReferencedObject with the map value for given
- * key.
+ * Deprecated. Call V8::RegisterExternallyReferencedObject with the map value
+ * for given key.
+ * TODO(hlopko) Remove once migration to reporter is finished.
*/
- void RegisterExternallyReferencedObject(K& key) {
+ void RegisterExternallyReferencedObject(K& key) {}
+
+ /**
+ * Use EmbedderReachableReferenceReporter with the map value for given key.
+ */
+ void RegisterExternallyReferencedObject(
+ EmbedderReachableReferenceReporter* reporter, K& key) {
DCHECK(Contains(key));
- V8::RegisterExternallyReferencedObject(
- reinterpret_cast<internal::Object**>(FromVal(Traits::Get(&impl_, key))),
- reinterpret_cast<internal::Isolate*>(GetIsolate()));
+ reporter->ReportExternalReference(FromVal(Traits::Get(&impl_, key)));
}
/**
« no previous file with comments | « include/v8.h ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698