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

Side by Side Diff: Source/core/workers/WorkerMessagingProxy.cpp

Issue 307943002: Oilpan: Prepare moving InspectorController and InspectorAgents to oilpan. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/core/workers/WorkerGlobalScope.cpp ('k') | Source/core/workers/WorkerThread.h » ('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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Google Inc. All Rights Reserved. 3 * Copyright (C) 2009 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 static void dispatchOnInspectorBackendTask(ExecutionContext* context, const Stri ng& message) 243 static void dispatchOnInspectorBackendTask(ExecutionContext* context, const Stri ng& message)
244 { 244 {
245 toWorkerGlobalScope(context)->workerInspectorController()->dispatchMessageFr omFrontend(message); 245 toWorkerGlobalScope(context)->workerInspectorController()->dispatchMessageFr omFrontend(message);
246 } 246 }
247 247
248 void WorkerMessagingProxy::sendMessageToInspector(const String& message) 248 void WorkerMessagingProxy::sendMessageToInspector(const String& message)
249 { 249 {
250 if (m_askedToTerminate) 250 if (m_askedToTerminate)
251 return; 251 return;
252 m_workerThread->postDebuggerTask(createCrossThreadTask(dispatchOnInspectorBa ckendTask, String(message))); 252 m_workerThread->postDebuggerTask(createCrossThreadTask(dispatchOnInspectorBa ckendTask, String(message)));
253 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(m_workerThread.ge t()); 253 m_workerThread->interruptAndDispatchInspectorCommands();
254 } 254 }
255 255
256 void WorkerMessagingProxy::workerGlobalScopeDestroyed() 256 void WorkerMessagingProxy::workerGlobalScopeDestroyed()
257 { 257 {
258 // This method is always the last to be performed, so the proxy is not neede d for communication 258 // This method is always the last to be performed, so the proxy is not neede d for communication
259 // in either side any more. However, the Worker object may still exist, and it assumes that the proxy exists, too. 259 // in either side any more. However, the Worker object may still exist, and it assumes that the proxy exists, too.
260 m_askedToTerminate = true; 260 m_askedToTerminate = true;
261 m_workerThread = nullptr; 261 m_workerThread = nullptr;
262 262
263 InspectorInstrumentation::workerGlobalScopeTerminated(m_executionContext.get (), this); 263 InspectorInstrumentation::workerGlobalScopeTerminated(m_executionContext.get (), this);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 { 297 {
298 m_workerThreadHadPendingActivity = hasPendingActivity; 298 m_workerThreadHadPendingActivity = hasPendingActivity;
299 } 299 }
300 300
301 bool WorkerMessagingProxy::hasPendingActivity() const 301 bool WorkerMessagingProxy::hasPendingActivity() const
302 { 302 {
303 return (m_unconfirmedMessageCount || m_workerThreadHadPendingActivity) && !m _askedToTerminate; 303 return (m_unconfirmedMessageCount || m_workerThreadHadPendingActivity) && !m _askedToTerminate;
304 } 304 }
305 305
306 } // namespace blink 306 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerGlobalScope.cpp ('k') | Source/core/workers/WorkerThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698