| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 92 } |
| 93 | 93 |
| 94 WorkerReportingProxy& workerReportingProxy() const { return m_workerReportin
gProxy; } | 94 WorkerReportingProxy& workerReportingProxy() const { return m_workerReportin
gProxy; } |
| 95 | 95 |
| 96 void postTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTask>); | 96 void postTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTask>); |
| 97 void postDebuggerTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTa
sk>); | 97 void postDebuggerTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTa
sk>); |
| 98 | 98 |
| 99 enum WaitMode { WaitForMessage, DontWaitForMessage }; | 99 enum WaitMode { WaitForMessage, DontWaitForMessage }; |
| 100 MessageQueueWaitResult runDebuggerTask(WaitMode = WaitForMessage); | 100 MessageQueueWaitResult runDebuggerTask(WaitMode = WaitForMessage); |
| 101 | 101 |
| 102 // These methods should be called if the holder of the thread is | |
| 103 // going to call runDebuggerTask in a loop. | |
| 104 void willEnterNestedLoop(); | |
| 105 void didLeaveNestedLoop(); | |
| 106 | |
| 107 WorkerGlobalScope* workerGlobalScope() const { return m_workerGlobalScope.ge
t(); } | 102 WorkerGlobalScope* workerGlobalScope() const { return m_workerGlobalScope.ge
t(); } |
| 108 bool terminated(); | 103 bool terminated(); |
| 109 | 104 |
| 110 // Number of active worker threads. | 105 // Number of active worker threads. |
| 111 static unsigned workerThreadCount(); | 106 static unsigned workerThreadCount(); |
| 112 | 107 |
| 113 PlatformThreadId platformThreadId(); | 108 PlatformThreadId platformThreadId(); |
| 114 | 109 |
| 115 void interruptAndDispatchInspectorCommands(); | 110 void interruptAndDispatchInspectorCommands(); |
| 116 void setWorkerInspectorController(WorkerInspectorController*); | 111 void setWorkerInspectorController(WorkerInspectorController*); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // Used to signal thread shutdown. | 157 // Used to signal thread shutdown. |
| 163 OwnPtr<WebWaitableEvent> m_shutdownEvent; | 158 OwnPtr<WebWaitableEvent> m_shutdownEvent; |
| 164 | 159 |
| 165 // Used to signal thread termination. | 160 // Used to signal thread termination. |
| 166 OwnPtr<WebWaitableEvent> m_terminationEvent; | 161 OwnPtr<WebWaitableEvent> m_terminationEvent; |
| 167 }; | 162 }; |
| 168 | 163 |
| 169 } // namespace blink | 164 } // namespace blink |
| 170 | 165 |
| 171 #endif // WorkerThread_h | 166 #endif // WorkerThread_h |
| OLD | NEW |