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

Side by Side Diff: Source/bindings/core/v8/WorkerScriptDebugServer.cpp

Issue 423303004: Change WokerThread to use a blink::WebThread (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove changes made to WebThread. Created 6 years, 4 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
« no previous file with comments | « Source/bindings/core/v8/WorkerScriptController.cpp ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 ScriptDebugListener* WorkerScriptDebugServer::getDebugListenerForContext(v8::Han dle<v8::Context>) 92 ScriptDebugListener* WorkerScriptDebugServer::getDebugListenerForContext(v8::Han dle<v8::Context>)
93 { 93 {
94 // There is only one worker context in isolate. 94 // There is only one worker context in isolate.
95 return m_listener; 95 return m_listener;
96 } 96 }
97 97
98 void WorkerScriptDebugServer::runMessageLoopOnPause(v8::Handle<v8::Context>) 98 void WorkerScriptDebugServer::runMessageLoopOnPause(v8::Handle<v8::Context>)
99 { 99 {
100 MessageQueueWaitResult result; 100 MessageQueueWaitResult result;
101 m_workerGlobalScope->thread()->willEnterNestedLoop();
101 do { 102 do {
102 result = m_workerGlobalScope->thread()->runDebuggerTask(); 103 result = m_workerGlobalScope->thread()->runDebuggerTask();
103 // Keep waiting until execution is resumed. 104 // Keep waiting until execution is resumed.
104 } while (result == MessageQueueMessageReceived && isPaused()); 105 } while (result == MessageQueueMessageReceived && isPaused());
106 m_workerGlobalScope->thread()->didLeaveNestedLoop();
105 107
106 // The listener may have been removed in the nested loop. 108 // The listener may have been removed in the nested loop.
107 if (m_listener) 109 if (m_listener)
108 m_listener->didContinue(); 110 m_listener->didContinue();
109 } 111 }
110 112
111 void WorkerScriptDebugServer::quitMessageLoopOnPause() 113 void WorkerScriptDebugServer::quitMessageLoopOnPause()
112 { 114 {
113 // Nothing to do here in case of workers since runMessageLoopOnPause will ch eck for paused state after each debugger command. 115 // Nothing to do here in case of workers since runMessageLoopOnPause will ch eck for paused state after each debugger command.
114 } 116 }
115 117
116 } // namespace blink 118 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/WorkerScriptController.cpp ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698