OLD | NEW |
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 #ifndef RejectedPromises_h | 5 #ifndef RejectedPromises_h |
6 #define RejectedPromises_h | 6 #define RejectedPromises_h |
7 | 7 |
8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 19 matching lines...) Expand all Loading... |
30 DECLARE_TRACE(); | 30 DECLARE_TRACE(); |
31 | 31 |
32 void rejectedWithNoHandler(ScriptState*, v8::PromiseRejectMessage, const Str
ing& errorMessage, const String& resourceName, int scriptId, int lineNumber, int
columnNumber, PassRefPtrWillBeRawPtr<ScriptCallStack>); | 32 void rejectedWithNoHandler(ScriptState*, v8::PromiseRejectMessage, const Str
ing& errorMessage, const String& resourceName, int scriptId, int lineNumber, int
columnNumber, PassRefPtrWillBeRawPtr<ScriptCallStack>); |
33 void handlerAdded(v8::PromiseRejectMessage); | 33 void handlerAdded(v8::PromiseRejectMessage); |
34 | 34 |
35 void processQueue(); | 35 void processQueue(); |
36 | 36 |
37 private: | 37 private: |
38 class Message; | 38 class Message; |
39 | 39 |
40 void processQueueNow(PassOwnPtrWillBeRawPtr<WillBeHeapDeque<OwnPtrWillBeMemb
er<Message>>>); | 40 using MessageQueue = WillBeHeapDeque<OwnPtrWillBeMember<Message>>; |
| 41 |
| 42 PassOwnPtrWillBeRawPtr<MessageQueue> createMessageQueue(); |
| 43 |
| 44 void processQueueNow(PassOwnPtrWillBeRawPtr<MessageQueue>); |
41 void revokeNow(PassOwnPtrWillBeRawPtr<Message>); | 45 void revokeNow(PassOwnPtrWillBeRawPtr<Message>); |
42 | 46 |
43 WillBeHeapDeque<OwnPtrWillBeMember<Message>> m_queue; | 47 MessageQueue m_queue; |
44 WillBeHeapVector<OwnPtrWillBeMember<Message>> m_reportedAsErrors; | 48 WillBeHeapVector<OwnPtrWillBeMember<Message>> m_reportedAsErrors; |
45 }; | 49 }; |
46 | 50 |
47 } // namespace blink | 51 } // namespace blink |
48 | 52 |
49 #endif // RejectedPromises_h | 53 #endif // RejectedPromises_h |
OLD | NEW |