Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(559)

Side by Side Diff: Source/web/WebEmbeddedWorkerImpl.cpp

Issue 1322523002: Make WorkerScriptLoader back to RefCounted class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/WebEmbeddedWorkerImpl.h ('k') | Source/web/WebSharedWorkerImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 void WebEmbeddedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame, bool) 254 void WebEmbeddedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame, bool)
255 { 255 {
256 ASSERT(!m_mainScriptLoader); 256 ASSERT(!m_mainScriptLoader);
257 ASSERT(!m_networkProvider); 257 ASSERT(!m_networkProvider);
258 ASSERT(m_mainFrame); 258 ASSERT(m_mainFrame);
259 ASSERT(m_workerContextClient); 259 ASSERT(m_workerContextClient);
260 ASSERT(m_loadingShadowPage); 260 ASSERT(m_loadingShadowPage);
261 ASSERT(!m_askedToTerminate); 261 ASSERT(!m_askedToTerminate);
262 m_loadingShadowPage = false; 262 m_loadingShadowPage = false;
263 m_networkProvider = adoptPtr(m_workerContextClient->createServiceWorkerNetwo rkProvider(frame->dataSource())); 263 m_networkProvider = adoptPtr(m_workerContextClient->createServiceWorkerNetwo rkProvider(frame->dataSource()));
264 m_mainScriptLoader = adoptPtr(new WorkerScriptLoader()); 264 m_mainScriptLoader = WorkerScriptLoader::create();
265 m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextServiceWo rker); 265 m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextServiceWo rker);
266 m_mainScriptLoader->loadAsynchronously( 266 m_mainScriptLoader->loadAsynchronously(
267 *m_mainFrame->frame()->document(), 267 *m_mainFrame->frame()->document(),
268 m_workerStartData.scriptURL, 268 m_workerStartData.scriptURL,
269 DenyCrossOriginRequests, 269 DenyCrossOriginRequests,
270 nullptr, 270 nullptr,
271 bind(&WebEmbeddedWorkerImpl::onScriptLoaderFinished, this)); 271 bind(&WebEmbeddedWorkerImpl::onScriptLoaderFinished, this));
272 // Do nothing here since onScriptLoaderFinished() might have been already 272 // Do nothing here since onScriptLoaderFinished() might have been already
273 // invoked and |this| might have been deleted at this point. 273 // invoked and |this| might have been deleted at this point.
274 } 274 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 m_mainScriptLoader.clear(); 345 m_mainScriptLoader.clear();
346 346
347 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient); 347 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient);
348 m_loaderProxy = WorkerLoaderProxy::create(this); 348 m_loaderProxy = WorkerLoaderProxy::create(this);
349 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy); 349 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy);
350 m_workerThread->start(startupData.release()); 350 m_workerThread->start(startupData.release());
351 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL); 351 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL);
352 } 352 }
353 353
354 } // namespace blink 354 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebEmbeddedWorkerImpl.h ('k') | Source/web/WebSharedWorkerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698