Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 2 files). Show all
Unified · Split
| @@ -4,7 +4,6 @@ · 3 unmodified lines | ||
| 4 | 4 | // |
| 5 | 5 | // Created by Brad Hefta-Gaub on 12/14/13. |
| 6 | 6 | // Copyright 2013 High Fidelity, Inc. |
| 7 | −// Copyright 2020 Vircadia contributors. | |
| 8 | 7 | // |
| 9 | 8 | // Distributed under the Apache License, Version 2.0. |
| 10 | 9 | // 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 | ||
| 1837 | 1836 | } |
| 1838 | 1837 | |
| 1839 | 1838 | // CommonJS/Node.js like require/module support |
| 1840 | −QScriptValue ScriptEngine::require(const QString& moduleId, bool forceRedownload) { | |
| 1839 | +QScriptValue ScriptEngine::require(const QString& moduleId) { | |
| 1841 | 1840 | qCDebug(scriptengine_module) << "ScriptEngine::require(" << moduleId.left(MAX_DEBUG_VALUE_LENGTH) << ")"; |
| 1842 | 1841 | if (!IS_THREADSAFE_INVOCATION(thread(), __FUNCTION__)) { |
| 1843 | 1842 | return unboundNullValue(); |
| @@ -1876,7 +1875,7 @@ QScriptValue ScriptEngine::require(const QString& moduleId, bool forceRedownload · 32 unmodified lines | ||
| 1876 | 1875 | // `delete Script.require.cache[Script.require.resolve(moduleId)];` |
| 1877 | 1876 | |
| 1878 | 1877 | // 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(); | |
| 1880 | 1879 | |
| 1881 | 1880 | // reset the cacheMeta record so invalidation won't apply next time, even if the module fails to load |
| 1882 | 1881 | cacheMeta.setProperty(modulePath, QScriptValue()); |