Closed Bug 1784481 Opened 3 years ago Closed 2 years ago

Implement ScriptLoaderInterface for Workers

Categories

(Core :: DOM: Workers, task)

task

Tracking

()

RESOLVED FIXED
107 Branch
Tracking Status
firefox107 --- fixed

People

(Reporter: yulia, Assigned: yulia)

References

Details

Attachments

(3 files)

The WorkerScriptLoader now roughly adheres to the same structure as the DOM Script Loader. There are still significant differences: It is still recreated for every importScripts call, meaning that a single worker will have multiple, nested, workerScriptLoaders.

However, we can start sharing code. This change will have WorkerScriptLoader implement the ScriptLoaderInterface, allowing us to plug in the ModuleLoader code.

This introduces the basic skeleton to make WorkerScriptLoader a ScriptLoaderInterface.
ScriptLoaderInterface defines the methods that are shared between any given ScriptLoader (for
example the DOM script loader, the ComponentScriptLoader) and the ModuleLoader for a particular
component.

This patch also adds documentation to make the role and responsibilities of the
ScriptLoaderInterface clear.

Fill out the ReportErrorToConsole method, and add documentation for ReportWarningToConsole

Pushed by ystartsev@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ae19d0d9ad84 Implement ScriptLoaderInterface Skeleton in WorkerScriptLoader; r=jonco https://hg.mozilla.org/integration/autoland/rev/9d91e7bba726 Use ScriptLoaderInterface methods for reporting errors; r=jonco https://hg.mozilla.org/integration/autoland/rev/8d35cee853a5 Use ScriptLoaderInterface method for filling compile options; r=jonco
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: