summaryrefslogtreecommitdiffstats
path: root/src/script/bridge
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-30 13:16:59 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-30 13:16:59 (GMT)
commit7a48877fb523491dcf67aed2b17d497d76754180 (patch)
treec5c454e9d53fd936b01ce4cd32b2598e0950fbc5 /src/script/bridge
parentae305abfdb795b472b2b9d200bf3b11af00d7d1f (diff)
parentff968f44124322f5cda47cc7eced79ccaf23de80 (diff)
downloadQt-7a48877fb523491dcf67aed2b17d497d76754180.zip
Qt-7a48877fb523491dcf67aed2b17d497d76754180.tar.gz
Qt-7a48877fb523491dcf67aed2b17d497d76754180.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (24 commits) qdoc: Added <div> elements to some html output for class references. Fix compile error on mingw. MONILITY-645 Do not override alternate background color in Plastique Fix QComboBox ignoring foreground role in some styles Fix compilation on HP-UXi: _SC_MONOTONIC_CLOCK isn't defined Fix compilation with Sun CC: Ensure that we return QPair<long,long> in all cases. Update PLATFORM(SPARC64) to CPU(SPARC64) jui files are no c++ ... scan some more file types by default Support EtchDisabledText with spin box on Windows style QNAM HTTP: Fix invoking a method when being destructed right now Fixed a typo in the QDoubleValidotor doc. Trivial fix to JavaScriptCore to fix building with MSVC 2010 Autotest: oops, fix oops: remove qguard from auto.pro Autotests: oops, remove last traces of QGuard Remove QGuard. Unskip test that used to crash QtScript: Add yet more missing API shims ...
Diffstat (limited to 'src/script/bridge')
-rw-r--r--src/script/bridge/qscriptdeclarativeclass.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/script/bridge/qscriptdeclarativeclass.cpp b/src/script/bridge/qscriptdeclarativeclass.cpp
index 0f450ca..1093448 100644
--- a/src/script/bridge/qscriptdeclarativeclass.cpp
+++ b/src/script/bridge/qscriptdeclarativeclass.cpp
@@ -154,9 +154,12 @@ QScriptDeclarativeClass::PersistentIdentifier::PersistentIdentifier()
QScriptDeclarativeClass::PersistentIdentifier::~PersistentIdentifier()
{
- if (engine)
- JSC::setCurrentIdentifierTable(engine->globalData->identifierTable);
- ((JSC::Identifier &)d).JSC::Identifier::~Identifier();
+ if (engine) {
+ QScript::APIShim shim(engine);
+ ((JSC::Identifier &)d).JSC::Identifier::~Identifier();
+ } else {
+ ((JSC::Identifier &)d).JSC::Identifier::~Identifier();
+ }
}
QScriptDeclarativeClass::PersistentIdentifier::PersistentIdentifier(const PersistentIdentifier &other)
@@ -190,7 +193,8 @@ QScriptValue QScriptDeclarativeClass::newObject(QScriptEngine *engine,
Q_ASSERT(engine);
Q_ASSERT(scriptClass);
- QScriptEnginePrivate *p = static_cast<QScriptEnginePrivate *>(QObjectPrivate::get(engine));
+ QScriptEnginePrivate *p = static_cast<QScriptEnginePrivate *>(QObjectPrivate::get(engine));
+ QScript::APIShim shim(p);
JSC::ExecState* exec = p->currentFrame;
QScriptObject *result = new (exec) QScriptObject(p->scriptObjectStructure);
@@ -207,6 +211,7 @@ QScriptDeclarativeClass::newObjectValue(QScriptEngine *engine,
Q_ASSERT(scriptClass);
QScriptEnginePrivate *p = static_cast<QScriptEnginePrivate *>(QObjectPrivate::get(engine));
+ QScript::APIShim shim(p);
JSC::ExecState* exec = p->currentFrame;
QScriptObject *result = new (exec) QScriptObject(p->scriptObjectStructure);
@@ -237,6 +242,7 @@ QScriptValue QScriptDeclarativeClass::function(const QScriptValue &v, const Iden
if (!d->isObject())
return QScriptValue();
+ QScript::APIShim shim(d->engine);
JSC::ExecState *exec = d->engine->currentFrame;
JSC::JSObject *object = d->jscValue.getObject();
JSC::PropertySlot slot(const_cast<JSC::JSObject*>(object));
@@ -260,6 +266,7 @@ QScriptValue QScriptDeclarativeClass::property(const QScriptValue &v, const Iden
if (!d->isObject())
return QScriptValue();
+ QScript::APIShim shim(d->engine);
JSC::ExecState *exec = d->engine->currentFrame;
JSC::JSObject *object = d->jscValue.getObject();
JSC::PropertySlot slot(const_cast<JSC::JSObject*>(object));
@@ -283,6 +290,7 @@ QScriptDeclarativeClass::functionValue(const QScriptValue &v, const Identifier &
if (!d->isObject())
return Value();
+ QScript::APIShim shim(d->engine);
JSC::ExecState *exec = d->engine->currentFrame;
JSC::JSObject *object = d->jscValue.getObject();
JSC::PropertySlot slot(const_cast<JSC::JSObject*>(object));
@@ -307,6 +315,7 @@ QScriptDeclarativeClass::propertyValue(const QScriptValue &v, const Identifier &
if (!d->isObject())
return Value();
+ QScript::APIShim shim(d->engine);
JSC::ExecState *exec = d->engine->currentFrame;
JSC::JSObject *object = d->jscValue.getObject();
JSC::PropertySlot slot(const_cast<JSC::JSObject*>(object));
@@ -332,6 +341,7 @@ QScriptValue QScriptDeclarativeClass::scopeChainValue(QScriptContext *context, i
context->activationObject(); //ensure the creation of the normal scope for native context
const JSC::CallFrame *frame = QScriptEnginePrivate::frameForContext(context);
QScriptEnginePrivate *engine = QScript::scriptEngineFromExec(frame);
+ QScript::APIShim shim(engine);
JSC::ScopeChainNode *node = frame->scopeChain();
JSC::ScopeChainIterator it(node);
@@ -392,6 +402,7 @@ QScriptContext * QScriptDeclarativeClass::pushCleanContext(QScriptEngine *engine
return 0;
QScriptEnginePrivate *d = QScriptEnginePrivate::get(engine);
+ QScript::APIShim shim(d);
JSC::CallFrame* newFrame = d->pushContext(d->currentFrame,
d->currentFrame->globalData().dynamicGlobalObject,
@@ -427,6 +438,7 @@ QScriptDeclarativeClass::createPersistentIdentifier(const QString &str)
{
QScriptEnginePrivate *p =
static_cast<QScriptEnginePrivate *>(QObjectPrivate::get(d_ptr->engine));
+ QScript::APIShim shim(p);
JSC::ExecState* exec = p->currentFrame;
PersistentIdentifier rv(p);
@@ -440,6 +452,7 @@ QScriptDeclarativeClass::createPersistentIdentifier(const Identifier &id)
{
QScriptEnginePrivate *p =
static_cast<QScriptEnginePrivate *>(QObjectPrivate::get(d_ptr->engine));
+ QScript::APIShim shim(p);
JSC::ExecState* exec = p->currentFrame;
PersistentIdentifier rv(p);