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

Side by Side Diff: Source/modules/webdatabase/DatabaseThread.cpp

Issue 864533002: Fix template angle bracket syntax in modules (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 { 101 {
102 WTF_LOG(StorageAPI, "Cleaning up DatabaseThread %p", this); 102 WTF_LOG(StorageAPI, "Cleaning up DatabaseThread %p", this);
103 103
104 // Clean up the list of all pending transactions on this database thread 104 // Clean up the list of all pending transactions on this database thread
105 m_transactionCoordinator->shutdown(); 105 m_transactionCoordinator->shutdown();
106 106
107 // Close the databases that we ran transactions on. This ensures that if any transactions are still open, they are rolled back and we don't leave the databa se in an 107 // Close the databases that we ran transactions on. This ensures that if any transactions are still open, they are rolled back and we don't leave the databa se in an
108 // inconsistent or locked state. 108 // inconsistent or locked state.
109 if (m_openDatabaseSet.size() > 0) { 109 if (m_openDatabaseSet.size() > 0) {
110 // As the call to close will modify the original set, we must take a cop y to iterate over. 110 // As the call to close will modify the original set, we must take a cop y to iterate over.
111 HeapHashSet<Member<Database> > openSetCopy; 111 HeapHashSet<Member<Database>> openSetCopy;
112 openSetCopy.swap(m_openDatabaseSet); 112 openSetCopy.swap(m_openDatabaseSet);
113 HeapHashSet<Member<Database> >::iterator end = openSetCopy.end(); 113 HeapHashSet<Member<Database>>::iterator end = openSetCopy.end();
114 for (HeapHashSet<Member<Database> >::iterator it = openSetCopy.begin(); it != end; ++it) 114 for (HeapHashSet<Member<Database>>::iterator it = openSetCopy.begin(); i t != end; ++it)
115 (*it)->close(); 115 (*it)->close();
116 } 116 }
117 m_openDatabaseSet.clear(); 117 m_openDatabaseSet.clear();
118 118
119 m_thread->postTask(new Task(WTF::bind(&DatabaseThread::cleanupDatabaseThread Completed, this))); 119 m_thread->postTask(new Task(WTF::bind(&DatabaseThread::cleanupDatabaseThread Completed, this)));
120 } 120 }
121 121
122 void DatabaseThread::cleanupDatabaseThreadCompleted() 122 void DatabaseThread::cleanupDatabaseThreadCompleted()
123 { 123 {
124 m_thread->detachGC(); 124 m_thread->detachGC();
(...skipping 29 matching lines...) Expand all
154 154
155 void DatabaseThread::scheduleTask(PassOwnPtr<DatabaseTask> task) 155 void DatabaseThread::scheduleTask(PassOwnPtr<DatabaseTask> task)
156 { 156 {
157 ASSERT(m_thread); 157 ASSERT(m_thread);
158 ASSERT(!terminationRequested()); 158 ASSERT(!terminationRequested());
159 // WebThread takes ownership of the task. 159 // WebThread takes ownership of the task.
160 m_thread->postTask(task.leakPtr()); 160 m_thread->postTask(task.leakPtr());
161 } 161 }
162 162
163 } // namespace blink 163 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698