Title: [207546] trunk/Source/WebCore
Revision
207546
Author
commit-qu...@webkit.org
Date
2016-10-19 11:09:50 -0700 (Wed, 19 Oct 2016)

Log Message

Cleanup WebCore/workers
https://bugs.webkit.org/show_bug.cgi?id=163635

Patch by Joseph Pecoraro <pecor...@apple.com> on 2016-10-19
Reviewed by Chris Dumez.

* workers/*:
Cleanup like pragma once, nullptr, remove stale includes, declarations.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (207545 => 207546)


--- trunk/Source/WebCore/ChangeLog	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/ChangeLog	2016-10-19 18:09:50 UTC (rev 207546)
@@ -1,3 +1,13 @@
+2016-10-19  Joseph Pecoraro  <pecor...@apple.com>
+
+        Cleanup WebCore/workers
+        https://bugs.webkit.org/show_bug.cgi?id=163635
+
+        Reviewed by Chris Dumez.
+
+        * workers/*:
+        Cleanup like pragma once, nullptr, remove stale includes, declarations.
+
 2016-10-19  Chris Dumez  <cdu...@apple.com>
 
         MouseEvent's coordinates should be 0 for simulated clicks

Modified: trunk/Source/WebCore/workers/AbstractWorker.cpp (207545 => 207546)


--- trunk/Source/WebCore/workers/AbstractWorker.cpp	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/AbstractWorker.cpp	2016-10-19 18:09:50 UTC (rev 207546)
@@ -32,7 +32,6 @@
 #include "AbstractWorker.h"
 
 #include "ContentSecurityPolicy.h"
-#include "Event.h"
 #include "ExceptionCode.h"
 #include "ScriptExecutionContext.h"
 #include "SecurityOrigin.h"

Modified: trunk/Source/WebCore/workers/AbstractWorker.h (207545 => 207546)


--- trunk/Source/WebCore/workers/AbstractWorker.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/AbstractWorker.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -28,14 +28,12 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef AbstractWorker_h
-#define AbstractWorker_h
+#pragma once
 
 #include "ActiveDOMObject.h"
 #include "EventListener.h"
 #include "EventTarget.h"
 #include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
 #include <wtf/text/AtomicStringHash.h>
 
 namespace WebCore {
@@ -62,5 +60,3 @@
     };
 
 } // namespace WebCore
-
-#endif // AbstractWorker_h

Modified: trunk/Source/WebCore/workers/Worker.cpp (207545 => 207546)


--- trunk/Source/WebCore/workers/Worker.cpp	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/Worker.cpp	2016-10-19 18:09:50 UTC (rev 207546)
@@ -22,27 +22,19 @@
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
  */
 
 #include "config.h"
-
 #include "Worker.h"
 
-#include "DOMWindow.h"
-#include "CachedResourceLoader.h"
 #include "ContentSecurityPolicy.h"
-#include "Document.h"
-#include "EventListener.h"
+#include "Event.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
-#include "Frame.h"
-#include "FrameLoader.h"
 #include "InspectorInstrumentation.h"
-#include "MessageEvent.h"
 #include "NetworkStateNotifier.h"
+#include "ResourceResponse.h"
 #include "SecurityOrigin.h"
-#include "TextEncoding.h"
 #include "WorkerGlobalScopeProxy.h"
 #include "WorkerScriptLoader.h"
 #include "WorkerThread.h"

Modified: trunk/Source/WebCore/workers/Worker.h (207545 => 207546)


--- trunk/Source/WebCore/workers/Worker.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/Worker.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -21,16 +21,13 @@
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
  */
 
-#ifndef Worker_h
-#define Worker_h
+#pragma once
 
 #include "AbstractWorker.h"
 #include "ActiveDOMObject.h"
 #include "ContentSecurityPolicyResponseHeaders.h"
-#include "EventListener.h"
 #include "EventTarget.h"
 #include "MessagePort.h"
 #include "WorkerScriptLoaderClient.h"
@@ -87,5 +84,3 @@
     };
 
 } // namespace WebCore
