Cleanup and unify context creation
authorLars Knoll <lars.knoll@digia.com>
Wed, 13 Mar 2013 21:05:34 +0000 (17:05 -0400)
committerSimon Hausmann <simon.hausmann@digia.com>
Wed, 13 Mar 2013 21:49:01 +0000 (22:49 +0100)
commit8ef0ca287f79a24c8e3b5f0f8101bec4b628f453
tree93aff47edf1ce73cec480ab047f20daa9defb204
parentb0aa50d80397032c661b5ee26a36a52f28dc60ca
Cleanup and unify context creation

* Always create contexts on the heap. When embedding native methods
we can't create contexts on the stack anymore without running the
risk of them being used in some scope chain.
* Unify context creation for call contexts, share the code
* Add a hack for indirect calls to eval and create a new 'fake'
global context there, so we don't mess up the context stack (it
broke badly when unwinding exceptions before).

Change-Id: I5804224dc26582f24ec79518639ceb13a8a3e967
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/v4/qmljs_environment.cpp
src/v4/qmljs_environment.h
src/v4/qmljs_runtime.cpp
src/v4/qv4functionobject.cpp
src/v4/qv4globalobject.cpp