Diff
Modified: trunk/Source/WebCore/ChangeLog (219335 => 219336)
--- trunk/Source/WebCore/ChangeLog 2017-07-11 16:43:04 UTC (rev 219335)
+++ trunk/Source/WebCore/ChangeLog 2017-07-11 16:48:02 UTC (rev 219336)
@@ -1,3 +1,27 @@
+2017-07-11 Alex Christensen <[email protected]>
+
+ SharedBuffer::size should return a size_t
+ https://bugs.webkit.org/show_bug.cgi?id=174328
+
+ Reviewed by Andreas Kling.
+
+ No change in behaviour.
+
+ * html/FTPDirectoryDocument.cpp:
+ (WebCore::createTemplateDocumentData):
+ * loader/ContentFilter.cpp:
+ (WebCore::ContentFilter::handleProvisionalLoadFailure):
+ * loader/ResourceLoader.cpp:
+ (WebCore::ResourceLoader::loadDataURL):
+ * loader/ResourceLoader.h:
+ * loader/appcache/ApplicationCacheStorage.cpp:
+ (WebCore::ApplicationCacheStorage::store):
+ * loader/cache/CachedScript.cpp:
+ (WebCore::CachedScript::script):
+ * platform/SharedBuffer.cpp:
+ (WebCore::SharedBuffer::tryCreateArrayBuffer):
+ * platform/SharedBuffer.h:
+
2017-07-11 Per Arne Vollan <[email protected]>
[Win] Build error when building WebCore from WebCore.proj project file.
Modified: trunk/Source/WebCore/html/FTPDirectoryDocument.cpp (219335 => 219336)
--- trunk/Source/WebCore/html/FTPDirectoryDocument.cpp 2017-07-11 16:43:04 UTC (rev 219335)
+++ trunk/Source/WebCore/html/FTPDirectoryDocument.cpp 2017-07-11 16:48:02 UTC (rev 219336)
@@ -280,7 +280,7 @@
{
RefPtr<SharedBuffer> buffer = SharedBuffer::createWithContentsOfFile(settings.ftpDirectoryTemplatePath());
if (buffer)
- LOG(FTP, "Loaded FTPDirectoryTemplate of length %i\n", buffer->size());
+ LOG(FTP, "Loaded FTPDirectoryTemplate of length %zu\n", buffer->size());
return buffer;
}
Modified: trunk/Source/WebCore/loader/ContentFilter.cpp (219335 => 219336)
--- trunk/Source/WebCore/loader/ContentFilter.cpp 2017-07-11 16:43:04 UTC (rev 219335)
+++ trunk/Source/WebCore/loader/ContentFilter.cpp 2017-07-11 16:48:02 UTC (rev 219336)
@@ -290,7 +290,7 @@
ASSERT(m_blockedError.failingURL() == error.failingURL());
RefPtr<SharedBuffer> replacementData { m_blockingContentFilter->replacementData() };
- ResourceResponse response { URL(), ASCIILiteral("text/html"), replacementData->size(), ASCIILiteral("UTF-8") };
+ ResourceResponse response { URL(), ASCIILiteral("text/html"), static_cast<long long>(replacementData->size()), ASCIILiteral("UTF-8") };
SubstituteData substituteData { WTFMove(replacementData), error.failingURL(), response, SubstituteData::SessionHistoryVisibility::Hidden };
SetForScope<bool> loadingBlockedPage { m_isLoadingBlockedPage, true };
m_documentLoader.frameLoader()->load(FrameLoadRequest(*m_documentLoader.frame(), blockedPageURL(), ShouldOpenExternalURLsPolicy::ShouldNotAllow, substituteData));
Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (219335 => 219336)
--- trunk/Source/WebCore/loader/ResourceLoader.cpp 2017-07-11 16:43:04 UTC (rev 219335)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp 2017-07-11 16:48:02 UTC (rev 219336)
@@ -262,7 +262,7 @@
auto& result = decodeResult.value();
auto dataSize = result.data ? result.data->size() : 0;
- ResourceResponse dataResponse { url, result.mimeType, dataSize, result.charset };
+ ResourceResponse dataResponse { url, result.mimeType, static_cast<long long>(dataSize), result.charset };
dataResponse.setHTTPStatusCode(200);
dataResponse.setHTTPStatusText(ASCIILiteral("OK"));
dataResponse.setHTTPHeaderField(HTTPHeaderName::ContentType, result.contentType);
Modified: trunk/Source/WebCore/loader/ResourceLoader.h (219335 => 219336)
--- trunk/Source/WebCore/loader/ResourceLoader.h 2017-07-11 16:43:04 UTC (rev 219335)
+++ trunk/Source/WebCore/loader/ResourceLoader.h 2017-07-11 16:48:02 UTC (rev 219336)
@@ -34,7 +34,6 @@
#include "ResourceLoaderTypes.h"
#include "ResourceRequest.h"
#include "ResourceResponse.h"
-#include <functional>
#include <wtf/Forward.h>
#if ENABLE(CONTENT_EXTENSIONS)
Modified: trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp (219335 => 219336)
--- trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp 2017-07-11 16:43:04 UTC (rev 219335)
+++ trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp 2017-07-11 16:48:02 UTC (rev 219336)
@@ -804,7 +804,7 @@
else if (shouldStoreResourceAsFlatFile(resource)) {
// First, check to see if creating the flat file would violate the maximum total quota. We don't need
// to check the per-origin quota here, as it was already checked in storeNewestCache().
- if (m_database.totalSize() + flatFileAreaSize() + resource->data().size() > m_maximumSize) {
+ if (m_database.totalSize() + flatFileAreaSize() + static_cast<int64_t>(resource->data().size()) > m_maximumSize) {
m_isMaximumSizeReached = true;
return false;
}
Modified: trunk/Source/WebCore/loader/cache/CachedScript.cpp (219335 => 219336)
--- trunk/Source/WebCore/loader/cache/CachedScript.cpp 2017-07-11 16:43:04 UTC (rev 219335)
+++ trunk/Source/WebCore/loader/cache/CachedScript.cpp 2017-07-11 16:48:02 UTC (rev 219336)
@@ -76,7 +76,7 @@
}
if (m_decodingState == DataAndDecodedStringHaveSameBytes)
- return { reinterpret_cast<const LChar*>(m_data->data()), m_data->size() };
+ return { reinterpret_cast<const LChar*>(m_data->data()), static_cast<unsigned>(m_data->size()) };
if (!m_script) {
m_script = m_decoder->decodeAndFlush(m_data->data(), encodedSize());
Modified: trunk/Source/WebCore/platform/SharedBuffer.cpp (219335 => 219336)
--- trunk/Source/WebCore/platform/SharedBuffer.cpp 2017-07-11 16:43:04 UTC (rev 219335)
+++ trunk/Source/WebCore/platform/SharedBuffer.cpp 2017-07-11 16:48:02 UTC (rev 219336)
@@ -119,7 +119,7 @@
{
RefPtr<ArrayBuffer> arrayBuffer = ArrayBuffer::createUninitialized(static_cast<unsigned>(size()), sizeof(char));
if (!arrayBuffer) {
- WTFLogAlways("SharedBuffer::tryCreateArrayBuffer Unable to create buffer. Requested size was %d x %lu\n", size(), sizeof(char));
+ WTFLogAlways("SharedBuffer::tryCreateArrayBuffer Unable to create buffer. Requested size was %zu x %lu\n", size(), sizeof(char));
return nullptr;
}
Modified: trunk/Source/WebCore/platform/SharedBuffer.h (219335 => 219336)
--- trunk/Source/WebCore/platform/SharedBuffer.h 2017-07-11 16:43:04 UTC (rev 219335)
+++ trunk/Source/WebCore/platform/SharedBuffer.h 2017-07-11 16:48:02 UTC (rev 219336)
@@ -86,8 +86,7 @@
// ArrayBuffer without merging segmented buffers into a flat buffer.
RefPtr<ArrayBuffer> tryCreateArrayBuffer() const;
- // FIXME: This should return a size_t.
- unsigned size() const { return m_size; }
+ size_t size() const { return m_size; }
bool isEmpty() const { return !size(); }
Modified: trunk/Source/WebKit2/ChangeLog (219335 => 219336)
--- trunk/Source/WebKit2/ChangeLog 2017-07-11 16:43:04 UTC (rev 219335)
+++ trunk/Source/WebKit2/ChangeLog 2017-07-11 16:48:02 UTC (rev 219336)
@@ -1,3 +1,13 @@
+2017-07-11 Alex Christensen <[email protected]>
+
+ SharedBuffer::size should return a size_t
+ https://bugs.webkit.org/show_bug.cgi?id=174328
+
+ Reviewed by Andreas Kling.
+
+ * UIProcess/WebResourceLoadStatisticsStore.cpp:
+ (WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk):
+
2017-07-11 Youenn Fablet <[email protected]>
We should do ICE candidate filtering at the Document level
Modified: trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp (219335 => 219336)
--- trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp 2017-07-11 16:43:04 UTC (rev 219335)
+++ trunk/Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.cpp 2017-07-11 16:48:02 UTC (rev 219336)
@@ -324,7 +324,7 @@
unlockAndCloseFile(handle);
if (writtenBytes != static_cast<int64_t>(rawData->size()))
- RELEASE_LOG_ERROR(ResourceLoadStatistics, "WebResourceLoadStatisticsStore: We only wrote %d out of %d bytes to disk", static_cast<unsigned>(writtenBytes), rawData->size());
+ RELEASE_LOG_ERROR(ResourceLoadStatistics, "WebResourceLoadStatisticsStore: We only wrote %d out of %zu bytes to disk", static_cast<unsigned>(writtenBytes), rawData->size());
m_lastStatisticsFileSyncTime = WallTime::now();
m_lastStatisticsWriteTime = MonotonicTime::now();