-
-#endif // Worker_h

Modified: trunk/Source/WebCore/workers/Worker.idl (207545 => 207546)


--- trunk/Source/WebCore/workers/Worker.idl	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/Worker.idl	2016-10-19 18:09:50 UTC (rev 207546)
@@ -22,7 +22,6 @@
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
  */
 
 [

Modified: trunk/Source/WebCore/workers/WorkerConsoleClient.h (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerConsoleClient.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerConsoleClient.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -23,8 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WorkerConsoleClient_h
-#define WorkerConsoleClient_h
+#pragma once
 
 #include "WorkerGlobalScope.h"
 #include <runtime/ConsoleClient.h>
@@ -57,5 +56,3 @@
 };
 
 } // namespace WebCore
-
-#endif // WorkerConsoleClient_h

Modified: trunk/Source/WebCore/workers/WorkerEventQueue.cpp (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerEventQueue.cpp	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerEventQueue.cpp	2016-10-19 18:09:50 UTC (rev 207546)
@@ -21,16 +21,14 @@
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
  */
 
 #include "config.h"
 #include "WorkerEventQueue.h"
 
-#include "DOMWindow.h"
-#include "Document.h"
 #include "Event.h"
 #include "EventNames.h"
+#include "EventTarget.h"
 #include "ScriptExecutionContext.h"
 
 namespace WebCore {
@@ -37,7 +35,6 @@
 
 WorkerEventQueue::WorkerEventQueue(ScriptExecutionContext& context)
     : m_scriptExecutionContext(context)
-    , m_isClosed(false)
 {
 }
 
@@ -52,7 +49,6 @@
     EventDispatcher(RefPtr<Event>&& event, WorkerEventQueue& eventQueue)
         : m_event(WTFMove(event))
         , m_eventQueue(eventQueue)
-        , m_isCancelled(false)
     {
     }
 
@@ -80,7 +76,7 @@
 private:
     RefPtr<Event> m_event;
     WorkerEventQueue& m_eventQueue;
-    bool m_isCancelled;
+    bool m_isCancelled { false };
 };
 
 bool WorkerEventQueue::enqueueEvent(Ref<Event>&& event)
@@ -115,4 +111,4 @@
     m_eventDispatcherMap.clear();
 }
 
-}
+} // namespace WebCore

Modified: trunk/Source/WebCore/workers/WorkerEventQueue.h (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerEventQueue.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerEventQueue.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -21,11 +21,9 @@
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
  */
 
-#ifndef WorkerEventQueue_h
-#define WorkerEventQueue_h
+#pragma once
 
 #include "EventQueue.h"
 #include <wtf/HashMap.h>
@@ -45,7 +43,7 @@
 
 private:
     ScriptExecutionContext& m_scriptExecutionContext;
-    bool m_isClosed;
+    bool m_isClosed { false };
 
     class EventDispatcher;
     typedef HashMap<RefPtr<Event>, EventDispatcher*> EventDispatcherMap;
@@ -52,6 +50,4 @@
     EventDispatcherMap m_eventDispatcherMap;
 };
 
