WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
232193
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?
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-10-22 20:53:31 PDT
<
rdar://problem/84574114
>
Jean-Yves Avenard [:jya]
Comment 2
2021-10-24 21:32:59 PDT
Created
attachment 442336
[details]
Patch
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug