Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1173)

Side by Side Diff: Source/core/inspector/WorkerDebuggerAgent.cpp

Issue 1131183003: WorkerThread: Remove willEnterNestedLoop() and didLeaveNestedLoop(). Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "core/inspector/WorkerDebuggerAgent.h" 32 #include "core/inspector/WorkerDebuggerAgent.h"
33 33
34 #include "bindings/core/v8/ScriptDebugServer.h" 34 #include "bindings/core/v8/ScriptDebugServer.h"
35 #include "core/inspector/InjectedScript.h" 35 #include "core/inspector/InjectedScript.h"
36 #include "core/inspector/InspectorInstrumentation.h"
36 #include "core/inspector/WorkerInspectorController.h" 37 #include "core/inspector/WorkerInspectorController.h"
37 #include "core/workers/WorkerGlobalScope.h" 38 #include "core/workers/WorkerGlobalScope.h"
38 #include "core/workers/WorkerThread.h" 39 #include "core/workers/WorkerThread.h"
39 #include "wtf/MessageQueue.h" 40 #include "wtf/MessageQueue.h"
40 41
41 namespace blink { 42 namespace blink {
42 43
43 namespace { 44 namespace {
44 45
45 class RunInspectorCommandsTask final : public ScriptDebugServer::Task { 46 class RunInspectorCommandsTask final : public ScriptDebugServer::Task {
46 public: 47 public:
47 explicit RunInspectorCommandsTask(WorkerThread* thread) 48 explicit RunInspectorCommandsTask(WorkerThread* thread)
48 : m_thread(thread) { } 49 : m_thread(thread) { }
49 virtual ~RunInspectorCommandsTask() { } 50 virtual ~RunInspectorCommandsTask() { }
50 virtual void run() override 51 virtual void run() override
51 { 52 {
52 // Process all queued debugger commands. WorkerThread is certainly 53 // Process all queued debugger commands. WorkerThread is certainly
53 // alive if this task is being executed. 54 // alive if this task is being executed.
54 m_thread->willEnterNestedLoop(); 55 InspectorInstrumentation::willEnterNestedRunLoop(m_thread->workerGlobalS cope());
55 while (MessageQueueMessageReceived == m_thread->runDebuggerTask(WorkerTh read::DontWaitForMessage)) { } 56 while (MessageQueueMessageReceived == m_thread->runDebuggerTask(WorkerTh read::DontWaitForMessage)) { }
56 m_thread->didLeaveNestedLoop(); 57 InspectorInstrumentation::didLeaveNestedRunLoop(m_thread->workerGlobalSc ope());
57 } 58 }
58 59
59 private: 60 private:
60 WorkerThread* m_thread; 61 WorkerThread* m_thread;
61 }; 62 };
62 63
63 } // namespace 64 } // namespace
64 65
65 PassOwnPtrWillBeRawPtr<WorkerDebuggerAgent> WorkerDebuggerAgent::create(WorkerSc riptDebugServer* scriptDebugServer, WorkerGlobalScope* inspectedWorkerGlobalScop e, InjectedScriptManager* injectedScriptManager) 66 PassOwnPtrWillBeRawPtr<WorkerDebuggerAgent> WorkerDebuggerAgent::create(WorkerSc riptDebugServer* scriptDebugServer, WorkerGlobalScope* inspectedWorkerGlobalScop e, InjectedScriptManager* injectedScriptManager)
66 { 67 {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 { 120 {
120 // We don't need to mute console for workers. 121 // We don't need to mute console for workers.
121 } 122 }
122 123
123 void WorkerDebuggerAgent::unmuteConsole() 124 void WorkerDebuggerAgent::unmuteConsole()
124 { 125 {
125 // We don't need to mute console for workers. 126 // We don't need to mute console for workers.
126 } 127 }
127 128
128 } // namespace blink 129 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/WorkerScriptDebugServer.cpp ('k') | Source/core/inspector/WorkerInspectorController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698