diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-08-17 13:43:07 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-08-17 13:43:07 (GMT) |
commit | ba25514d1c1010d84ffdbf75331ff71596e56c99 (patch) | |
tree | 0826e54b51a0727ec823be7768d3f34fb94ed6fd /src/script/api | |
parent | 92daafcd4677af16d47e51ac8e0f00c554007fa0 (diff) | |
download | Qt-ba25514d1c1010d84ffdbf75331ff71596e56c99.zip Qt-ba25514d1c1010d84ffdbf75331ff71596e56c99.tar.gz Qt-ba25514d1c1010d84ffdbf75331ff71596e56c99.tar.bz2 |
remove unnecessary ifdefs
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 207521d..eef0b5d 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -2158,13 +2158,11 @@ QScriptValue QScriptEngine::evaluate(const QString &program, const QString &file JSC::ExecState* exec = d->currentFrame; JSC::SourceCode source = JSC::makeSource(jscProgram, jscFileName, lineNumber); -#ifdef QT_BUILD_SCRIPT_LIB intptr_t sourceId = source.provider()->asID(); JSC::Debugger* debugger = d->originalGlobalObject()->debugger(); exec->globalData().scriptpool->startEvaluating(source); if (debugger) debugger->evaluateStart(sourceId); -#endif exec->clearException(); JSC::DynamicGlobalObjectScope dynamicGlobalObjectScope(exec, exec->scopeChain()->globalObject()); @@ -2175,13 +2173,13 @@ QScriptValue QScriptEngine::evaluate(const QString &program, const QString &file if (!evalNode) { JSC::JSValue exceptionValue = JSC::Error::create(exec, JSC::SyntaxError, errorMessage, errorLine, source.provider()->asID(), 0); exec->setException(exceptionValue); -#ifdef QT_BUILD_SCRIPT_LIB + if (debugger) { debugger->exceptionThrow(JSC::DebuggerCallFrame(exec, exceptionValue), sourceId, false); debugger->evaluateStop(exceptionValue, sourceId); } exec->globalData().scriptpool->stopEvaluating(source); -#endif + return d->scriptValueFromJSCValue(exceptionValue); } @@ -2194,29 +2192,28 @@ QScriptValue QScriptEngine::evaluate(const QString &program, const QString &file if (d->timeoutChecker()->shouldAbort()) { if (d->abortResult.isError()) exec->setException(d->scriptValueToJSCValue(d->abortResult)); -#ifdef QT_BUILD_SCRIPT_LIB + if (debugger) debugger->evaluateStop(d->scriptValueToJSCValue(d->abortResult), sourceId); exec->globalData().scriptpool->stopEvaluating(source); -#endif + return d->abortResult; } if (exceptionValue) { exec->setException(exceptionValue); -#ifdef QT_BUILD_SCRIPT_LIB + if (debugger) debugger->evaluateStop(exceptionValue, sourceId); exec->globalData().scriptpool->stopEvaluating(source); -#endif + return d->scriptValueFromJSCValue(exceptionValue); } -#ifdef QT_BUILD_SCRIPT_LIB if (debugger) debugger->evaluateStop(result, sourceId); exec->globalData().scriptpool->stopEvaluating(source); -#endif + Q_ASSERT(!exec->hadException()); return d->scriptValueFromJSCValue(result); } |