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

Side by Side Diff: Source/core/workers/WorkerThread.cpp

Issue 941403002: Revert of Add task location information to ExecutionContext (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/WorkerObjectProxy.cpp ('k') | Source/modules/filesystem/DOMFileSystem.h » ('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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 WorkerGlobalScope* workerGlobalScope = toWorkerGlobalScope(context); 416 WorkerGlobalScope* workerGlobalScope = toWorkerGlobalScope(context);
417 workerGlobalScope->stopActiveDOMObjects(); 417 workerGlobalScope->stopActiveDOMObjects();
418 PlatformThreadData::current().threadTimers().setSharedTimer(nullptr); 418 PlatformThreadData::current().threadTimers().setSharedTimer(nullptr);
419 419
420 // Event listeners would keep DOMWrapperWorld objects alive for too long . Also, they have references to JS objects, 420 // Event listeners would keep DOMWrapperWorld objects alive for too long . Also, they have references to JS objects,
421 // which become dangling once Heap is destroyed. 421 // which become dangling once Heap is destroyed.
422 workerGlobalScope->removeAllEventListeners(); 422 workerGlobalScope->removeAllEventListeners();
423 423
424 // Stick a shutdown command at the end of the queue, so that we deal 424 // Stick a shutdown command at the end of the queue, so that we deal
425 // with all the cleanup tasks the databases post first. 425 // with all the cleanup tasks the databases post first.
426 workerGlobalScope->postTask(FROM_HERE, WorkerThreadShutdownFinishTask::c reate()); 426 workerGlobalScope->postTask(WorkerThreadShutdownFinishTask::create());
427 } 427 }
428 428
429 virtual bool isCleanupTask() const { return true; } 429 virtual bool isCleanupTask() const { return true; }
430 }; 430 };
431 431
432 void WorkerThread::stop() 432 void WorkerThread::stop()
433 { 433 {
434 // Prevent the deadlock between GC and an attempt to stop a thread. 434 // Prevent the deadlock between GC and an attempt to stop a thread.
435 ThreadState::SafePointScope safePointScope(ThreadState::HeapPointersOnStack) ; 435 ThreadState::SafePointScope safePointScope(ThreadState::HeapPointersOnStack) ;
436 stopInternal(); 436 stopInternal();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); 570 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get());
571 } 571 }
572 572
573 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke rInspectorController) 573 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke rInspectorController)
574 { 574 {
575 MutexLocker locker(m_workerInspectorControllerMutex); 575 MutexLocker locker(m_workerInspectorControllerMutex);
576 m_workerInspectorController = workerInspectorController; 576 m_workerInspectorController = workerInspectorController;
577 } 577 }
578 578
579 } // namespace blink 579 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerObjectProxy.cpp ('k') | Source/modules/filesystem/DOMFileSystem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698