Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09e3318b authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "RecipientList&friends: virtual destructors" into main

parents 89bdcd08 d3d65362
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -590,7 +590,7 @@ class RecipientList : public RefBase {

public:
    RecipientList();
    ~RecipientList();
    virtual ~RecipientList();

    void add(const sp<JavaRecipient<T> >& recipient);
    void remove(const sp<JavaRecipient<T> >& recipient);
@@ -753,7 +753,7 @@ public:
        gcIfManyNewRefs(env);
    }

    ~JavaDeathRecipient() {
    virtual ~JavaDeathRecipient() {
        gNumDeathRefsDeleted.fetch_add(1, std::memory_order_relaxed);
    }

@@ -821,6 +821,8 @@ public:
                                  const sp<RecipientList<IBinder::FrozenStateChangeCallback>>& list)
          : JavaRecipient(env, recipient, list, /*useWeakReference=*/true) {}

    virtual ~JavaFrozenStateChangeCallback() {}

    void onStateChanged(const wp<IBinder>& who, State state) {
        LOG_DEATH_FREEZE("Receiving onStateChanged() on JavaFrozenStateChangeCallback %p. state: "
                         "%s\n",