The goal is to strip out data that can be used by untoward users in copying models, avatars, etc.
Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 36 files). Show all
Unified · Split
| @@ -369,7 +369,6 @@ void ScriptEngine::runInThread() { · 368 unmodified lines | ||
| 369 | 369 | Q_ASSERT_X(!_isThreaded, "ScriptEngine::runInThread()", "runInThread should not be called more than once"); |
| 370 | 370 | |
| 371 | 371 | if (_isThreaded) { |
| 372 | − qCWarning(scriptengine) << "ScriptEngine already running in thread: " << getFilename(); | |
| 373 | 372 | return; |
| 374 | 373 | } |
| 375 | 374 | |
| @@ -419,10 +418,10 @@ void ScriptEngine::waitTillDoneRunning() { · 43 unmodified lines | ||
| 419 | 418 | workerThread->quit(); |
| 420 | 419 | |
| 421 | 420 | 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."; | |
| 423 | 422 | abortEvaluation(); |
| 424 | 423 | } else { |
| 425 | − qCWarning(scriptengine) << "Script Engine has been running too long, throwing:" << getFilename(); | |
| 424 | + qCWarning(scriptengine) << "Script Engine has been running too long, throwing."; | |
| 426 | 425 | auto context = currentContext(); |
| 427 | 426 | if (context) { |
| 428 | 427 | context->throwError("Timed out during shutdown"); |
| @@ -498,7 +497,6 @@ void ScriptEngine::loadURL(const QUrl& scriptURL, bool reload) { · 69 unmodified lines | ||
| 498 | 497 | { |
| 499 | 498 | static const QString DEBUG_FLAG("#debug"); |
| 500 | 499 | if (QRegularExpression(DEBUG_FLAG).match(scriptContents).hasMatch()) { |
| 501 | − qCWarning(scriptengine) << "NOTE: ScriptEngine for " << QUrl(url).fileName() << " will be launched in debug mode"; | |
| 502 | 500 | _debuggable = true; |
| 503 | 501 | } |
| 504 | 502 | } |
| @@ -1632,7 +1630,6 @@ QVariantMap ScriptEngine::fetchModuleSource(const QString& modulePath, const boo · 1127 unmodified lines | ||
| 1632 | 1630 | auto url = modulePath; |
| 1633 | 1631 | auto status = _status[url]; |
| 1634 | 1632 | auto contents = data[url]; |
| 1635 | − qCDebug(scriptengine_module) << "require.fetchModuleSource.onload: " << QUrl(url).fileName() << status << QThread::currentThread(); | |
| 1636 | 1633 | if (isStopping()) { |
| 1637 | 1634 | req["status"] = "Stopped"; |
| 1638 | 1635 | req["success"] = false; |
| @@ -1752,8 +1749,8 @@ QScriptValue ScriptEngine::require(const QString& moduleId) { · 113 unmodified lines | ||
| 1752 | 1749 | auto exports = module.property("exports"); |
| 1753 | 1750 | if (!invalidateCache && exports.isObject()) { |
| 1754 | 1751 | // 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()); | |
| 1757 | 1754 | registerModuleWithParent(module, parent); |
| 1758 | 1755 | maybeEmitUncaughtException("cached module"); |
| 1759 | 1756 | return exports; |
| @@ -2138,7 +2135,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& · 378 unmodified lines | ||
| 2138 | 2135 | PROFILE_RANGE(script, __FUNCTION__); |
| 2139 | 2136 | |
| 2140 | 2137 | if (isStopping() || DependencyManager::get<ScriptEngines>()->isStopped()) { |
| 2141 | − qCDebug(scriptengine) << "loadEntityScript.start " << entityScript << entityID.toString() | |
| 2138 | + qCDebug(scriptengine) << "loadEntityScript.start " << entityID.toString() | |
| 2142 | 2139 | << " but isStopping==" << isStopping() |
| 2143 | 2140 | << " || engines->isStopped==" << DependencyManager::get<ScriptEngines>()->isStopped(); |
| 2144 | 2141 | return; |
| @@ -2163,8 +2160,8 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& · 18 unmodified lines | ||
| 2163 | 2160 | // since not reloading, assume that the exact same input would produce the exact same output again |
| 2164 | 2161 | // note: this state gets reset with "reload all scripts," leaving/returning to a Domain, clear cache, etc. |
| 2165 | 2162 | #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()); | |
| 2168 | 2165 | #endif |
| 2169 | 2166 | updateEntityScriptStatus(entityID, EntityScriptStatus::ERROR_LOADING_SCRIPT, |
| 2170 | 2167 | "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 | ||
| 2173 | 2170 | } else { |
| 2174 | 2171 | // another entity is busy loading from this script URL so wait for them to finish |
| 2175 | 2172 | #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()); | |
| 2178 | 2175 | #endif |
| 2179 | 2176 | _deferredEntityLoads.push_back({ entityID, entityScript }); |
| 2180 | 2177 | return; |
| @@ -2188,7 +2185,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& · 7 unmodified lines | ||
| 2188 | 2185 | { |
| 2189 | 2186 | EntityScriptDetails details; |
| 2190 | 2187 | bool hasEntityScript = getEntityScriptDetails(entityID, details); |
| 2191 | − qCDebug(scriptengine) << "loadEntityScript.LOADING: " << entityScript << entityID.toString() | |
| 2188 | + qCDebug(scriptengine) << "loadEntityScript.LOADING: " << entityID.toString() | |
| 2192 | 2189 | << "(previous: " << (hasEntityScript ? details.status : EntityScriptStatus::PENDING) << ")"; |
| 2193 | 2190 | } |
| 2194 | 2191 | #endif |
| @@ -2217,7 +2214,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString& · 22 unmodified lines | ||
| 2217 | 2214 | } |
| 2218 | 2215 | executeOnScriptThread([=]{ |
| 2219 | 2216 | #ifdef DEBUG_ENTITY_STATES |
| 2220 | − qCDebug(scriptengine) << "loadEntityScript.contentAvailable" << status << QUrl(url).fileName() << entityID.toString(); | |
| 2217 | + qCDebug(scriptengine) << "loadEntityScript.contentAvailable" << status << entityID.toString(); | |
| 2221 | 2218 | #endif |
| 2222 | 2219 | if (!isStopping() && hasEntityScriptDetails(entityID)) { |
| 2223 | 2220 | _contentAvailableQueue[entityID] = { entityID, url, contents, isURL, success, status }; |
| @@ -2306,7 +2303,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 82 unmodified lines | ||
| 2306 | 2303 | setEntityScriptDetails(entityID, newDetails); |
| 2307 | 2304 | |
| 2308 | 2305 | #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"; | |
| 2310 | 2307 | #endif |
| 2311 | 2308 | // flag the original entityScript as unusuable |
| 2312 | 2309 | _occupiedScriptURLs[entityScript] = BAD_SCRIPT_UUID_PLACEHOLDER; |
| @@ -2352,7 +2349,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co · 39 unmodified lines | ||
| 2352 | 2349 | timeout.setSingleShot(true); |
| 2353 | 2350 | timeout.start(SANDBOX_TIMEOUT); |
| 2354 | 2351 | connect(&timeout, &QTimer::timeout, [=, &sandbox]{ |
| 2355 | − qCDebug(scriptengine) << "ScriptEngine::entityScriptContentAvailable timeout(" << scriptOrURL << ")"; | |
| 2352 | + qCDebug(scriptengine) << "ScriptEngine::entityScriptContentAvailable timeout"; | |
| 2356 | 2353 | |
| 2357 | 2354 | // Guard against infinite loops and non-performant code |
| 2358 | 2355 | sandbox.raiseException( |