Commit 7b6a7379 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

PersistentValueMapBase: Deprecate outdated marking API

Embedders should use EmbedderHeapTracer::RegisterEmbedderReference
instead.

Bug: chromium:923361
Change-Id: If76c0354475798b09af95bedee0890594b29cd14
Reviewed-on: https://chromium-review.googlesource.com/c/1486472Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59840}
parent e97c48ec
...@@ -198,12 +198,9 @@ class PersistentValueMapBase { ...@@ -198,12 +198,9 @@ class PersistentValueMapBase {
* Call V8::RegisterExternallyReferencedObject with the map value for given * Call V8::RegisterExternallyReferencedObject with the map value for given
* key. * key.
*/ */
void RegisterExternallyReferencedObject(K& key) { V8_DEPRECATE_SOON(
assert(Contains(key)); "Used TracedGlobal and EmbedderHeapTracer::RegisterEmbedderReference",
V8::RegisterExternallyReferencedObject( inline void RegisterExternallyReferencedObject(K& key));
reinterpret_cast<internal::Address*>(FromVal(Traits::Get(&impl_, key))),
reinterpret_cast<internal::Isolate*>(GetIsolate()));
}
/** /**
* Return value for key and remove it from the map. * Return value for key and remove it from the map.
...@@ -355,6 +352,15 @@ class PersistentValueMapBase { ...@@ -355,6 +352,15 @@ class PersistentValueMapBase {
const char* label_; const char* label_;
}; };
template <typename K, typename V, typename Traits>
inline void
PersistentValueMapBase<K, V, Traits>::RegisterExternallyReferencedObject(
K& key) {
assert(Contains(key));
V8::RegisterExternallyReferencedObject(
reinterpret_cast<internal::Address*>(FromVal(Traits::Get(&impl_, key))),
reinterpret_cast<internal::Isolate*>(GetIsolate()));
}
template <typename K, typename V, typename Traits> template <typename K, typename V, typename Traits>
class PersistentValueMap : public PersistentValueMapBase<K, V, Traits> { class PersistentValueMap : public PersistentValueMapBase<K, V, Traits> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment