Bug 1800641 - Part 6: Add ScriptLoadRequest::{,Set}ReceivedScriptTextLength. r=nbp

Depends on D197843

Differential Revision: https://phabricator.services.mozilla.com/D197844
This commit is contained in:
Tooru Fujisawa
2024-01-08 14:57:38 +00:00
parent bcb3790794
commit e45786c019
4 changed files with 10 additions and 4 deletions

View File

@@ -2474,7 +2474,7 @@ bool ScriptLoader::ShouldCacheBytecode(ScriptLoadRequest* aRequest) {
size_t sourceLength;
size_t minLength;
MOZ_ASSERT(aRequest->IsTextSource());
sourceLength = aRequest->mScriptTextLength;
sourceLength = aRequest->ReceivedScriptTextLength();
minLength = sourceLengthMin;
if (sourceLength < minLength) {
LOG(("ScriptLoadRequest (%p): Bytecode-cache: Script is too small.",