commit 3fc5977ee97dec5a98fd36c2d3b976498d8778b1
parent 14761bfc837dc973621780a099534f51116d2c44
Author: Tooru Fujisawa <arai_a@mac.com>
Date: Thu, 16 Oct 2025 09:03:23 +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
@@ -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() {