summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-10-07 16:31:09 +0200
committerKent Hansen <khansen@trolltech.com>2009-10-07 18:16:07 +0200
commiteb10655a9e94d0953d5f43815750fe128b862051 (patch)
treec9d59ccab2f2933778381064c2d69716860a17ba /src
parent2dd5facac01df4a90fbf9b7ce666704fddaf9e4f (diff)
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')
-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 1c668a973e..b8340a7e51 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)) {