| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 delete this; | 226 delete this; |
| 227 } | 227 } |
| 228 | 228 |
| 229 void WorkerMessagingProxy::terminateWorkerGlobalScope() | 229 void WorkerMessagingProxy::terminateWorkerGlobalScope() |
| 230 { | 230 { |
| 231 if (m_askedToTerminate) | 231 if (m_askedToTerminate) |
| 232 return; | 232 return; |
| 233 m_askedToTerminate = true; | 233 m_askedToTerminate = true; |
| 234 | 234 |
| 235 if (m_workerThread) | 235 if (m_workerThread) |
| 236 m_workerThread->stop(); | 236 m_workerThread->terminate(); |
| 237 | 237 |
| 238 terminateInternally(); | 238 terminateInternally(); |
| 239 } | 239 } |
| 240 | 240 |
| 241 void WorkerMessagingProxy::postMessageToPageInspector(const String& message) | 241 void WorkerMessagingProxy::postMessageToPageInspector(const String& message) |
| 242 { | 242 { |
| 243 if (!m_workerInspectorProxy) | 243 if (!m_workerInspectorProxy) |
| 244 return; | 244 return; |
| 245 WorkerInspectorProxy::PageInspector* pageInspector = m_workerInspectorProxy-
>pageInspector(); | 245 WorkerInspectorProxy::PageInspector* pageInspector = m_workerInspectorProxy-
>pageInspector(); |
| 246 if (pageInspector) | 246 if (pageInspector) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 | 286 |
| 287 // FIXME: This need to be revisited when we support nested worker one day | 287 // FIXME: This need to be revisited when we support nested worker one day |
| 288 ASSERT(m_executionContext->isDocument()); | 288 ASSERT(m_executionContext->isDocument()); |
| 289 Document* document = toDocument(m_executionContext.get()); | 289 Document* document = toDocument(m_executionContext.get()); |
| 290 LocalFrame* frame = document->frame(); | 290 LocalFrame* frame = document->frame(); |
| 291 if (frame) | 291 if (frame) |
| 292 frame->console().adoptWorkerMessagesAfterTermination(this); | 292 frame->console().adoptWorkerMessagesAfterTermination(this); |
| 293 } | 293 } |
| 294 | 294 |
| 295 } // namespace blink | 295 } // namespace blink |
| OLD | NEW |