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

Unified Diff: Source/bindings/core/v8/RejectedPromises.h

Issue 897523002: Handle rejected promises better for workers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tidying Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/bindings/core/v8/RejectedPromises.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | Source/bindings/core/v8/RejectedPromises.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698