Diff
Modified: trunk/Source/WTF/ChangeLog (256744 => 256745)
--- trunk/Source/WTF/ChangeLog 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WTF/ChangeLog 2020-02-17 18:47:59 UTC (rev 256745)
@@ -1,3 +1,26 @@
+2020-02-17 Víctor Manuel Jáquez Leal <[email protected]>
+
+ a lot gcc warnings because of %{public}s format specifier
+ https://bugs.webkit.org/show_bug.cgi?id=207478
+
+ Reviewed by Darin Adler.
+
+ Add PUBLIC_LOG_STRING macro which is defined depending on if
+ os_log()[1] is used or rather old printf().
+
+ OS Logging processes format specifiers for privacy matters, for
+ example dynamic strings, which demands %{public}s. But these
+ specifiers are not valid for printf().
+
+ Calls to logging with this specifier, if they are not Mac/Darwing
+ exclusive, use this new macro to avoid gcc warnings.
+
+ 1. https://developer.apple.com/documentation/os/logging?language=objc
+
+ * wtf/Assertions.h:
+ * wtf/MemoryPressureHandler.cpp:
+ (WTF::MemoryPressureHandler::ReliefLogger::logMemoryUsageChange):
+
2020-02-17 Antti Koivisto <[email protected]>
[macOS] Add trace points for layer flush runloop observer
Modified: trunk/Source/WTF/wtf/Assertions.h (256744 => 256745)
--- trunk/Source/WTF/wtf/Assertions.h 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WTF/wtf/Assertions.h 2020-02-17 18:47:59 UTC (rev 256745)
@@ -484,6 +484,7 @@
/* RELEASE_LOG */
#if RELEASE_LOG_DISABLED
+#define PUBLIC_LOG_STRING "s"
#define RELEASE_LOG(channel, ...) ((void)0)
#define RELEASE_LOG_ERROR(channel, ...) LOG_ERROR(__VA_ARGS__)
#define RELEASE_LOG_FAULT(channel, ...) LOG_ERROR(__VA_ARGS__)
@@ -498,6 +499,7 @@
#define RELEASE_LOG_STACKTRACE(channel) ((void)0)
#else
+#define PUBLIC_LOG_STRING "{public}s"
#define RELEASE_LOG(channel, ...) os_log(LOG_CHANNEL(channel).osLogChannel, __VA_ARGS__)
#define RELEASE_LOG_ERROR(channel, ...) os_log_error(LOG_CHANNEL(channel).osLogChannel, __VA_ARGS__)
#define RELEASE_LOG_FAULT(channel, ...) os_log_fault(LOG_CHANNEL(channel).osLogChannel, __VA_ARGS__)
Modified: trunk/Source/WTF/wtf/MemoryPressureHandler.cpp (256744 => 256745)
--- trunk/Source/WTF/wtf/MemoryPressureHandler.cpp 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WTF/wtf/MemoryPressureHandler.cpp 2020-02-17 18:47:59 UTC (rev 256745)
@@ -275,16 +275,14 @@
void MemoryPressureHandler::ReliefLogger::logMemoryUsageChange()
{
#if !RELEASE_LOG_DISABLED
-#define STRING_SPECIFICATION "%{public}s"
#define MEMORYPRESSURE_LOG(...) RELEASE_LOG(MemoryPressure, __VA_ARGS__)
#else
-#define STRING_SPECIFICATION "%s"
#define MEMORYPRESSURE_LOG(...) WTFLogAlways(__VA_ARGS__)
#endif
auto currentMemory = platformMemoryUsage();
if (!currentMemory || !m_initialMemory) {
- MEMORYPRESSURE_LOG("Memory pressure relief: " STRING_SPECIFICATION ": (Unable to get dirty memory information for process)", m_logString);
+ MEMORYPRESSURE_LOG("Memory pressure relief: %" PUBLIC_LOG_STRING ": (Unable to get dirty memory information for process)", m_logString);
return;
}
@@ -291,7 +289,7 @@
long residentDiff = currentMemory->resident - m_initialMemory->resident;
long physicalDiff = currentMemory->physical - m_initialMemory->physical;
- MEMORYPRESSURE_LOG("Memory pressure relief: " STRING_SPECIFICATION ": res = %zu/%zu/%ld, res+swap = %zu/%zu/%ld",
+ MEMORYPRESSURE_LOG("Memory pressure relief: %" PUBLIC_LOG_STRING ": res = %zu/%zu/%ld, res+swap = %zu/%zu/%ld",
m_logString,
m_initialMemory->resident, currentMemory->resident, residentDiff,
m_initialMemory->physical, currentMemory->physical, physicalDiff);
Modified: trunk/Source/WebCore/ChangeLog (256744 => 256745)
--- trunk/Source/WebCore/ChangeLog 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WebCore/ChangeLog 2020-02-17 18:47:59 UTC (rev 256745)
@@ -1,3 +1,31 @@
+2020-02-17 Víctor Manuel Jáquez Leal <[email protected]>
+
+ a lot gcc warnings because of %{public}s format specifier
+ https://bugs.webkit.org/show_bug.cgi?id=207478
+
+ Reviewed by Darin Adler.
+
+ Add PUBLIC_LOG_STRING macro which is defined depending on if
+ os_log()[1] is used or rather old printf().
+
+ OS Logging processes format specifiers for privacy matters, for
+ example dynamic strings, which demands %{public}s. But these
+ specifiers are not valid for printf().
+
+ Calls to logging with this specifier, if they are not Mac/Darwing
+ exclusive, use this new macro to avoid gcc warnings.
+
+ 1. https://developer.apple.com/documentation/os/logging?language=objc
+
+ No new tests. Covered by existing tests.
+
+ * loader/AdClickAttribution.cpp:
+ (WebCore::AdClickAttribution::parseConversionRequest):
+ * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
+ (WebCore::doReleaseLogging):
+ * workers/service/server/RegistrationDatabase.cpp:
+ (WebCore::RegistrationDatabase::openSQLiteDatabase):
+
2020-02-17 Sihui Liu <[email protected]>
IndexedDB: index cursor iteration is slow when there are a lot of index records from different object stores
Modified: trunk/Source/WebCore/loader/AdClickAttribution.cpp (256744 => 256745)
--- trunk/Source/WebCore/loader/AdClickAttribution.cpp 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WebCore/loader/AdClickAttribution.cpp 2020-02-17 18:47:59 UTC (rev 256745)
@@ -59,7 +59,7 @@
auto path = StringView(redirectURL.string()).substring(redirectURL.pathStart(), redirectURL.pathEnd() - redirectURL.pathStart());
if (path.isEmpty() || !path.startsWith(adClickAttributionPathPrefix)) {
- RELEASE_LOG_INFO_IF(debugModeEnabled(), AdClickAttribution, "Conversion was not accepted because the URL path did not start with %{public}s.", adClickAttributionPathPrefix);
+ RELEASE_LOG_INFO_IF(debugModeEnabled(), AdClickAttribution, "Conversion was not accepted because the URL path did not start with %" PUBLIC_LOG_STRING ".", adClickAttributionPathPrefix);
return { };
}
Modified: trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp (256744 => 256745)
--- trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp 2020-02-17 18:47:59 UTC (rev 256745)
@@ -128,9 +128,9 @@
UNUSED_PARAM(message);
#else
if (severity == rtc::LS_ERROR)
- RELEASE_LOG_ERROR(WebRTC, "LibWebRTC error: %{public}s", message);
+ RELEASE_LOG_ERROR(WebRTC, "LibWebRTC error: %" PUBLIC_LOG_STRING, message);
else
- RELEASE_LOG(WebRTC, "LibWebRTC message: %{public}s", message);
+ RELEASE_LOG(WebRTC, "LibWebRTC message: %" PUBLIC_LOG_STRING, message);
#endif
}
Modified: trunk/Source/WebCore/workers/service/server/RegistrationDatabase.cpp (256744 => 256745)
--- trunk/Source/WebCore/workers/service/server/RegistrationDatabase.cpp 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WebCore/workers/service/server/RegistrationDatabase.cpp 2020-02-17 18:47:59 UTC (rev 256745)
@@ -160,7 +160,7 @@
String errorMessage = ensureValidRecordsTable();
if (!errorMessage.isNull()) {
- RELEASE_LOG_ERROR(ServiceWorker, "ensureValidRecordsTable failed, reason: %{public}s", errorMessage.utf8().data());
+ RELEASE_LOG_ERROR(ServiceWorker, "ensureValidRecordsTable failed, reason: %" PUBLIC_LOG_STRING, errorMessage.utf8().data());
doRecoveryAttempt();
return;
}
@@ -167,7 +167,7 @@
errorMessage = importRecords();
if (!errorMessage.isNull()) {
- RELEASE_LOG_ERROR(ServiceWorker, "importRecords failed, reason: %{public}s", errorMessage.utf8().data());
+ RELEASE_LOG_ERROR(ServiceWorker, "importRecords failed, reason: %" PUBLIC_LOG_STRING, errorMessage.utf8().data());
doRecoveryAttempt();
return;
}
Modified: trunk/Source/WebKit/ChangeLog (256744 => 256745)
--- trunk/Source/WebKit/ChangeLog 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WebKit/ChangeLog 2020-02-17 18:47:59 UTC (rev 256745)
@@ -1,3 +1,50 @@
+2020-02-17 Víctor Manuel Jáquez Leal <[email protected]>
+
+ a lot gcc warnings because of %{public}s format specifier
+ https://bugs.webkit.org/show_bug.cgi?id=207478
+
+ Reviewed by Darin Adler.
+
+ Add PUBLIC_LOG_STRING macro which is defined depending on if
+ os_log()[1] is used or rather old printf().
+
+ OS Logging processes format specifiers for privacy matters, for
+ example dynamic strings, which demands %{public}s. But these
+ specifiers are not valid for printf().
+
+ Calls to logging with this specifier, if they are not Mac/Darwing
+ exclusive, use this new macro to avoid gcc warnings.
+
+ 1. https://developer.apple.com/documentation/os/logging?language=objc
+
+ * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
+ (WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
+ (WebKit::ResourceLoadStatisticsDatabaseStore::openITPDatabase):
+ (WebKit::ResourceLoadStatisticsDatabaseStore::isCorrectTableSchema):
+ (WebKit::ResourceLoadStatisticsDatabaseStore::createUniqueIndices):
+ (WebKit::ResourceLoadStatisticsDatabaseStore::prepareStatements):
+ * NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
+ (WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccess):
+ (WebKit::ResourceLoadStatisticsMemoryStore::requestStorageAccessUnderOpener):
+ (WebKit::ResourceLoadStatisticsMemoryStore::ensurePrevalentResourcesForDebugMode):
+ * NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp:
+ (WebKit::ResourceLoadStatisticsStore::removeDataRecords):
+ (WebKit::ResourceLoadStatisticsStore::debugLogDomainsInBatches):
+ * NetworkProcess/NetworkResourceLoader.cpp:
+ (WebKit::NetworkResourceLoader::start):
+ (WebKit::NetworkResourceLoader::startNetworkLoad):
+ (WebKit::NetworkResourceLoader::didReceiveResponse):
+ * NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
+ (WebKit::ServiceWorkerFetchTask::didReceiveResponse):
+ (WebKit::ServiceWorkerFetchTask::didFail):
+ * UIProcess/AuxiliaryProcessProxy.cpp:
+ (WebKit::AuxiliaryProcessProxy::logInvalidMessage):
+ * UIProcess/ProcessThrottler.h:
+ (WebKit::ProcessThrottler::Activity::Activity):
+ (WebKit::ProcessThrottler::Activity::invalidate):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::receivedNavigationPolicyDecision):
+
2020-02-17 Per Arne Vollan <[email protected]>
Mach lookup to com.apple.webinspector should not be allowed in WebKit's WebContent process
Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp (256744 => 256745)
--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp 2020-02-17 18:47:59 UTC (rev 256745)
@@ -286,7 +286,7 @@
if (!m_database.tableExists("ObservedDomains"_s)) {
if (!createSchema()) {
- RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::createSchema failed, error message: %{public}s, database path: %{public}s", this, m_database.lastErrorMsg(), m_storageDirectoryPath.utf8().data());
+ RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::createSchema failed, error message: %" PUBLIC_LOG_STRING ", database path: %" PUBLIC_LOG_STRING, this, m_database.lastErrorMsg(), m_storageDirectoryPath.utf8().data());
ASSERT_NOT_REACHED();
return;
}
@@ -293,10 +293,10 @@
}
if (!m_database.turnOnIncrementalAutoVacuum())
- RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::turnOnIncrementalAutoVacuum failed, error message: %{public}s", this, m_database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::turnOnIncrementalAutoVacuum failed, error message: %" PUBLIC_LOG_STRING, this, m_database.lastErrorMsg());
if (!prepareStatements()) {
- RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::prepareStatements failed, error message: %{public}s, database path: %{public}s", this, m_database.lastErrorMsg(), m_storageDirectoryPath.utf8().data());
+ RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::prepareStatements failed, error message: %" PUBLIC_LOG_STRING ", database path: %" PUBLIC_LOG_STRING, this, m_database.lastErrorMsg(), m_storageDirectoryPath.utf8().data());
ASSERT_NOT_REACHED();
return;
}
@@ -315,7 +315,7 @@
m_isNewResourceLoadStatisticsDatabaseFile = false;
if (!m_database.open(m_storageDirectoryPath)) {
- RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::open failed, error message: %{public}s, database path: %{public}s", this, m_database.lastErrorMsg(), m_storageDirectoryPath.utf8().data());
+ RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::open failed, error message: %" PUBLIC_LOG_STRING ", database path: %" PUBLIC_LOG_STRING, this, m_database.lastErrorMsg(), m_storageDirectoryPath.utf8().data());
ASSERT_NOT_REACHED();
}
}
@@ -330,7 +330,7 @@
{
SQLiteStatement statement(m_database, "SELECT 1 from sqlite_master WHERE type='table' and tbl_name=?");
if (statement.prepare() != SQLITE_OK) {
- RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::isCorrectTableSchema failed to prepare, error message: %{public}s", this, m_database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::isCorrectTableSchema failed to prepare, error message: %" PUBLIC_LOG_STRING, this, m_database.lastErrorMsg());
return false;
}
@@ -337,7 +337,7 @@
bool hasAllTables = true;
for (auto table : tables) {
if (statement.bindText(1, table) != SQLITE_OK) {
- RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::isCorrectTableSchema failed to bind, error message: %{public}s", this, m_database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::isCorrectTableSchema failed to bind, error message: %" PUBLIC_LOG_STRING, this, m_database.lastErrorMsg());
return false;
}
if (statement.step() != SQLITE_ROW) {
@@ -418,7 +418,7 @@
|| !m_database.executeCommand(createUniqueIndexSubresourceUnderTopFrameDomains)
|| !m_database.executeCommand(createUniqueIndexSubresourceUniqueRedirectsTo)
|| !m_database.executeCommand(createUniqueIndexSubresourceUnderTopFrameDomains)) {
- RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::createUniqueIndices failed to execute, error message: %{public}s", this, m_database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::createUniqueIndices failed to execute, error message: %" PUBLIC_LOG_STRING, this, m_database.lastErrorMsg());
return false;
}
return true;
@@ -525,7 +525,7 @@
|| m_storageAccessExistsStatement.prepare() != SQLITE_OK
|| m_getMostRecentlyUpdatedTimestampStatement.prepare() != SQLITE_OK
) {
- RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::prepareStatements failed to prepare, error message: %{public}s", this, m_database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "%p - ResourceLoadStatisticsDatabaseStore::prepareStatements failed to prepare, error message: %" PUBLIC_LOG_STRING, this, m_database.lastErrorMsg());
ASSERT_NOT_REACHED();
return false;
}
@@ -817,7 +817,7 @@
if (m_getAllSubStatisticsStatement.bindInt(1, thirdPartyDomainID) != SQLITE_OK
|| m_getAllSubStatisticsStatement.bindInt(2, thirdPartyDomainID) != SQLITE_OK
|| m_getAllSubStatisticsStatement.bindInt(3, thirdPartyDomainID) != SQLITE_OK) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getThirdPartyDataForSpecificFirstPartyDomain, error message: %{public}s", m_database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getThirdPartyDataForSpecificFirstPartyDomain, error message: %" PUBLIC_LOG_STRING, m_database.lastErrorMsg());
ASSERT_NOT_REACHED();
}
Vector<WebResourceLoadStatisticsStore::ThirdPartyDataForSpecificFirstParty> thirdPartyDataForSpecificFirstPartyDomains;
@@ -843,7 +843,7 @@
if (sortedStatistics.prepare() != SQLITE_OK
|| sortedStatistics.bindText(1, "1")
|| sortedStatistics.bindText(2, "%") != SQLITE_OK) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::aggregatedThirdPartyData, error message: %{public}s", m_database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::aggregatedThirdPartyData, error message: %" PUBLIC_LOG_STRING, m_database.lastErrorMsg());
ASSERT_NOT_REACHED();
return thirdPartyDataList;
}
@@ -892,7 +892,7 @@
// Prepare
if (medianDaysSinceUIStatement.prepare() != SQLITE_OK) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getMedianOfPrevalentResourcesWithUserInteraction, error message: %{public}s", database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getMedianOfPrevalentResourcesWithUserInteraction, error message: %" PUBLIC_LOG_STRING, database.lastErrorMsg());
ASSERT_NOT_REACHED();
return 0;
}
@@ -899,7 +899,7 @@
// Bind
if (medianDaysSinceUIStatement.bindInt(1, 1) != SQLITE_OK || medianDaysSinceUIStatement.bindInt(2, 1) != SQLITE_OK || medianDaysSinceUIStatement.bindInt(3, (prevalentResourcesWithUserInteractionCount / 2) != SQLITE_OK)) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getMedianOfPrevalentResourcesWithUserInteraction, error message: %{public}s", database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getMedianOfPrevalentResourcesWithUserInteraction, error message: %" PUBLIC_LOG_STRING, database.lastErrorMsg());
ASSERT_NOT_REACHED();
return 0;
}
@@ -906,7 +906,7 @@
// Step
if (medianDaysSinceUIStatement.step() != SQLITE_ROW) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getMedianOfPrevalentResourcesWithUserInteraction, error message: %{public}s", database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getMedianOfPrevalentResourcesWithUserInteraction, error message: %" PUBLIC_LOG_STRING, database.lastErrorMsg());
return 0;
}
@@ -921,7 +921,7 @@
// Prepare
if (lowerMedianDaysSinceUIStatement.prepare() != SQLITE_OK) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getMedianOfPrevalentResourcesWithUserInteraction, error message: %{public}s", database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getMedianOfPrevalentResourcesWithUserInteraction, error message: %" PUBLIC_LOG_STRING, database.lastErrorMsg());
ASSERT_NOT_REACHED();
return 0;
}
@@ -928,7 +928,7 @@
// Bind
if (lowerMedianDaysSinceUIStatement.bindInt(1, 1) != SQLITE_OK || lowerMedianDaysSinceUIStatement.bindInt(2, 1) != SQLITE_OK || lowerMedianDaysSinceUIStatement.bindInt(3, ((prevalentResourcesWithUserInteractionCount - 1) / 2)) != SQLITE_OK) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getMedianOfPrevalentResourcesWithUserInteraction, error message: %{public}s", database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getMedianOfPrevalentResourcesWithUserInteraction, error message: %" PUBLIC_LOG_STRING, database.lastErrorMsg());
ASSERT_NOT_REACHED();
return 0;
}
@@ -935,7 +935,7 @@
// Step
if (lowerMedianDaysSinceUIStatement.step() != SQLITE_ROW) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getMedianOfPrevalentResourcesWithUserInteraction, error message: %{public}s", database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getMedianOfPrevalentResourcesWithUserInteraction, error message: %" PUBLIC_LOG_STRING, database.lastErrorMsg());
return 0;
}
@@ -948,7 +948,7 @@
{
auto stepValue = m_countPrevalentResourcesStatement.step();
if (stepValue != SQLITE_ROW && stepValue != SQLITE_DONE) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getNumberOfPrevalentResources failed to step, error message: %{public}s", m_database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getNumberOfPrevalentResources failed to step, error message: %" PUBLIC_LOG_STRING, m_database.lastErrorMsg());
ASSERT_NOT_REACHED();
return 0;
}
@@ -980,7 +980,7 @@
// Prepare
if (topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement.prepare() != SQLITE_OK) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement query failed to prepare, error message: %{public}s", m_database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement query failed to prepare, error message: %" PUBLIC_LOG_STRING, m_database.lastErrorMsg());
ASSERT_NOT_REACHED();
return 0;
}
@@ -988,7 +988,7 @@
// Bind
if (topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement.bindInt(1, 1) != SQLITE_OK
|| topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement.bindInt(2, 1) != SQLITE_OK) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement query failed to bind, error message: %{public}s", m_database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement query failed to bind, error message: %" PUBLIC_LOG_STRING, m_database.lastErrorMsg());
ASSERT_NOT_REACHED();
return 0;
}
@@ -995,7 +995,7 @@
// Step
if (topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement.step() != SQLITE_ROW) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement query failed to step, error message: %{public}s", m_database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::topPrevalentResourceWithUserInteractionDaysSinceUserInteractionStatement query failed to step, error message: %" PUBLIC_LOG_STRING, m_database.lastErrorMsg());
return 0;
}
@@ -1017,7 +1017,7 @@
if (getMedianStatistic.bindInt(1, 1) != SQLITE_OK
|| getMedianStatistic.bindInt(2, 0) != SQLITE_OK
|| getMedianStatistic.bindInt(3, (bucketSize / 2)) != SQLITE_OK) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::makeMedianWithoutUIQuery, error message: %{public}s", database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::makeMedianWithoutUIQuery, error message: %" PUBLIC_LOG_STRING, database.lastErrorMsg());
ASSERT_NOT_REACHED();
return 0;
}
@@ -1034,7 +1034,7 @@
if (getLowerMedianStatistic.bindInt(1, 1) != SQLITE_OK
|| getLowerMedianStatistic.bindInt(2, 0) != SQLITE_OK
|| getLowerMedianStatistic.bindInt(2, ((bucketSize-1) / 2)) != SQLITE_OK) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::makeMedianWithoutUIQuery, error message: %{public}s", database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::makeMedianWithoutUIQuery, error message: %" PUBLIC_LOG_STRING, database.lastErrorMsg());
ASSERT_NOT_REACHED();
return 0;
}
@@ -1053,7 +1053,7 @@
if (prevalentResourceCountInTop.bindInt(1, 1) != SQLITE_OK
|| prevalentResourceCountInTop.bindText(2, "%") != SQLITE_OK
|| prevalentResourceCountInTop.bindInt(3, bucketSize) != SQLITE_OK) {
- RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getNumberOfPrevalentResourcesInTopResources, error message: %{public}s", database.lastErrorMsg());
+ RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getNumberOfPrevalentResourcesInTopResources, error message: %" PUBLIC_LOG_STRING, database.lastErrorMsg());
ASSERT_NOT_REACHED();
return 0;
}
Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp (256744 => 256745)
--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp 2020-02-17 18:47:59 UTC (rev 256745)
@@ -316,11 +316,11 @@
auto& subFrameStatistic = ensureResourceStatisticsForRegistrableDomain(subFrameDomain);
switch (cookieAccess(subFrameStatistic, topFrameDomain)) {
case CookieAccess::CannotRequest:
- RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "Cannot grant storage access to %{public}s since its cookies are blocked in third-party contexts and it has not received user interaction as first-party.", subFrameDomain.string().utf8().data());
+ RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "Cannot grant storage access to %" PUBLIC_LOG_STRING " since its cookies are blocked in third-party contexts and it has not received user interaction as first-party.", subFrameDomain.string().utf8().data());
completionHandler(StorageAccessStatus::CannotRequestAccess);
return;
case CookieAccess::BasedOnCookiePolicy:
- RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "No need to grant storage access to %{public}s since its cookies are not blocked in third-party contexts. Note that the underlying cookie policy may still block this third-party from setting cookies.", subFrameDomain.string().utf8().data());
+ RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "No need to grant storage access to %" PUBLIC_LOG_STRING " since its cookies are not blocked in third-party contexts. Note that the underlying cookie policy may still block this third-party from setting cookies.", subFrameDomain.string().utf8().data());
completionHandler(StorageAccessStatus::HasAccess);
return;
case CookieAccess::OnlyIfGranted:
@@ -330,13 +330,13 @@
auto userWasPromptedEarlier = hasUserGrantedStorageAccessThroughPrompt(subFrameStatistic, topFrameDomain);
if (userWasPromptedEarlier == StorageAccessPromptWasShown::No) {
- RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "About to ask the user whether they want to grant storage access to %{public}s under %{public}s or not.", subFrameDomain.string().utf8().data(), topFrameDomain.string().utf8().data());
+ RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "About to ask the user whether they want to grant storage access to %" PUBLIC_LOG_STRING " under %" PUBLIC_LOG_STRING " or not.", subFrameDomain.string().utf8().data(), topFrameDomain.string().utf8().data());
completionHandler(StorageAccessStatus::RequiresUserPrompt);
return;
}
if (userWasPromptedEarlier == StorageAccessPromptWasShown::Yes)
- RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "Storage access was granted to %{public}s under %{public}s.", subFrameDomain.string().utf8().data(), topFrameDomain.string().utf8().data());
+ RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "Storage access was granted to %" PUBLIC_LOG_STRING " under %" PUBLIC_LOG_STRING ".", subFrameDomain.string().utf8().data(), topFrameDomain.string().utf8().data());
subFrameStatistic.timesAccessedAsFirstPartyDueToStorageAccessAPI++;
@@ -353,7 +353,7 @@
if (domainInNeedOfStorageAccess == openerDomain)
return;
- RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "[Temporary combatibility fix] Storage access was granted for %{public}s under opener page from %{public}s, with user interaction in the opened window.", domainInNeedOfStorageAccess.string().utf8().data(), openerDomain.string().utf8().data());
+ RELEASE_LOG_INFO_IF(debugLoggingEnabled(), ITPDebug, "[Temporary combatibility fix] Storage access was granted for %" PUBLIC_LOG_STRING " under opener page from %" PUBLIC_LOG_STRING ", with user interaction in the opened window.", domainInNeedOfStorageAccess.string().utf8().data(), openerDomain.string().utf8().data());
grantStorageAccessInternal(WTFMove(domainInNeedOfStorageAccess), WTFMove(openerDomain), WTF::nullopt, openerPageID, StorageAccessPromptWasShown::No, [](StorageAccessWasGranted) { });
}
@@ -422,7 +422,7 @@
auto& manualResourceStatistic = ensureResourceStatisticsForRegistrableDomain(debugManualPrevalentResource());
setPrevalentResource(manualResourceStatistic, ResourceLoadPrevalence::High);
domainsToBlock.uncheckedAppend(debugManualPrevalentResource());
- RELEASE_LOG_INFO(ITPDebug, "Did set %{public}s as prevalent resource for the purposes of ITP Debug Mode.", debugManualPrevalentResource().string().utf8().data());
+ RELEASE_LOG_INFO(ITPDebug, "Did set %" PUBLIC_LOG_STRING " as prevalent resource for the purposes of ITP Debug Mode.", debugManualPrevalentResource().string().utf8().data());
}
return domainsToBlock;
Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp (256744 => 256745)
--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsStore.cpp 2020-02-17 18:47:59 UTC (rev 256745)
@@ -205,7 +205,7 @@
return;
}
- RELEASE_LOG_INFO_IF(m_debugLoggingEnabled, ITPDebug, "About to remove data records for %{public}s.", domainsToString(domainsToRemoveWebsiteDataFor).utf8().data());
+ RELEASE_LOG_INFO_IF(m_debugLoggingEnabled, ITPDebug, "About to remove data records for %" PUBLIC_LOG_STRING ".", domainsToString(domainsToRemoveWebsiteDataFor).utf8().data());
setDataRecordsBeingRemoved(true);
@@ -601,7 +601,7 @@
return;
if (domains.size() <= maxNumberOfDomainsInOneLogStatement) {
- RELEASE_LOG_INFO(ITPDebug, "About to %{public}s cookies in third-party contexts for: %{public}s.", action, domainsToString(domains).utf8().data());
+ RELEASE_LOG_INFO(ITPDebug, "About to %" PUBLIC_LOG_STRING " cookies in third-party contexts for: %" PUBLIC_LOG_STRING ".", action, domainsToString(domains).utf8().data());
return;
}
@@ -612,7 +612,7 @@
for (auto& domain : domains) {
if (batch.size() == maxNumberOfDomainsInOneLogStatement) {
- RELEASE_LOG_INFO(ITPDebug, "About to %{public}s cookies in third-party contexts for (%{public}d of %u): %{public}s.", action, batchNumber, numberOfBatches, domainsToString(batch).utf8().data());
+ RELEASE_LOG_INFO(ITPDebug, "About to %" PUBLIC_LOG_STRING " cookies in third-party contexts for (%{public}d of %u): %" PUBLIC_LOG_STRING ".", action, batchNumber, numberOfBatches, domainsToString(batch).utf8().data());
batch.shrink(0);
++batchNumber;
}
@@ -619,7 +619,7 @@
batch.append(domain);
}
if (!batch.isEmpty())
- RELEASE_LOG_INFO(ITPDebug, "About to %{public}s cookies in third-party contexts for (%{public}d of %u): %{public}s.", action, batchNumber, numberOfBatches, domainsToString(batch).utf8().data());
+ RELEASE_LOG_INFO(ITPDebug, "About to %" PUBLIC_LOG_STRING " cookies in third-party contexts for (%{public}d of %u): %" PUBLIC_LOG_STRING ".", action, batchNumber, numberOfBatches, domainsToString(batch).utf8().data());
}
} // namespace WebKit
Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (256744 => 256745)
--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2020-02-17 18:47:59 UTC (rev 256745)
@@ -188,7 +188,7 @@
WTF::switchOn(result,
[this] (ResourceError& error) {
- RELEASE_LOG_IF_ALLOWED("start: NetworkLoadChecker::check returned an error (error.domain=%{public}s, error.code=%d, isCancellation=%d)", error.domain().utf8().data(), error.errorCode(), error.isCancellation());
+ RELEASE_LOG_IF_ALLOWED("start: NetworkLoadChecker::check returned an error (error.domain=%" PUBLIC_LOG_STRING ", error.code=%d, isCancellation=%d)", error.domain().utf8().data(), error.errorCode(), error.isCancellation());
if (!error.isCancellation())
this->didFailLoading(error);
},
@@ -330,7 +330,7 @@
parameters.request = WTFMove(request);
m_networkLoad = makeUnique<NetworkLoad>(*this, &networkSession->blobRegistry(), WTFMove(parameters), *networkSession);
- RELEASE_LOG_IF_ALLOWED("startNetworkLoad: Going to the network (description=%{public}s)", m_networkLoad->description().utf8().data());
+ RELEASE_LOG_IF_ALLOWED("startNetworkLoad: Going to the network (description=%" PUBLIC_LOG_STRING ")", m_networkLoad->description().utf8().data());
}
ResourceLoadInfo NetworkResourceLoader::resourceLoadInfo()
@@ -487,7 +487,7 @@
void NetworkResourceLoader::didReceiveResponse(ResourceResponse&& receivedResponse, ResponseCompletionHandler&& completionHandler)
{
- RELEASE_LOG_IF_ALLOWED("didReceiveResponse: (httpStatusCode=%d, MIMEType=%{public}s, expectedContentLength=%" PRId64 ", hasCachedEntryForValidation=%d, hasNetworkLoadChecker=%d)", receivedResponse.httpStatusCode(), receivedResponse.mimeType().utf8().data(), receivedResponse.expectedContentLength(), !!m_cacheEntryForValidation, !!m_networkLoadChecker);
+ RELEASE_LOG_IF_ALLOWED("didReceiveResponse: (httpStatusCode=%d, MIMEType=%" PUBLIC_LOG_STRING ", expectedContentLength=%" PRId64 ", hasCachedEntryForValidation=%d, hasNetworkLoadChecker=%d)", receivedResponse.httpStatusCode(), receivedResponse.mimeType().utf8().data(), receivedResponse.expectedContentLength(), !!m_cacheEntryForValidation, !!m_networkLoadChecker);
if (isMainResource())
didReceiveMainResourceResponse(receivedResponse);
@@ -531,7 +531,7 @@
if (m_networkLoadChecker) {
auto error = m_networkLoadChecker->validateResponse(m_networkLoad ? m_networkLoad->currentRequest() : originalRequest(), m_response);
if (!error.isNull()) {
- RELEASE_LOG_ERROR_IF_ALLOWED("didReceiveResponse: NetworkLoadChecker::validateResponse returned an error (error.domain=%{public}s, error.code=%d)", error.domain().utf8().data(), error.errorCode());
+ RELEASE_LOG_ERROR_IF_ALLOWED("didReceiveResponse: NetworkLoadChecker::validateResponse returned an error (error.domain=%" PUBLIC_LOG_STRING ", error.code=%d)", error.domain().utf8().data(), error.errorCode());
RunLoop::main().dispatch([protectedThis = makeRef(*this), error = WTFMove(error)] {
if (protectedThis->m_networkLoad)
protectedThis->didFailLoading(error);
Modified: trunk/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp (256744 => 256745)
--- trunk/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp 2020-02-17 18:47:59 UTC (rev 256745)
@@ -140,7 +140,7 @@
if (m_isDone)
return;
- RELEASE_LOG_IF_ALLOWED("didReceiveResponse: (httpStatusCode=%d, MIMEType=%{public}s, expectedContentLength=%" PRId64 ", needsContinueDidReceiveResponseMessage=%d, source=%u)", response.httpStatusCode(), response.mimeType().utf8().data(), response.expectedContentLength(), needsContinueDidReceiveResponseMessage, static_cast<unsigned>(response.source()));
+ RELEASE_LOG_IF_ALLOWED("didReceiveResponse: (httpStatusCode=%d, MIMEType=%" PUBLIC_LOG_STRING ", expectedContentLength=%" PRId64 ", needsContinueDidReceiveResponseMessage=%d, source=%u)", response.httpStatusCode(), response.mimeType().utf8().data(), response.expectedContentLength(), needsContinueDidReceiveResponseMessage, static_cast<unsigned>(response.source()));
m_wasHandled = true;
m_timeoutTimer.stop();
softUpdateIfNeeded();
@@ -184,7 +184,7 @@
m_timeoutTimer.stop();
softUpdateIfNeeded();
}
- RELEASE_LOG_ERROR_IF_ALLOWED("didFail: (error.domain=%{public}s, error.code=%d)", error.domain().utf8().data(), error.errorCode());
+ RELEASE_LOG_ERROR_IF_ALLOWED("didFail: (error.domain=%" PUBLIC_LOG_STRING ", error.code=%d)", error.domain().utf8().data(), error.errorCode());
m_loader.didFailLoading(error);
}
Modified: trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp (256744 => 256745)
--- trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp 2020-02-17 18:47:59 UTC (rev 256745)
@@ -273,7 +273,7 @@
void AuxiliaryProcessProxy::logInvalidMessage(IPC::Connection& connection, IPC::StringReference messageReceiverName, IPC::StringReference messageName)
{
- RELEASE_LOG_FAULT(IPC, "Received an invalid message '%{public}s::%{public}s' from the %{public}s process.", messageReceiverName.toString().data(), messageName.toString().data(), processName().characters());
+ RELEASE_LOG_FAULT(IPC, "Received an invalid message '%" PUBLIC_LOG_STRING "::%" PUBLIC_LOG_STRING "' from the %" PUBLIC_LOG_STRING " process.", messageReceiverName.toString().data(), messageName.toString().data(), processName().characters());
}
} // namespace WebKit
Modified: trunk/Source/WebKit/UIProcess/ProcessThrottler.h (256744 => 256745)
--- trunk/Source/WebKit/UIProcess/ProcessThrottler.h 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WebKit/UIProcess/ProcessThrottler.h 2020-02-17 18:47:59 UTC (rev 256745)
@@ -65,7 +65,7 @@
, m_name(name)
{
throttler.addActivity(*this);
- PROCESSTHROTTLER_ACTIVITY_RELEASE_LOG("Activity: Starting %{public}s activity / '%{public}s'",
+ PROCESSTHROTTLER_ACTIVITY_RELEASE_LOG("Activity: Starting %" PUBLIC_LOG_STRING " activity / '%" PUBLIC_LOG_STRING "'",
type == ActivityType::Foreground ? "foreground" : "background", m_name.characters());
}
@@ -83,7 +83,7 @@
void invalidate()
{
ASSERT(isValid());
- PROCESSTHROTTLER_ACTIVITY_RELEASE_LOG("invalidate: Ending %{public}s activity / '%{public}s'",
+ PROCESSTHROTTLER_ACTIVITY_RELEASE_LOG("invalidate: Ending %" PUBLIC_LOG_STRING " activity / '%" PUBLIC_LOG_STRING "'",
type == ActivityType::Foreground ? "foreground" : "background", m_name.characters());
m_throttler->removeActivity(*this);
m_throttler = nullptr;
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (256744 => 256745)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-02-17 18:33:10 UTC (rev 256744)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-02-17 18:47:59 UTC (rev 256745)
@@ -3122,10 +3122,10 @@
bool shouldProcessSwap = processForNavigation.ptr() != sourceProcess.ptr();
if (shouldProcessSwap) {
policyAction = PolicyAction::StopAllLoads;
- RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "decidePolicyForNavigationAction, swapping process %i with process %i for navigation, reason: %{public}s", processIdentifier(), processForNavigation->processIdentifier(), reason.utf8().data());
+ RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "decidePolicyForNavigationAction, swapping process %i with process %i for navigation, reason: %" PUBLIC_LOG_STRING, processIdentifier(), processForNavigation->processIdentifier(), reason.utf8().data());
LOG(ProcessSwapping, "(ProcessSwapping) Switching from process %i to new process (%i) for navigation %" PRIu64 " '%s'", processIdentifier(), processForNavigation->processIdentifier(), navigation->navigationID(), navigation->loggingString());
} else
- RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "decidePolicyForNavigationAction: keep using process %i for navigation, reason: %{public}s", processIdentifier(), reason.utf8().data());
+ RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "decidePolicyForNavigationAction: keep using process %i for navigation, reason: %" PUBLIC_LOG_STRING, processIdentifier(), reason.utf8().data());
if (shouldProcessSwap) {
// Make sure the process to be used for the navigation does not get shutDown now due to destroying SuspendedPageProxy or ProvisionalPageProxy objects.