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

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

Issue 563203002: [Blink-WebWorkers] WorkerSharedTimer cancels extra delayed tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed hash set, which was used to store previous tasks. Now using single ptr. Created 6 years, 3 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
« no previous file with comments | « no previous file | Source/core/workers/WorkerThread.cpp » ('j') | public/platform/WebThread.h » ('J')
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 friend class WorkerSharedTimer; 110 friend class WorkerSharedTimer;
111 friend class WorkerThreadShutdownFinishTask; 111 friend class WorkerThreadShutdownFinishTask;
112 112
113 void stopInShutdownSequence(); 113 void stopInShutdownSequence();
114 void stopInternal(); 114 void stopInternal();
115 115
116 void initialize(); 116 void initialize();
117 void cleanup(); 117 void cleanup();
118 void idleHandler(); 118 void idleHandler();
119 void postDelayedTask(PassOwnPtr<ExecutionContextTask>, long long delayMs ); 119 void postDelayedTask(PassOwnPtr<ExecutionContextTask>, long long delayMs );
120 void postCancellableDelayedTask(WorkerThreadTask* , long long delayMs);
120 121
121 bool m_terminated; 122 bool m_terminated;
122 OwnPtr<WorkerSharedTimer> m_sharedTimer; 123 OwnPtr<WorkerSharedTimer> m_sharedTimer;
123 MessageQueue<WorkerThreadTask> m_debuggerMessageQueue; 124 MessageQueue<WorkerThreadTask> m_debuggerMessageQueue;
124 OwnPtr<PendingGCRunner> m_pendingGCRunner; 125 OwnPtr<PendingGCRunner> m_pendingGCRunner;
125 OwnPtr<WebThread::TaskObserver> m_microtaskRunner; 126 OwnPtr<WebThread::TaskObserver> m_microtaskRunner;
126 OwnPtr<MessageLoopInterruptor> m_messageLoopInterruptor; 127 OwnPtr<MessageLoopInterruptor> m_messageLoopInterruptor;
127 128
128 WorkerLoaderProxy& m_workerLoaderProxy; 129 WorkerLoaderProxy& m_workerLoaderProxy;
129 WorkerReportingProxy& m_workerReportingProxy; 130 WorkerReportingProxy& m_workerReportingProxy;
(...skipping 15 matching lines...) Expand all
145 // WorkerThread might get deleted before it had a chance to properly 146 // WorkerThread might get deleted before it had a chance to properly
146 // shut down. By deleting the WebThread first, we can guarantee that 147 // shut down. By deleting the WebThread first, we can guarantee that
147 // no pending tasks on the thread might want to access any of the other 148 // no pending tasks on the thread might want to access any of the other
148 // members during the WorkerThread's destruction. 149 // members during the WorkerThread's destruction.
149 OwnPtr<blink::WebThread> m_thread; 150 OwnPtr<blink::WebThread> m_thread;
150 }; 151 };
151 152
152 } // namespace blink 153 } // namespace blink
153 154
154 #endif // WorkerThread_h 155 #endif // WorkerThread_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/workers/WorkerThread.cpp » ('j') | public/platform/WebThread.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698