mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-06 19:38:24 +00:00
42 lines
1.4 KiB
C++
42 lines
1.4 KiB
C++
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;
|