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

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

Issue 2494333002: Replace wrapUnique(new T(args)) by makeUnique<T>(args) in Blink (Closed)
Patch Set: Drop redundant WTF:: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 RefPtr<RejectedPromises>(this), 219 RefPtr<RejectedPromises>(this),
220 passed(std::move(message)))); 220 passed(std::move(message))));
221 m_reportedAsErrors.remove(i); 221 m_reportedAsErrors.remove(i);
222 return; 222 return;
223 } 223 }
224 } 224 }
225 } 225 }
226 226
227 std::unique_ptr<RejectedPromises::MessageQueue> 227 std::unique_ptr<RejectedPromises::MessageQueue>
228 RejectedPromises::createMessageQueue() { 228 RejectedPromises::createMessageQueue() {
229 return wrapUnique(new MessageQueue()); 229 return makeUnique<MessageQueue>();
230 } 230 }
231 231
232 void RejectedPromises::dispose() { 232 void RejectedPromises::dispose() {
233 if (m_queue.isEmpty()) 233 if (m_queue.isEmpty())
234 return; 234 return;
235 235
236 std::unique_ptr<MessageQueue> queue = createMessageQueue(); 236 std::unique_ptr<MessageQueue> queue = createMessageQueue();
237 queue->swap(m_queue); 237 queue->swap(m_queue);
238 processQueueNow(std::move(queue)); 238 processQueueNow(std::move(queue));
239 } 239 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698