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

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

Issue 1502153005: Revert of Release Oilpan heap singletons prior to LSan leak detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 #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 RefCountedWillBeGarbageCollected<RejectedP romises> {
21 USING_FAST_MALLOC_WILL_BE_REMOVED(RejectedPromises); 21 USING_FAST_MALLOC_WILL_BE_REMOVED(RejectedPromises);
22 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(RejectedPromises); 22 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(RejectedPromises);
23 public: 23 public:
24 static PassRefPtrWillBeRawPtr<RejectedPromises> create() 24 static PassRefPtrWillBeRawPtr<RejectedPromises> create()
25 { 25 {
26 return adoptRefWillBeNoop(new RejectedPromises); 26 return adoptRefWillBeNoop(new RejectedPromises);
27 } 27 }
28 28
29 RejectedPromises();
29 void dispose(); 30 void dispose();
30 DECLARE_TRACE(); 31 DECLARE_TRACE();
31 32
32 void rejectedWithNoHandler(ScriptState*, v8::PromiseRejectMessage, const Str ing& errorMessage, const String& resourceName, int scriptId, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallStack>, AccessControlStatus); 33 void rejectedWithNoHandler(ScriptState*, v8::PromiseRejectMessage, const Str ing& errorMessage, const String& resourceName, int scriptId, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallStack>, AccessControlStatus);
33 void handlerAdded(v8::PromiseRejectMessage); 34 void handlerAdded(v8::PromiseRejectMessage);
34 35
35 void processQueue(); 36 void processQueue();
36 37
37 private: 38 private:
38 class Message; 39 class Message;
39 40
40 RejectedPromises(); 41 using MessageQueue = WillBeHeapDeque<OwnPtrWillBeMember<Message>>;
41 42
42 using MessageQueue = WillBeHeapDeque<OwnPtrWillBeMember<Message>>;
43 PassOwnPtrWillBeRawPtr<MessageQueue> createMessageQueue(); 43 PassOwnPtrWillBeRawPtr<MessageQueue> createMessageQueue();
44 44
45 void processQueueNow(PassOwnPtrWillBeRawPtr<MessageQueue>); 45 void processQueueNow(PassOwnPtrWillBeRawPtr<MessageQueue>);
46 void revokeNow(PassOwnPtrWillBeRawPtr<Message>); 46 void revokeNow(PassOwnPtrWillBeRawPtr<Message>);
47 47
48 MessageQueue m_queue; 48 MessageQueue m_queue;
49 WillBeHeapVector<OwnPtrWillBeMember<Message>> m_reportedAsErrors; 49 WillBeHeapVector<OwnPtrWillBeMember<Message>> m_reportedAsErrors;
50 }; 50 };
51 51
52 } // namespace blink 52 } // namespace blink
53 53
54 #endif // RejectedPromises_h 54 #endif // RejectedPromises_h
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