summaryrefslogtreecommitdiffstats
path: root/src/script/api
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-10-07 14:31:09 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-10-07 16:16:07 (GMT)
commiteb10655a9e94d0953d5f43815750fe128b862051 (patch)
treec9d59ccab2f2933778381064c2d69716860a17ba /src/script/api
parent2dd5facac01df4a90fbf9b7ce666704fddaf9e4f (diff)
downloadQt-eb10655a9e94d0953d5f43815750fe128b862051.zip
Qt-eb10655a9e94d0953d5f43815750fe128b862051.tar.gz
Qt-eb10655a9e94d0953d5f43815750fe128b862051.tar.bz2
Use JSC::asObject() when we know that the value is an object
It's faster than calling getObject(), since getObject() will do type checking of the value.
Diffstat (limited to 'src/script/api')
-rw-r--r--src/script/api/qscriptvalue.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 1c668a9..b8340a7 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -280,7 +280,7 @@ QScriptValue QScriptValuePrivate::property(const JSC::Identifier &id, int resolv
{
Q_ASSERT(isObject());
JSC::ExecState *exec = engine->currentFrame;
- JSC::JSObject *object = jscValue.getObject();
+ JSC::JSObject *object = JSC::asObject(jscValue);
JSC::PropertySlot slot(const_cast<JSC::JSObject*>(object));
JSC::JSValue result;
if (const_cast<JSC::JSObject*>(object)->getOwnPropertySlot(exec, id, slot)) {
@@ -303,7 +303,7 @@ QScriptValue QScriptValuePrivate::property(quint32 index, int resolveMode) const
{
Q_ASSERT(isObject());
JSC::ExecState *exec = engine->currentFrame;
- JSC::JSObject *object = jscValue.getObject();
+ JSC::JSObject *object = JSC::asObject(jscValue);
JSC::PropertySlot slot(const_cast<JSC::JSObject*>(object));
JSC::JSValue result;
if (const_cast<JSC::JSObject*>(object)->getOwnPropertySlot(exec, index, slot)) {