Index: Source/bindings/core/v8/RejectedPromises.h |
diff --git a/Source/bindings/core/v8/RejectedPromises.h b/Source/bindings/core/v8/RejectedPromises.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b5fefb096b7060d834d60f7c0be0bdb83b794988 |
--- /dev/null |
+++ b/Source/bindings/core/v8/RejectedPromises.h |
@@ -0,0 +1,42 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef RejectedPromises_h |
+#define RejectedPromises_h |
+ |
+#include "platform/heap/Handle.h" |
+ |
+namespace v8 { |
+class PromiseRejectMessage; |
+}; |
+ |
+namespace blink { |
+ |
+class ScriptCallStack; |
+class ScriptState; |
+ |
+class RejectedPromises final : public NoBaseWillBeGarbageCollected<RejectedPromises> { |
+ DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(RejectedPromises); |
+public: |
+ static PassOwnPtrWillBeRawPtr<RejectedPromises> create() |
+ { |
+ return adoptPtrWillBeNoop(new RejectedPromises); |
+ } |
+ |
+ RejectedPromises(); |
+ void dispose(); |
+ void trace(Visitor*); |
+ |
+ void add(ScriptState*, v8::PromiseRejectMessage, const String& errorMessage, const String& resourceName, int scriptId, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallStack>); |
+ |
+ void processQueue(); |
+ |
+private: |
+ class Message; |
+ WillBeHeapDeque<OwnPtrWillBeMember<Message>> m_queue; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif // RejectedPromises_h |