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

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

Issue 1601283003: DevTools: deoilpanize inspector/v8 and related classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed. Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/RejectedPromises.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 #ifndef RejectedPromises_h 5 #ifndef RejectedPromises_h
6 #define RejectedPromises_h 6 #define RejectedPromises_h
7 7
8 #include "core/fetch/AccessControlStatus.h" 8 #include "core/fetch/AccessControlStatus.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 class PromiseRejectMessage; 12 class PromiseRejectMessage;
13 }; 13 };
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class ScriptCallStack; 17 class ScriptCallStack;
18 class ScriptState; 18 class ScriptState;
19 19
20 class RejectedPromises final : public RefCountedWillBeGarbageCollected<RejectedP romises> { 20 class RejectedPromises final : public RefCounted<RejectedPromises> {
21 USING_FAST_MALLOC_WILL_BE_REMOVED(RejectedPromises); 21 USING_FAST_MALLOC(RejectedPromises);
22 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(RejectedPromises);
23 public: 22 public:
24 static PassRefPtrWillBeRawPtr<RejectedPromises> create() 23 static PassRefPtr<RejectedPromises> create()
25 { 24 {
26 return adoptRefWillBeNoop(new RejectedPromises); 25 return adoptRef(new RejectedPromises());
27 } 26 }
28 27
28 ~RejectedPromises();
29 void dispose(); 29 void dispose();
30 DECLARE_TRACE();
31 30
32 void rejectedWithNoHandler(ScriptState*, v8::PromiseRejectMessage, const Str ing& errorMessage, const String& resourceName, int scriptId, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallStack>, AccessControlStatus); 31 void rejectedWithNoHandler(ScriptState*, v8::PromiseRejectMessage, const Str ing& errorMessage, const String& resourceName, int scriptId, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>, AccessControlStatus);
33 void handlerAdded(v8::PromiseRejectMessage); 32 void handlerAdded(v8::PromiseRejectMessage);
34 33
35 void processQueue(); 34 void processQueue();
36 35
37 private: 36 private:
38 class Message; 37 class Message;
39 38
40 RejectedPromises(); 39 RejectedPromises();
41 40
42 using MessageQueue = WillBeHeapDeque<OwnPtrWillBeMember<Message>>; 41 using MessageQueue = Deque<OwnPtr<Message>>;
43 PassOwnPtrWillBeRawPtr<MessageQueue> createMessageQueue(); 42 PassOwnPtr<MessageQueue> createMessageQueue();
44 43
45 void processQueueNow(PassOwnPtrWillBeRawPtr<MessageQueue>); 44 void processQueueNow(PassOwnPtr<MessageQueue>);
46 void revokeNow(PassOwnPtrWillBeRawPtr<Message>); 45 void revokeNow(PassOwnPtr<Message>);
47 46
48 MessageQueue m_queue; 47 MessageQueue m_queue;
49 WillBeHeapVector<OwnPtrWillBeMember<Message>> m_reportedAsErrors; 48 Vector<OwnPtr<Message>> m_reportedAsErrors;
50 }; 49 };
51 50
52 } // namespace blink 51 } // namespace blink
53 52
54 #endif // RejectedPromises_h 53 #endif // RejectedPromises_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698