History

resolve conflicts on merge with upstream master

Stephen Birarda committed 11 years ago

Commit d03a8372 parents 2ecec26 1b6a2ff46 files · +1108 −415Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 46 files). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+6−7
@@ -96,7 +96,7 @@ static bool hasCorrectSyntax(const QScriptProgram& program) { · 95 unmodified lines
96 return true;96 return true;
97}97}
98 98
99static bool hadUncauchtExceptions(QScriptEngine& engine, const QString& fileName) {99static bool hadUncaughtExceptions(QScriptEngine& engine, const QString& fileName) {
100 if (engine.hasUncaughtException()) {100 if (engine.hasUncaughtException()) {
101 const auto backtrace = engine.uncaughtExceptionBacktrace();101 const auto backtrace = engine.uncaughtExceptionBacktrace();
102 const auto exception = engine.uncaughtException().toString();102 const auto exception = engine.uncaughtException().toString();
@@ -616,7 +616,7 @@ QScriptValue ScriptEngine::evaluate(const QString& sourceCode, const QString& fi · 513 unmodified lines
616 const auto result = QScriptEngine::evaluate(program);616 const auto result = QScriptEngine::evaluate(program);
617 --_evaluatesPending;617 --_evaluatesPending;
618 618
619 const auto hadUncaughtException = hadUncauchtExceptions(*this, program.fileName());619 const auto hadUncaughtException = hadUncaughtExceptions(*this, program.fileName());
620 if (_wantSignals) {620 if (_wantSignals) {
621 emit evaluationFinished(result, hadUncaughtException);621 emit evaluationFinished(result, hadUncaughtException);
622 }622 }
@@ -684,10 +684,9 @@ void ScriptEngine::run() { · 61 unmodified lines
684 }684 }
685 }685 }
686 lastUpdate = now;686 lastUpdate = now;
687 687
688 if (hadUncauchtExceptions(*this, _fileNameString)) {688 // Debug and clear exceptions
689 stop();689 hadUncaughtExceptions(*this, _fileNameString);
690 }
691 }690 }
692 691
693 stopAllTimers(); // make sure all our timers are stopped if the script is ending692 stopAllTimers(); // make sure all our timers are stopped if the script is ending
@@ -1022,7 +1021,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 328 unmodified lines
1022 1021
1023 QScriptEngine sandbox;1022 QScriptEngine sandbox;
1024 QScriptValue testConstructor = sandbox.evaluate(program);1023 QScriptValue testConstructor = sandbox.evaluate(program);
1025 if (hadUncauchtExceptions(sandbox, program.fileName())) {1024 if (hadUncaughtExceptions(sandbox, program.fileName())) {
1026 return;1025 return;
1027 }1026 }
1028 1027