Properly unwind the js stack for generated code
authorLars Knoll <lars.knoll@digia.com>
Fri, 6 Sep 2013 11:48:33 +0000 (13:48 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 11 Sep 2013 11:02:00 +0000 (13:02 +0200)
commite6180ecdc2144786c58d2f9d615f698ca3442382
treea6b9f468b4ba5aeb4a99662d7a87a7353071ce52
parentf9fda643ab7aa1a66e4816382f0e66499818f42a
Properly unwind the js stack for generated code

Surround all calls into generated code with a
try {} catch {} statement that resets the jstack
to the correct position.

Like this we properly unwind the js stack in all cases, and
can also use stricter assertions in our ScopedCallData, etc.
classes to check that the stack is healthy.

Change-Id: I7ca03e06ea55007be683305d9c2a6898cf5fc689
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/compiler/qv4compileddata.cpp
src/qml/compiler/qv4isel_masm.cpp
src/qml/jsruntime/qv4engine.cpp
src/qml/jsruntime/qv4function.cpp
src/qml/jsruntime/qv4function_p.h
src/qml/jsruntime/qv4functionobject.cpp
src/qml/jsruntime/qv4scopedvalue_p.h
src/qml/jsruntime/qv4stacktrace.cpp
src/qml/jsruntime/qv4unwindhelper_arm_p.h
src/qml/jsruntime/qv4unwindhelper_dw2_p.h