diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-04-05 14:51:13 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-04-05 16:10:24 +0200 |
commit | ab4b03969c13f9ba4825848a2bcc4d86c98eb3a0 (patch) | |
tree | 5201f9c2cb56d0e7c929056b1e5ec403aca7b0d8 /src | |
parent | 76a3f403810a682799ac43b83ddd5c089e7405d9 (diff) |
Don't create new Objects in the current scope
When creating new objects through the V8 API, use the
root context, not the current context.
Fixes some crashes in QML, after creating contexts on the
stack again.
Change-Id: I9e49fa39f6222dcfa747b7466f1555572dc24f94
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/v4/qv4v8.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/v4/qv4v8.cpp b/src/v4/qv4v8.cpp index 10de8c7327..4adc706f77 100644 --- a/src/v4/qv4v8.cpp +++ b/src/v4/qv4v8.cpp @@ -1417,7 +1417,7 @@ class V4V8Object : public BaseClass { public: V4V8Object(VM::ExecutionEngine *engine, ObjectTemplate *tmpl) - : BaseClass(engine->current) + : BaseClass(engine->rootContext) { this->vtbl = &static_vtbl; m_template = Persistent<ObjectTemplate>(tmpl); |