diff options
author | jsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-30 23:45:15 +0000 |
---|---|---|
committer | jsbell@chromium.org <jsbell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-30 23:45:15 +0000 |
commit | 85edc1f08b6fba5164246c21ffb2c859566016c1 (patch) | |
tree | 8d408acb53104928625089f1186be5ea5af0d9ca /content | |
parent | 782c3ac24bf9e59900df1df5c707281623e5e3fc (diff) | |
download | chromium_src-85edc1f08b6fba5164246c21ffb2c859566016c1.zip chromium_src-85edc1f08b6fba5164246c21ffb2c859566016c1.tar.gz chromium_src-85edc1f08b6fba5164246c21ffb2c859566016c1.tar.bz2 |
IndexedDB: Use IDMap::Clear() to clear pending callbacks
BUG=153652
Review URL: https://chromiumcodereview.appspot.com/11348020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165063 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/common/indexed_db/indexed_db_dispatcher.cc | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/content/common/indexed_db/indexed_db_dispatcher.cc b/content/common/indexed_db/indexed_db_dispatcher.cc index 1345a37..ad0d899 100644 --- a/content/common/indexed_db/indexed_db_dispatcher.cc +++ b/content/common/indexed_db/indexed_db_dispatcher.cc @@ -57,18 +57,9 @@ IndexedDBDispatcher::~IndexedDBDispatcher() { // Clear any pending callbacks - which may result in dispatch requests - // before marking the dispatcher as deleted. - for (IDMap<WebKit::WebIDBCallbacks, IDMapOwnPointer>::iterator - it(&pending_callbacks_); !it.IsAtEnd(); it.Advance()) { - pending_callbacks_.Remove(it.GetCurrentKey()); - } - for (IDMap<WebKit::WebIDBDatabaseCallbacks, IDMapOwnPointer>::iterator - it(&pending_database_callbacks_); !it.IsAtEnd(); it.Advance()) { - pending_database_callbacks_.Remove(it.GetCurrentKey()); - } - for (IDMap<WebKit::WebIDBTransactionCallbacks, IDMapOwnPointer>::iterator - it(&pending_transaction_callbacks_); !it.IsAtEnd(); it.Advance()) { - pending_transaction_callbacks_.Remove(it.GetCurrentKey()); - } + pending_callbacks_.Clear(); + pending_database_callbacks_.Clear(); + pending_transaction_callbacks_.Clear(); DCHECK(pending_callbacks_.IsEmpty()); DCHECK(pending_database_callbacks_.IsEmpty()); |