From a3a44fc16417edfe09fca757f4ab1fb8fdaff00d Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 11 Sep 2014 15:37:31 +0200 Subject: Basic support for typed arrays This implements most of the spec required for the Khronos typed array specification. It tries to follow ECMAScript 6 as closely as possible, but currently only implements a subset of the ECMAScript 6 specification. Addes a test script in tests/manual/v4 to test our implementation. Change-Id: I8ec63869500358e088b73240e1f37120ae3cf59a Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4arraybuffer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/qml/jsruntime/qv4arraybuffer.cpp') diff --git a/src/qml/jsruntime/qv4arraybuffer.cpp b/src/qml/jsruntime/qv4arraybuffer.cpp index 9d24044d7c..c97b16a255 100644 --- a/src/qml/jsruntime/qv4arraybuffer.cpp +++ b/src/qml/jsruntime/qv4arraybuffer.cpp @@ -59,6 +59,8 @@ ReturnedValue ArrayBufferCtor::construct(Managed *m, CallData *callData) return v4->currentContext()->throwRangeError(QLatin1String("ArrayBuffer constructor: invalid length")); Scoped a(scope, v4->memoryManager->alloc(v4, len)); + if (scope.engine->hasException) + return Encode::undefined(); return a.asReturnedValue(); } -- cgit v1.2.1