diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2010-03-29 20:48:20 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2010-03-29 20:53:09 (GMT) |
commit | 7e8092fc70357b69835d8edc9e38f3286fe8727f (patch) | |
tree | c3a19d320818e1d40caf478658029eea38ae1845 /src/script | |
parent | 3e5745ea75d73869918889cb374c3d651bed0991 (diff) | |
download | Qt-7e8092fc70357b69835d8edc9e38f3286fe8727f.zip Qt-7e8092fc70357b69835d8edc9e38f3286fe8727f.tar.gz Qt-7e8092fc70357b69835d8edc9e38f3286fe8727f.tar.bz2 |
QScript: More missing APIShim
Fixes crash in tst_QScriptValueIterator::remove on windows
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/api/qscriptvalueiterator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/api/qscriptvalueiterator.cpp b/src/script/api/qscriptvalueiterator.cpp index 460dddb..ecda5fc 100644 --- a/src/script/api/qscriptvalueiterator.cpp +++ b/src/script/api/qscriptvalueiterator.cpp @@ -292,6 +292,7 @@ QScriptValue QScriptValueIterator::value() const Q_D(const QScriptValueIterator); if (!d || !d->initialized || !d->engine()) return QScriptValue(); + QScript::APIShim shim(d->engine()); JSC::JSValue jsValue = d->object()->property(*d->current); return d->engine()->scriptValueFromJSCValue(jsValue); } @@ -307,6 +308,7 @@ void QScriptValueIterator::setValue(const QScriptValue &value) Q_D(QScriptValueIterator); if (!d || !d->initialized || !d->engine()) return; + QScript::APIShim shim(d->engine()); JSC::JSValue jsValue = d->engine()->scriptValueToJSCValue(value); d->object()->setProperty(*d->current, jsValue); } @@ -322,6 +324,7 @@ QScriptValue::PropertyFlags QScriptValueIterator::flags() const Q_D(const QScriptValueIterator); if (!d || !d->initialized || !d->engine()) return 0; + QScript::APIShim shim(d->engine()); return d->object()->propertyFlags(*d->current); } @@ -336,6 +339,7 @@ void QScriptValueIterator::remove() Q_D(QScriptValueIterator); if (!d || !d->initialized || !d->engine()) return; + QScript::APIShim shim(d->engine()); d->object()->setProperty(*d->current, JSC::JSValue()); d->propertyNames.erase(d->current); } |