diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-08-21 17:31:22 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-02 17:27:36 +0200 |
commit | 6f472680ebecb3a4d700eedcf62cb423b05c4fd1 (patch) | |
tree | bc732911a9c353dbac232ebda5a94468e3e261fe /src/qml/qml/qqmlxmlhttprequest.cpp | |
parent | da2f24d8e5c32fe4ed45dcb89aa357465f85fc1e (diff) |
change calling convention for JS function calls
This allows faster pass through of the data if we have
nested calls.
Also make sure we always reserve at least
QV4::Global::ReservedArgumentCount Values on the
stack to avoid stack corruption.
Change-Id: I42976460f1ef11a333d4adda70fba8daac66acf3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlxmlhttprequest.cpp')
-rw-r--r-- | src/qml/qml/qqmlxmlhttprequest.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index fb6733ee58..5045d700ed 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -1482,8 +1482,11 @@ void QQmlXMLHttpRequest::dispatchCallback(const Value &me) v4->current->throwError(QStringLiteral("QQmlXMLHttpRequest: internal error: empty ActivationObject")); QQmlContextData *callingContext = QmlContextWrapper::getContext(activationObject); - if (callingContext) - callback->call(activationObject, 0, 0); + if (callingContext) { + CALLDATA(0); + d.thisObject = activationObject; + callback->call(d); + } // if the callingContext object is no longer valid, then it has been // deleted explicitly (e.g., by a Loader deleting the itemContext when @@ -1562,7 +1565,7 @@ struct QQmlXMLHttpRequestCtor : public FunctionObject if (c->proto) c->proto->mark(); } - static Value construct(Managed *that, Value *, int) + static Value construct(Managed *that, const QV4::CallData &) { QQmlXMLHttpRequestCtor *ctor = that->as<QQmlXMLHttpRequestCtor>(); if (!ctor) @@ -1575,7 +1578,7 @@ struct QQmlXMLHttpRequestCtor : public FunctionObject return Value::fromObject(w); } - static Value call(Managed *, const Value &, Value *, int) { + static Value call(Managed *, const QV4::CallData &) { return Value::undefinedValue(); } |