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

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

Issue 1915153004: [K5] Replace bind() + non-GC pointers with unretained() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Kuroneko_4
Patch Set: Rebase Created 4 years, 7 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 = adoptPtr(m_client->createServiceWorkerNetworkProvider(fr ame->dataSource())); 175 m_networkProvider = adoptPtr(m_client->createServiceWorkerNetworkProvider(fr ame->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, unretained(th is)),
185 bind(&WebSharedWorkerImpl::onScriptLoaderFinished, this)); 185 bind(&WebSharedWorkerImpl::onScriptLoaderFinished, 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 if (devtoolsAgent) 392 if (devtoolsAgent)
393 devtoolsAgent->dispatchOnInspectorBackend(sessionId, message); 393 devtoolsAgent->dispatchOnInspectorBackend(sessionId, message);
394 } 394 }
395 395
396 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) 396 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client)
397 { 397 {
398 return new WebSharedWorkerImpl(client); 398 return new WebSharedWorkerImpl(client);
399 } 399 }
400 400
401 } // namespace blink 401 } // 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