NEW232193
Remove unnecessary refcount increase when using m_player in MediaPlayerPrivateRemote
https://bugs.webkit.org/show_bug.cgi?id=232193
Summary Remove unnecessary refcount increase when using m_player in MediaPlayerPrivat...
Jean-Yves Avenard [:jya]
Reported 2021-10-22 20:52:03 PDT
As mentioned in: https://bugs.webkit.org/show_bug.cgi?id=232124#c3 We have a lot of this code pattern: ``` if (RefPtr player = m_player.get()) m_player->addAudioTrack(addResult.iterator->value); ``` there's no side effect possible when calling m_player here, so there's no need to keep a strong reference : doing: ``` if (m_player) m_player->addAudioTrack(addResult.iterator->value); ``` is fine
Attachments
Patch (18.77 KB, patch)
2021-10-24 21:32 PDT, Jean-Yves Avenard [:jya]
jean-yves.avenard: review?
Radar WebKit Bug Importer
Comment 1 2021-10-22 20:53:31 PDT
Jean-Yves Avenard [:jya]
Comment 2 2021-10-24 21:32:59 PDT
Note You need to log in before you can comment on or make changes to this bug.