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

Side by Side Diff: Source/core/workers/WorkerThread.h

Issue 1305453003: Fix data race in blink::WorkerMessagingProxy::reportException (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/core/workers/WorkerMessagingProxy.cpp ('k') | Source/core/workers/WorkerThread.cpp » ('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 * 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void appendDebuggerTask(PassOwnPtr<WebThread::Task>); 99 void appendDebuggerTask(PassOwnPtr<WebThread::Task>);
100 100
101 enum WaitMode { WaitForMessage, DontWaitForMessage }; 101 enum WaitMode { WaitForMessage, DontWaitForMessage };
102 MessageQueueWaitResult runDebuggerTask(WaitMode = WaitForMessage); 102 MessageQueueWaitResult runDebuggerTask(WaitMode = WaitForMessage);
103 103
104 // These methods should be called if the holder of the thread is 104 // These methods should be called if the holder of the thread is
105 // going to call runDebuggerTask in a loop. 105 // going to call runDebuggerTask in a loop.
106 void willEnterNestedLoop(); 106 void willEnterNestedLoop();
107 void didLeaveNestedLoop(); 107 void didLeaveNestedLoop();
108 108
109 WorkerGlobalScope* workerGlobalScope() const { return m_workerGlobalScope.ge t(); } 109 // Can be called only on the worker thread, WorkerGlobalScope is not thread safe.
110 WorkerGlobalScope* workerGlobalScope();
110 111
111 // Returns true once one of the terminate* methods is called. 112 // Returns true once one of the terminate* methods is called.
112 bool terminated(); 113 bool terminated();
113 114
114 // Number of active worker threads. 115 // Number of active worker threads.
115 static unsigned workerThreadCount(); 116 static unsigned workerThreadCount();
116 117
117 PlatformThreadId platformThreadId(); 118 PlatformThreadId platformThreadId();
118 119
119 void interruptAndDispatchInspectorCommands(); 120 void interruptAndDispatchInspectorCommands();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // Used to signal thread shutdown. 176 // Used to signal thread shutdown.
176 OwnPtr<WebWaitableEvent> m_shutdownEvent; 177 OwnPtr<WebWaitableEvent> m_shutdownEvent;
177 178
178 // Used to signal thread termination. 179 // Used to signal thread termination.
179 OwnPtr<WebWaitableEvent> m_terminationEvent; 180 OwnPtr<WebWaitableEvent> m_terminationEvent;
180 }; 181 };
181 182
182 } // namespace blink 183 } // namespace blink
183 184
184 #endif // WorkerThread_h 185 #endif // WorkerThread_h
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerMessagingProxy.cpp ('k') | Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698