diff options
Diffstat (limited to 'src/qml/jsruntime/qv4promiseobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4promiseobject.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4promiseobject.cpp b/src/qml/jsruntime/qv4promiseobject.cpp index a955e5eb6a..8450655334 100644 --- a/src/qml/jsruntime/qv4promiseobject.cpp +++ b/src/qml/jsruntime/qv4promiseobject.cpp @@ -364,7 +364,7 @@ void Heap::RejectWrapper::init() } -ReturnedValue PromiseCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *) +ReturnedValue PromiseCtor::virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *newTarget) { Scope scope(f); @@ -396,6 +396,9 @@ ReturnedValue PromiseCtor::virtualCallAsConstructor(const FunctionObject *f, con a->d()->resolution.set(scope.engine, Value::fromReturnedValue(scope.engine->catchException())); } + if (newTarget) + a->setProtoFromNewTarget(newTarget); + return a->asReturnedValue(); } |