diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-01-05 22:21:35 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-01-25 08:31:28 +0000 |
commit | 25552c1404dff66ae9681e57f2b9a8be08d3828a (patch) | |
tree | f0f00a1e53d1eedc0ee93f32243555a4d43eeeaa /src/qml/qml/v8 | |
parent | 381e3151aea83806fb5bea2407fef67de3cc5014 (diff) |
Convert more builtin functions to the new calling convention
Change-Id: I053215261e1186aff25f29e0967219ef667f7678
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/v8')
-rw-r--r-- | src/qml/qml/v8/qv4domerrors_p.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qml/qml/v8/qv4domerrors_p.h b/src/qml/qml/v8/qv4domerrors_p.h index faa9dd8bc7..d2225ec591 100644 --- a/src/qml/qml/v8/qv4domerrors_p.h +++ b/src/qml/qml/v8/qv4domerrors_p.h @@ -81,6 +81,14 @@ QT_BEGIN_NAMESPACE return ctx->engine()->throwError(ex); \ } +#define THROW_DOM(error, string) { \ + QV4::ScopedValue v(scope, scope.engine->newString(QStringLiteral(string))); \ + QV4::ScopedObject ex(scope, scope.engine->newErrorObject(v)); \ + ex->put(QV4::ScopedString(scope, scope.engine->newIdentifier(QStringLiteral("code"))), QV4::ScopedValue(scope, QV4::Primitive::fromInt32(error))); \ + scope.result = scope.engine->throwError(ex); \ + return; \ +} + namespace QV4 { struct ExecutionEngine; } |