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

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

Issue 2614663008: Migrate WTF::Vector::append() to ::push_back() [part 13 of N] (Closed)
Patch Set: Created 3 years, 11 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/indexeddb/IDBObserverChanges.h" 5 #include "modules/indexeddb/IDBObserverChanges.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "bindings/core/v8/ScriptState.h" 8 #include "bindings/core/v8/ScriptState.h"
9 #include "bindings/core/v8/V8Binding.h" 9 #include "bindings/core/v8/V8Binding.h"
10 #include "bindings/modules/v8/ToV8ForModules.h" 10 #include "bindings/modules/v8/ToV8ForModules.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 void IDBObserverChanges::extractChanges( 46 void IDBObserverChanges::extractChanges(
47 const WebVector<WebIDBObservation>& observations, 47 const WebVector<WebIDBObservation>& observations,
48 const WebVector<int32_t>& observationIndex) { 48 const WebVector<int32_t>& observationIndex) {
49 // TODO(dmurph): Avoid getting and setting repeated times. 49 // TODO(dmurph): Avoid getting and setting repeated times.
50 for (const auto& idx : observationIndex) 50 for (const auto& idx : observationIndex)
51 m_records 51 m_records
52 .add(observations[idx].objectStoreId, 52 .add(observations[idx].objectStoreId,
53 HeapVector<Member<IDBObservation>>()) 53 HeapVector<Member<IDBObservation>>())
54 .storedValue->value.append(IDBObservation::create(observations[idx])); 54 .storedValue->value.push_back(
55 IDBObservation::create(observations[idx]));
55 } 56 }
56 57
57 DEFINE_TRACE(IDBObserverChanges) { 58 DEFINE_TRACE(IDBObserverChanges) {
58 visitor->trace(m_database); 59 visitor->trace(m_database);
59 visitor->trace(m_transaction); 60 visitor->trace(m_transaction);
60 visitor->trace(m_records); 61 visitor->trace(m_records);
61 } 62 }
62 63
63 } // namespace blink 64 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698