OLD | NEW |
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 { | 165 { |
166 m_messagingProxy->reportPendingActivityInternal(m_confirmingMessage, m_h
asPendingActivity); | 166 m_messagingProxy->reportPendingActivityInternal(m_confirmingMessage, m_h
asPendingActivity); |
167 } | 167 } |
168 | 168 |
169 WorkerMessagingProxy* m_messagingProxy; | 169 WorkerMessagingProxy* m_messagingProxy; |
170 bool m_confirmingMessage; | 170 bool m_confirmingMessage; |
171 bool m_hasPendingActivity; | 171 bool m_hasPendingActivity; |
172 }; | 172 }; |
173 | 173 |
174 | 174 |
| 175 // TODO(jabdelmalek): factor out into port |
| 176 /* |
| 177 |
175 WorkerContextProxy* WorkerContextProxy::create(Worker* worker) | 178 WorkerContextProxy* WorkerContextProxy::create(Worker* worker) |
176 { | 179 { |
177 return new WorkerMessagingProxy(worker); | 180 return new WorkerMessagingProxy(worker); |
178 } | 181 } |
| 182 */ |
179 | 183 |
180 WorkerMessagingProxy::WorkerMessagingProxy(Worker* workerObject) | 184 WorkerMessagingProxy::WorkerMessagingProxy(Worker* workerObject) |
181 : m_scriptExecutionContext(workerObject->scriptExecutionContext()) | 185 : m_scriptExecutionContext(workerObject->scriptExecutionContext()) |
182 , m_workerObject(workerObject) | 186 , m_workerObject(workerObject) |
183 , m_unconfirmedMessageCount(0) | 187 , m_unconfirmedMessageCount(0) |
184 , m_workerThreadHadPendingActivity(false) | 188 , m_workerThreadHadPendingActivity(false) |
185 , m_askedToTerminate(false) | 189 , m_askedToTerminate(false) |
186 { | 190 { |
187 ASSERT(m_workerObject); | 191 ASSERT(m_workerObject); |
188 ASSERT((m_scriptExecutionContext->isDocument() && isMainThread()) | 192 ASSERT((m_scriptExecutionContext->isDocument() && isMainThread()) |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 bool WorkerMessagingProxy::hasPendingActivity() const | 329 bool WorkerMessagingProxy::hasPendingActivity() const |
326 { | 330 { |
327 return (m_unconfirmedMessageCount || m_workerThreadHadPendingActivity) && !m
_askedToTerminate; | 331 return (m_unconfirmedMessageCount || m_workerThreadHadPendingActivity) && !m
_askedToTerminate; |
328 } | 332 } |
329 | 333 |
330 } // namespace WebCore | 334 } // namespace WebCore |
331 | 335 |
332 #endif // ENABLE(WORKERS) | 336 #endif // ENABLE(WORKERS) |
333 | 337 |
334 | 338 |
OLD | NEW |