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/ScriptCache.cpp (1 of 36 files). Show all
Unified · Split
| @@ -37,9 +37,6 @@ ScriptCache::ScriptCache(QObject* parent) { · 36 unmodified lines | ||
| 37 | 37 | |
| 38 | 38 | void ScriptCache::clearCache() { |
| 39 | 39 | Lock lock(_containerLock); |
| 40 | − foreach(auto& url, _scriptCache.keys()) { | |
| 41 | − qCDebug(scriptengine) << "clearing cache: " << url; | |
| 42 | − } | |
| 43 | 40 | _scriptCache.clear(); |
| 44 | 41 | } |
| 45 | 42 | |
| @@ -48,7 +45,6 @@ void ScriptCache::clearATPScriptsFromCache() { · 2 unmodified lines | ||
| 48 | 45 | qCDebug(scriptengine) << "Clearing ATP scripts from ScriptCache"; |
| 49 | 46 | for (auto it = _scriptCache.begin(); it != _scriptCache.end();) { |
| 50 | 47 | if (it.key().scheme() == "atp") { |
| 51 | − qCDebug(scriptengine) << "Removing: " << it.key(); | |
| 52 | 48 | it = _scriptCache.erase(it); |
| 53 | 49 | } else { |
| 54 | 50 | ++it; |
| @@ -60,7 +56,6 @@ void ScriptCache::deleteScript(const QUrl& unnormalizedURL) { · 5 unmodified lines | ||
| 60 | 56 | QUrl url = DependencyManager::get<ResourceManager>()->normalizeURL(unnormalizedURL); |
| 61 | 57 | Lock lock(_containerLock); |
| 62 | 58 | if (_scriptCache.contains(url)) { |
| 63 | − qCDebug(scriptengine) << "Delete script from cache:" << url.toString(); | |
| 64 | 59 | _scriptCache.remove(url); |
| 65 | 60 | } |
| 66 | 61 | } |
| @@ -146,7 +141,6 @@ void ScriptCache::scriptContentAvailable(int maxRetries) { · 79 unmodified lines | ||
| 146 | 141 | _activeScriptRequests.remove(url); |
| 147 | 142 | |
| 148 | 143 | _scriptCache[url] = scriptContent = req->getData(); |
| 149 | − qCDebug(scriptengine) << "Done downloading script at:" << url.toString(); | |
| 150 | 144 | } else { |
| 151 | 145 | auto result = req->getResult(); |
| 152 | 146 | bool irrecoverable = |
| @@ -160,12 +154,12 @@ void ScriptCache::scriptContentAvailable(int maxRetries) { · 7 unmodified lines | ||
| 160 | 154 | |
| 161 | 155 | int timeout = exp(scriptRequest.numRetries) * ScriptRequest::START_DELAY_BETWEEN_RETRIES; |
| 162 | 156 | int attempt = scriptRequest.numRetries; |
| 163 | − qCDebug(scriptengine) << QString("Script request failed [%1]: %2 (will retry %3 more times; attempt #%4 in %5ms...)") | |
| 164 | − .arg(status).arg(url.toString()).arg(maxRetries - attempt + 1).arg(attempt).arg(timeout); | |
| 157 | + qCDebug(scriptengine) << QString("Script request failed [%1]: (will retry %2 more times; attempt #%3 in %4ms...)") | |
| 158 | + .arg(status).arg(maxRetries - attempt + 1).arg(attempt).arg(timeout); | |
| 165 | 159 | |
| 166 | 160 | QTimer::singleShot(timeout, this, [this, url, attempt, maxRetries]() { |
| 167 | − qCDebug(scriptengine) << QString("Retrying script request [%1 / %2]: %3") | |
| 168 | − .arg(attempt).arg(maxRetries).arg(url.toString()); | |
| 161 | + qCDebug(scriptengine) << QString("Retrying script request [%1 / %2]") | |
| 162 | + .arg(attempt).arg(maxRetries); | |
| 169 | 163 | |
| 170 | 164 | auto request = DependencyManager::get<ResourceManager>()->createResourceRequest( |
| 171 | 165 | nullptr, url, true, -1, "ScriptCache::scriptContentAvailable"); |
| @@ -186,12 +180,10 @@ void ScriptCache::scriptContentAvailable(int maxRetries) { · 14 unmodified lines | ||
| 186 | 180 | scriptContent = _scriptCache[url]; |
| 187 | 181 | } |
| 188 | 182 | _activeScriptRequests.remove(url); |
| 189 | − qCWarning(scriptengine) << "Error loading script from URL " << url << "(" << status <<")"; | |
| 183 | + qCWarning(scriptengine) << "Error loading script from URL (" << status <<")"; | |
| 190 | 184 | |
| 191 | 185 | } |
| 192 | 186 | } |
| 193 | − } else { | |
| 194 | − qCWarning(scriptengine) << "Warning: scriptContentAvailable for inactive url: " << url; | |
| 195 | 187 | } |
| 196 | 188 | } |
| 197 | 189 | |