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

Unified Diff: include/v8-util.h

Issue 1883043003: Add RegisterExternallyReferencedObject to PersistenValueMap (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Leave RegisterExternallyReferencedObject private Created 4 years, 8 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') | no next file » | 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 73ec658f7b0abe4219cbed906357a6d25256577d..e6259c1227b86bc6e83c95c3264d288be313ce77 100644
--- a/include/v8-util.h
+++ b/include/v8-util.h
@@ -206,6 +206,17 @@ class PersistentValueMapBase {
}
/**
+ * Call V8::RegisterExternallyReferencedObject with the map value for given
+ * key.
+ */
+ void RegisterExternallyReferencedObject(K& key) {
+ DCHECK(Contains(key));
+ V8::RegisterExternallyReferencedObject(
+ reinterpret_cast<internal::Object**>(FromVal(Traits::Get(&impl_, key))),
+ reinterpret_cast<internal::Isolate*>(GetIsolate()));
+ }
+
+ /**
* Return value for key and remove it from the map.
*/
Global<V> Remove(const K& key) {
« no previous file with comments | « include/v8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698