Title: [271418] trunk/Source/WebCore
- Revision
- 271418
- Author
- [email protected]
- Date
- 2021-01-12 14:47:50 -0800 (Tue, 12 Jan 2021)
Log 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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (271417 => 271418)
--- trunk/Source/WebCore/ChangeLog 2021-01-12 22:47:15 UTC (rev 271417)
+++ trunk/Source/WebCore/ChangeLog 2021-01-12 22:47:50 UTC (rev 271418)
@@ -1,3 +1,21 @@
+2021-01-12 Eric Carlson <[email protected]>
+
+ [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.
+
2021-01-12 Chris Fleizach <[email protected]>
AX: Implement aria-braillelabel and aria-brailleroledescription
Modified: trunk/Source/WebCore/dom/Document.cpp (271417 => 271418)
--- trunk/Source/WebCore/dom/Document.cpp 2021-01-12 22:47:15 UTC (rev 271417)
+++ trunk/Source/WebCore/dom/Document.cpp 2021-01-12 22:47:50 UTC (rev 271418)
@@ -550,12 +550,12 @@
logger->setEnabled(sharedLoggerOwner(), alwaysOnLoggingAllowed);
}
-auto Document::addToDocumentsMap() -> DocumentsMap::AddResult
+void Document::addToDocumentsMap()
{
auto addResult = allDocumentsMap().add(m_identifier, this);
+ ASSERT_UNUSED(addResult, addResult.isNewEntry);
+
configureSharedLogger();
-
- return addResult;
}
void Document::removeFromDocumentsMap()
@@ -639,8 +639,7 @@
, m_editor(makeUniqueRef<Editor>(*this))
, m_selection(makeUniqueRef<FrameSelection>(this))
{
- auto addResult = addToDocumentsMap();
- ASSERT_UNUSED(addResult, addResult.isNewEntry);
+ addToDocumentsMap();
// We depend on the url getting immediately set in subframes, but we
// also depend on the url NOT getting immediately set in opened windows.
Modified: trunk/Source/WebCore/dom/Document.h (271417 => 271418)
--- trunk/Source/WebCore/dom/Document.h 2021-01-12 22:47:15 UTC (rev 271417)
+++ trunk/Source/WebCore/dom/Document.h 2021-01-12 22:47:50 UTC (rev 271418)
@@ -1721,7 +1721,7 @@
void didLogMessage(const WTFLogChannel&, WTFLogLevel, Vector<JSONLogValue>&&) final;
static void configureSharedLogger();
- DocumentsMap::AddResult addToDocumentsMap();
+ void addToDocumentsMap();
void removeFromDocumentsMap();
const Ref<const Settings> m_settings;
Modified: trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp (271417 => 271418)
--- trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp 2021-01-12 22:47:15 UTC (rev 271417)
+++ trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp 2021-01-12 22:47:50 UTC (rev 271418)
@@ -62,7 +62,7 @@
template<typename> struct LogArgument;
template<> struct LogArgument<webm::TrackType> {
- static String toString(webm::TrackType type)
+ static ASCIILiteral toString(webm::TrackType type)
{
switch (type) {
case webm::TrackType::kVideo: return "Video"_s;
@@ -78,7 +78,7 @@
};
template<> struct LogArgument<webm::Id> {
- static String toString(webm::Id id)
+ static ASCIILiteral toString(webm::Id id)
{
switch (id) {
case webm::Id::kEbml: return "Ebml"_s;
@@ -235,7 +235,7 @@
};
template<> struct LogArgument<WebCore::SourceBufferParserWebM::State> {
- static String toString(WebCore::SourceBufferParserWebM::State state)
+ static ASCIILiteral toString(WebCore::SourceBufferParserWebM::State state)
{
switch (state) {
case WebCore::SourceBufferParserWebM::State::None: return "None"_s;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes