History

CR Feedback

ZappoMan committed 10 years ago

Commit ee4748f1 parent 73ff0301 file · +2 −8Browse files

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

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+2−8
@@ -222,14 +222,14 @@ void ScriptEngine::waitTillDoneRunning() { · 221 unmodified lines
222 222
223 // if we've been waiting a second or more, then tell the script engine to stop evaluating223 // if we've been waiting a second or more, then tell the script engine to stop evaluating
224 if (elapsed > USECS_PER_SECOND) {224 if (elapsed > USECS_PER_SECOND) {
225 qDebug() << "giving up on evaluation elapsed:" << elapsed << "calling abortEvaluation() script:" << scriptName;225 qCDebug(scriptengine) << "Script " << scriptName << " has been running too long [" << elapsed << "] aborting evaluation.";
226 threadSafeAbortEvaluation();226 threadSafeAbortEvaluation();
227 }227 }
228 228
229 // if we've been waiting for more than 5 seconds then we should be more aggessive about stopping229 // if we've been waiting for more than 5 seconds then we should be more aggessive about stopping
230 static const auto WAITING_TOO_LONG = USECS_PER_SECOND * 5;230 static const auto WAITING_TOO_LONG = USECS_PER_SECOND * 5;
231 if (elapsed > WAITING_TOO_LONG) {231 if (elapsed > WAITING_TOO_LONG) {
232 qDebug() << "giving up on thread elapsed:" << elapsed << "calling thread->quit() script:" << scriptName;232 qCDebug(scriptengine) << "Script " << scriptName << " has been running too long [" << elapsed << "] quitting.";
233 thread()->quit();233 thread()->quit();
234 break;234 break;
235 }235 }
@@ -396,7 +396,6 @@ void ScriptEngine::registerValue(const QString& valueName, QScriptValue value) { · 160 unmodified lines
396 if (partsToGo > 0) {396 if (partsToGo > 0) {
397 //QObject *object = new QObject;397 //QObject *object = new QObject;
398 QScriptValue partValue = newArray(); //newQObject(object, QScriptEngine::ScriptOwnership);398 QScriptValue partValue = newArray(); //newQObject(object, QScriptEngine::ScriptOwnership);
399 qDebug() << "partValue[" << pathPart<<"].isArray() :" << partValue.isArray();
400 partObject.setProperty(pathPart, partValue);399 partObject.setProperty(pathPart, partValue);
401 } else {400 } else {
402 partObject.setProperty(pathPart, value);401 partObject.setProperty(pathPart, value);
@@ -1089,11 +1088,6 @@ void ScriptEngine::loadEntityScript(QWeakPointer<ScriptEngine> theEngine, const · 686 unmodified lines
1089 << QThread::currentThread() << "] expected thread [" << strongEngine->thread() << "]";1088 << QThread::currentThread() << "] expected thread [" << strongEngine->thread() << "]";
1090#endif1089#endif
1091 strongEngine->entityScriptContentAvailable(entityID, scriptOrURL, contents, isURL, success);1090 strongEngine->entityScriptContentAvailable(entityID, scriptOrURL, contents, isURL, success);
1092 } else {
1093 // FIXME - I'm leaving this in for testing, so that QA can confirm that sometimes the script contents
1094 // returns after the ScriptEngine has been deleted, we can remove this after QA verifies the
1095 // repro case.
1096 qDebug() << "ScriptCache::getScriptContents() returned after our ScriptEngine was deleted... script:" << scriptOrURL;
1097 }1091 }
1098 }, forceRedownload);1092 }, forceRedownload);
1099}1093}