Index: Source/WebCore/storage/chromium/DatabaseTrackerChromium.cpp |
=================================================================== |
--- Source/WebCore/storage/chromium/DatabaseTrackerChromium.cpp (revision 97635) |
+++ Source/WebCore/storage/chromium/DatabaseTrackerChromium.cpp (working copy) |
@@ -189,31 +189,24 @@ |
void DatabaseTracker::interruptAllDatabasesForContext(const ScriptExecutionContext* context) |
{ |
- Vector<RefPtr<AbstractDatabase> > openDatabases; |
- { |
- MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard); |
+ MutexLocker openDatabaseMapLock(m_openDatabaseMapGuard); |
- if (!m_openDatabaseMap) |
- return; |
+ if (!m_openDatabaseMap) |
+ return; |
- DatabaseNameMap* nameMap = m_openDatabaseMap->get(context->securityOrigin()->databaseIdentifier()); |
- if (!nameMap) |
- return; |
+ DatabaseNameMap* nameMap = m_openDatabaseMap->get(context->securityOrigin()->databaseIdentifier()); |
+ if (!nameMap) |
+ return; |
- DatabaseNameMap::const_iterator dbNameMapEndIt = nameMap->end(); |
- for (DatabaseNameMap::const_iterator dbNameMapIt = nameMap->begin(); dbNameMapIt != dbNameMapEndIt; ++dbNameMapIt) { |
- DatabaseSet* databaseSet = dbNameMapIt->second; |
- DatabaseSet::const_iterator dbSetEndIt = databaseSet->end(); |
- for (DatabaseSet::const_iterator dbSetIt = databaseSet->begin(); dbSetIt != dbSetEndIt; ++dbSetIt) { |
- if ((*dbSetIt)->scriptExecutionContext() == context) |
- openDatabases.append(*dbSetIt); |
- } |
+ DatabaseNameMap::const_iterator dbNameMapEndIt = nameMap->end(); |
+ for (DatabaseNameMap::const_iterator dbNameMapIt = nameMap->begin(); dbNameMapIt != dbNameMapEndIt; ++dbNameMapIt) { |
+ DatabaseSet* databaseSet = dbNameMapIt->second; |
+ DatabaseSet::const_iterator end = databaseSet->end(); |
+ for (DatabaseSet::const_iterator it = databaseSet->begin(); it != end; ++it) { |
+ if ((*it)->scriptExecutionContext() == context) |
+ (*it)->interrupt(); |
} |
} |
- |
- Vector<RefPtr<AbstractDatabase> >::const_iterator openDatabasesEndIt = openDatabases.end(); |
- for (Vector<RefPtr<AbstractDatabase> >::const_iterator openDatabasesIt = openDatabases.begin(); openDatabasesIt != openDatabasesEndIt; ++openDatabasesIt) |
- (*openDatabasesIt)->interrupt(); |
} |
} |