Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 176 ASSERT(m_webView); | 176 ASSERT(m_webView); |
| 177 // Detach the client before closing the view to avoid getting called back. | 177 // Detach the client before closing the view to avoid getting called back. |
| 178 m_mainFrame->setClient(0); | 178 m_mainFrame->setClient(0); |
| 179 | 179 |
| 180 m_webView->close(); | 180 m_webView->close(); |
| 181 m_mainFrame->close(); | 181 m_mainFrame->close(); |
| 182 if (m_loaderProxy) | 182 if (m_loaderProxy) |
| 183 m_loaderProxy->detachProvider(this); | 183 m_loaderProxy->detachProvider(this); |
| 184 } | 184 } |
| 185 | 185 |
| 186 void WebSharedWorkerImpl::stopWorkerThread() | 186 void WebSharedWorkerImpl::stopWorkerThread() |
|
kinuko
2015/06/11 08:42:33
No need to do it in this CL but it might be better
Takashi Toyoshima
2015/06/11 11:25:59
Add TODOs for both.
| |
| 187 { | 187 { |
| 188 if (m_askedToTerminate) | 188 if (m_askedToTerminate) |
| 189 return; | 189 return; |
| 190 m_askedToTerminate = true; | 190 m_askedToTerminate = true; |
| 191 if (m_mainScriptLoader) { | 191 if (m_mainScriptLoader) { |
| 192 m_mainScriptLoader->cancel(); | 192 m_mainScriptLoader->cancel(); |
| 193 m_mainScriptLoader.clear(); | 193 m_mainScriptLoader.clear(); |
| 194 if (client()) | 194 if (client()) |
| 195 client()->workerScriptLoadFailed(); | 195 client()->workerScriptLoadFailed(); |
| 196 delete this; | 196 delete this; |
| 197 return; | 197 return; |
| 198 } | 198 } |
| 199 if (m_workerThread) | 199 if (m_workerThread) |
| 200 m_workerThread->stop(); | 200 m_workerThread->terminate(); |
| 201 m_workerInspectorProxy->workerThreadTerminated(); | 201 m_workerInspectorProxy->workerThreadTerminated(); |
| 202 } | 202 } |
| 203 | 203 |
| 204 void WebSharedWorkerImpl::initializeLoader() | 204 void WebSharedWorkerImpl::initializeLoader() |
| 205 { | 205 { |
| 206 // Create 'shadow page'. This page is never displayed, it is used to proxy t he | 206 // Create 'shadow page'. This page is never displayed, it is used to proxy t he |
| 207 // loading requests from the worker context to the rest of WebKit and Chromi um | 207 // loading requests from the worker context to the rest of WebKit and Chromi um |
| 208 // infrastructure. | 208 // infrastructure. |
| 209 ASSERT(!m_webView); | 209 ASSERT(!m_webView); |
| 210 m_webView = WebView::create(0); | 210 m_webView = WebView::create(0); |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 474 if (devtoolsAgent) | 474 if (devtoolsAgent) |
| 475 devtoolsAgent->dispatchOnInspectorBackend(message); | 475 devtoolsAgent->dispatchOnInspectorBackend(message); |
| 476 } | 476 } |
| 477 | 477 |
| 478 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) | 478 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) |
| 479 { | 479 { |
| 480 return new WebSharedWorkerImpl(client); | 480 return new WebSharedWorkerImpl(client); |
| 481 } | 481 } |
| 482 | 482 |
| 483 } // namespace blink | 483 } // namespace blink |
| OLD | NEW |