-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fetch client settings object isn't used in fetch the descendants of and link a module script
#9499
Comments
Thanks for filing this. I think this is a result of #8253. Prior to that CL, it looks like that https://whatpr.org/html/8253/085d4d1...75e7bf0/webappapis.html#fetch-the-descendants-of-and-link-a-module-script made use of this by for-looping over all of the modules of a script, and then making module requests for them which required the So now I think we can just remove this vestigial argument. |
Closes #9499; see the rationale there for why this extra parameter existed in the first place.
The algorithm still has the 'a fetch client settings object' argument,
perhaps you missed that? |
That's embarrassing! Yep, I uploaded #9510 to finish this off. |
I've checked the spec again, I am not sure if removing the 'fetch client settings object' is correct, it looks to me now fetching the top-level module script and fetching the sub-modules are using different settings objects? please correct me if I am wrong. So now when doing a worker module script fetching, we've fetched the top-level module worker script, (with the fetch client settings object from the document). now HostLoadImportedModule(referrer, moduleRequest, loadState, payload) is called, https://html.spec.whatwg.org/multipage/webappapis.html#hostloadimportedmodule in this case, referrer should be the top-level module worker script(?)
will overwrite the settingsObject with referencingScript's settings object. and the referencingScript is a JS module script, should be created from
and the creating of a JS module script is called from
So the sub-modules are fetched by Trace back to the original caller, the
|
Yes I think the intention is to fetch a worker's descendant module scripts with the "inner settings object", i.e., On one hand, the overwriting of the "current settings object" in HostLoadImportedModule() was already present before that PR: https://whatpr.org/html/8253/085d4d1...75e7bf0/webappapis.html#hostloadimportedmodule:~:text=Set%20settings%20object%20%20settingsObject%20%20to%20referencing%20script%20%20referencingScript%20%20%27s%20settings%20object%20. On the other hand, the descendant-fetching algorithm did pass in fetch client settings object to the now-gone "internal module script graph fetching procedure", which may have indeed used that to fetch "inner" module scripts. I'm not sure since clawing through the diff is incredibly hard at this point since so much has changed. Perhaps we can ask @nicolo-ribaudo if he thinks the current spec looks right, but I slightly suspect all is well. |
oh, but the 'inner settings object' is got from
and worker global scope's policy container will be updated after receiving the top-level module worker script,
so does that mean fetching the top-level module worker script is using document's settings, whereas fetching sub-modules is using worker global scope's settings ? |
Yes I think that's the goal |
It looks like there's been a regression there indeed. Let's continue the conversation in a non-closed issue: #9513 |
https://html.spec.whatwg.org/multipage/webappapis.html#fetch-the-descendants-of-and-link-a-module-script
But the algorithm doesn't use this
fetch client settings object
at all.The
fetch client settings object
stores various data structureshttps://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object
The text was updated successfully, but these errors were encountered: