refactor: Remove bytecode loading strategy, b=no-bug, c=no-component

This commit is contained in:
mr. m
2025-06-09 11:31:29 +02:00
parent 2d5fed3cd9
commit 6e2ce89d21
2 changed files with 0 additions and 45 deletions

View File

@@ -16,7 +16,3 @@ pref("browser.lowMemoryResponseMask", 3);
#endif
pref("network.predictor.enable-hover-on-ssl", true);
// Experimental Zen Features
// Strategy to use for bytecode cache (Thanks https://github.com/gunir)
pref('dom.script_loader.bytecode_cache.strategy', 2);

View File

@@ -1,41 +0,0 @@
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
index 51f63f998e47aa4b1dffc3cacdb0a698b33b4623..0387738ce1f29b5db4a5d03a3b2f5f3a91011125 100644
--- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp
@@ -2679,6 +2679,36 @@ void ScriptLoader::CalculateBytecodeCacheFlag(ScriptLoadRequest* aRequest) {
hasFetchCountMin = false;
break;
}
+ case 1: {
+ // 1!
+ hasSourceLengthMin = true;
+ hasFetchCountMin = true;
+ sourceLengthMin = 1024;
+ // If we were to optimize only for speed, without considering the impact
+ // on memory, we should set this threshold to 2. (Bug 900784 comment 120)
+ fetchCountMin = 1;
+ break;
+ }
+ case 2: {
+ // 2!
+ hasSourceLengthMin = true;
+ hasFetchCountMin = true;
+ sourceLengthMin = 1024;
+ // If we were to optimize only for speed, without considering the impact
+ // on memory, we should set this threshold to 2. (Bug 900784 comment 120)
+ fetchCountMin = 2;
+ break;
+ }
+ case 3: {
+ // 3!
+ hasSourceLengthMin = true;
+ hasFetchCountMin = true;
+ sourceLengthMin = 1024;
+ // If we were to optimize only for speed, without considering the impact
+ // on memory, we should set this threshold to 2. (Bug 900784 comment 120)
+ fetchCountMin = 3;
+ break;
+ }
default:
case 0: {
hasSourceLengthMin = true;