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/1486472
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59840}
This commit is contained in:
Michael Lippautz 2019-02-25 16:30:54 +01:00 committed by Commit Bot
parent e97c48ec58
commit 7b6a7379b6

View File

@ -198,12 +198,9 @@ class PersistentValueMapBase {
* Call V8::RegisterExternallyReferencedObject with the map value for given
* key.
*/
void RegisterExternallyReferencedObject(K& key) {
assert(Contains(key));
V8::RegisterExternallyReferencedObject(
reinterpret_cast<internal::Address*>(FromVal(Traits::Get(&impl_, key))),
reinterpret_cast<internal::Isolate*>(GetIsolate()));
}
V8_DEPRECATE_SOON(
"Used TracedGlobal and EmbedderHeapTracer::RegisterEmbedderReference",
inline void RegisterExternallyReferencedObject(K& key));
/**
* Return value for key and remove it from the map.
@ -355,6 +352,15 @@ class PersistentValueMapBase {
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>
class PersistentValueMap : public PersistentValueMapBase<K, V, Traits> {