From ab4b03969c13f9ba4825848a2bcc4d86c98eb3a0 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 5 Apr 2013 14:51:13 +0200 Subject: 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 --- src/v4/qv4v8.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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(tmpl); -- cgit v1.2.3