OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |