tor-browser

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

commit caf275708ea66789a24905cc587652efa4e947f3
parent 86631a6e10a29b4c8f5922ea4ecc3fdb5a0cad94
Author: Tooru Fujisawa <arai_a@mac.com>
Date:   Wed, 15 Oct 2025 09:41:51 +0000

Bug 1991081 - Part 6: Remove testing-only events from EncodeBytecodeAndSave. r=nbp

scriptloader_bytecode_saved and scriptloader_bytecode_failed are
testing-only events.  The tests use them are disabled right now,
and they should be rewritten with the updated cache mechanism.

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

Diffstat:
Mdom/script/ScriptLoader.cpp | 10+---------
1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp @@ -3716,11 +3716,6 @@ void ScriptLoader::EncodeBytecodeAndSave( const JS::TranscodeBuffer& aSRI, JS::Stencil* aStencil) { MOZ_ASSERT(aCacheInfo); - using namespace mozilla::Telemetry; - nsresult rv = NS_OK; - auto bytecodeFailed = mozilla::MakeScopeExit( - [&]() { TRACE_FOR_TEST_NONE(aRequest, "scriptloader_bytecode_failed"); }); - size_t SRILength = aSRI.length(); MOZ_ASSERT(JS::IsTranscodingBytecodeOffsetAligned(SRILength)); @@ -3761,7 +3756,7 @@ void ScriptLoader::EncodeBytecodeAndSave( // might fail if the stream is already open by another request, in which // case, we just ignore the current one. nsCOMPtr<nsIAsyncOutputStream> output; - rv = aCacheInfo->OpenAlternativeOutputStream( + nsresult rv = aCacheInfo->OpenAlternativeOutputStream( aMimeType, static_cast<int64_t>(compressedBytecode.length()), getter_AddRefs(output)); if (NS_FAILED(rv)) { @@ -3792,9 +3787,6 @@ void ScriptLoader::EncodeBytecodeAndSave( } MOZ_RELEASE_ASSERT(compressedBytecode.length() == n); - - bytecodeFailed.release(); - TRACE_FOR_TEST_NONE(aRequest, "scriptloader_bytecode_saved"); } void ScriptLoader::GiveUpCaching() {