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

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

Issue 2779543007: Add DCHECK to WebEmbeddedWorkerImpl to assert WebFrameClient params. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 CString content(""); 324 CString content("");
325 RefPtr<SharedBuffer> buffer( 325 RefPtr<SharedBuffer> buffer(
326 SharedBuffer::create(content.data(), content.length())); 326 SharedBuffer::create(content.data(), content.length()));
327 m_loadingShadowPage = true; 327 m_loadingShadowPage = true;
328 m_mainFrame->frame()->loader().load( 328 m_mainFrame->frame()->loader().load(
329 FrameLoadRequest(0, ResourceRequest(m_workerStartData.scriptURL), 329 FrameLoadRequest(0, ResourceRequest(m_workerStartData.scriptURL),
330 SubstituteData(buffer, "text/html", "UTF-8", KURL()))); 330 SubstituteData(buffer, "text/html", "UTF-8", KURL())));
331 } 331 }
332 332
333 void WebEmbeddedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame) { 333 void WebEmbeddedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame) {
334 DCHECK_EQ(frame, m_mainFrame);
334 DCHECK(!m_mainScriptLoader); 335 DCHECK(!m_mainScriptLoader);
335 DCHECK(m_mainFrame); 336 DCHECK(m_mainFrame);
336 DCHECK(m_workerContextClient); 337 DCHECK(m_workerContextClient);
337 DCHECK(m_loadingShadowPage); 338 DCHECK(m_loadingShadowPage);
338 DCHECK(!m_askedToTerminate); 339 DCHECK(!m_askedToTerminate);
339 m_loadingShadowPage = false; 340 m_loadingShadowPage = false;
340 frame->dataSource()->setServiceWorkerNetworkProvider(WTF::wrapUnique( 341 frame->dataSource()->setServiceWorkerNetworkProvider(WTF::wrapUnique(
341 m_workerContextClient->createServiceWorkerNetworkProvider())); 342 m_workerContextClient->createServiceWorkerNetworkProvider()));
342 m_mainScriptLoader = WorkerScriptLoader::create(); 343 m_mainScriptLoader = WorkerScriptLoader::create();
343 m_mainScriptLoader->setRequestContext( 344 m_mainScriptLoader->setRequestContext(
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 *this, *document, *m_workerContextClient); 471 *this, *document, *m_workerContextClient);
471 m_loaderProxy = WorkerLoaderProxy::create(this); 472 m_loaderProxy = WorkerLoaderProxy::create(this);
472 m_workerThread = 473 m_workerThread =
473 ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalScopeProxy); 474 ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalScopeProxy);
474 m_workerThread->start(std::move(startupData), m_mainThreadTaskRunners.get()); 475 m_workerThread->start(std::move(startupData), m_mainThreadTaskRunners.get());
475 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), 476 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(),
476 scriptURL); 477 scriptURL);
477 } 478 }
478 479
479 } // namespace blink 480 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698