Cleanup: simplify WebSockets code for RuntimeEnabledFeatures
authorbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Aug 2017 16:32:24 +0000 (16:32 +0000)
committerbburg@apple.com <bburg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Aug 2017 16:32:24 +0000 (16:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=175190

Reviewed by Sam Weinig.

This runtime enabled flag is not used by anything. It was added
for V8 in <https://bugs.webkit.org/show_bug.cgi?id=29896>.

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::setIsAvailable): Deleted.
(WebCore::WebSocket::isAvailable): Deleted.
* Modules/websockets/WebSocket.h:
* Modules/websockets/WebSocket.idl:
* page/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::webSocketEnabled const): Deleted.
* page/RuntimeEnabledFeatures.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220337 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/websockets/WebSocket.cpp
Source/WebCore/Modules/websockets/WebSocket.h
Source/WebCore/Modules/websockets/WebSocket.idl
Source/WebCore/page/RuntimeEnabledFeatures.cpp
Source/WebCore/page/RuntimeEnabledFeatures.h

index 786992d..c42ffbf 100644 (file)
@@ -1,5 +1,24 @@
 2017-08-07  Brian Burg  <bburg@apple.com>
 
+        Cleanup: simplify WebSockets code for RuntimeEnabledFeatures
+        https://bugs.webkit.org/show_bug.cgi?id=175190
+
+        Reviewed by Sam Weinig.
+
+        This runtime enabled flag is not used by anything. It was added
+        for V8 in <https://bugs.webkit.org/show_bug.cgi?id=29896>.
+
+        * Modules/websockets/WebSocket.cpp:
+        (WebCore::WebSocket::setIsAvailable): Deleted.
+        (WebCore::WebSocket::isAvailable): Deleted.
+        * Modules/websockets/WebSocket.h:
+        * Modules/websockets/WebSocket.idl:
+        * page/RuntimeEnabledFeatures.cpp:
+        (WebCore::RuntimeEnabledFeatures::webSocketEnabled const): Deleted.
+        * page/RuntimeEnabledFeatures.h:
+
+2017-08-07  Brian Burg  <bburg@apple.com>
+
         Remove CANVAS_PATH compilation guard
         https://bugs.webkit.org/show_bug.cgi?id=175207
 
index 000618d..723a0b6 100644 (file)
@@ -126,18 +126,6 @@ static unsigned saturateAdd(unsigned a, unsigned b)
     return a + b;
 }
 
-static bool webSocketsAvailable = true;
-
-void WebSocket::setIsAvailable(bool available)
-{
-    webSocketsAvailable = available;
-}
-
-bool WebSocket::isAvailable()
-{
-    return webSocketsAvailable;
-}
-
 const char* WebSocket::subprotocolSeparator()
 {
     return ", ";
index d283799..d8a90d9 100644 (file)
@@ -52,9 +52,6 @@ class ThreadableWebSocketChannel;
 
 class WebSocket final : public RefCounted<WebSocket>, public EventTargetWithInlineData, public ActiveDOMObject, private WebSocketChannelClient {
 public:
-    static void setIsAvailable(bool);
-    static bool isAvailable();
-
     static const char* subprotocolSeparator();
 
     static ExceptionOr<Ref<WebSocket>> create(ScriptExecutionContext&, const String& url);
index 52f61f4..2d17ed9 100644 (file)
@@ -35,7 +35,6 @@
     Constructor(USVString url, DOMString protocol),
     ConstructorMayThrowException,
     ConstructorCallWith=ScriptExecutionContext,
-    EnabledAtRuntime=WebSocket,
     Exposed=(Window,Worker),
 ] interface WebSocket : EventTarget {
     readonly attribute USVString URL; // Lowercased .url is the one in the spec, but leaving .URL for compatibility reasons.
index b32fa7d..def1188 100644 (file)
@@ -33,7 +33,6 @@
 #include "RuntimeEnabledFeatures.h"
 
 #include "MediaPlayer.h"
-#include "WebSocket.h"
 #include <wtf/NeverDestroyed.h>
 
 namespace WebCore {
@@ -59,9 +58,4 @@ bool RuntimeEnabledFeatures::audioEnabled() const
 }
 #endif
 
-bool RuntimeEnabledFeatures::webSocketEnabled() const
-{
-    return WebSocket::isAvailable();
-}
-
 } // namespace WebCore
index e20ee5c..a2ecc29 100644 (file)
@@ -207,8 +207,6 @@ public:
     bool audioEnabled() const;
 #endif
 
-    bool webSocketEnabled() const;
-
     WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures();
 
 private: