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

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

Issue 2093603002: Wrap non-GCed raw pointer parameters of WTF::bind with WTF::unretained (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unretained_wrapper
Patch Set: rebase Created 4 years, 6 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
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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 m_loadingShadowPage = false; 331 m_loadingShadowPage = false;
332 m_networkProvider = wrapUnique(m_workerContextClient->createServiceWorkerNet workProvider(frame->dataSource())); 332 m_networkProvider = wrapUnique(m_workerContextClient->createServiceWorkerNet workProvider(frame->dataSource()));
333 m_mainScriptLoader = WorkerScriptLoader::create(); 333 m_mainScriptLoader = WorkerScriptLoader::create();
334 m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextServiceWo rker); 334 m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextServiceWo rker);
335 m_mainScriptLoader->loadAsynchronously( 335 m_mainScriptLoader->loadAsynchronously(
336 *m_mainFrame->frame()->document(), 336 *m_mainFrame->frame()->document(),
337 m_workerStartData.scriptURL, 337 m_workerStartData.scriptURL,
338 DenyCrossOriginRequests, 338 DenyCrossOriginRequests,
339 m_workerStartData.addressSpace, 339 m_workerStartData.addressSpace,
340 nullptr, 340 nullptr,
341 bind(&WebEmbeddedWorkerImpl::onScriptLoaderFinished, this)); 341 bind(&WebEmbeddedWorkerImpl::onScriptLoaderFinished, WTF::unretained(thi s)));
342 // Do nothing here since onScriptLoaderFinished() might have been already 342 // Do nothing here since onScriptLoaderFinished() might have been already
343 // invoked and |this| might have been deleted at this point. 343 // invoked and |this| might have been deleted at this point.
344 } 344 }
345 345
346 void WebEmbeddedWorkerImpl::sendProtocolMessage(int sessionId, int callId, const WebString& message, const WebString& state) 346 void WebEmbeddedWorkerImpl::sendProtocolMessage(int sessionId, int callId, const WebString& message, const WebString& state)
347 { 347 {
348 m_workerContextClient->sendDevToolsMessage(sessionId, callId, message, state ); 348 m_workerContextClient->sendDevToolsMessage(sessionId, callId, message, state );
349 } 349 }
350 350
351 void WebEmbeddedWorkerImpl::resumeStartup() 351 void WebEmbeddedWorkerImpl::resumeStartup()
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 m_mainScriptLoader.clear(); 432 m_mainScriptLoader.clear();
433 433
434 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient); 434 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *doc ument, *m_workerContextClient);
435 m_loaderProxy = WorkerLoaderProxy::create(this); 435 m_loaderProxy = WorkerLoaderProxy::create(this);
436 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy); 436 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy);
437 m_workerThread->start(std::move(startupData)); 437 m_workerThread->start(std::move(startupData));
438 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL); 438 m_workerInspectorProxy->workerThreadCreated(document, m_workerThread.get(), scriptURL);
439 } 439 }
440 440
441 } // namespace blink 441 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698