Commit 0781f42b authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[global-handles] Deprecate unused methods

Bug: chromium:923361
Change-Id: I520b2778b8a2fe3fcd52570f3a91758bc949f374
Reviewed-on: https://chromium-review.googlesource.com/c/1425897
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58975}
parent 1c1c2e51
......@@ -568,7 +568,9 @@ template <class T> class PersistentBase {
V8_INLINE bool IsIndependent() const);
/** Checks if the handle holds the only reference to an object. */
V8_INLINE bool IsNearDeath() const;
V8_DEPRECATE_SOON(
"Garbage collection internal state should not be relied on.",
V8_INLINE bool IsNearDeath() const);
/** Returns true if the handle's reference is weak. */
V8_INLINE bool IsWeak() const;
......@@ -8317,7 +8319,9 @@ class V8_EXPORT Isolate {
* garbage collection but is free to visit an arbitrary superset of these
* objects.
*/
void VisitHandlesForPartialDependence(PersistentHandleVisitor* visitor);
V8_DEPRECATE_SOON(
"Use VisitHandlesWithClassIds",
void VisitHandlesForPartialDependence(PersistentHandleVisitor* visitor));
/**
* Iterates through all the persistent handles in the current isolate's heap
......
......@@ -21164,7 +21164,17 @@ TEST(PersistentHandleInNewSpaceVisitor) {
CHECK_EQ(42, object2.WrapperClassId());
Visitor42 visitor(&object2);
#if __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
#endif
// VisitHandlesForPartialDependence is marked deprecated. This test will be
// removed with the API method.
isolate->VisitHandlesForPartialDependence(&visitor);
#if __clang__
#pragma clang diagnostic pop
#endif
CHECK_EQ(1, visitor.counter_);
object1.Reset();
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