Changeset 260815 in webkit


Ignore:
Timestamp:
Apr 28, 2020 3:58:24 AM (4 years ago)
Author:
cturner@igalia.com
Message:

[EME][CDMProxy] Default initialize m_numDecryptorsWaitingForKey member
https://bugs.webkit.org/show_bug.cgi?id=210970

Reviewed by Xabier Rodriguez-Calvar.

This was causing non-deterministic reads of the
m_numDecryptorsWaitingForKey member. Sometimes a waiting for key
event would fail to fire and cause test failures. I thought
std::atomic<int> would default initialize to zero, but after
spec-diving I realise now I was wrong about that.

Test: encrypted-media/clearkey-mp4-waiting-for-a-key.https.html

  • platform/encryptedmedia/CDMProxy.h:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r260814 r260815  
     12020-04-28  Charlie Turner  <cturner@igalia.com>
     2
     3        [EME][CDMProxy] Default initialize m_numDecryptorsWaitingForKey member
     4        https://bugs.webkit.org/show_bug.cgi?id=210970
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        This was causing non-deterministic reads of the
     9        m_numDecryptorsWaitingForKey member. Sometimes a waiting for key
     10        event would fail to fire and cause test failures. I thought
     11        std::atomic<int> would default initialize to zero, but after
     12        spec-diving I realise now I was wrong about that.
     13
     14        Test: encrypted-media/clearkey-mp4-waiting-for-a-key.https.html
     15
     16        * platform/encryptedmedia/CDMProxy.h:
     17
    1182020-04-28  Youenn Fablet  <youenn@apple.com>
    219
  • trunk/Source/WebCore/platform/encryptedmedia/CDMProxy.h

    r260568 r260815  
    195195    MediaPlayer* m_player { nullptr }; // FIXME: MainThread<T>?
    196196
    197     std::atomic<int> m_numDecryptorsWaitingForKey;
     197    std::atomic<int> m_numDecryptorsWaitingForKey { 0 };
    198198    Vector<RefPtr<CDMInstanceSession>> m_sessions;
    199199
Note: See TracChangeset for help on using the changeset viewer.