-}
-
-#endif // WorkerEventQueue_h
+} // namespace WebCore

Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.cpp (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerGlobalScope.cpp	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.cpp	2016-10-19 18:09:50 UTC (rev 207546)
@@ -28,18 +28,13 @@
 #include "config.h"
 #include "WorkerGlobalScope.h"
 
-#include "ActiveDOMObject.h"
 #include "ContentSecurityPolicy.h"
 #include "Crypto.h"
 #include "DOMTimer.h"
-#include "DOMURL.h"
-#include "DOMWindow.h"
-#include "ErrorEvent.h"
 #include "Event.h"
 #include "ExceptionCode.h"
 #include "IDBConnectionProxy.h"
 #include "InspectorConsoleInstrumentation.h"
-#include "MessagePort.h"
 #include "ScheduledAction.h"
 #include "ScriptSourceCode.h"
 #include "SecurityOrigin.h"
@@ -49,19 +44,13 @@
 #include "WorkerLoaderProxy.h"
 #include "WorkerLocation.h"
 #include "WorkerNavigator.h"
-#include "WorkerObjectProxy.h"
+#include "WorkerReportingProxy.h"
 #include "WorkerScriptLoader.h"
 #include "WorkerThread.h"
 #include "WorkerThreadableLoader.h"
-#include <bindings/ScriptValue.h>
 #include <inspector/ConsoleMessage.h>
 #include <inspector/ScriptCallStack.h>
-#include <wtf/RefPtr.h>
 
-#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
-#include "NotificationCenter.h"
-#endif
-
 using namespace Inspector;
 
 namespace WebCore {
@@ -289,7 +278,7 @@
     }
 
     thread().workerReportingProxy().postConsoleMessageToWorkerObject(source, level, message, 0, 0, String());
-    addMessageToWorkerConsole(source, level, message, String(), 0, 0, 0, 0, requestIdentifier);
+    addMessageToWorkerConsole(source, level, message, String(), 0, 0, nullptr, nullptr, requestIdentifier);
 }
 
 void WorkerGlobalScope::addMessage(MessageSource source, MessageLevel level, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, RefPtr<ScriptCallStack>&& callStack, JSC::ExecState* state, unsigned long requestIdentifier)
@@ -352,7 +341,7 @@
         return;
     ASSERT(m_context->isContextThread());
     m_context->unregisterObserver(this);
