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

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

Issue 100433005: [oilpan] Rename PauseScope to SafePointScope (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years 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
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 double absoluteTime = 0.0; 154 double absoluteTime = 0.0;
155 if (waitMode == WaitForMessage) 155 if (waitMode == WaitForMessage)
156 absoluteTime = (predicate.isDefaultMode() && m_sharedTimer->isActive()) ? m_sharedTimer->fireTime() : MessageQueue<Task>::infiniteTime(); 156 absoluteTime = (predicate.isDefaultMode() && m_sharedTimer->isActive()) ? m_sharedTimer->fireTime() : MessageQueue<Task>::infiniteTime();
157 MessageQueueWaitResult result; 157 MessageQueueWaitResult result;
158 158
159 OwnPtr<WorkerRunLoop::Task> task; 159 OwnPtr<WorkerRunLoop::Task> task;
160 { 160 {
161 // FIXME(oilpan): The WorkerContext is kept alive by a persistent handle in WorkerThread.h 161 // FIXME(oilpan): The WorkerContext is kept alive by a persistent handle in WorkerThread.h
162 // and therefore there are no unknown heap pointers on the stack at this point. 162 // and therefore there are no unknown heap pointers on the stack at this point.
163 // We should probably make that more clear somehow. 163 // We should probably make that more clear somehow.
164 ThreadState::PauseScope paused(ThreadState::NoHeapPointersOnStack); 164 ThreadState::SafePointScope safePointScope(ThreadState::NoHeapPointersOn Stack);
165 task = m_messageQueue.waitForMessageFilteredWithTimeout(result, predicat e, absoluteTime); 165 task = m_messageQueue.waitForMessageFilteredWithTimeout(result, predicat e, absoluteTime);
166 } 166 }
167 167
168 // If the context is closing, don't execute any further JavaScript tasks (pe r section 4.1.1 of the Web Workers spec). However, there may be implementation cleanup tasks in the queue, so keep running through it. 168 // If the context is closing, don't execute any further JavaScript tasks (pe r section 4.1.1 of the Web Workers spec). However, there may be implementation cleanup tasks in the queue, so keep running through it.
169 169
170 switch (result) { 170 switch (result) {
171 case MessageQueueTerminated: 171 case MessageQueueTerminated:
172 break; 172 break;
173 173
174 case MessageQueueMessageReceived: 174 case MessageQueueMessageReceived:
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 m_task->performTask(context); 230 m_task->performTask(context);
231 } 231 }
232 232
233 WorkerRunLoop::Task::Task(PassOwnPtr<ScriptExecutionContext::Task> task, const S tring& mode) 233 WorkerRunLoop::Task::Task(PassOwnPtr<ScriptExecutionContext::Task> task, const S tring& mode)
234 : m_task(task) 234 : m_task(task)
235 , m_mode(mode.isolatedCopy()) 235 , m_mode(mode.isolatedCopy())
236 { 236 {
237 } 237 }
238 238
239 } // namespace WebCore 239 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698