summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2010-03-24 11:47:31 (GMT)
committerKent Hansen <kent.hansen@nokia.com>2010-03-24 13:09:18 (GMT)
commit739f15838f73e84cb5e5ae58bb8adc267bc1b79c (patch)
treeffaa37d72d060a8018041ced97f6de1e3428445e /src/script
parent0b112f032f703160af8e9dc1736a576e2af92e02 (diff)
downloadQt-739f15838f73e84cb5e5ae58bb8adc267bc1b79c.zip
Qt-739f15838f73e84cb5e5ae58bb8adc267bc1b79c.tar.gz
Qt-739f15838f73e84cb5e5ae58bb8adc267bc1b79c.tar.bz2
QtScript: Add more missing API shims
Their absence was causing Bauhaus to crash. Reviewed-by: Simon Hausmann
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/qscriptvalue.cpp12
-rw-r--r--src/script/api/qscriptvalueiterator.cpp1
2 files changed, 9 insertions, 4 deletions
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 5db1165..3fe0e7d 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -1505,8 +1505,9 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject,
const QScriptValueList &args)
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC())
+ if (!d || !d->isObject())
return QScriptValue();
+ QScript::APIShim shim(d->engine);
JSC::JSValue callee = d->jscValue;
JSC::CallData callData;
JSC::CallType callType = callee.getCallData(callData);
@@ -1582,8 +1583,9 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject,
const QScriptValue &arguments)
{
Q_D(QScriptValue);
- if (!d || !d->isJSC())
+ if (!d || !d->isObject())
return QScriptValue();
+ QScript::APIShim shim(d->engine);
JSC::JSValue callee = d->jscValue;
JSC::CallData callData;
JSC::CallType callType = callee.getCallData(callData);
@@ -1656,8 +1658,9 @@ QScriptValue QScriptValue::call(const QScriptValue &thisObject,
QScriptValue QScriptValue::construct(const QScriptValueList &args)
{
Q_D(const QScriptValue);
- if (!d || !d->isJSC())
+ if (!d || !d->isObject())
return QScriptValue();
+ QScript::APIShim shim(d->engine);
JSC::JSValue callee = d->jscValue;
JSC::ConstructData constructData;
JSC::ConstructType constructType = callee.getConstructData(constructData);
@@ -1705,8 +1708,9 @@ QScriptValue QScriptValue::construct(const QScriptValueList &args)
QScriptValue QScriptValue::construct(const QScriptValue &arguments)
{
Q_D(QScriptValue);
- if (!d || !d->isJSC())
+ if (!d || !d->isObject())
return QScriptValue();
+ QScript::APIShim shim(d->engine);
JSC::JSValue callee = d->jscValue;
JSC::ConstructData constructData;
JSC::ConstructType constructType = callee.getConstructData(constructData);
diff --git a/src/script/api/qscriptvalueiterator.cpp b/src/script/api/qscriptvalueiterator.cpp
index 5c1e6f2..7fd7093 100644
--- a/src/script/api/qscriptvalueiterator.cpp
+++ b/src/script/api/qscriptvalueiterator.cpp
@@ -100,6 +100,7 @@ public:
if (initialized)
return;
QScriptEnginePrivate *eng_p = engine();
+ QScript::APIShim shim(eng_p);
JSC::ExecState *exec = eng_p->globalExec();
JSC::PropertyNameArray propertyNamesArray(exec);
JSC::asObject(object()->jscValue)->getOwnPropertyNames(exec, propertyNamesArray, JSC::IncludeDontEnumProperties);