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

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

Issue 1915153004: [K5] Replace bind() + non-GC pointers with unretained() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Kuroneko_4
Patch Set: Rebase Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/MainThreadTaskRunnerTest.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/ScriptCallStack.h" 8 #include "bindings/core/v8/ScriptCallStack.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "bindings/core/v8/ScriptValue.h" 10 #include "bindings/core/v8/ScriptValue.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 m_queue.remove(it); 213 m_queue.remove(it);
214 return; 214 return;
215 } 215 }
216 } 216 }
217 217
218 // Then look it up in the reported errors. 218 // Then look it up in the reported errors.
219 for (size_t i = 0; i < m_reportedAsErrors.size(); ++i) { 219 for (size_t i = 0; i < m_reportedAsErrors.size(); ++i) {
220 OwnPtr<Message>& message = m_reportedAsErrors.at(i); 220 OwnPtr<Message>& message = m_reportedAsErrors.at(i);
221 if (!message->isCollected() && message->hasPromise(data.GetPromise())) { 221 if (!message->isCollected() && message->hasPromise(data.GetPromise())) {
222 message->makePromiseStrong(); 222 message->makePromiseStrong();
223 Platform::current()->currentThread()->scheduler()->timerTaskRunner() ->postTask(BLINK_FROM_HERE, bind(&RejectedPromises::revokeNow, this, passed(mess age.release()))); 223 Platform::current()->currentThread()->scheduler()->timerTaskRunner() ->postTask(BLINK_FROM_HERE, bind(&RejectedPromises::revokeNow, unretainedUnsafe( this), passed(message.release())));
224 m_reportedAsErrors.remove(i); 224 m_reportedAsErrors.remove(i);
225 return; 225 return;
226 } 226 }
227 } 227 }
228 } 228 }
229 229
230 PassOwnPtr<RejectedPromises::MessageQueue> RejectedPromises::createMessageQueue( ) 230 PassOwnPtr<RejectedPromises::MessageQueue> RejectedPromises::createMessageQueue( )
231 { 231 {
232 return adoptPtr(new MessageQueue()); 232 return adoptPtr(new MessageQueue());
233 } 233 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 } 275 }
276 } 276 }
277 } 277 }
278 278
279 void RejectedPromises::revokeNow(PassOwnPtr<Message> message) 279 void RejectedPromises::revokeNow(PassOwnPtr<Message> message)
280 { 280 {
281 message->revoke(); 281 message->revoke();
282 } 282 }
283 283
284 } // namespace blink 284 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/MainThreadTaskRunnerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698