-    m_context = 0;
+    m_context = nullptr;
 }
 
 void WorkerGlobalScope::registerObserver(Observer* observer)

Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.h (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerGlobalScope.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -34,7 +34,6 @@
 #include "WorkerEventQueue.h"
 #include "WorkerScriptController.h"
 #include <memory>
-#include <wtf/Assertions.h>
 #include <wtf/HashSet.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
@@ -46,7 +45,6 @@
 
 namespace WebCore {
 
-class Blob;
 class ContentSecurityPolicyResponseHeaders;
 class Crypto;
 class ScheduledAction;
@@ -164,7 +162,7 @@
 
     void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, int columnNumber, RefPtr<Inspector::ScriptCallStack>&&) override;
     void addMessageToWorkerConsole(std::unique_ptr<Inspector::ConsoleMessage>);
-    void addMessageToWorkerConsole(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, RefPtr<Inspector::ScriptCallStack>&&, JSC::ExecState* = 0, unsigned long requestIdentifier = 0);
+    void addMessageToWorkerConsole(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, RefPtr<Inspector::ScriptCallStack>&&, JSC::ExecState* = nullptr, unsigned long requestIdentifier = 0);
 
 private:
     void refScriptExecutionContext() override { ref(); }
@@ -173,7 +171,7 @@
     void refEventTarget() final { ref(); }
     void derefEventTarget() final { deref(); }
 
-    void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, RefPtr<Inspector::ScriptCallStack>&&, JSC::ExecState* = 0, unsigned long requestIdentifier = 0) override;
+    void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, unsigned columnNumber, RefPtr<Inspector::ScriptCallStack>&&, JSC::ExecState* = nullptr, unsigned long requestIdentifier = 0) override;
 
     EventTarget* errorEventTarget() override;
 

Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.idl (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerGlobalScope.idl	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.idl	2016-10-19 18:09:50 UTC (rev 207546)
@@ -21,7 +21,6 @@
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
  */
 
 [

Modified: trunk/Source/WebCore/workers/WorkerGlobalScopeProxy.h (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerGlobalScopeProxy.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerGlobalScopeProxy.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -28,8 +28,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WorkerGlobalScopeProxy_h
-#define WorkerGlobalScopeProxy_h
+#pragma once
 
 #include "MessagePort.h"
 #include "WorkerThread.h"
@@ -63,5 +62,3 @@
     };
 
 } // namespace WebCore
-
-#endif // WorkerGlobalScopeProxy_h

Modified: trunk/Source/WebCore/workers/WorkerLoaderProxy.h (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerLoaderProxy.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerLoaderProxy.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -28,11 +28,9 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WorkerLoaderProxy_h
-#define WorkerLoaderProxy_h
+#pragma once
 
 #include "ScriptExecutionContext.h"
-#include <wtf/Forward.h>
 
 namespace WebCore {
 
@@ -55,5 +53,3 @@
     };
 
 } // namespace WebCore
-
-#endif // WorkerLoaderProxy_h

Modified: trunk/Source/WebCore/workers/WorkerLocation.cpp (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerLocation.cpp	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerLocation.cpp	2016-10-19 18:09:50 UTC (rev 207546)
@@ -21,7 +21,6 @@
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
  */
 
 #include "config.h"

Modified: trunk/Source/WebCore/workers/WorkerLocation.h (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerLocation.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerLocation.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -21,15 +21,12 @@
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
  */
 
-#ifndef WorkerLocation_h
-#define WorkerLocation_h
+#pragma once
 
 #include "URL.h"
 #include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
@@ -62,5 +59,3 @@
     };
 
 } // namespace WebCore
-
-#endif // WorkerLocation_h

Modified: trunk/Source/WebCore/workers/WorkerMessagingProxy.cpp (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerMessagingProxy.cpp	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerMessagingProxy.cpp	2016-10-19 18:09:50 UTC (rev 207546)
@@ -190,7 +190,7 @@
 
 void WorkerMessagingProxy::workerObjectDestroyed()
 {
-    m_workerObject = 0;
+    m_workerObject = nullptr;
     m_scriptExecutionContext->postTask([this] (ScriptExecutionContext&) {
         m_mayBeDestroyed = true;
         if (m_workerThread)
@@ -218,12 +218,10 @@
     m_scriptExecutionContext->postTask([this] (ScriptExecutionContext&) {
         workerGlobalScopeDestroyedInternal();
     });
-    // Will execute workerGlobalScopeDestroyedInternal() on context's thread.
 }
 
 void WorkerMessagingProxy::workerGlobalScopeClosed()
 {
-    // Executes terminateWorkerGlobalScope() on parent context's thread.
     m_scriptExecutionContext->postTask([this] (ScriptExecutionContext&) {
         terminateWorkerGlobalScope();
     });
@@ -231,7 +229,7 @@
 
 void WorkerMessagingProxy::workerGlobalScopeDestroyedInternal()
 {
-    // WorkerGlobalScopeDestroyedTask is always the last to be performed, so the proxy is not needed for communication
+    // This is always the last task to be performed, so the proxy is not needed for communication
     // in either side any more. However, the Worker object may still exist, and it assumes that the proxy exists, too.
     m_askedToTerminate = true;
     m_workerThread = nullptr;
@@ -255,7 +253,6 @@
     m_scriptExecutionContext->postTask([this, hasPendingActivity] (ScriptExecutionContext&) {
         reportPendingActivityInternal(true, hasPendingActivity);
     });
-    // Will execute reportPendingActivityInternal() on context's thread.
 }
 
 void WorkerMessagingProxy::reportPendingActivity(bool hasPendingActivity)
@@ -263,7 +260,6 @@
     m_scriptExecutionContext->postTask([this, hasPendingActivity] (ScriptExecutionContext&) {
         reportPendingActivityInternal(false, hasPendingActivity);
     });
-    // Will execute reportPendingActivityInternal() on context's thread.
 }
 
 void WorkerMessagingProxy::reportPendingActivityInternal(bool confirmingMessage, bool hasPendingActivity)

Modified: trunk/Source/WebCore/workers/WorkerMessagingProxy.h (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerMessagingProxy.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerMessagingProxy.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -21,11 +21,9 @@
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
  */
 
-#ifndef WorkerMessagingProxy_h
-#define WorkerMessagingProxy_h
+#pragma once
 
 #include "ScriptExecutionContext.h"
 #include "WorkerGlobalScopeProxy.h"
@@ -42,7 +40,6 @@
 
     class ContentSecurityPolicyResponseHeaders;
     class DedicatedWorkerThread;
-    class ScriptExecutionContext;
     class Worker;
 
     class WorkerMessagingProxy : public WorkerGlobalScopeProxy, public WorkerObjectProxy, public WorkerLoaderProxy {
@@ -84,11 +81,6 @@
         virtual ~WorkerMessagingProxy();
 
     private:
-        friend class MessageWorkerTask;
-        friend class WorkerGlobalScopeDestroyedTask;
-        friend class WorkerExceptionTask;
-        friend class WorkerThreadActivityReportTask;
-
         void workerGlobalScopeDestroyedInternal();
         void reportPendingActivityInternal(bool confirmingMessage, bool hasPendingActivity);
         Worker* workerObject() const { return m_workerObject; }
@@ -107,5 +99,3 @@
     };
 
 } // namespace WebCore
-
-#endif // WorkerMessagingProxy_h

Modified: trunk/Source/WebCore/workers/WorkerObjectProxy.h (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerObjectProxy.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerObjectProxy.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -28,8 +28,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WorkerObjectProxy_h
-#define WorkerObjectProxy_h
+#pragma once
 
 #include "WorkerReportingProxy.h"
 #include "MessagePort.h"
@@ -52,5 +51,3 @@
     };
 
 } // namespace WebCore
-
-#endif // WorkerObjectProxy_h

Modified: trunk/Source/WebCore/workers/WorkerReportingProxy.h (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerReportingProxy.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerReportingProxy.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -28,11 +28,9 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WorkerReportingProxy_h
-#define WorkerReportingProxy_h
+#pragma once
 
 #include <runtime/ConsoleTypes.h>
-#include <wtf/Forward.h>
 
 namespace WebCore {
 
@@ -53,5 +51,3 @@
     };
 
 } // namespace WebCore
-
-#endif // WorkerReportingProxy_h

Modified: trunk/Source/WebCore/workers/WorkerRunLoop.cpp (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerRunLoop.cpp	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerRunLoop.cpp	2016-10-19 18:09:50 UTC (rev 207546)
@@ -116,7 +116,7 @@
     {
         m_runLoop.m_nestedCount--;
         if (!m_runLoop.m_nestedCount)
-            threadGlobalData().threadTimers().setSharedTimer(0);
+            threadGlobalData().threadTimers().setSharedTimer(nullptr);
     }
 private:
     WorkerRunLoop& m_runLoop;

Modified: trunk/Source/WebCore/workers/WorkerRunLoop.h (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerRunLoop.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerRunLoop.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -28,8 +28,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WorkerRunLoop_h
-#define WorkerRunLoop_h
+#pragma once
 
 #include "ScriptExecutionContext.h"
 #include <memory>
@@ -92,5 +91,3 @@
     };
 
 } // namespace WebCore
-
-#endif // WorkerRunLoop_h

Modified: trunk/Source/WebCore/workers/WorkerScriptLoader.cpp (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerScriptLoader.cpp	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerScriptLoader.cpp	2016-10-19 18:09:50 UTC (rev 207546)
@@ -22,28 +22,24 @@
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
  */
 
 #include "config.h"
-
 #include "WorkerScriptLoader.h"
 
 #include "ContentSecurityPolicy.h"
 #include "ResourceResponse.h"
 #include "ScriptExecutionContext.h"
-#include "SecurityOrigin.h"
 #include "TextResourceDecoder.h"
 #include "WorkerGlobalScope.h"
 #include "WorkerScriptLoaderClient.h"
 #include "WorkerThreadableLoader.h"
 #include <wtf/Ref.h>
-#include <wtf/RefPtr.h>
 
 namespace WebCore {
 
 WorkerScriptLoader::WorkerScriptLoader()
-    : m_client(0)
+    : m_client(nullptr)
     , m_failed(false)
     , m_identifier(0)
     , m_finishing(false)
@@ -114,7 +110,7 @@
 std::unique_ptr<ResourceRequest> WorkerScriptLoader::createResourceRequest()
 {
     auto request = std::make_unique<ResourceRequest>(m_url);
-    request->setHTTPMethod("GET");
+    request->setHTTPMethod(ASCIILiteral("GET"));
     return request;
 }
     
@@ -137,9 +133,9 @@
 
     if (!m_decoder) {
         if (!m_responseEncoding.isEmpty())
-            m_decoder = TextResourceDecoder::create("text/_javascript_", m_responseEncoding);
+            m_decoder = TextResourceDecoder::create(ASCIILiteral("text/_javascript_"), m_responseEncoding);
         else
-            m_decoder = TextResourceDecoder::create("text/_javascript_", "UTF-8");
+            m_decoder = TextResourceDecoder::create(ASCIILiteral("text/_javascript_"), "UTF-8");
     }
 
     if (!len)

Modified: trunk/Source/WebCore/workers/WorkerScriptLoader.h (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerScriptLoader.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerScriptLoader.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -22,11 +22,9 @@
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
  */
 
-#ifndef WorkerScriptLoader_h
-#define WorkerScriptLoader_h
+#pragma once
 
 #include "URL.h"
 #include "ResourceRequest.h"
@@ -92,5 +90,3 @@
     };
 
 } // namespace WebCore
-
-#endif // WorkerScriptLoader_h

Modified: trunk/Source/WebCore/workers/WorkerScriptLoaderClient.h (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerScriptLoaderClient.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerScriptLoaderClient.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -22,11 +22,9 @@
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
  */
 
-#ifndef WorkerScriptLoaderClient_h
-#define WorkerScriptLoaderClient_h
+#pragma once
 
 namespace WebCore {
 
@@ -45,5 +43,3 @@
     };
 
 } // namespace WebCore
-
-#endif // WorkerScriptLoaderClient_h

Modified: trunk/Source/WebCore/workers/WorkerThread.cpp (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerThread.cpp	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerThread.cpp	2016-10-19 18:09:50 UTC (rev 207546)
@@ -25,11 +25,9 @@
  */
 
 #include "config.h"
-
 #include "WorkerThread.h"
 
 #include "ContentSecurityPolicyResponseHeaders.h"
-#include "DedicatedWorkerGlobalScope.h"
 #include "IDBConnectionProxy.h"
 #include "ScriptSourceCode.h"
 #include "SecurityOrigin.h"
@@ -36,6 +34,7 @@
 #include "SocketProvider.h"
 #include "ThreadGlobalData.h"
 #include "URL.h"
+#include "WorkerGlobalScope.h"
 #include <utility>
 #include <wtf/Lock.h>
 #include <wtf/NeverDestroyed.h>
@@ -99,9 +98,6 @@
     , m_workerLoaderProxy(workerLoaderProxy)
     , m_workerReportingProxy(workerReportingProxy)
     , m_startupData(std::make_unique<WorkerThreadStartupData>(scriptURL, userAgent, sourceCode, startMode, contentSecurityPolicyResponseHeaders, shouldBypassMainWorldContentSecurityPolicy, topOrigin))
-#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
-    , m_notificationClient(0)
-#endif
 #if ENABLE(INDEXED_DATABASE)
     , m_idbConnectionProxy(connectionProxy)
 #endif

Modified: trunk/Source/WebCore/workers/WorkerThread.h (207545 => 207546)


--- trunk/Source/WebCore/workers/WorkerThread.h	2016-10-19 17:47:30 UTC (rev 207545)
+++ trunk/Source/WebCore/workers/WorkerThread.h	2016-10-19 18:09:50 UTC (rev 207546)
@@ -21,7 +21,6 @@
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- *
  */
 
 #pragma once
@@ -102,7 +101,7 @@
     std::unique_ptr<WorkerThreadStartupData> m_startupData;
 
 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
-    NotificationClient* m_notificationClient;
+    NotificationClient* m_notificationClient { nullptr };
 #endif
 
 #if ENABLE(INDEXED_DATABASE)
@@ -114,4 +113,3 @@
 };
 
 } // namespace WebCore
-
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to