aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4promiseobject_p.h
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2019-07-09 16:39:25 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2019-07-10 16:28:38 +0200
commitf3d40896c1d8601703fcbf30214e22f50eb72727 (patch)
tree1ee6a81be0848dced11d496c4c8257012b14e6ff /src/qml/jsruntime/qv4promiseobject_p.h
parentb15a745c384436f706cd9b87c04a7f252e109962 (diff)
Fix promise chaining
Fixes: QTBUG-71329 Change-Id: I261b25ff281bb44d03650ab05258743f104f3cc9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4promiseobject_p.h')
-rw-r--r--src/qml/jsruntime/qv4promiseobject_p.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4promiseobject_p.h b/src/qml/jsruntime/qv4promiseobject_p.h
index bce59b19a7..8a3724e07d 100644
--- a/src/qml/jsruntime/qv4promiseobject_p.h
+++ b/src/qml/jsruntime/qv4promiseobject_p.h
@@ -62,6 +62,7 @@ struct PromiseCapability;
namespace Promise {
struct ReactionEvent;
+struct ResolveThenableEvent;
class ReactionHandler : public QObject
{
@@ -69,13 +70,15 @@ class ReactionHandler : public QObject
public:
ReactionHandler(QObject *parent = nullptr);
- virtual ~ReactionHandler();
+ virtual ~ReactionHandler() override;
void addReaction(ExecutionEngine *e, const Value *reaction, const Value *value);
+ void addResolveThenable(ExecutionEngine *e, const PromiseObject *promise, const Object *thenable, const FunctionObject *then);
protected:
- void customEvent(QEvent *event);
+ void customEvent(QEvent *event) override;
void executeReaction(ReactionEvent *event);
+ void executeResolveThenable(ResolveThenableEvent *event);
};
} // Promise