commit 26d940e00c623d173a6de434d258de1f30c1eb5f parent 1bdbf595f945972f6271baed14beea6d27bae62f Author: Tooru Fujisawa <arai_a@mac.com> Date: Wed, 29 Oct 2025 09:37:24 +0000 Bug 1994617 - Part 6: Check the expired request early. r=nbp Differential Revision: https://phabricator.services.mozilla.com/D270106 Diffstat:
| M | dom/script/ScriptLoader.cpp | | | 10 | ++++++++++ |
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp @@ -2721,6 +2721,16 @@ void ScriptLoader::CalculateCacheFlag(ScriptLoadRequest* aRequest) { return; } + if (!aRequest->IsCachedStencil() && aRequest->ExpirationTime().IsExpired()) { + LOG(("ScriptLoadRequest (%p): Bytecode-cache: Skip all: Expired", + aRequest)); + // NOTE: The expiration for in-memory-cached case should be handled by + // SharedScriptCache. + aRequest->MarkSkippedAllCaching(); + aRequest->getLoadedScript()->DropDiskCacheReferenceAndSRI(); + return; + } + if (aRequest->IsBytecode()) { LOG(("ScriptLoadRequest (%p): Bytecode-cache: Skip all: IsBytecode", aRequest));