Files
desktop/src/dom/script/ScriptLoader-cpp.patch

42 lines
1.4 KiB
C++

diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
index e65533af04ea5f42c10477314c594c2c7bbc67b3..df4d63dafb838b67e64a91f26487106a77494516 100644
--- a/dom/script/ScriptLoader.cpp
+++ b/dom/script/ScriptLoader.cpp
@@ -2401,6 +2401,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;