OLD | NEW |
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 Loading... |
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 |
121 private: | 126 private: |
122 explicit NotifyDatabaseObserverOnCloseTask(Database* database) | 127 explicit NotifyDatabaseObserverOnCloseTask(Database* database) |
123 : m_database(database) | 128 : m_database(database) |
124 { | 129 { |
125 } | 130 } |
126 | 131 |
127 CrossThreadPersistent<Database> m_database; | 132 CrossThreadPersistent<Database> m_database; |
128 }; | 133 }; |
129 | 134 |
130 void DatabaseTracker::removeOpenDatabase(Database* database) | 135 void DatabaseTracker::removeOpenDatabase(Database* database) |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 DatabaseSet::iterator found = databaseSet->find(database); | 261 DatabaseSet::iterator found = databaseSet->find(database); |
257 if (found == databaseSet->end()) | 262 if (found == databaseSet->end()) |
258 return; | 263 return; |
259 } | 264 } |
260 | 265 |
261 // And we have to call closeImmediately() without our collection lock being
held. | 266 // And we have to call closeImmediately() without our collection lock being
held. |
262 database->closeImmediately(); | 267 database->closeImmediately(); |
263 } | 268 } |
264 | 269 |
265 } // namespace blink | 270 } // namespace blink |
OLD | NEW |