Title: [211298] trunk/Source/WebCore
Revision
211298
Author
cdu...@apple.com
Date
2017-01-27 12:35:53 -0800 (Fri, 27 Jan 2017)

Log Message

Fix diagnostic logging in media code
https://bugs.webkit.org/show_bug.cgi?id=167510

Reviewed by Alex Christensen.

Fix diagnostic logging in media code. It should not use logDiagnosticMessageWithValue()
with a non-numeric value.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::updatePlayState):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (211297 => 211298)


--- trunk/Source/WebCore/ChangeLog	2017-01-27 20:35:52 UTC (rev 211297)
+++ trunk/Source/WebCore/ChangeLog	2017-01-27 20:35:53 UTC (rev 211298)
@@ -1,3 +1,17 @@
+2017-01-27  Chris Dumez  <cdu...@apple.com>
+
+        Fix diagnostic logging in media code
+        https://bugs.webkit.org/show_bug.cgi?id=167510
+
+        Reviewed by Alex Christensen.
+
+        Fix diagnostic logging in media code. It should not use logDiagnosticMessageWithValue()
+        with a non-numeric value.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::loadResource):
+        (WebCore::HTMLMediaElement::updatePlayState):
+
 2017-01-27  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         [Cocoa] Prepare ComplexTextController for unit testing

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (211297 => 211298)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2017-01-27 20:35:52 UTC (rev 211297)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2017-01-27 20:35:53 UTC (rev 211298)
@@ -1455,7 +1455,7 @@
     }
 
     // Log that we started loading a media element.
-    page->diagnosticLoggingClient().logDiagnosticMessageWithValue(DiagnosticLoggingKeys::mediaKey(), isVideo() ? DiagnosticLoggingKeys::videoKey() : DiagnosticLoggingKeys::audioKey(), DiagnosticLoggingKeys::loadingKey(), ShouldSample::No);
+    page->diagnosticLoggingClient().logDiagnosticMessage(isVideo() ? DiagnosticLoggingKeys::videoKey() : DiagnosticLoggingKeys::audioKey(), DiagnosticLoggingKeys::loadingKey(), ShouldSample::No);
 
     m_firstTimePlaying = true;
 
@@ -4903,7 +4903,7 @@
             if (m_firstTimePlaying) {
                 // Log that a media element was played.
                 if (auto* page = document().page())
-                    page->diagnosticLoggingClient().logDiagnosticMessageWithValue(DiagnosticLoggingKeys::mediaKey(), isVideo() ? DiagnosticLoggingKeys::videoKey() : DiagnosticLoggingKeys::audioKey(), DiagnosticLoggingKeys::playedKey(), ShouldSample::No);
+                    page->diagnosticLoggingClient().logDiagnosticMessage(isVideo() ? DiagnosticLoggingKeys::videoKey() : DiagnosticLoggingKeys::audioKey(), DiagnosticLoggingKeys::playedKey(), ShouldSample::No);
                 m_firstTimePlaying = false;
             }
 

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp (211297 => 211298)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2017-01-27 20:35:52 UTC (rev 211297)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2017-01-27 20:35:53 UTC (rev 211298)
@@ -218,11 +218,6 @@
     return ASCIILiteral("mainResource");
 }
 
-String DiagnosticLoggingKeys::mediaKey()
-{
-    return ASCIILiteral("media");
-}
-
 String DiagnosticLoggingKeys::isErrorPageKey()
 {
     return ASCIILiteral("isErrorPage");

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.h (211297 => 211298)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2017-01-27 20:35:52 UTC (rev 211297)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2017-01-27 20:35:53 UTC (rev 211298)
@@ -75,7 +75,6 @@
     static String isLoadingKey();
     static String mainDocumentErrorKey();
     static String mainResourceKey();
-    static String mediaKey();
     static String mediaLoadedKey();
     static String mediaLoadingFailedKey();
     WEBCORE_EXPORT static String missingValidatorFieldsKey();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to