From eb10655a9e94d0953d5f43815750fe128b862051 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 7 Oct 2009 16:31:09 +0200 Subject: 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. --- src/script/api/qscriptvalue.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/script/api') 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(object)); JSC::JSValue result; if (const_cast(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(object)); JSC::JSValue result; if (const_cast(object)->getOwnPropertySlot(exec, index, slot)) { -- cgit v1.2.1