History

Case 19754 - Remove logging URLs and related file locations.

The goal is to strip out data that can be used by untoward users in copying models, avatars, etc.

Roxanne Skelly committed 8 years ago

Commit cef70001 parent e80468e36 files · +84 −201Browse files

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

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+13−16
@@ -369,7 +369,6 @@ void ScriptEngine::runInThread() { · 368 unmodified lines
369369 Q_ASSERT_X(!_isThreaded, "ScriptEngine::runInThread()", "runInThread should not be called more than once");
370370
371371 if (_isThreaded) {
372− qCWarning(scriptengine) << "ScriptEngine already running in thread: " << getFilename();
373372 return;
374373 }
375374
@@ -419,10 +418,10 @@ void ScriptEngine::waitTillDoneRunning() { · 43 unmodified lines
419418 workerThread->quit();
420419
421420 if (isEvaluating()) {
422− qCWarning(scriptengine) << "Script Engine has been running too long, aborting:" << getFilename();
421+ qCWarning(scriptengine) << "Script Engine has been running too long, aborting.";
423422 abortEvaluation();
424423 } else {
425− qCWarning(scriptengine) << "Script Engine has been running too long, throwing:" << getFilename();
424+ qCWarning(scriptengine) << "Script Engine has been running too long, throwing.";
426425 auto context = currentContext();
427426 if (context) {
428427 context->throwError("Timed out during shutdown");
@@ -498,7 +497,6 @@ void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) { · 69 unmodified lines
498497 {
499498 static const QString DEBUG_FLAG("#debug");
500499 if (QRegularExpression(DEBUG_FLAG).match(scriptContents).hasMatch()) {
501− qCWarning(scriptengine) << "NOTE: ScriptEngine for " << QUrl(url).fileName() << " will be launched in debug mode";
502500 _debuggable = true;
503501 }
504502 }
@@ -1632,7 +1630,6 @@ QVariantMap ScriptEngine::fetchModuleSource(const QString& modulePath, const boo · 1127 unmodified lines
16321630 auto url = modulePath;
16331631 auto status = _status[url];
16341632 auto contents = data[url];
1635− qCDebug(scriptengine_module) << "require.fetchModuleSource.onload: " << QUrl(url).fileName() << status << QThread::currentThread();
16361633 if (isStopping()) {
16371634 req["status"] = "Stopped";
16381635 req["success"] = false;
@@ -1752,8 +1749,8 @@ QScriptValue ScriptEngine::require(const QString& moduleId) { · 113 unmodified lines
17521749 auto exports = module.property("exports");
17531750 if (!invalidateCache && exports.isObject()) {
17541751 // we have found a cached module -- just need to possibly register it with current parent
1755− qCDebug(scriptengine_module) << QString("require - using cached module '%1' for '%2' (loaded: %3)")
1756− .arg(modulePath).arg(moduleId).arg(module.property("loaded").toString());
1752+ qCDebug(scriptengine_module) << QString("require - using cached module for '%1' (loaded: %2)")
1753+ .arg(moduleId).arg(module.property("loaded").toString());
17571754 registerModuleWithParent(module, parent);
17581755 maybeEmitUncaughtException("cached module");
17591756 return exports;
@@ -2138,7 +2135,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& · 378 unmodified lines
21382135 PROFILE_RANGE(script, __FUNCTION__);
21392136
21402137 if (isStopping() || DependencyManager::get<ScriptEngines>()->isStopped()) {
2141− qCDebug(scriptengine) << "loadEntityScript.start " << entityScript << entityID.toString()
2138+ qCDebug(scriptengine) << "loadEntityScript.start " << entityID.toString()
21422139 << " but isStopping==" << isStopping()
21432140 << " || engines->isStopped==" << DependencyManager::get<ScriptEngines>()->isStopped();
21442141 return;
@@ -2163,8 +2160,8 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& · 18 unmodified lines
21632160 // since not reloading, assume that the exact same input would produce the exact same output again
21642161 // note: this state gets reset with "reload all scripts," leaving/returning to a Domain, clear cache, etc.
21652162 #ifdef DEBUG_ENTITY_STATES
2166− qCDebug(scriptengine) << QString("loadEntityScript.cancelled entity: %1 script: %2 (previous script failure)")
2167− .arg(entityID.toString()).arg(entityScript);
2163+ qCDebug(scriptengine) << QString("loadEntityScript.cancelled entity: %1 (previous script failure)")
2164+ .arg(entityID.toString());
21682165 #endif
21692166 updateEntityScriptStatus(entityID, EntityScriptStatus::ERROR_LOADING_SCRIPT,
21702167 "A previous Entity failed to load using this script URL; reload to try again.");
@@ -2173,8 +2170,8 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& · 2 unmodified lines
21732170 } else {
21742171 // another entity is busy loading from this script URL so wait for them to finish
21752172 #ifdef DEBUG_ENTITY_STATES
2176− qCDebug(scriptengine) << QString("loadEntityScript.deferring[%0] entity: %1 script: %2 (waiting on %3)")
2177− .arg(_deferredEntityLoads.size()).arg(entityID.toString()).arg(entityScript).arg(currentEntityID.toString());
2173+ qCDebug(scriptengine) << QString("loadEntityScript.deferring[%0] entity: %1 (waiting on %2 )")
2174+ .arg(_deferredEntityLoads.size()).arg(entityID.toString()).arg(currentEntityID.toString());
21782175 #endif
21792176 _deferredEntityLoads.push_back({ entityID, entityScript });
21802177 return;
@@ -2188,7 +2185,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& · 7 unmodified lines
21882185 {
21892186 EntityScriptDetails details;
21902187 bool hasEntityScript = getEntityScriptDetails(entityID, details);
2191− qCDebug(scriptengine) << "loadEntityScript.LOADING: " << entityScript << entityID.toString()
2188+ qCDebug(scriptengine) << "loadEntityScript.LOADING: " << entityID.toString()
21922189 << "(previous: " << (hasEntityScript ? details.status : EntityScriptStatus::PENDING) << ")";
21932190 }
21942191 #endif
@@ -2217,7 +2214,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& · 22 unmodified lines
22172214 }
22182215 executeOnScriptThread([=]{
22192216 #ifdef DEBUG_ENTITY_STATES
2220− qCDebug(scriptengine) << "loadEntityScript.contentAvailable" << status << QUrl(url).fileName() << entityID.toString();
2217+ qCDebug(scriptengine) << "loadEntityScript.contentAvailable" << status << entityID.toString();
22212218 #endif
22222219 if (!isStopping() && hasEntityScriptDetails(entityID)) {
22232220 _contentAvailableQueue[entityID] = { entityID, url, contents, isURL, success, status };
@@ -2306,7 +2303,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 82 unmodified lines
23062303 setEntityScriptDetails(entityID, newDetails);
23072304
23082305 #ifdef DEBUG_ENTITY_STATES
2309− qCDebug(scriptengine) << "entityScriptContentAvailable -- flagging " << entityScript << " as BAD_SCRIPT_UUID_PLACEHOLDER";
2306+ qCDebug(scriptengine) << "entityScriptContentAvailable -- flagging as BAD_SCRIPT_UUID_PLACEHOLDER";
23102307 #endif
23112308 // flag the original entityScript as unusuable
23122309 _occupiedScriptURLs[entityScript] = BAD_SCRIPT_UUID_PLACEHOLDER;
@@ -2352,7 +2349,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 39 unmodified lines
23522349 timeout.setSingleShot(true);
23532350 timeout.start(SANDBOX_TIMEOUT);
23542351 connect(&timeout, &QTimer::timeout, [=, &sandbox]{
2355− qCDebug(scriptengine) << "ScriptEngine::entityScriptContentAvailable timeout(" << scriptOrURL << ")";
2352+ qCDebug(scriptengine) << "ScriptEngine::entityScriptContentAvailable timeout";
23562353
23572354 // Guard against infinite loops and non-performant code
23582355 sandbox.raiseException(