The error message for a missing JavaScript module (ModuleSourceLoadFailed) should indicate the parent module that requested the missing module
Categories
(Core :: JavaScript Engine, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox138 | --- | fixed |
People
(Reporter: cob.bzmoz, Assigned: cob.bzmoz)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0
Steps to reproduce:
Load a page that contains some module script A, which attempts to import a non-existent module script B.
Actual results:
Firefox displayed an error message for the failure to load B, but this error message gave incorrect information on what file attempted to load B (it displayed the filename of the current document).
Expected results:
Firefox should have displayed the name of A, as Chrome does, to help me figure out which JavaScript file contained an incorrect import
.
This testcase consists of an HTML file, testcase.html
, which loads a top-level module, parent-module.js
; that module in turn attempts to load the (intentionally absent) nonexistent.js
module.
When run in Firefox, the error location (righthand side) will be listed as testcase.html
. When run in Chrome (on a local server), you should see a net::ERR_ABORTED 404
error with the source location given as parent-module.js
.
When a child module fails to load, the parent module that requested it is now used as the source location for the error message.
Updated•28 days ago
|
Updated•27 days ago
|
Updated•27 days ago
|
Comment 4•26 days ago
|
||
bugherder |
Description
•