mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-25 20:18:46 +02:00
Switch to READONLY_PROP_FLAGS for require.cache/require.resolve properties
This commit is contained in:
parent
5e5bba5aad
commit
d93047f9e2
1 changed files with 2 additions and 2 deletions
|
@ -580,7 +580,7 @@ void ScriptEngine::resetModuleCache(bool deleteScriptCache) {
|
||||||
#if DEBUG_JS_MODULES
|
#if DEBUG_JS_MODULES
|
||||||
cache.setProperty("__meta__", cacheMeta, READONLY_HIDDEN_PROP_FLAGS);
|
cache.setProperty("__meta__", cacheMeta, READONLY_HIDDEN_PROP_FLAGS);
|
||||||
#endif
|
#endif
|
||||||
jsRequire.setProperty("cache", cache, QScriptValue::ReadOnly | QScriptValue::Undeletable);
|
jsRequire.setProperty("cache", cache, READONLY_PROP_FLAGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEngine::init() {
|
void ScriptEngine::init() {
|
||||||
|
@ -651,7 +651,7 @@ void ScriptEngine::init() {
|
||||||
auto Script = globalObject().property("Script");
|
auto Script = globalObject().property("Script");
|
||||||
auto require = Script.property("require");
|
auto require = Script.property("require");
|
||||||
auto resolve = Script.property("_requireResolve");
|
auto resolve = Script.property("_requireResolve");
|
||||||
require.setProperty("resolve", resolve, QScriptValue::ReadOnly | QScriptValue::Undeletable);
|
require.setProperty("resolve", resolve, READONLY_PROP_FLAGS);
|
||||||
resetModuleCache();
|
resetModuleCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue