tor-browser

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

commit 3853c05fdf38876bc2259749552abd45a0de0c9a
parent 459880d45518445afafc1f719348b8adc175a988
Author: Tooru Fujisawa <arai_a@mac.com>
Date:   Fri, 31 Oct 2025 05:22:07 +0000

Bug 1980154 - Part 1: Make EncodeBytecodeAndSave a static function. r=nbp

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

Diffstat:
Mdom/script/ScriptLoader.cpp | 1+
Mdom/script/ScriptLoader.h | 6++++--
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp @@ -3629,6 +3629,7 @@ void ScriptLoader::UpdateDiskCache() { JS::DestroyFrontendContext(fc); } +/* static */ void ScriptLoader::EncodeBytecodeAndSave( JS::FrontendContext* aFc, JS::loader::LoadedScript* aLoadedScript) { MOZ_ASSERT(aLoadedScript->HasDiskCacheReference()); diff --git a/dom/script/ScriptLoader.h b/dom/script/ScriptLoader.h @@ -755,12 +755,14 @@ class ScriptLoader final : public JS::loader::ScriptLoaderInterface { */ void UpdateDiskCache(); + public: /** * Encode the stencils and save the bytecode to the necko cache. */ - void EncodeBytecodeAndSave(JS::FrontendContext* aFc, - JS::loader::LoadedScript* aLoadedScript); + static void EncodeBytecodeAndSave(JS::FrontendContext* aFc, + JS::loader::LoadedScript* aLoadedScript); + private: /** * Discard all disk-cache-related info for scripts queued for the disk cache. *