| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // This may delete 'this'. | 202 // This may delete 'this'. |
| 203 m_workerContextClient->workerContextFailedToStart(); | 203 m_workerContextClient->workerContextFailedToStart(); |
| 204 return; | 204 return; |
| 205 } | 205 } |
| 206 if (m_pauseAfterDownloadState == IsPausedAfterDownload) { | 206 if (m_pauseAfterDownloadState == IsPausedAfterDownload) { |
| 207 // This may delete 'this'. | 207 // This may delete 'this'. |
| 208 m_workerContextClient->workerContextFailedToStart(); | 208 m_workerContextClient->workerContextFailedToStart(); |
| 209 return; | 209 return; |
| 210 } | 210 } |
| 211 if (m_workerThread) | 211 if (m_workerThread) |
| 212 m_workerThread->stop(); | 212 m_workerThread->terminate(); |
| 213 m_workerInspectorProxy->workerThreadTerminated(); | 213 m_workerInspectorProxy->workerThreadTerminated(); |
| 214 } | 214 } |
| 215 | 215 |
| 216 void WebEmbeddedWorkerImpl::resumeAfterDownload() | 216 void WebEmbeddedWorkerImpl::resumeAfterDownload() |
| 217 { | 217 { |
| 218 ASSERT(!m_askedToTerminate); | 218 ASSERT(!m_askedToTerminate); |
| 219 bool wasPaused = (m_pauseAfterDownloadState == IsPausedAfterDownload); | 219 bool wasPaused = (m_pauseAfterDownloadState == IsPausedAfterDownload); |
| 220 m_pauseAfterDownloadState = DontPauseAfterDownload; | 220 m_pauseAfterDownloadState = DontPauseAfterDownload; |
| 221 | 221 |
| 222 // If we were asked to wait for debugger while updating service worker versi
on then it is good time now. | 222 // If we were asked to wait for debugger while updating service worker versi
on then it is good time now. |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 m_mainScriptLoader.clear(); | 429 m_mainScriptLoader.clear(); |
| 430 | 430 |
| 431 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc
ument, *m_workerContextClient); | 431 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc
ument, *m_workerContextClient); |
| 432 m_loaderProxy = WorkerLoaderProxy::create(this); | 432 m_loaderProxy = WorkerLoaderProxy::create(this); |
| 433 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS
copeProxy); | 433 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS
copeProxy); |
| 434 m_workerThread->start(startupData.release()); | 434 m_workerThread->start(startupData.release()); |
| 435 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(),
scriptURL); | 435 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(),
scriptURL); |
| 436 } | 436 } |
| 437 | 437 |
| 438 } // namespace blink | 438 } // namespace blink |
| OLD | NEW |