Bug 1800641 - Part 2: Add ScriptLoadRequest::Bytecode and let JSExecutionContext::Decode receive JS::TranscodeRange. r=nbp
Depends on D197839 Differential Revision: https://phabricator.services.mozilla.com/D197840
This commit is contained in:
@@ -243,6 +243,14 @@ class ScriptLoadRequest
|
||||
|
||||
void SetBytecode();
|
||||
|
||||
JS::TranscodeRange Bytecode() const {
|
||||
MOZ_ASSERT(IsBytecode());
|
||||
const auto& bytecode = mScriptBytecode;
|
||||
auto offset = mBytecodeOffset;
|
||||
return JS::TranscodeRange(bytecode.begin() + offset,
|
||||
bytecode.length() - offset);
|
||||
}
|
||||
|
||||
mozilla::CORSMode CORSMode() const { return mFetchOptions->mCORSMode; }
|
||||
|
||||
void DropBytecodeCacheReferences();
|
||||
|
||||
Reference in New Issue
Block a user