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

Side by Side Diff: Source/modules/webdatabase/DatabaseThread.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) 2007, 2008, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2013 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 { 106 {
107 // Wait for DatabaseThread::start() to complete. 107 // Wait for DatabaseThread::start() to complete.
108 MutexLocker lock(m_threadCreationMutex); 108 MutexLocker lock(m_threadCreationMutex);
109 LOG(StorageAPI, "Started DatabaseThread %p", this); 109 LOG(StorageAPI, "Started DatabaseThread %p", this);
110 } 110 }
111 111
112 AutodrainedPool pool; 112 AutodrainedPool pool;
113 while (true) { 113 while (true) {
114 OwnPtr<DatabaseTask> task; 114 OwnPtr<DatabaseTask> task;
115 { 115 {
116 ThreadState::PauseScope pauseScope(ThreadState::NoHeapPointersOnStac k); 116 ThreadState::SafePointScope safePointScope(ThreadState::NoHeapPointe rsOnStack);
117 task = m_queue.waitForMessage(); 117 task = m_queue.waitForMessage();
118 if (!task) 118 if (!task)
119 break; 119 break;
120 } 120 }
121 121
122 task->performTask(); 122 task->performTask();
123 pool.cycle(); 123 pool.cycle();
124 } 124 }
125 125
126 // Clean up the list of all pending transactions on this database thread 126 // Clean up the list of all pending transactions on this database thread
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 }; 188 };
189 189
190 void DatabaseThread::unscheduleDatabaseTasks(DatabaseBackend* database) 190 void DatabaseThread::unscheduleDatabaseTasks(DatabaseBackend* database)
191 { 191 {
192 // Note that the thread loop is running, so some tasks for the database 192 // Note that the thread loop is running, so some tasks for the database
193 // may still be executed. This is unavoidable. 193 // may still be executed. This is unavoidable.
194 SameDatabasePredicate predicate(database); 194 SameDatabasePredicate predicate(database);
195 m_queue.removeIf(predicate); 195 m_queue.removeIf(predicate);
196 } 196 }
197 } // namespace WebCore 197 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698