Bug 1800641 - Part 4: Add ScriptLoadRequest::{Get,Set}SRILength. r=nbp

Depends on D197841

Differential Revision: https://phabricator.services.mozilla.com/D197842
This commit is contained in:
Tooru Fujisawa
2024-01-08 14:57:37 +00:00
parent 929368a3f4
commit 168d0ccdd7
3 changed files with 24 additions and 10 deletions

View File

@@ -259,6 +259,15 @@ class ScriptLoadRequest
bytecode.length() - offset);
}
size_t GetSRILength() const {
MOZ_ASSERT(IsBytecode() || IsSource());
return mBytecodeOffset;
}
void SetSRILength(size_t sriLength) {
MOZ_ASSERT(IsBytecode() || IsSource());
mBytecodeOffset = JS::AlignTranscodingBytecodeOffset(sriLength);
}
mozilla::CORSMode CORSMode() const { return mFetchOptions->mCORSMode; }
void DropBytecodeCacheReferences();