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

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

Issue 1111693003: Remove the concept of a cleanup task (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Potential shutdown sequence with some debug logging. Created 5 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 static PassOwnPtr<NotifyDatabaseObserverOnCloseTask> create(Database* databa se) 111 static PassOwnPtr<NotifyDatabaseObserverOnCloseTask> create(Database* databa se)
112 { 112 {
113 return adoptPtr(new NotifyDatabaseObserverOnCloseTask(database)); 113 return adoptPtr(new NotifyDatabaseObserverOnCloseTask(database));
114 } 114 }
115 115
116 virtual void performTask(ExecutionContext*) override 116 virtual void performTask(ExecutionContext*) override
117 { 117 {
118 databaseClosed(m_database.get()); 118 databaseClosed(m_database.get());
119 } 119 }
120 120
121 virtual bool isCleanupTask() const override
122 {
123 return true;
124 }
125
126 private: 121 private:
127 explicit NotifyDatabaseObserverOnCloseTask(Database* database) 122 explicit NotifyDatabaseObserverOnCloseTask(Database* database)
128 : m_database(database) 123 : m_database(database)
129 { 124 {
130 } 125 }
131 126
132 CrossThreadPersistent<Database> m_database; 127 CrossThreadPersistent<Database> m_database;
133 }; 128 };
134 129
135 void DatabaseTracker::removeOpenDatabase(Database* database) 130 void DatabaseTracker::removeOpenDatabase(Database* database)
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 DatabaseSet::iterator found = databaseSet->find(database); 256 DatabaseSet::iterator found = databaseSet->find(database);
262 if (found == databaseSet->end()) 257 if (found == databaseSet->end())
263 return; 258 return;
264 } 259 }
265 260
266 // And we have to call closeImmediately() without our collection lock being held. 261 // And we have to call closeImmediately() without our collection lock being held.
267 database->closeImmediately(); 262 database->closeImmediately();
268 } 263 }
269 264
270 } // namespace blink 265 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698