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) { |