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

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

Issue 2196833002: Propagate proper FROM_HERE to postTask() in worker code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 263
264 void WebSharedWorkerImpl::workerThreadTerminatedOnMainThread() 264 void WebSharedWorkerImpl::workerThreadTerminatedOnMainThread()
265 { 265 {
266 m_client->workerContextDestroyed(); 266 m_client->workerContextDestroyed();
267 // The lifetime of this proxy is controlled by the worker context. 267 // The lifetime of this proxy is controlled by the worker context.
268 delete this; 268 delete this;
269 } 269 }
270 270
271 // WorkerLoaderProxyProvider --------------------------------------------------- -------- 271 // WorkerLoaderProxyProvider --------------------------------------------------- --------
272 272
273 void WebSharedWorkerImpl::postTaskToLoader(std::unique_ptr<ExecutionContextTask> task) 273 void WebSharedWorkerImpl::postTaskToLoader(const WebTraceLocation& location, std ::unique_ptr<ExecutionContextTask> task)
274 { 274 {
275 // TODO(hiroshige,yuryu): Make this not use ExecutionContextTask and 275 // TODO(hiroshige,yuryu): Make this not use ExecutionContextTask and
276 // consider using m_mainThreadTaskRunners->getLoadingTaskRunner() instead. 276 // consider using m_mainThreadTaskRunners->getLoadingTaskRunner() instead.
277 m_mainFrame->frame()->document()->postTask(BLINK_FROM_HERE, std::move(task)) ; 277 m_mainFrame->frame()->document()->postTask(location, std::move(task));
278 } 278 }
279 279
280 bool WebSharedWorkerImpl::postTaskToWorkerGlobalScope(std::unique_ptr<ExecutionC ontextTask> task) 280 bool WebSharedWorkerImpl::postTaskToWorkerGlobalScope(const WebTraceLocation& lo cation, std::unique_ptr<ExecutionContextTask> task)
281 { 281 {
282 m_workerThread->postTask(BLINK_FROM_HERE, std::move(task)); 282 m_workerThread->postTask(location, std::move(task));
283 return true; 283 return true;
284 } 284 }
285 285
286 void WebSharedWorkerImpl::connect(WebMessagePortChannel* webChannel) 286 void WebSharedWorkerImpl::connect(WebMessagePortChannel* webChannel)
287 { 287 {
288 workerThread()->postTask( 288 workerThread()->postTask(
289 BLINK_FROM_HERE, createCrossThreadTask(&connectTask, passed(WebMessagePo rtChannelUniquePtr(webChannel)))); 289 BLINK_FROM_HERE, createCrossThreadTask(&connectTask, passed(WebMessagePo rtChannelUniquePtr(webChannel))));
290 } 290 }
291 291
292 void WebSharedWorkerImpl::connectTask(WebMessagePortChannelUniquePtr channel, Ex ecutionContext* context) 292 void WebSharedWorkerImpl::connectTask(WebMessagePortChannelUniquePtr channel, Ex ecutionContext* context)
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 if (devtoolsAgent) 411 if (devtoolsAgent)
412 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, mes sage); 412 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, mes sage);
413 } 413 }
414 414
415 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) 415 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client)
416 { 416 {
417 return new WebSharedWorkerImpl(client); 417 return new WebSharedWorkerImpl(client);
418 } 418 }
419 419
420 } // namespace blink 420 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebSharedWorkerImpl.h ('k') | third_party/WebKit/Source/wtf/debug/Alias.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698