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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp

Issue 2673543003: Migrate WTF::HashMap::remove() to ::erase() (Closed)
Patch Set: Created 3 years, 10 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 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 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 return; 839 return;
840 } 840 }
841 if (!backendDB()) { 841 if (!backendDB()) {
842 exceptionState.throwDOMException(InvalidStateError, 842 exceptionState.throwDOMException(InvalidStateError,
843 IDBDatabase::databaseClosedErrorMessage); 843 IDBDatabase::databaseClosedErrorMessage);
844 return; 844 return;
845 } 845 }
846 846
847 backendDB()->deleteIndex(m_transaction->id(), id(), indexId); 847 backendDB()->deleteIndex(m_transaction->id(), id(), indexId);
848 848
849 m_metadata->indexes.remove(indexId); 849 m_metadata->indexes.erase(indexId);
850 IDBIndexMap::iterator it = m_indexMap.find(name); 850 IDBIndexMap::iterator it = m_indexMap.find(name);
851 if (it != m_indexMap.end()) { 851 if (it != m_indexMap.end()) {
852 m_transaction->indexDeleted(it->value); 852 m_transaction->indexDeleted(it->value);
853 it->value->markDeleted(); 853 it->value->markDeleted();
854 m_indexMap.remove(name); 854 m_indexMap.erase(name);
855 } 855 }
856 } 856 }
857 857
858 IDBRequest* IDBObjectStore::openCursor(ScriptState* scriptState, 858 IDBRequest* IDBObjectStore::openCursor(ScriptState* scriptState,
859 const ScriptValue& range, 859 const ScriptValue& range,
860 const String& directionString, 860 const String& directionString,
861 ExceptionState& exceptionState) { 861 ExceptionState& exceptionState) {
862 IDB_TRACE("IDBObjectStore::openCursor"); 862 IDB_TRACE("IDBObjectStore::openCursor");
863 if (isDeleted()) { 863 if (isDeleted()) {
864 exceptionState.throwDOMException( 864 exceptionState.throwDOMException(
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 } 1088 }
1089 } 1089 }
1090 return IDBIndexMetadata::InvalidId; 1090 return IDBIndexMetadata::InvalidId;
1091 } 1091 }
1092 1092
1093 WebIDBDatabase* IDBObjectStore::backendDB() const { 1093 WebIDBDatabase* IDBObjectStore::backendDB() const {
1094 return m_transaction->backendDB(); 1094 return m_transaction->backendDB();
1095 } 1095 }
1096 1096
1097 } // namespace blink 1097 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698