commit 8c38c4c093d52db00d421c9889c66f8961502289
parent d6475781cdd53c622074bdfe0140ac677d4b1df8
Author: Tooru Fujisawa <arai_a@mac.com>
Date: Tue, 30 Sep 2025 11:36:55 +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:
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
@@ -3709,11 +3709,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));
@@ -3754,7 +3749,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)) {
@@ -3785,9 +3780,6 @@ void ScriptLoader::EncodeBytecodeAndSave(
}
MOZ_RELEASE_ASSERT(compressedBytecode.length() == n);
-
- bytecodeFailed.release();
- TRACE_FOR_TEST_NONE(aRequest, "scriptloader_bytecode_saved");
}
void ScriptLoader::GiveUpCaching() {