Bug 1798319 - Implement modulepreload in early hints r=manuel,smaug,necko-reviewers,kershaw
The aEarlyHintPreloaderId parameter for StartLoad/StartLoadInternal is changed to be a member variable of ScriptLoadRequest instead so that an initiator type of early hints can be set for module requests. Before, ModuleLoader would always pass in a zero value for the id since ModuleLoaderBase has no concept of early hints when it calls StartFetch. As a prerequisite for early hints support, this commit also implements modulepreload in link headers (Bug 1773056). Differential Revision: https://phabricator.services.mozilla.com/D180020
This commit is contained in:
@@ -88,7 +88,8 @@ ScriptLoadRequest::ScriptLoadRequest(ScriptKind aKind, nsIURI* aURI,
|
||||
mScriptBytecode(),
|
||||
mBytecodeOffset(0),
|
||||
mURI(aURI),
|
||||
mLoadContext(aContext) {
|
||||
mLoadContext(aContext),
|
||||
mEarlyHintPreloaderId(0) {
|
||||
MOZ_ASSERT(mFetchOptions);
|
||||
if (mLoadContext) {
|
||||
mLoadContext->SetRequest(this);
|
||||
|
||||
Reference in New Issue
Block a user