Diff
Modified: trunk/Source/WTF/ChangeLog (265054 => 265055)
--- trunk/Source/WTF/ChangeLog 2020-07-29 21:02:53 UTC (rev 265054)
+++ trunk/Source/WTF/ChangeLog 2020-07-29 21:21:17 UTC (rev 265055)
@@ -1,3 +1,14 @@
+2020-07-29 Don Olmstead <don.olmst...@sony.com>
+
+ Remove USE(ZLIB)
+ https://bugs.webkit.org/show_bug.cgi?id=214929
+
+ Reviewed by Darin Adler.
+
+ Remove setting a default value of USE_ZLIB.
+
+ * wtf/PlatformUse.h:
+
2020-07-28 Karl Rackler <rack...@apple.com>
Unreviewed, reverting r264955.
Modified: trunk/Source/WTF/wtf/PlatformUse.h (265054 => 265055)
--- trunk/Source/WTF/wtf/PlatformUse.h 2020-07-29 21:02:53 UTC (rev 265054)
+++ trunk/Source/WTF/wtf/PlatformUse.h 2020-07-29 21:21:17 UTC (rev 265055)
@@ -193,10 +193,6 @@
#define USE_AV_SAMPLE_BUFFER_DISPLAY_LAYER 1
#endif
-#if !defined(USE_ZLIB)
-#define USE_ZLIB 1
-#endif
-
#if PLATFORM(COCOA) || PLATFORM(GTK)
#define USE_UNIFIED_TEXT_CHECKING 1
#endif
Modified: trunk/Source/WebCore/ChangeLog (265054 => 265055)
--- trunk/Source/WebCore/ChangeLog 2020-07-29 21:02:53 UTC (rev 265054)
+++ trunk/Source/WebCore/ChangeLog 2020-07-29 21:21:17 UTC (rev 265055)
@@ -1,3 +1,26 @@
+2020-07-29 Don Olmstead <don.olmst...@sony.com>
+
+ Remove USE(ZLIB)
+ https://bugs.webkit.org/show_bug.cgi?id=214929
+
+ Reviewed by Darin Adler.
+
+ Remove USE(ZLIB) guards in WebSocket code. Since WebSocketDeflateFramer::canDeflate
+ is always true remove it and the callsite checking it in WebSocketChannel.
+
+ * Modules/websockets/WebSocketChannel.cpp:
+ (WebCore::WebSocketChannel::connect):
+ * Modules/websockets/WebSocketDeflateFramer.cpp:
+ (WebCore::WebSocketExtensionDeflateFrame::processResponse):
+ (WebCore::WebSocketDeflateFramer::enableDeflate):
+ (WebCore::WebSocketDeflateFramer::deflate):
+ (WebCore::WebSocketDeflateFramer::resetDeflateContext):
+ (WebCore::WebSocketDeflateFramer::inflate):
+ (WebCore::WebSocketDeflateFramer::resetInflateContext):
+ (WebCore::WebSocketDeflateFramer::canDeflate const): Deleted.
+ * Modules/websockets/WebSocketDeflateFramer.h:
+ * Modules/websockets/WebSocketDeflater.cpp:
+
2020-07-29 Chris Dumez <cdu...@apple.com>
Calling AudioNode constructors should have identical behavior to using create*() function on BaseAudioContext
Modified: trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp (265054 => 265055)
--- trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp 2020-07-29 21:02:53 UTC (rev 265054)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp 2020-07-29 21:21:17 UTC (rev 265055)
@@ -99,8 +99,7 @@
String clientOrigin = m_document->securityOrigin().toString();
m_handshake = makeUnique<WebSocketHandshake>(validatedURL->url, protocol, userAgent, clientOrigin, m_allowCookies);
m_handshake->reset();
- if (m_deflateFramer.canDeflate())
- m_handshake->addExtensionProcessor(m_deflateFramer.createExtensionProcessor());
+ m_handshake->addExtensionProcessor(m_deflateFramer.createExtensionProcessor());
if (m_identifier)
InspectorInstrumentation::didCreateWebSocket(m_document.get(), m_identifier, validatedURL->url);
Modified: trunk/Source/WebCore/Modules/websockets/WebSocketDeflateFramer.cpp (265054 => 265055)
--- trunk/Source/WebCore/Modules/websockets/WebSocketDeflateFramer.cpp 2020-07-29 21:02:53 UTC (rev 265054)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketDeflateFramer.cpp 2020-07-29 21:21:17 UTC (rev 265055)
@@ -69,7 +69,6 @@
bool WebSocketExtensionDeflateFrame::processResponse(const HashMap<String, String>& serverParameters)
{
-#if USE(ZLIB)
if (m_responseProcessed) {
m_failureReason = "Received duplicate deflate-frame response";
return false;
@@ -106,10 +105,6 @@
m_framer->enableDeflate(windowBits, mode);
return true;
-#else
- ASSERT_NOT_REACHED();
- return false;
-#endif
}
DeflateResultHolder::DeflateResultHolder(WebSocketDeflateFramer* framer)
@@ -158,16 +153,6 @@
return makeUnique<WebSocketExtensionDeflateFrame>(this);
}
-bool WebSocketDeflateFramer::canDeflate() const
-{
-#if USE(ZLIB)
- return true;
-#else
- return false;
-#endif
-}
-
-#if USE(ZLIB)
void WebSocketDeflateFramer::enableDeflate(int windowBits, WebSocketDeflater::ContextTakeOverMode mode)
{
m_deflater = makeUnique<WebSocketDeflater>(windowBits, mode);
@@ -179,11 +164,9 @@
}
m_enabled = true;
}
-#endif
std::unique_ptr<DeflateResultHolder> WebSocketDeflateFramer::deflate(WebSocketFrame& frame)
{
-#if USE(ZLIB)
auto result = makeUnique<DeflateResultHolder>(this);
if (!enabled() || !WebSocketFrame::isNonControlOpCode(frame.opCode) || !frame.payloadLength)
return result;
@@ -195,17 +178,12 @@
frame.payload = m_deflater->data();
frame.payloadLength = m_deflater->size();
return result;
-#else
- return makeUnique<DeflateResultHolder>(this);
-#endif
}
void WebSocketDeflateFramer::resetDeflateContext()
{
-#if USE(ZLIB)
if (m_deflater)
m_deflater->reset();
-#endif
}
std::unique_ptr<InflateResultHolder> WebSocketDeflateFramer::inflate(WebSocketFrame& frame)
@@ -215,7 +193,6 @@
result->fail("Compressed bit must be 0 if no negotiated deflate-frame extension");
return result;
}
-#if USE(ZLIB)
if (!frame.compress)
return result;
if (!WebSocketFrame::isNonControlOpCode(frame.opCode)) {
@@ -230,17 +207,12 @@
frame.payload = m_inflater->data();
frame.payloadLength = m_inflater->size();
return result;
-#else
- return result;
-#endif
}
void WebSocketDeflateFramer::resetInflateContext()
{
-#if USE(ZLIB)
if (m_inflater)
m_inflater->reset();
-#endif
}
void WebSocketDeflateFramer::didFail()
Modified: trunk/Source/WebCore/Modules/websockets/WebSocketDeflateFramer.h (265054 => 265055)
--- trunk/Source/WebCore/Modules/websockets/WebSocketDeflateFramer.h 2020-07-29 21:02:53 UTC (rev 265054)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketDeflateFramer.h 2020-07-29 21:21:17 UTC (rev 265055)
@@ -30,9 +30,7 @@
#pragma once
-#if USE(ZLIB)
#include "WebSocketDeflater.h"
-#endif
#include "WebSocketExtensionProcessor.h"
#include "WebSocketFrame.h"
@@ -80,7 +78,6 @@
std::unique_ptr<WebSocketExtensionProcessor> createExtensionProcessor();
- bool canDeflate() const;
bool enabled() const { return m_enabled; }
std::unique_ptr<DeflateResultHolder> deflate(WebSocketFrame&);
@@ -90,16 +87,12 @@
void didFail();
-#if USE(ZLIB)
void enableDeflate(int windowBits, WebSocketDeflater::ContextTakeOverMode);
-#endif
private:
bool m_enabled;
-#if USE(ZLIB)
std::unique_ptr<WebSocketDeflater> m_deflater;
std::unique_ptr<WebSocketInflater> m_inflater;
-#endif
};
} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/websockets/WebSocketDeflater.cpp (265054 => 265055)
--- trunk/Source/WebCore/Modules/websockets/WebSocketDeflater.cpp 2020-07-29 21:02:53 UTC (rev 265054)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketDeflater.cpp 2020-07-29 21:21:17 UTC (rev 265055)
@@ -31,8 +31,6 @@
#include "config.h"
#include "WebSocketDeflater.h"
-#if USE(ZLIB)
-
#include "Logging.h"
#include <wtf/FastMalloc.h>
#include <wtf/HashMap.h>
@@ -206,5 +204,3 @@
}
} // namespace WebCore
-
-#endif // USE(ZLIB)