Fix some bugs related to QJSValue
authorLars Knoll <lars.knoll@digia.com>
Fri, 14 Jun 2013 11:54:36 +0000 (13:54 +0200)
committerSimon Hausmann <simon.hausmann@digia.com>
Fri, 14 Jun 2013 12:52:22 +0000 (14:52 +0200)
commit33f94b17cbbcb59418612d13570409b9e5499c29
tree082a4b4f8f42b668ab23166d1b59939e81c358dc
parentc1aeeb8fbd9555e3f14f33c91be4d8a610c526c4
Fix some bugs related to QJSValue

Give PersistentValuePrivate a virtual destructor. This makes
sure we properly delete things as QJSValuePrivate inherits from
it.

Also always access the QV4::Value through getValue() before passing
it off into the JS engine, so that we properly convert a QString
based JSValue into a QV4::String.

Change-Id: I4c6cb8d0e043e0d7f66fa545abe898e189051049
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/qml/v4/qv4value.cpp
src/qml/qml/v4/qv4value_p.h
src/qml/qml/v8/qjsvalue.cpp
src/qml/qml/v8/qv8engine.cpp