Enter context before running bindings
authorAaron Kennedy <aaron.kennedy@nokia.com>
Wed, 8 Jun 2011 00:16:17 +0000 (10:16 +1000)
committerAaron Kennedy <aaron.kennedy@nokia.com>
Wed, 8 Jun 2011 00:16:17 +0000 (10:16 +1000)
Although not strictly necessary to run the binding function, the
subsequent calls to toVariant() might execute code and thus require
a context.

src/declarative/qml/qdeclarativebinding.cpp

index aa1059d..106cc10 100644 (file)
@@ -372,6 +372,7 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags)
             QVariant value;
 
             v8::HandleScope handle_scope;
+            v8::Context::Scope scope(ep->v8engine.context());
             v8::Local<v8::Value> result = d->v8value(0, &isUndefined);
 
             if (wasDeleted) {