diff options
author | Lars Knoll <[email protected]> | 2013-09-06 13:48:33 +0200 |
---|---|---|
committer | The Qt Project <[email protected]> | 2013-09-11 13:02:00 +0200 |
commit | e6180ecdc2144786c58d2f9d615f698ca3442382 (patch) | |
tree | a6b9f468b4ba5aeb4a99662d7a87a7353071ce52 /src/qml/jsruntime/qv4engine.cpp | |
parent | f9fda643ab7aa1a66e4816382f0e66499818f42a (diff) |
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 <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index f854f191a6..638609de37 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -721,13 +721,13 @@ namespace { { bool operator()(Function *function, quintptr pc) { - return reinterpret_cast<quintptr>(function->code) < pc - && (reinterpret_cast<quintptr>(function->code) + function->codeSize) < pc; + return reinterpret_cast<quintptr>(function->codePtr) < pc + && (reinterpret_cast<quintptr>(function->codePtr) + function->codeSize) < pc; } bool operator()(quintptr pc, Function *function) { - return pc < reinterpret_cast<quintptr>(function->code); + return pc < reinterpret_cast<quintptr>(function->codePtr); } }; } |