Title: [281348] trunk/Source/WebCore
Revision
281348
Author
[email protected]
Date
2021-08-20 15:58:48 -0700 (Fri, 20 Aug 2021)

Log Message

Outdent WorkerRunLoop class definition
https://bugs.webkit.org/show_bug.cgi?id=229352

Reviewed by Wenson Hsieh.

Just outdent the class.

* workers/WorkerRunLoop.h:
(WebCore::WorkerRunLoop::terminated const):
(WebCore::WorkerRunLoop::createUniqueId):
(WebCore::WorkerRunLoop::Task::mode const):
(WebCore::WorkerRunLoop::isBeingDebugged const):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (281347 => 281348)


--- trunk/Source/WebCore/ChangeLog	2021-08-20 22:54:37 UTC (rev 281347)
+++ trunk/Source/WebCore/ChangeLog	2021-08-20 22:58:48 UTC (rev 281348)
@@ -1,3 +1,18 @@
+2021-08-20  Simon Fraser  <[email protected]>
+
+        Outdent WorkerRunLoop class definition
+        https://bugs.webkit.org/show_bug.cgi?id=229352
+
+        Reviewed by Wenson Hsieh.
+
+        Just outdent the class.
+
+        * workers/WorkerRunLoop.h:
+        (WebCore::WorkerRunLoop::terminated const):
+        (WebCore::WorkerRunLoop::createUniqueId):
+        (WebCore::WorkerRunLoop::Task::mode const):
+        (WebCore::WorkerRunLoop::isBeingDebugged const):
+
 2021-08-20  Alan Bujtas  <[email protected]>
 
         [LFC][IFC] Make mid-word breaking surrogate pair aware

Modified: trunk/Source/WebCore/workers/WorkerRunLoop.h (281347 => 281348)


--- trunk/Source/WebCore/workers/WorkerRunLoop.h	2021-08-20 22:54:37 UTC (rev 281347)
+++ trunk/Source/WebCore/workers/WorkerRunLoop.h	2021-08-20 22:58:48 UTC (rev 281348)
@@ -37,65 +37,65 @@
 
 namespace WebCore {
 
-    class ModePredicate;
-    class WorkerOrWorkletGlobalScope;
-    class WorkerSharedTimer;
+class ModePredicate;
+class WorkerOrWorkletGlobalScope;
+class WorkerSharedTimer;
 
-    class WorkerRunLoop {
-    public:
-        WorkerRunLoop();
-        ~WorkerRunLoop();
-        
-        // Blocking call. Waits for tasks and timers, invokes the callbacks.
-        void run(WorkerOrWorkletGlobalScope*);
+class WorkerRunLoop {
+public:
+    WorkerRunLoop();
+    ~WorkerRunLoop();
+    
+    // Blocking call. Waits for tasks and timers, invokes the callbacks.
+    void run(WorkerOrWorkletGlobalScope*);
 
-        enum WaitMode { WaitForMessage, DontWaitForMessage };
+    enum WaitMode { WaitForMessage, DontWaitForMessage };
 
-        // Waits for a single task and returns.
-        MessageQueueWaitResult runInMode(WorkerOrWorkletGlobalScope*, const String& mode, WaitMode = WaitForMessage);
-        MessageQueueWaitResult runInDebuggerMode(WorkerOrWorkletGlobalScope&);
+    // Waits for a single task and returns.
+    MessageQueueWaitResult runInMode(WorkerOrWorkletGlobalScope*, const String& mode, WaitMode = WaitForMessage);
+    MessageQueueWaitResult runInDebuggerMode(WorkerOrWorkletGlobalScope&);
 
-        void terminate();
-        bool terminated() const { return m_messageQueue.killed(); }
+    void terminate();
+    bool terminated() const { return m_messageQueue.killed(); }
 
-        void postTask(ScriptExecutionContext::Task&&);
-        void postTaskAndTerminate(ScriptExecutionContext::Task&&);
-        WEBCORE_EXPORT void postTaskForMode(ScriptExecutionContext::Task&&, const String& mode);
-        void postDebuggerTask(ScriptExecutionContext::Task&&);
+    void postTask(ScriptExecutionContext::Task&&);
+    void postTaskAndTerminate(ScriptExecutionContext::Task&&);
+    WEBCORE_EXPORT void postTaskForMode(ScriptExecutionContext::Task&&, const String& mode);
+    void postDebuggerTask(ScriptExecutionContext::Task&&);
 
-        unsigned long createUniqueId() { return ++m_uniqueId; }
+    unsigned long createUniqueId() { return ++m_uniqueId; }
 
-        WEBCORE_EXPORT static String defaultMode();
-        class Task {
-            WTF_MAKE_NONCOPYABLE(Task); WTF_MAKE_FAST_ALLOCATED;
-        public:
-            Task(ScriptExecutionContext::Task&&, const String& mode);
-            const String& mode() const { return m_mode; }
+    WEBCORE_EXPORT static String defaultMode();
+    class Task {
+        WTF_MAKE_NONCOPYABLE(Task); WTF_MAKE_FAST_ALLOCATED;
+    public:
+        Task(ScriptExecutionContext::Task&&, const String& mode);
+        const String& mode() const { return m_mode; }
 
-        private:
-            void performTask(WorkerOrWorkletGlobalScope*);
+    private:
+        void performTask(WorkerOrWorkletGlobalScope*);
 
-            ScriptExecutionContext::Task m_task;
-            String m_mode;
+        ScriptExecutionContext::Task m_task;
+        String m_mode;
 
-            friend class WorkerRunLoop;
-        };
+        friend class WorkerRunLoop;
+    };
 
-    private:
-        friend class RunLoopSetup;
-        MessageQueueWaitResult runInMode(WorkerOrWorkletGlobalScope*, const ModePredicate&, WaitMode);
+private:
+    friend class RunLoopSetup;
+    MessageQueueWaitResult runInMode(WorkerOrWorkletGlobalScope*, const ModePredicate&, WaitMode);
 
-        // Runs any clean up tasks that are currently in the queue and returns.
-        // This should only be called when the context is closed or loop has been terminated.
-        void runCleanupTasks(WorkerOrWorkletGlobalScope*);
+    // Runs any clean up tasks that are currently in the queue and returns.
+    // This should only be called when the context is closed or loop has been terminated.
+    void runCleanupTasks(WorkerOrWorkletGlobalScope*);
 
-        bool isBeingDebugged() const { return m_debugCount >= 1; }
+    bool isBeingDebugged() const { return m_debugCount >= 1; }
 
-        MessageQueue<Task> m_messageQueue;
-        std::unique_ptr<WorkerSharedTimer> m_sharedTimer;
-        int m_nestedCount { 0 };
-        int m_debugCount { 0 };
-        unsigned long m_uniqueId { 0 };
-    };
+    MessageQueue<Task> m_messageQueue;
+    std::unique_ptr<WorkerSharedTimer> m_sharedTimer;
+    int m_nestedCount { 0 };
+    int m_debugCount { 0 };
+    unsigned long m_uniqueId { 0 };
+};
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to