Closed Bug 1767829 Opened 2 years ago Closed 2 years ago

Update the module loader load API in preparation for loading ES6 modules in mozJSComponentLoader

Categories

(Core :: JavaScript Engine, task)

task

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(5 files)

No description provided.

Give the caching interfaces default empty implementations so derived classes
don't need to implement them if they don't want any speical behaviour. We don't
use these methods for caching in mozJSComponentLoader.

Classes with virtual methods should have a virtual destructor so deleting an
object through a base class pointer works correctly. I think I got lint
warnings about this when I added a new derived loader.

Depends on D145488

Module loaders require an event target to use with mozPromise. The default uses
the event loop so doesn't permit implementing a synchronous module loader.

Depends on D145489

This allows derived loaders not to support dynamic import if they don't want to.

Module loading for in mozJSComponentLoader will not initially support this.

Depends on D145490

The main version of EvaluateModule will continue to use AutoEntryScript, but we
don't always want it's error reporting behaviour.

Depends on D145491

Attachment #9275049 - Attachment description: Bug 1767829 - Part 4: Throw and error if CreateDynamicImport returns null r?yulia → Bug 1767829 - Part 4: Throw an error if CreateDynamicImport returns null r?yulia
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b3a61b8f69f1
Part 1: Give ScriptLoaderInterface caching methods default implementations which do nothing r=yulia
https://hg.mozilla.org/integration/autoland/rev/bb4df70de2f3
Part 2: Give ScriptLoaderInterface a virtual destructor r=yulia
https://hg.mozilla.org/integration/autoland/rev/a0d9dae70a33
Part 3: Add the option for derived module loaders to specifiy their own event target r=yulia
https://hg.mozilla.org/integration/autoland/rev/c0f8b8d263c9
Part 4: Throw an error if CreateDynamicImport returns null r=yulia
https://hg.mozilla.org/integration/autoland/rev/d741a6c430de
Part 5: Add EvaluateModuleInContext method to allow callers to set up and supply their own JSContext r=yulia
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: