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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp

Issue 2554693003: Migrate WTF::Vector::append() to ::push_back() [part 1 of N] (Closed)
Patch Set: rebase Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "bindings/core/v8/RejectedPromises.h" 5 #include "bindings/core/v8/RejectedPromises.h"
6 6
7 #include "bindings/core/v8/ScopedPersistent.h" 7 #include "bindings/core/v8/ScopedPersistent.h"
8 #include "bindings/core/v8/ScriptState.h" 8 #include "bindings/core/v8/ScriptState.h"
9 #include "bindings/core/v8/ScriptValue.h" 9 #include "bindings/core/v8/ScriptValue.h"
10 #include "bindings/core/v8/V8Binding.h" 10 #include "bindings/core/v8/V8Binding.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 ++i; 262 ++i;
263 } 263 }
264 264
265 while (!queue->isEmpty()) { 265 while (!queue->isEmpty()) {
266 std::unique_ptr<Message> message = queue->takeFirst(); 266 std::unique_ptr<Message> message = queue->takeFirst();
267 if (message->isCollected()) 267 if (message->isCollected())
268 continue; 268 continue;
269 if (!message->hasHandler()) { 269 if (!message->hasHandler()) {
270 message->report(); 270 message->report();
271 message->makePromiseWeak(); 271 message->makePromiseWeak();
272 m_reportedAsErrors.append(std::move(message)); 272 m_reportedAsErrors.push_back(std::move(message));
273 if (m_reportedAsErrors.size() > maxReportedHandlersPendingResolution) 273 if (m_reportedAsErrors.size() > maxReportedHandlersPendingResolution)
274 m_reportedAsErrors.remove(0, maxReportedHandlersPendingResolution / 10); 274 m_reportedAsErrors.remove(0, maxReportedHandlersPendingResolution / 10);
275 } 275 }
276 } 276 }
277 } 277 }
278 278
279 void RejectedPromises::revokeNow(std::unique_ptr<Message> message) { 279 void RejectedPromises::revokeNow(std::unique_ptr<Message> message) {
280 message->revoke(); 280 message->revoke();
281 } 281 }
282 282
283 } // namespace blink 283 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/Iterable.h ('k') | third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698