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

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

Issue 2010603002: Use SourceLocation when reporting runtime exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2004243002
Patch Set: test fixes 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/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 "bindings/core/v8/SourceLocation.h"
8 #include "core/fetch/AccessControlStatus.h" 9 #include "core/fetch/AccessControlStatus.h"
9 #include "wtf/Deque.h" 10 #include "wtf/Deque.h"
10 #include "wtf/Forward.h" 11 #include "wtf/Forward.h"
11 #include "wtf/RefCounted.h" 12 #include "wtf/RefCounted.h"
12 #include "wtf/Vector.h" 13 #include "wtf/Vector.h"
13 14
14 namespace v8 { 15 namespace v8 {
15 class PromiseRejectMessage; 16 class PromiseRejectMessage;
16 }; 17 };
17 18
18 namespace blink { 19 namespace blink {
19 20
20 class ScriptCallStack;
21 class ScriptState; 21 class ScriptState;
22 22
23 class RejectedPromises final : public RefCounted<RejectedPromises> { 23 class RejectedPromises final : public RefCounted<RejectedPromises> {
24 USING_FAST_MALLOC(RejectedPromises); 24 USING_FAST_MALLOC(RejectedPromises);
25 public: 25 public:
26 static PassRefPtr<RejectedPromises> create() 26 static PassRefPtr<RejectedPromises> create()
27 { 27 {
28 return adoptRef(new RejectedPromises()); 28 return adoptRef(new RejectedPromises());
29 } 29 }
30 30
31 ~RejectedPromises(); 31 ~RejectedPromises();
32 void dispose(); 32 void dispose();
33 33
34 void rejectedWithNoHandler(ScriptState*, v8::PromiseRejectMessage, const Str ing& errorMessage, const String& resourceName, int scriptId, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>, AccessControlStatus); 34 void rejectedWithNoHandler(ScriptState*, v8::PromiseRejectMessage, const Str ing& errorMessage, PassOwnPtr<SourceLocation>, AccessControlStatus);
35 void handlerAdded(v8::PromiseRejectMessage); 35 void handlerAdded(v8::PromiseRejectMessage);
36 36
37 void processQueue(); 37 void processQueue();
38 38
39 private: 39 private:
40 class Message; 40 class Message;
41 41
42 RejectedPromises(); 42 RejectedPromises();
43 43
44 using MessageQueue = Deque<OwnPtr<Message>>; 44 using MessageQueue = Deque<OwnPtr<Message>>;
45 PassOwnPtr<MessageQueue> createMessageQueue(); 45 PassOwnPtr<MessageQueue> createMessageQueue();
46 46
47 void processQueueNow(PassOwnPtr<MessageQueue>); 47 void processQueueNow(PassOwnPtr<MessageQueue>);
48 void revokeNow(PassOwnPtr<Message>); 48 void revokeNow(PassOwnPtr<Message>);
49 49
50 MessageQueue m_queue; 50 MessageQueue m_queue;
51 Vector<OwnPtr<Message>> m_reportedAsErrors; 51 Vector<OwnPtr<Message>> m_reportedAsErrors;
52 }; 52 };
53 53
54 } // namespace blink 54 } // namespace blink
55 55
56 #endif // RejectedPromises_h 56 #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