From b340caa0d3ebf7f76c0445b2cdd4032d8e3bf8d5 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sat, 1 Nov 2014 21:44:57 +0100 Subject: Get rid of Members and directly store MemberData::Data pointers And do the same change for ArrayData. Change-Id: Ia1ae56bd0ff586c9b987e15af7a53f395a37054a Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4value.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/qml/jsruntime/qv4value.cpp') diff --git a/src/qml/jsruntime/qv4value.cpp b/src/qml/jsruntime/qv4value.cpp index a80cc40add..e4f84b22fb 100644 --- a/src/qml/jsruntime/qv4value.cpp +++ b/src/qml/jsruntime/qv4value.cpp @@ -91,6 +91,8 @@ double Value::toNumberImpl() const ExecutionContext *ctx = objectValue()->internalClass()->engine->currentContext(); Scope scope(ctx); ScopedValue prim(scope, RuntimeHelpers::toPrimitive(ValueRef::fromRawValue(this), NUMBER_HINT)); + if (scope.engine->hasException) + return 0; return prim->toNumber(); } #endif -- cgit v1.2.3