diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-01-11 14:21:18 +1000 |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-01-11 14:21:18 +1000 |
commit | ece224f79dfe3b859910cb24d64e96277b3c737f (patch) | |
tree | 9dd6f037ac81bd492cc553870d1e390520e58200 /src/script/bridge/qscriptdeclarativeobject.cpp | |
parent | e1dfba9da8e093255c6020cb61b1b0ea68d2c012 (diff) | |
download | qt4-tools-ece224f79dfe3b859910cb24d64e96277b3c737f.tar.gz |
Optimization: Add QScriptDeclarativeClass::Value
This class is essentially the same as QScriptValue, but it is faster
as it doesn't reference objects. Thus, they might be collected
if the gc runs. For return values from QScriptDeclarativeClass this
isn't a problem, of course.
Diffstat (limited to 'src/script/bridge/qscriptdeclarativeobject.cpp')
-rw-r--r-- | src/script/bridge/qscriptdeclarativeobject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/bridge/qscriptdeclarativeobject.cpp b/src/script/bridge/qscriptdeclarativeobject.cpp index 6b4f5cb886..72e31a90a9 100644 --- a/src/script/bridge/qscriptdeclarativeobject.cpp +++ b/src/script/bridge/qscriptdeclarativeobject.cpp @@ -74,9 +74,9 @@ bool DeclarativeObjectDelegate::getOwnPropertySlot(QScriptObject* object, QScriptClass::QueryFlags flags = m_class->queryProperty(m_object, identifier, QScriptClass::HandlesReadAccess); if (flags & QScriptClass::HandlesReadAccess) { - QScriptValue value = m_class->property(m_object, identifier); + QScriptDeclarativeClass::Value val = m_class->property(m_object, identifier); p->context = 0; - slot.setValue(engine->scriptValueToJSCValue(value)); + slot.setValue((const JSC::JSValue &)val); return true; } p->context = 0; |