History

Revert forceRedownload functionality.

Kalila L committed 6 years ago

Commit 8eb12a81 parent 8a007a42 files · +3 −6Browse files

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

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+2−3
@@ -4,7 +4,6 @@ · 3 unmodified lines
44 //
55 // Created by Brad Hefta-Gaub on 12/14/13.
66 // Copyright 2013 High Fidelity, Inc.
7−// Copyright 2020 Vircadia contributors.
87 //
98 // Distributed under the Apache License, Version 2.0.
109 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
@@ -1837,7 +1836,7 @@ QScriptValue ScriptEngine::instantiateModule(const QScriptValue& module, const Q · 1826 unmodified lines
18371836 }
18381837
18391838 // CommonJS/Node.js like require/module support
1840−QScriptValue ScriptEngine::require(const QString& moduleId, bool forceRedownload) {
1839+QScriptValue ScriptEngine::require(const QString& moduleId) {
18411840 qCDebug(scriptengine_module) << "ScriptEngine::require(" << moduleId.left(MAX_DEBUG_VALUE_LENGTH) << ")";
18421841 if (!IS_THREADSAFE_INVOCATION(thread(), __FUNCTION__)) {
18431842 return unboundNullValue();
@@ -1876,7 +1875,7 @@ QScriptValue ScriptEngine::require(const QString& moduleId, bool forceRedownload · 32 unmodified lines
18761875 // `delete Script.require.cache[Script.require.resolve(moduleId)];`
18771876
18781877 // cacheMeta is just used right now to tell deleted keys apart from undefined ones
1879− bool invalidateCache = forceRedownload || (module.isUndefined() && cacheMeta.property(moduleId).isValid());
1878+ bool invalidateCache = module.isUndefined() && cacheMeta.property(moduleId).isValid();
18801879
18811880 // reset the cacheMeta record so invalidation won't apply next time, even if the module fails to load
18821881 cacheMeta.setProperty(modulePath, QScriptValue());