tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit cf0ac52917eb90c4e1f3b725b5df54a05167edb5
parent fc9619ea3cae7ab9b2dbfea74748283905ab73b6
Author: Tooru Fujisawa <arai_a@mac.com>
Date:   Wed, 29 Oct 2025 14:30:55 +0000

Bug 1995983 - Put bytecode response to in-memory cache. r=nbp

Differential Revision: https://phabricator.services.mozilla.com/D270107

Diffstat:
Mdom/script/ScriptLoader.cpp | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp @@ -2731,14 +2731,6 @@ void ScriptLoader::CalculateCacheFlag(ScriptLoadRequest* aRequest) { return; } - if (aRequest->IsBytecode()) { - LOG(("ScriptLoadRequest (%p): Bytecode-cache: Skip all: IsBytecode", - aRequest)); - aRequest->MarkSkippedAllCaching(); - MOZ_ASSERT(!aRequest->getLoadedScript()->HasDiskCacheReference()); - return; - } - if (mCache) { LOG(("ScriptLoadRequest (%p): Bytecode-cache: Mark in-memory: Stencil", aRequest)); @@ -2749,6 +2741,14 @@ void ScriptLoader::CalculateCacheFlag(ScriptLoadRequest* aRequest) { // The following conditions apply only to the disk cache. + if (aRequest->IsBytecode()) { + LOG(("ScriptLoadRequest (%p): Bytecode-cache: Skip disk: IsBytecode", + aRequest)); + aRequest->MarkSkippedDiskCaching(); + MOZ_ASSERT(!aRequest->getLoadedScript()->HasDiskCacheReference()); + return; + } + // We need the nsICacheInfoChannel to exist to be able to open the alternate // data output stream. if (!aRequest->getLoadedScript()->HasDiskCacheReference()) {