Changeset 271418 in webkit


Ignore:
Timestamp:
Jan 12, 2021 2:47:50 PM (3 years ago)
Author:
eric.carlson@apple.com
Message:

[Mac] Add runtime logging to format reader and WebM parser
https://bugs.webkit.org/show_bug.cgi?id=220423
<rdar://problem/72896655>

Unreviewed, address post-review comments after r271270.

  • dom/Document.cpp:

(WebCore::Document::addToDocumentsMap): ASSERT that document was not already in the map.
(WebCore::Document::Document): Move ASSERT to addToDocumentsMap.

  • dom/Document.h:
  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WTF::LogArgument<webm::TrackType>::toString): Return ASCIILiteral instead of String.
(WTF::LogArgument<webm::Id>::toString): Ditto.
(WTF::LogArgument<WebCore::SourceBufferParserWebM::State>::toString): Ditto.

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r271416 r271418  
     12021-01-12  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [Mac] Add runtime logging to format reader and WebM parser
     4        https://bugs.webkit.org/show_bug.cgi?id=220423
     5        <rdar://problem/72896655>
     6
     7        Unreviewed, address post-review comments after r271270.
     8
     9        * dom/Document.cpp:
     10        (WebCore::Document::addToDocumentsMap): ASSERT that document was not already in the map.
     11        (WebCore::Document::Document): Move ASSERT to addToDocumentsMap.
     12        * dom/Document.h:
     13
     14        * platform/graphics/cocoa/SourceBufferParserWebM.cpp:
     15        (WTF::LogArgument<webm::TrackType>::toString): Return ASCIILiteral instead of String.
     16        (WTF::LogArgument<webm::Id>::toString): Ditto.
     17        (WTF::LogArgument<WebCore::SourceBufferParserWebM::State>::toString): Ditto.
     18
    1192021-01-12  Chris Fleizach  <cfleizach@apple.com>
    220
  • trunk/Source/WebCore/dom/Document.cpp

    r271401 r271418  
    551551}
    552552
    553 auto Document::addToDocumentsMap() -> DocumentsMap::AddResult
     553void Document::addToDocumentsMap()
    554554{
    555555    auto addResult = allDocumentsMap().add(m_identifier, this);
     556    ASSERT_UNUSED(addResult, addResult.isNewEntry);
     557
    556558    configureSharedLogger();
    557    
    558     return addResult;
    559559}
    560560
     
    640640    , m_selection(makeUniqueRef<FrameSelection>(this))
    641641{
    642     auto addResult = addToDocumentsMap();
    643     ASSERT_UNUSED(addResult, addResult.isNewEntry);
     642    addToDocumentsMap();
    644643
    645644    // We depend on the url getting immediately set in subframes, but we
  • trunk/Source/WebCore/dom/Document.h

    r271270 r271418  
    17221722    static void configureSharedLogger();
    17231723
    1724     DocumentsMap::AddResult addToDocumentsMap();
     1724    void addToDocumentsMap();
    17251725    void removeFromDocumentsMap();
    17261726
  • trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp

    r271270 r271418  
    6363
    6464template<> struct LogArgument<webm::TrackType> {
    65     static String toString(webm::TrackType type)
     65    static ASCIILiteral toString(webm::TrackType type)
    6666    {
    6767        switch (type) {
     
    7979
    8080template<> struct LogArgument<webm::Id> {
    81     static String toString(webm::Id id)
     81    static ASCIILiteral toString(webm::Id id)
    8282    {
    8383        switch (id) {
     
    236236
    237237template<> struct LogArgument<WebCore::SourceBufferParserWebM::State> {
    238     static String toString(WebCore::SourceBufferParserWebM::State state)
     238    static ASCIILiteral toString(WebCore::SourceBufferParserWebM::State state)
    239239    {
    240240        switch (state) {
Note: See TracChangeset for help on using the changeset viewer.