Chromium Code Reviews| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 298 m_loadingShadowPage = false; | 298 m_loadingShadowPage = false; |
| 299 m_networkProvider = adoptPtr(m_workerContextClient->createServiceWorkerNetwo rkProvider(frame->dataSource())); | 299 m_networkProvider = adoptPtr(m_workerContextClient->createServiceWorkerNetwo rkProvider(frame->dataSource())); |
| 300 m_mainScriptLoader = adoptPtr(new WorkerScriptLoader()); | 300 m_mainScriptLoader = adoptPtr(new WorkerScriptLoader()); |
| 301 m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextServiceWo rker); | 301 m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextServiceWo rker); |
| 302 m_mainScriptLoader->loadAsynchronously( | 302 m_mainScriptLoader->loadAsynchronously( |
| 303 *m_mainFrame->frame()->document(), | 303 *m_mainFrame->frame()->document(), |
| 304 m_workerStartData.scriptURL, | 304 m_workerStartData.scriptURL, |
| 305 DenyCrossOriginRequests, | 305 DenyCrossOriginRequests, |
| 306 nullptr, | 306 nullptr, |
| 307 bind(&WebEmbeddedWorkerImpl::onScriptLoaderFinished, this)); | 307 bind(&WebEmbeddedWorkerImpl::onScriptLoaderFinished, this)); |
| 308 // Do nothing here since onScriptLoaderFinished() might be already invoked | |
|
haraken
2015/07/02 06:18:06
might be => might have been
Takashi Toyoshima
2015/07/02 07:33:56
Oops, tense is so important here.
| |
| 309 // and |this| might have been deleted at this point. | |
| 308 } | 310 } |
| 309 | 311 |
| 310 void WebEmbeddedWorkerImpl::sendProtocolMessage(int callId, const WebString& mes sage, const WebString& state) | 312 void WebEmbeddedWorkerImpl::sendProtocolMessage(int callId, const WebString& mes sage, const WebString& state) |
| 311 { | 313 { |
| 312 m_workerContextClient->sendDevToolsMessage(callId, message, state); | 314 m_workerContextClient->sendDevToolsMessage(callId, message, state); |
| 313 } | 315 } |
| 314 | 316 |
| 315 void WebEmbeddedWorkerImpl::resumeStartup() | 317 void WebEmbeddedWorkerImpl::resumeStartup() |
| 316 { | 318 { |
| 317 WaitingForDebuggerState waitingForDebuggerState = m_waitingForDebuggerState; | 319 WaitingForDebuggerState waitingForDebuggerState = m_waitingForDebuggerState; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 385 m_mainScriptLoader.clear(); | 387 m_mainScriptLoader.clear(); |
| 386 | 388 |
| 387 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient); | 389 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient); |
| 388 m_loaderProxy = WorkerLoaderProxy::create(this); | 390 m_loaderProxy = WorkerLoaderProxy::create(this); |
| 389 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy); | 391 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy); |
| 390 m_workerThread->start(startupData.release()); | 392 m_workerThread->start(startupData.release()); |
| 391 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL); | 393 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL); |
| 392 } | 394 } |
| 393 | 395 |
| 394 } // namespace blink | 396 } // namespace blink |
| OLD | NEW |