diff options
author | Liang Qi <liang.qi@qt.io> | 2018-03-28 08:27:57 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-03-28 08:27:57 +0200 |
commit | 198409ba76e18587526e9e1ec84fdb432c671937 (patch) | |
tree | 2d06c052272ddfd1c9b34b863e342826a31d20b9 /src/qml | |
parent | 9a98d16d9e49395a24cd733ca8f65b2f82ebba94 (diff) | |
parent | e696a6b7bff04d1581cf59b4d96ecb5508f54169 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp
tests/auto/qml/qjsengine/tst_qjsengine.cpp
Change-Id: I8276669e257f35a76768ef7f8795a8605cf4c9bc
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/debugger/qqmlprofiler_p.h | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4global_p.h | 5 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4value_p.h | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlexpression.cpp | 5 | ||||
-rw-r--r-- | src/qml/qml/qqmljavascriptexpression.cpp | 14 |
5 files changed, 17 insertions, 11 deletions
diff --git a/src/qml/debugger/qqmlprofiler_p.h b/src/qml/debugger/qqmlprofiler_p.h index 44d208db41..d01e2bc429 100644 --- a/src/qml/debugger/qqmlprofiler_p.h +++ b/src/qml/debugger/qqmlprofiler_p.h @@ -190,7 +190,7 @@ public: } RefLocation(QQmlDataBlob *ref) - : Location(QQmlSourceLocation()), locationType(Compiling), sent(false) + : Location(QQmlSourceLocation(), ref->url()), locationType(Compiling), sent(false) { blob = ref; blob->addref(); diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h index 7f82a02ae0..9b13d4e341 100644 --- a/src/qml/jsruntime/qv4global_p.h +++ b/src/qml/jsruntime/qv4global_p.h @@ -108,6 +108,11 @@ inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); } //# define V4_ENABLE_JIT #endif +// check FPU with double precision on ARM platform +#if (defined(Q_PROCESSOR_ARM_64) || defined(Q_PROCESSOR_ARM_32)) && defined(V4_ENABLE_JIT) && defined(__ARM_FP) && (__ARM_FP <= 0x04) +# undef V4_ENABLE_JIT +#endif + // Black list some platforms #if defined(V4_ENABLE_JIT) #if defined(Q_OS_IOS) || defined(Q_OS_TVOS) diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h index 97ed13cd91..a5ee6b5373 100644 --- a/src/qml/jsruntime/qv4value_p.h +++ b/src/qml/jsruntime/qv4value_p.h @@ -339,7 +339,7 @@ public: if (isDouble()) { double d = doubleValue(); int i = (int)d; - if (i == d) { + if (i == d && !(d == 0 && std::signbit(d))) { setInt_32(i); return true; } diff --git a/src/qml/qml/qqmlexpression.cpp b/src/qml/qml/qqmlexpression.cpp index 59cc9bb09f..27d3acb9b7 100644 --- a/src/qml/qml/qqmlexpression.cpp +++ b/src/qml/qml/qqmlexpression.cpp @@ -252,6 +252,11 @@ QV4::ReturnedValue QQmlExpressionPrivate::v4value(bool *isUndefined) if (!expressionFunctionValid) { createQmlBinding(context(), scopeObject(), expression, url, line); expressionFunctionValid = true; + if (hasError()) { + if (isUndefined) + *isUndefined = true; + return QV4::Encode::undefined(); + } } return evaluate(isUndefined); diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index 74148e3ca4..3daa107b64 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -451,15 +451,11 @@ void QQmlJavaScriptExpression::createQmlBinding(QQmlContextData *ctxt, QObject * QV4::Script script(v4, qmlContext, code, filename, line); script.parse(); if (v4->hasException) { - QQmlError error = v4->catchExceptionAsQmlError(); - if (error.description().isEmpty()) - error.setDescription(QLatin1String("Exception occurred during function evaluation")); - if (error.line() == -1) - error.setLine(line); - if (error.url().isEmpty()) - error.setUrl(QUrl::fromLocalFile(filename)); - error.setObject(qmlScope); - ep->warning(error); + QQmlDelayedError *error = delayedError(); + error->catchJavaScriptException(v4); + error->setErrorObject(qmlScope); + if (!error->addError(ep)) + ep->warning(error); return; } setupFunction(qmlContext, script.vmFunction); |