diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-14 14:03:18 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-14 14:03:18 (GMT) |
commit | e21e9b5a400115291c883b9b85055a8355f3a30b (patch) | |
tree | 8072e84826692738e7f8f294cf747eece340c3fa /src/script/api/qscriptengine.cpp | |
parent | ecc2422553aebd9db06baa9c7a23b21351625947 (diff) | |
download | Qt-e21e9b5a400115291c883b9b85055a8355f3a30b.zip Qt-e21e9b5a400115291c883b9b85055a8355f3a30b.tar.gz Qt-e21e9b5a400115291c883b9b85055a8355f3a30b.tar.bz2 |
use originalGlobalObject() instead of lexicalGlobalObject() where possible
No need to look up the global object via the scope chain since we have
a direct pointer to it already.
Diffstat (limited to 'src/script/api/qscriptengine.cpp')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index a87872a..207521d 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -2160,7 +2160,7 @@ QScriptValue QScriptEngine::evaluate(const QString &program, const QString &file #ifdef QT_BUILD_SCRIPT_LIB intptr_t sourceId = source.provider()->asID(); - JSC::Debugger* debugger = exec->lexicalGlobalObject()->debugger(); + JSC::Debugger* debugger = d->originalGlobalObject()->debugger(); exec->globalData().scriptpool->startEvaluating(source); if (debugger) debugger->evaluateStart(sourceId); @@ -2291,7 +2291,7 @@ JSC::CallFrame *QScriptEnginePrivate::pushContext(JSC::CallFrame *exec, const JS //JSC doesn't create default created object for native functions. so we do it JSC::JSValue prototype = callee->get(exec, exec->propertyNames().prototype); JSC::Structure *structure = prototype.isObject() ? JSC::asObject(prototype)->inheritorID() - : exec->lexicalGlobalObject()->emptyObjectStructure(); + : originalGlobalObject()->emptyObjectStructure(); thisObject = new (exec) QScriptObject(structure); } |