Refactor the module loader to make it more generic
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox100 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(10 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
The aim of this bug is to make the module loader code more generic in preparation for using it in mozJSComponentLoader. We should try and move the DOM-specific code out and pull in any remaining generic module code.
Assignee | ||
Comment 1•2 years ago
|
||
This restricts access to mDynamicImportRequests and adds the appropriate accessors.
Assignee | ||
Comment 2•2 years ago
|
||
This splits the interface of ModuleLoaderBase into sections and restricts acess
for internal methods.
Depends on D141248
Assignee | ||
Comment 3•2 years ago
|
||
This can work it out if it needs it by calling GetGlobalForRequest.
Depends on D141249
Assignee | ||
Comment 4•2 years ago
|
||
I'm not sure why this was there because this can't run script.
Depends on D141250
Assignee | ||
Comment 5•2 years ago
|
||
I don't know why these are there; there's nothing in the spec to say these
operations perform a microtask checkpoint (unlike executing a module).
Depends on D141251
Assignee | ||
Comment 6•2 years ago
|
||
This layer doesn't add much above calling into the JS engine and it's DOM
specific so let's remove it.
Depends on D141252
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a8e0362d4e6d Part 1: Make list of dynamic import requests private r=yulia https://hg.mozilla.org/integration/autoland/rev/a3c688ed0dbf Part 2: Restrict access to internal methods of module loader where possible r=yulia https://hg.mozilla.org/integration/autoland/rev/fcbec93f7598 Part 3: Don't pass a global to FillCompileOptionsForRequest r=yulia https://hg.mozilla.org/integration/autoland/rev/e9a2cd65cf4a Part 4: Remove use of AutoEntryScript when parsing module source r=smaug https://hg.mozilla.org/integration/autoland/rev/4036fd69dfb6 Part 5: Remove microtask checkpoints from the module loader in couple of places r=smaug https://hg.mozilla.org/integration/autoland/rev/27af2350c258 Part 6: Remove use of nsJSUtils layer for module instantiation and evaluation r=smaug
Comment 8•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a8e0362d4e6d
https://hg.mozilla.org/mozilla-central/rev/a3c688ed0dbf
https://hg.mozilla.org/mozilla-central/rev/fcbec93f7598
https://hg.mozilla.org/mozilla-central/rev/e9a2cd65cf4a
https://hg.mozilla.org/mozilla-central/rev/4036fd69dfb6
https://hg.mozilla.org/mozilla-central/rev/27af2350c258
Assignee | ||
Comment 9•2 years ago
|
||
This adds a virtual method to nsIGlobalObject and implements it for
nsGlobalWindowInner and SandboxPrivate. This means we don't have to put the
logic for dealing with all the different kinds of globals in once place.
Assignee | ||
Comment 10•2 years ago
|
||
This adds a new virtual to the module loader base, along the same lines as the
one to create a load request for a static import. This makes the
HostImportModuleDynamically hook generic.
Depends on D141733
Assignee | ||
Comment 11•2 years ago
|
||
Now we can move the JS engine integration hooks into the generic module loader.
There is still some code there to deal with web extension globals. This will be
removed in a later patch.
Depends on D141734
Assignee | ||
Comment 12•2 years ago
|
||
StartModuleLoadImpl moves to the base class and uses to new virtual methods
CanStartLoad and StartFetch which are implemented by the derived class.
Depends on D141735
Comment 13•2 years ago
|
||
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7a711fde3cc8 Part 7: Add a virtual method to get the module loader to use for the current global r=yulia,smaug https://hg.mozilla.org/integration/autoland/rev/9f2bd46d25f0 Part 8: Add a virtual method to create a module load request for a dynamic import r=yulia https://hg.mozilla.org/integration/autoland/rev/59c0f85d61e1 Part 9: Move module loading hooks into the generic module loader r=yulia
Assignee | ||
Updated•2 years ago
|
Comment 14•2 years ago
|
||
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e91490b311a1 Part 10: Move the generic parts of the StartLoad method to the module loader base r=yulia
Comment 15•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7a711fde3cc8
https://hg.mozilla.org/mozilla-central/rev/9f2bd46d25f0
https://hg.mozilla.org/mozilla-central/rev/59c0f85d61e1
Comment 16•2 years ago
|
||
bugherder |
Description
•