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

Side by Side Diff: third_party/WebKit/Source/web/WebSharedWorkerImpl.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, 5 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) 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 DCHECK(!m_mainScriptLoader); 174 DCHECK(!m_mainScriptLoader);
175 m_networkProvider = wrapUnique(m_client->createServiceWorkerNetworkProvider( frame->dataSource())); 175 m_networkProvider = wrapUnique(m_client->createServiceWorkerNetworkProvider( frame->dataSource()));
176 m_mainScriptLoader = WorkerScriptLoader::create(); 176 m_mainScriptLoader = WorkerScriptLoader::create();
177 m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextSharedWor ker); 177 m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextSharedWor ker);
178 m_loadingDocument = toWebLocalFrameImpl(frame)->frame()->document(); 178 m_loadingDocument = toWebLocalFrameImpl(frame)->frame()->document();
179 m_mainScriptLoader->loadAsynchronously( 179 m_mainScriptLoader->loadAsynchronously(
180 *m_loadingDocument.get(), 180 *m_loadingDocument.get(),
181 m_url, 181 m_url,
182 DenyCrossOriginRequests, 182 DenyCrossOriginRequests,
183 m_creationAddressSpace, 183 m_creationAddressSpace,
184 bind(&WebSharedWorkerImpl::didReceiveScriptLoaderResponse, this), 184 bind(&WebSharedWorkerImpl::didReceiveScriptLoaderResponse, WTF::unretain ed(this)),
185 bind(&WebSharedWorkerImpl::onScriptLoaderFinished, this)); 185 bind(&WebSharedWorkerImpl::onScriptLoaderFinished, WTF::unretained(this) ));
186 // Do nothing here since onScriptLoaderFinished() might have been already 186 // Do nothing here since onScriptLoaderFinished() might have been already
187 // invoked and |this| might have been deleted at this point. 187 // invoked and |this| might have been deleted at this point.
188 } 188 }
189 189
190 bool WebSharedWorkerImpl::isControlledByServiceWorker(WebDataSource& dataSource) 190 bool WebSharedWorkerImpl::isControlledByServiceWorker(WebDataSource& dataSource)
191 { 191 {
192 return m_networkProvider && m_networkProvider->isControlledByServiceWorker(d ataSource); 192 return m_networkProvider && m_networkProvider->isControlledByServiceWorker(d ataSource);
193 } 193 }
194 194
195 int64_t WebSharedWorkerImpl::serviceWorkerID(WebDataSource& dataSource) 195 int64_t WebSharedWorkerImpl::serviceWorkerID(WebDataSource& dataSource)
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 if (devtoolsAgent) 398 if (devtoolsAgent)
399 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, mes sage); 399 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, mes sage);
400 } 400 }
401 401
402 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) 402 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client)
403 { 403 {
404 return new WebSharedWorkerImpl(client); 404 return new WebSharedWorkerImpl(client);
405 } 405 }
406 406
407 } // namespace blink 407 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp ('k') | third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698