-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Editorial: refactor callers of internal module script graph fetching procedure #4713
Conversation
@domenic WDYT? This was a preparation for import maps spec. (I also created a call graph chart but I'm not sure whether this image should be also added) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems pretty nice. A couple small things:
- Can you rewrap changed paragraphs using https://output.jsbin.com/maferi ?
- Let's make the names more obvious. I suggest:
- Fetch an external module script graph
- Fetch an inline module script graph
- Fetch an import() module script graph
- Fetch a module worker script graph
Sounds good. Renamed. Also rewrapped lines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I pushed a few more changes, including the diagram, and it looks good to me now. @hiroshige-g can you check over my changes with your own review?
Thanks! Your commits look good to me. The diagram looks nice. How did you prepare the diagram? |
I wrote out the SVG by hand. I find it relaxing sometimes :) |
This PR simplifies the call graph around
internal module script graph fetching procedure
.This PR makes top-level entry points of module loading
Fetch a module script graph
Fetch an inline module script graph
(introduced by this PR)Fetch a dynamic module script graph
(introduced by this PR)Fetch a module worker script graph
The fetch and process the linked resource algorithm for modulepreload links
call
fetch the descendants of and instantiate
,that calls
fetch the descendants of
,that calls
internal module script graph fetching procedure
,that calls
fetch the descendants of
recursively.Previously,
internal module script graph fetching procedure
can be top-level or non-top-level,and thus calls
fetch the descendants of and instantiate
orfetch the descendants of
accordingly,depending on the
top-level module fetch flag
.This PR makes
internal module script graph fetching procedure
non-top-level only, andmerges the top-level parts into the top-level entry points of module loading listed above.
This PR slightly changes the timing of
FinishDynamicImport
on error inresolve a module specifier
,but this doesn't affect observable behavior so much,
because promises are anyway resolved asynchronously.
/links.html ( diff )
/scripting.html ( diff )
/webappapis.html ( diff )