diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2011-08-04 13:42:15 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-08-04 14:38:49 +0200 |
commit | ee06564a979a4677d117bc29e610e0368671fbdd (patch) | |
tree | db802112f27200b78e8b0fbfe566d92f356d4af7 /src/declarative/qml/v8 | |
parent | d4b6e43e7f096925d5761e53860a35b995a4eb0a (diff) |
Remove dead code from QJSValuePrivate
reinitialize() was used to implement setGlobalObject()
and setScriptClass() in the QtScript/V8 port, but those
functions will not be part of the new JS API.
Change-Id: I030d371659136a407636c7a13afe7623a60a2837
Reviewed-on: http://codereview.qt.nokia.com/2623
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'src/declarative/qml/v8')
-rw-r--r-- | src/declarative/qml/v8/qjsvalue_impl_p.h | 20 | ||||
-rw-r--r-- | src/declarative/qml/v8/qjsvalue_p.h | 1 |
2 files changed, 0 insertions, 21 deletions
diff --git a/src/declarative/qml/v8/qjsvalue_impl_p.h b/src/declarative/qml/v8/qjsvalue_impl_p.h index 1970505f13..414109cea7 100644 --- a/src/declarative/qml/v8/qjsvalue_impl_p.h +++ b/src/declarative/qml/v8/qjsvalue_impl_p.h @@ -1051,26 +1051,6 @@ void QJSValuePrivate::reinitialize() m_state = Invalid; } -/*! - \internal - reinitialize this value to an JSValue. -*/ -void QJSValuePrivate::reinitialize(QV8Engine* engine, v8::Handle<v8::Value> value) -{ - Q_ASSERT_X(this != InvalidValue(), Q_FUNC_INFO, "static invalid can't be reinitialized to a different value"); - if (isJSBased()) { - m_value.Dispose(); - // avoid double registration - m_engine->unregisterValue(this); - } else if (isStringBased()) { - delete u.m_string; - } - m_engine = engine; - m_state = JSValue; - m_value = v8::Persistent<v8::Value>::New(value); - m_engine->registerValue(this); -} - QV8Engine* QJSValuePrivate::engine() const { return m_engine; diff --git a/src/declarative/qml/v8/qjsvalue_p.h b/src/declarative/qml/v8/qjsvalue_p.h index 8189f45d59..b50f573b5c 100644 --- a/src/declarative/qml/v8/qjsvalue_p.h +++ b/src/declarative/qml/v8/qjsvalue_p.h @@ -82,7 +82,6 @@ public: inline QJSValuePrivate(QV8Engine *engine, QJSValue::SpecialValue value); inline QJSValuePrivate(QV8Engine *engine, v8::Handle<v8::Value>); inline void reinitialize(); - inline void reinitialize(QV8Engine *engine, v8::Handle<v8::Value> value); inline bool toBool() const; inline double toNumber() const; |