Bug 1830292 - base64url parser in SRI r=tschuster,ckerschb

Tests have shown that web pages use base64url encoded integrity
metadata when using SRI, as other browsers are already supporting it.
To align cross-browser behavior, we'll support base64url and base64
in parallel and update the tests from wpt at the same time.

Differential Revision: https://phabricator.services.mozilla.com/D178147
This commit is contained in:
Frederik Braun
2023-05-23 14:26:47 +00:00
parent 5ebd531cc4
commit daa81426e9
4 changed files with 59 additions and 23 deletions

View File

@@ -3061,7 +3061,7 @@ nsresult ScriptLoader::SaveSRIHash(ScriptLoadRequest* aRequest,
}
// Verify that the exported and predicted length correspond.
mozilla::DebugOnly<uint32_t> srilen;
DebugOnly<uint32_t> srilen{};
MOZ_ASSERT(NS_SUCCEEDED(SRICheckDataVerifier::DataSummaryLength(
len, aRequest->mScriptBytecode.begin(), &srilen)));
MOZ_ASSERT(srilen == len);