Changeset 211376 in webkit


Ignore:
Timestamp:
Jan 30, 2017 10:45:21 AM (7 years ago)
Author:
Chris Dumez
Message:

Update DiagnosticLoggingClient::logDiagnosticMessageWithValue() to take in the value as a double
https://bugs.webkit.org/show_bug.cgi?id=167536

Reviewed by Darin Adler.

Update DiagnosticLoggingClient::logDiagnosticMessageWithValue() to take in the value as a double
instead of a string. The value needs to be numeric and the current API is error-prone.

Source/WebCore:

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerEngineFailedToLoad):

  • loader/EmptyClients.cpp:
  • page/DiagnosticLoggingClient.h:

Source/WebKit2:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::logDiagnosticMessage):
(WebKit::NetworkProcess::logDiagnosticMessageWithResult):
(WebKit::NetworkProcess::logDiagnosticMessageWithValue):

  • NetworkProcess/NetworkProcess.h:
  • Scripts/webkit/messages.py:

(headers_for_type):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/HighPerformanceGraphicsUsageSampler.cpp:

(WebKit::HighPerformanceGraphicsUsageSampler::timerFired):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::logDiagnosticMessage):
(WebKit::NetworkProcessProxy::logDiagnosticMessageWithResult):
(WebKit::NetworkProcessProxy::logDiagnosticMessageWithValue):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/PerActivityStateCPUUsageSampler.cpp:

(WebKit::PerActivityStateCPUUsageSampler::loggingTimerFired):

  • UIProcess/WebBackForwardList.cpp:

(WebKit::WebBackForwardList::goToItem):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::logDiagnosticMessage):
(WebKit::WebPageProxy::logDiagnosticMessageWithResult):
(WebKit::WebPageProxy::logDiagnosticMessageWithValue):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:

(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):

  • WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
