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

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

Issue 899923004: Add task location information to WorkerThread (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/workers/WorkerThread.cpp ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 void WebEmbeddedWorkerImpl::postTaskToLoader(PassOwnPtr<ExecutionContextTask> ta sk) 269 void WebEmbeddedWorkerImpl::postTaskToLoader(PassOwnPtr<ExecutionContextTask> ta sk)
270 { 270 {
271 toWebLocalFrameImpl(m_mainFrame)->frame()->document()->postTask(FROM_HERE, t ask); 271 toWebLocalFrameImpl(m_mainFrame)->frame()->document()->postTask(FROM_HERE, t ask);
272 } 272 }
273 273
274 bool WebEmbeddedWorkerImpl::postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionCont extTask> task) 274 bool WebEmbeddedWorkerImpl::postTaskToWorkerGlobalScope(PassOwnPtr<ExecutionCont extTask> task)
275 { 275 {
276 if (m_askedToTerminate || !m_workerThread) 276 if (m_askedToTerminate || !m_workerThread)
277 return false; 277 return false;
278 278
279 m_workerThread->postTask(task); 279 m_workerThread->postTask(FROM_HERE, task);
280 return !m_workerThread->terminated(); 280 return !m_workerThread->terminated();
281 } 281 }
282 282
283 void WebEmbeddedWorkerImpl::prepareShadowPageForLoader() 283 void WebEmbeddedWorkerImpl::prepareShadowPageForLoader()
284 { 284 {
285 // Create 'shadow page', which is never displayed and is used mainly to 285 // Create 'shadow page', which is never displayed and is used mainly to
286 // provide a context for loading on the main thread. 286 // provide a context for loading on the main thread.
287 // 287 //
288 // FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader. 288 // FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader.
289 // This code, and probably most of the code in this class should be shared 289 // This code, and probably most of the code in this class should be shared
(...skipping 142 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, startupData.release()); 436 m_workerThread = ServiceWorkerThread::create(m_loaderProxy, *m_workerGlobalS copeProxy, startupData.release());
437 m_workerThread->start(); 437 m_workerThread->start();
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
« no previous file with comments | « Source/core/workers/WorkerThread.cpp ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698