aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-03-28 16:49:19 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-04-09 13:42:24 +0000
commit51b73e0bb68812d78315af032546750d04656c02 (patch)
treeb9d5c063af458ed62786cc95d89c132543dbeb3f /src/qml/compiler
parentccad6b577016c8a0986f56b2656471896b5817ea (diff)
Fix XMLHttpRequest when used with QQmlEngine::evaluate
Our XHR implementation insists on a valid QQmlContext when processing callbacks. This is to protect against callbacks being triggered after dynamic QML contexts such as delegates have been destroyed. Unfortunately those checks are too strict and make it impossible to use XHR from within plain JS scripts (where v4->callingQmlContext() will return a null pointer). Dispatching the callbacks in functions that are directly called from QML/JS is safe and something we can do unconditionally. This applies to the callbacks triggered from abort() and open() for example. When we're called from QNetworkAccessManager we should enforce the continued existence of a QML context only if it was present at send() time. Task-number: QTBUG-67337 Change-Id: I8235f6ef407adc3eaeeff4eee72238ba6750afb2 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Valery Kotov <vkotov@luxoft.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler')
0 files changed, 0 insertions, 0 deletions