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

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

Issue 400153002: Change WokerThread to use a blink::WebThread. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix issues from jochen's review. Created 6 years, 5 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 class RunInspectorCommandsTask FINAL : public ScriptDebugServer::Task { 58 class RunInspectorCommandsTask FINAL : public ScriptDebugServer::Task {
59 public: 59 public:
60 explicit RunInspectorCommandsTask(WorkerThread* thread) 60 explicit RunInspectorCommandsTask(WorkerThread* thread)
61 : m_thread(thread) { } 61 : m_thread(thread) { }
62 virtual ~RunInspectorCommandsTask() { } 62 virtual ~RunInspectorCommandsTask() { }
63 virtual void run() OVERRIDE 63 virtual void run() OVERRIDE
64 { 64 {
65 // Process all queued debugger commands. WorkerThread is certainly 65 // Process all queued debugger commands. WorkerThread is certainly
66 // alive if this task is being executed. 66 // alive if this task is being executed.
67 while (MessageQueueMessageReceived == m_thread->runDebuggerTask(WorkerRu nLoop::DontWaitForMessage)) { } 67 m_thread->willEnterNestedLoop();
68 while (MessageQueueMessageReceived == m_thread->runDebuggerTask(WorkerTh read::DontWaitForMessage)) { }
69 m_thread->didLeaveNestedLoop();
68 } 70 }
69 71
70 private: 72 private:
71 WorkerThread* m_thread; 73 WorkerThread* m_thread;
72 }; 74 };
73 75
74 } // namespace 76 } // namespace
75 77
76 PassOwnPtr<WorkerDebuggerAgent> WorkerDebuggerAgent::create(WorkerScriptDebugSer ver* scriptDebugServer, WorkerGlobalScope* inspectedWorkerGlobalScope, InjectedS criptManager* injectedScriptManager) 78 PassOwnPtr<WorkerDebuggerAgent> WorkerDebuggerAgent::create(WorkerScriptDebugSer ver* scriptDebugServer, WorkerGlobalScope* inspectedWorkerGlobalScope, InjectedS criptManager* injectedScriptManager)
77 { 79 {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 { 132 {
131 // We don't need to mute console for workers. 133 // We don't need to mute console for workers.
132 } 134 }
133 135
134 void WorkerDebuggerAgent::unmuteConsole() 136 void WorkerDebuggerAgent::unmuteConsole()
135 { 137 {
136 // We don't need to mute console for workers. 138 // We don't need to mute console for workers.
137 } 139 }
138 140
139 } // namespace blink 141 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698