Location:
trunk/Source
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r211375 r211376  
     12017-01-30  Chris Dumez  <cdumez@apple.com>
     2
     3        Update DiagnosticLoggingClient::logDiagnosticMessageWithValue() to take in the value as a double
     4        https://bugs.webkit.org/show_bug.cgi?id=167536
     5
     6        Reviewed by Darin Adler.
     7
     8        Update DiagnosticLoggingClient::logDiagnosticMessageWithValue() to take in the value as a double
     9        instead of a string. The value needs to be numeric and the current API is error-prone.
     10
     11        * html/HTMLMediaElement.cpp:
     12        (WebCore::HTMLMediaElement::mediaPlayerEngineFailedToLoad):
     13        * loader/EmptyClients.cpp:
     14        * page/DiagnosticLoggingClient.h:
     15
    1162017-01-30  Ryan Haddad  <ryanhaddad@apple.com>
    217
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r211298 r211376  
    64736473
    64746474    if (auto* page = document().page())
    6475         page->diagnosticLoggingClient().logDiagnosticMessageWithValue(DiagnosticLoggingKeys::engineFailedToLoadKey(), m_player->engineDescription(), String::number(m_player->platformErrorCode()), ShouldSample::No);
     6475        page->diagnosticLoggingClient().logDiagnosticMessageWithValue(DiagnosticLoggingKeys::engineFailedToLoadKey(), m_player->engineDescription(), m_player->platformErrorCode(), 4, ShouldSample::No);
    64766476}
    64776477
  • trunk/Source/WebCore/loader/EmptyClients.cpp

    r211033 r211376  
    117117    void logDiagnosticMessage(const String&, const String&, ShouldSample) final { }
    118118    void logDiagnosticMessageWithResult(const String&, const String&, DiagnosticLoggingResultType, ShouldSample) final { }
    119     void logDiagnosticMessageWithValue(const String&, const String&, const String&, ShouldSample) final { }
     119    void logDiagnosticMessageWithValue(const String&, const String&, double, unsigned, ShouldSample) final { }
    120120};
    121121
  • trunk/Source/WebCore/page/DiagnosticLoggingClient.h

    r211233 r211376  
    4040    virtual void logDiagnosticMessage(const String& message, const String& description, ShouldSample) = 0;
    4141    virtual void logDiagnosticMessageWithResult(const String& message, const String& description, DiagnosticLoggingResultType, ShouldSample) = 0;
    42     // FIXME: rename this to logDiagnosticMessageWithNumericValue().
    43     virtual void logDiagnosticMessageWithValue(const String& message, const String& description, const String& value, ShouldSample) = 0;
     42    virtual void logDiagnosticMessageWithValue(const String& message, const String& description, double value, unsigned significantFigures, ShouldSample) = 0;
    4443
    4544    static bool shouldLogAfterSampling(ShouldSample);
  • trunk/Source/WebKit2/ChangeLog

    r211368 r211376  
     12017-01-30  Chris Dumez  <cdumez@apple.com>
     2
     3        Update DiagnosticLoggingClient::logDiagnosticMessageWithValue() to take in the value as a double
     4        https://bugs.webkit.org/show_bug.cgi?id=167536
     5
     6        Reviewed by Darin Adler.
     7
     8        Update DiagnosticLoggingClient::logDiagnosticMessageWithValue() to take in the value as a double
     9        instead of a string. The value needs to be numeric and the current API is error-prone.
     10
     11        * NetworkProcess/NetworkProcess.cpp:
     12        (WebKit::NetworkProcess::logDiagnosticMessage):
     13        (WebKit::NetworkProcess::logDiagnosticMessageWithResult):
     14        (WebKit::NetworkProcess::logDiagnosticMessageWithValue):
     15        * NetworkProcess/NetworkProcess.h:
     16        * Scripts/webkit/messages.py:
     17        (headers_for_type):
     18        * Shared/WebCoreArgumentCoders.h:
     19        * UIProcess/HighPerformanceGraphicsUsageSampler.cpp:
     20        (WebKit::HighPerformanceGraphicsUsageSampler::timerFired):
     21        * UIProcess/Network/NetworkProcessProxy.cpp:
     22        (WebKit::NetworkProcessProxy::logDiagnosticMessage):
     23        (WebKit::NetworkProcessProxy::logDiagnosticMessageWithResult):
     24        (WebKit::NetworkProcessProxy::logDiagnosticMessageWithValue):
     25        * UIProcess/Network/NetworkProcessProxy.h:
     26        * UIProcess/Network/NetworkProcessProxy.messages.in:
     27        * UIProcess/PerActivityStateCPUUsageSampler.cpp:
     28        (WebKit::PerActivityStateCPUUsageSampler::loggingTimerFired):
     29        * UIProcess/WebBackForwardList.cpp:
     30        (WebKit::WebBackForwardList::goToItem):
     31        * UIProcess/WebPageProxy.cpp:
     32        (WebKit::WebPageProxy::logDiagnosticMessage):
     33        (WebKit::WebPageProxy::logDiagnosticMessageWithResult):
     34        (WebKit::WebPageProxy::logDiagnosticMessageWithValue):
     35        * UIProcess/WebPageProxy.h:
     36        * UIProcess/WebPageProxy.messages.in:
     37        * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
     38        (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage):
     39        (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult):
     40        (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue):
     41        * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
     42
    1432017-01-30  Csaba Osztrogonác  <ossy@webkit.org>
    244
  • trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp

    r209498 r211376  
    586586        return;
    587587
    588     parentProcessConnection()->send(Messages::NetworkProcessProxy::LogSampledDiagnosticMessage(webPageID, message, description), 0);
     588    parentProcessConnection()->send(Messages::NetworkProcessProxy::LogDiagnosticMessage(webPageID, message, description, ShouldSample::No), 0);
    589589}
    590590
     
    594594        return;
    595595
    596     parentProcessConnection()->send(Messages::NetworkProcessProxy::LogSampledDiagnosticMessageWithResult(webPageID, message, description, result), 0);
    597 }
    598 
    599 void NetworkProcess::logDiagnosticMessageWithValue(uint64_t webPageID, const String& message, const String& description, const String& value, ShouldSample shouldSample)
     596    parentProcessConnection()->send(Messages::NetworkProcessProxy::LogDiagnosticMessageWithResult(webPageID, message, description, result, ShouldSample::No), 0);
     597}
     598
     599void NetworkProcess::logDiagnosticMessageWithValue(uint64_t webPageID, const String& message, const String& description, double value, unsigned significantFigures, ShouldSample shouldSample)
    600600{
    601601    if (!DiagnosticLoggingClient::shouldLogAfterSampling(shouldSample))
    602602        return;
    603603
    604     parentProcessConnection()->send(Messages::NetworkProcessProxy::LogSampledDiagnosticMessageWithValue(webPageID, message, description, value), 0);
     604    parentProcessConnection()->send(Messages::NetworkProcessProxy::LogDiagnosticMessageWithValue(webPageID, message, description, value, significantFigures, ShouldSample::No), 0);
    605605}
    606606
  • trunk/Source/WebKit2/NetworkProcess/NetworkProcess.h

    r210921 r211376  
    9696    void logDiagnosticMessage(uint64_t webPageID, const String& message, const String& description, WebCore::ShouldSample);
    9797    void logDiagnosticMessageWithResult(uint64_t webPageID, const String& message, const String& description, WebCore::DiagnosticLoggingResultType, WebCore::ShouldSample);
    98     void logDiagnosticMessageWithValue(uint64_t webPageID, const String& message, const String& description, const String& value, WebCore::ShouldSample);
     98    void logDiagnosticMessageWithValue(uint64_t webPageID, const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample);
    9999
    100100#if PLATFORM(COCOA)
  • trunk/Source/WebKit2/Scripts/webkit/messages.py

    r211356 r211376  
    361361        'WebCore::PluginInfo': ['<WebCore/PluginData.h>'],
    362362        'WebCore::RecentSearch': ['<WebCore/SearchPopupMenu.h>'],
     363        'WebCore::ShouldSample': ['<WebCore/DiagnosticLoggingClient.h>'],
    363364        'WebCore::TextCheckingRequestData': ['<WebCore/TextChecking.h>'],
    364365        'WebCore::TextCheckingResult': ['<WebCore/TextCheckerClient.h>'],
  • trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h

    r210921 r211376  
    2828#include "ArgumentCoders.h"
    2929#include <WebCore/ColorSpace.h>
     30#include <WebCore/DiagnosticLoggingClient.h>
    3031#include <WebCore/FrameLoaderTypes.h>
    3132#include <WebCore/IndexedDB.h>
     
    645646};
    646647
     648template<> struct EnumTraits<WebCore::ShouldSample> {
     649    using values = EnumValues<
     650        WebCore::ShouldSample,
     651        WebCore::ShouldSample::No,
     652        WebCore::ShouldSample::Yes
     653    >;
     654};
     655
    647656#if ENABLE(INDEXED_DATABASE)
    648657template<> struct EnumTraits<WebCore::IndexedDB::GetAllType> {
  • trunk/Source/WebKit2/UIProcess/HighPerformanceGraphicsUsageSampler.cpp

    r211229 r211376  
    7373        state = DiagnosticLoggingKeys::activeInBackgroundTabOnlyKey();
    7474
    75     firstPage->logDiagnosticMessage(DiagnosticLoggingKeys::webGLStateKey(), state, false);
     75    firstPage->logDiagnosticMessage(DiagnosticLoggingKeys::webGLStateKey(), state, ShouldSample::No);
    7676}
    7777
  • trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp

    r210887 r211376  
    317317}
    318318
    319 void NetworkProcessProxy::logSampledDiagnosticMessage(uint64_t pageID, const String& message, const String& description)
     319void NetworkProcessProxy::logDiagnosticMessage(uint64_t pageID, const String& message, const String& description, WebCore::ShouldSample shouldSample)
    320320{
    321321    WebPageProxy* page = WebProcessProxy::webPage(pageID);
     
    325325        return;
    326326
    327     page->logSampledDiagnosticMessage(message, description);
    328 }
    329 
    330 void NetworkProcessProxy::logSampledDiagnosticMessageWithResult(uint64_t pageID, const String& message, const String& description, uint32_t result)
     327    page->logDiagnosticMessage(message, description, shouldSample);
     328}
     329
     330void NetworkProcessProxy::logDiagnosticMessageWithResult(uint64_t pageID, const String& message, const String& description, uint32_t result, WebCore::ShouldSample shouldSample)
    331331{
    332332    WebPageProxy* page = WebProcessProxy::webPage(pageID);
     
    336336        return;
    337337
    338     page->logSampledDiagnosticMessageWithResult(message, description, result);
    339 }
    340 
    341 void NetworkProcessProxy::logSampledDiagnosticMessageWithValue(uint64_t pageID, const String& message, const String& description, const String& value)
     338    page->logDiagnosticMessageWithResult(message, description, result, shouldSample);
     339}
     340
     341void NetworkProcessProxy::logDiagnosticMessageWithValue(uint64_t pageID, const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample shouldSample)
    342342{
    343343    WebPageProxy* page = WebProcessProxy::webPage(pageID);
     
    347347        return;
    348348
    349     page->logSampledDiagnosticMessageWithValue(message, description, value);
     349    page->logDiagnosticMessageWithValue(message, description, value, significantFigures, shouldSample);
    350350}
    351351
  • trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h

    r210887 r211376  
    4040class ProtectionSpace;
    4141class ResourceRequest;
     42enum class ShouldSample;
    4243class SecurityOrigin;
    4344struct SecurityOriginData;
     
    110111    void didDeleteWebsiteDataForOrigins(uint64_t callbackID);
    111112    void grantSandboxExtensionsToDatabaseProcessForBlobs(uint64_t requestID, const Vector<String>& paths);
    112     void logSampledDiagnosticMessage(uint64_t pageID, const String& message, const String& description);
    113     void logSampledDiagnosticMessageWithResult(uint64_t pageID, const String& message, const String& description, uint32_t result);
    114     void logSampledDiagnosticMessageWithValue(uint64_t pageID, const String& message, const String& description, const String& value);
     113    void logDiagnosticMessage(uint64_t pageID, const String& message, const String& description, WebCore::ShouldSample);
     114    void logDiagnosticMessageWithResult(uint64_t pageID, const String& message, const String& description, uint32_t result, WebCore::ShouldSample);
     115    void logDiagnosticMessageWithValue(uint64_t pageID, const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample);
    115116#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
    116117    void canAuthenticateAgainstProtectionSpace(uint64_t loaderID, uint64_t pageID, uint64_t frameID, const WebCore::ProtectionSpace&);
  • trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.messages.in

    r202511 r211376  
    3636
    3737    # Diagnostic messages logging
    38     LogSampledDiagnosticMessage(uint64_t pageID, String message, String description)
    39     LogSampledDiagnosticMessageWithResult(uint64_t pageID, String message, String description, uint32_t result)
    40     LogSampledDiagnosticMessageWithValue(uint64_t pageID, String message, String description, String value)
     38    LogDiagnosticMessage(uint64_t pageID, String message, String description, enum WebCore::ShouldSample shouldSample)
     39    LogDiagnosticMessageWithResult(uint64_t pageID, String message, String description, uint32_t result, enum WebCore::ShouldSample shouldSample)
     40    LogDiagnosticMessageWithValue(uint64_t pageID, String message, String description, double value, unsigned significantFigures, enum WebCore::ShouldSample shouldSample)
    4141
    4242#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
  • trunk/Source/WebKit2/UIProcess/PerActivityStateCPUUsageSampler.cpp

    r211295 r211376  
    7272}
    7373
    74 static String toStringRoundingSignificantFigures(double value, unsigned significantFigures)
    75 {
    76     DecimalNumber decimal(value, RoundingSignificantFigures, significantFigures);
    77     NumberToLStringBuffer buffer;
    78     unsigned length = decimal.toStringDecimal(buffer, WTF::NumberToStringBufferLength);
    79     return String(buffer, length);
    80 }
    81 
    8274void PerActivityStateCPUUsageSampler::loggingTimerFired()
    8375{
     
    9486        double cpuUsage = static_cast<double>(pair.value * 100.) / cpuTimeDelta;
    9587        String activityStateKey = loggingKeyForActivityState(pair.key);
    96         page->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::cpuUsageKey(), activityStateKey, toStringRoundingSignificantFigures(cpuUsage, 2), false);
     88        page->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::cpuUsageKey(), activityStateKey, cpuUsage, 2, ShouldSample::No);
    9789        RELEASE_LOG(PerformanceLogging, "WebContent processes used %.1f%% CPU in %s state", cpuUsage, activityStateKey.utf8().data());
    9890    }
  • trunk/Source/WebKit2/UIProcess/WebBackForwardList.cpp

    r211304 r211376  
    3030#include "SessionState.h"
    3131#include "WebPageProxy.h"
     32#include <WebCore/DiagnosticLoggingClient.h>
    3233#include <WebCore/DiagnosticLoggingKeys.h>
    3334
    3435namespace WebKit {
     36
     37using namespace WebCore;
    3538
    3639// FIXME: Make this static once WebBackForwardListCF.cpp is no longer using it.
     
    180183        unsigned delta = m_entries.size() - targetIndex - 1;
    181184        String deltaValue = delta > 10 ? ASCIILiteral("over10") : String::number(delta);
    182         m_page->logDiagnosticMessage(WebCore::DiagnosticLoggingKeys::backNavigationDeltaKey(), deltaValue, false /* shouldSample */);
     185        m_page->logDiagnosticMessage(WebCore::DiagnosticLoggingKeys::backNavigationDeltaKey(), deltaValue, ShouldSample::No);
    183186    }
    184187
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r211312 r211376  
    51695169#endif
    51705170
    5171 void WebPageProxy::logDiagnosticMessage(const String& message, const String& description, bool shouldSample)
    5172 {
    5173     if (!DiagnosticLoggingClient::shouldLogAfterSampling(shouldSample ? ShouldSample::Yes : ShouldSample::No))
    5174         return;
    5175 
    5176     logSampledDiagnosticMessage(message, description);
    5177 }
    5178 
    5179 void WebPageProxy::logDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result, bool shouldSample)
    5180 {
    5181     if (!DiagnosticLoggingClient::shouldLogAfterSampling(shouldSample ? ShouldSample::Yes : ShouldSample::No))
    5182         return;
    5183 
    5184     logSampledDiagnosticMessageWithResult(message, description, static_cast<WebCore::DiagnosticLoggingResultType>(result));
    5185 }
    5186 
    5187 void WebPageProxy::logDiagnosticMessageWithValue(const String& message, const String& description, const String& value, bool shouldSample)
    5188 {
    5189     if (!DiagnosticLoggingClient::shouldLogAfterSampling(shouldSample ? ShouldSample::Yes : ShouldSample::No))
    5190         return;
    5191 
    5192     logSampledDiagnosticMessageWithValue(message, description, value);
    5193 }
    5194 
    5195 void WebPageProxy::logSampledDiagnosticMessage(const String& message, const String& description)
    5196 {
     5171void WebPageProxy::logDiagnosticMessage(const String& message, const String& description, WebCore::ShouldSample shouldSample)
     5172{
     5173    if (!DiagnosticLoggingClient::shouldLogAfterSampling(shouldSample))
     5174        return;
     5175
    51975176    m_diagnosticLoggingClient->logDiagnosticMessage(this, message, description);
    51985177}
    51995178
    5200 void WebPageProxy::logSampledDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result)
    5201 {
     5179void WebPageProxy::logDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result, WebCore::ShouldSample shouldSample)
     5180{
     5181    if (!DiagnosticLoggingClient::shouldLogAfterSampling(shouldSample))
     5182        return;
     5183
    52025184    m_diagnosticLoggingClient->logDiagnosticMessageWithResult(this, message, description, static_cast<WebCore::DiagnosticLoggingResultType>(result));
    52035185}
    52045186
    5205 void WebPageProxy::logSampledDiagnosticMessageWithValue(const String& message, const String& description, const String& value)
    5206 {
    5207     m_diagnosticLoggingClient->logDiagnosticMessageWithValue(this, message, description, value);
     5187void WebPageProxy::logDiagnosticMessageWithValue(const String& message, const String& description, double value, unsigned significantFigures, ShouldSample shouldSample)
     5188{
     5189    if (!DiagnosticLoggingClient::shouldLogAfterSampling(shouldSample))
     5190        return;
     5191
     5192    m_diagnosticLoggingClient->logDiagnosticMessageWithValue(this, message, description, String::number(value, significantFigures));
    52085193}
    52095194
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r211356 r211376  
    157157class TextIndicator;
    158158class ValidationBubble;
    159 enum class HasInsecureContent;
     159
    160160struct DictionaryPopupInfo;
    161161struct ExceptionDetails;
     
    167167struct ViewportAttributes;
    168168struct WindowFeatures;
     169
     170enum class HasInsecureContent;
     171enum class ShouldSample;
    169172}
    170173
     
    11241127
    11251128    // Diagnostic messages logging.
    1126     void logDiagnosticMessage(const String& message, const String& description, bool shouldSample);
    1127     void logDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result, bool shouldSample);
    1128     void logDiagnosticMessageWithValue(const String& message, const String& description, const String& value, bool shouldSample);
    1129     void logSampledDiagnosticMessage(const String& message, const String& description);
    1130     void logSampledDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result);
    1131     void logSampledDiagnosticMessageWithValue(const String& message, const String& description, const String& value);
     1129    void logDiagnosticMessage(const String& message, const String& description, WebCore::ShouldSample);
     1130    void logDiagnosticMessageWithResult(const String& message, const String& description, uint32_t result, WebCore::ShouldSample);
     1131    void logDiagnosticMessageWithValue(const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample);
    11321132
    11331133    // Form validation messages.
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in

    r211356 r211376  
    236236
    237237    # Diagnostic messages logging
    238     LogSampledDiagnosticMessage(String message, String description)
    239     LogSampledDiagnosticMessageWithResult(String message, String description, uint32_t result)
    240     LogSampledDiagnosticMessageWithValue(String message, String description, String value)
     238    LogDiagnosticMessage(String message, String description, enum WebCore::ShouldSample shouldSample)
     239    LogDiagnosticMessageWithResult(String message, String description, uint32_t result, enum WebCore::ShouldSample shouldSample)
     240    LogDiagnosticMessageWithValue(String message, String description, double value, unsigned significantFigures, enum WebCore::ShouldSample shouldSample)
    241241
    242242    # Editor notifications
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp

    r199955 r211376  
    3333namespace WebKit {
    3434
     35using namespace WebCore;
     36
    3537WebDiagnosticLoggingClient::WebDiagnosticLoggingClient(WebPage& page)
    3638    : m_page(page)
     
    5153    // FIXME: Remove this injected bundle API.
    5254    m_page.injectedBundleDiagnosticLoggingClient().logDiagnosticMessage(&m_page, message, description);
    53     m_page.send(Messages::WebPageProxy::LogSampledDiagnosticMessage(message, description));
     55    m_page.send(Messages::WebPageProxy::LogDiagnosticMessage(message, description, ShouldSample::No));
    5456}
    5557
     
    6365    // FIXME: Remove this injected bundle API.
    6466    m_page.injectedBundleDiagnosticLoggingClient().logDiagnosticMessageWithResult(&m_page, message, description, result);
    65     m_page.send(Messages::WebPageProxy::LogSampledDiagnosticMessageWithResult(message, description, result));
     67    m_page.send(Messages::WebPageProxy::LogDiagnosticMessageWithResult(message, description, result, ShouldSample::No));
    6668}
    6769
    68 void WebDiagnosticLoggingClient::logDiagnosticMessageWithValue(const String& message, const String& description, const String& value, WebCore::ShouldSample shouldSample)
     70void WebDiagnosticLoggingClient::logDiagnosticMessageWithValue(const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample shouldSample)
    6971{
    7072    ASSERT(!m_page.corePage() || m_page.corePage()->settings().diagnosticLoggingEnabled());
     
    7476
    7577    // FIXME: Remove this injected bundle API.
    76     m_page.injectedBundleDiagnosticLoggingClient().logDiagnosticMessageWithValue(&m_page, message, description, value);
    77     m_page.send(Messages::WebPageProxy::LogSampledDiagnosticMessageWithValue(message, description, value));
     78    m_page.injectedBundleDiagnosticLoggingClient().logDiagnosticMessageWithValue(&m_page, message, description, String::number(value, significantFigures));
     79    m_page.send(Messages::WebPageProxy::LogDiagnosticMessageWithValue(message, description, value, significantFigures, ShouldSample::No));
    7880}
    7981
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h

    r199955 r211376  
    4242    void logDiagnosticMessage(const String& message, const String& description, WebCore::ShouldSample) override;
    4343    void logDiagnosticMessageWithResult(const String& message, const String& description, WebCore::DiagnosticLoggingResultType, WebCore::ShouldSample) override;
    44     void logDiagnosticMessageWithValue(const String& message, const String& description, const String& value, WebCore::ShouldSample) override;
     44    void logDiagnosticMessageWithValue(const String& message, const String& description, double value, unsigned significantFigures, WebCore::ShouldSample) override;
    4545
    4646    WebPage& m_page;
Note: See TracChangeset for help on using the changeset viewer.