aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v8/qv8engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/v8/qv8engine.cpp')
-rw-r--r--src/qml/qml/v8/qv8engine.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp
index 8e8223fea1..ab3283f727 100644
--- a/src/qml/qml/v8/qv8engine.cpp
+++ b/src/qml/qml/v8/qv8engine.cpp
@@ -147,6 +147,8 @@ QV8Engine::QV8Engine(QJSEngine* qq, QJSEngine::ContextOwnership ownership)
QV8GCCallback::registerGcPrologueCallback();
m_strongReferencer = qPersistentNew(v8::Object::New());
+ m_bindingFlagKey = qPersistentNew(v8::String::New("qml::binding"));
+
m_stringWrapper.init();
m_contextWrapper.init(this);
m_qobjectWrapper.init(this);
@@ -191,6 +193,8 @@ QV8Engine::~QV8Engine()
m_contextWrapper.destroy();
m_stringWrapper.destroy();
+ qPersistentDispose(m_bindingFlagKey);
+
m_originalGlobalObject.destroy();
if (m_ownsV8Context)
@@ -314,6 +318,7 @@ v8::Handle<v8::Value> QV8Engine::fromVariant(const QVariant &variant)
if (type < QMetaType::User) {
switch (QMetaType::Type(type)) {
+ case QMetaType::UnknownType:
case QMetaType::Void:
return v8::Undefined();
case QMetaType::Bool:
@@ -598,6 +603,7 @@ void QV8Engine::initializeGlobal(v8::Handle<v8::Object> global)
qt->Set(v8::String::New("atob"), V8FUNCTION(atob, this));
qt->Set(v8::String::New("resolvedUrl"), V8FUNCTION(resolvedUrl, this));
qt->Set(v8::String::New("locale"), V8FUNCTION(locale, this));
+ qt->Set(v8::String::New("binding"), V8FUNCTION(binding, this));
if (m_engine) {
qt->Set(v8::String::New("application"), newQObject(new QQuickApplication(m_engine)));
@@ -1112,6 +1118,7 @@ v8::Handle<v8::Value> QV8Engine::metaTypeToJS(int type, const void *data)
// check if it's one of the types we know
switch (QMetaType::Type(type)) {
+ case QMetaType::UnknownType:
case QMetaType::Void:
return v8::Undefined();
case QMetaType::Bool: