Closed Bug 1877703 Opened 1 year ago Closed 10 months ago

Dynamically inserted import map fails to remap bareword import

Categories

(Core :: JavaScript Engine, defect, P2)

defect

Tracking

()

RESOLVED FIXED
126 Branch
Tracking Status
firefox126 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(5 files, 5 obsolete 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

Since there have been a couple of bugs about this recently, I tried adding a test to check that dynamically inserted import maps were working correctly. This is a modified version of test_importMap_with_external_script.html that inserts the import map dynamically. The first test fails, indicating that a bareword import was not remapped as expected because of the import map.

The test fails with the following output:

 0:06.04 TEST_START: dom/base/test/jsmodules/importmaps/test_dynamic_importMap_with_external_script.html
 0:06.71 GECKO(125047) ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /tmp/tmphx0m4ngp.mozrunner/runtests_leaks_tab_pid125296.log
 0:07.28 FAIL uncaught exception - TypeError: The specifier “bare” was a bare specifier, but was not remapped to anything. Relative module specifiers must start with “./”, “../” or “/”. at
    simpletestOnerror@SimpleTest/SimpleTest.js:2044:18
    OnErrorEventHandlerNonNull*@SimpleTest/SimpleTest.js:2019:1
 0:07.28 GECKO(125047) JavaScript error: http://mochi.test:8888/tests/dom/base/test/jsmodules/importmaps/module_importMap_with_external_script_0.mjs, line 3: TypeError: The specifier “bare” was a bare specifier, but was not remapped to anything. Relative module specifiers must start with “./”, “../” or “/”.
 0:07.29 GECKO(125047) MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
 0:07.29 GECKO(125047) MEMORY STAT | vsize 2431MB | residentFast 140MB | heapAllocated 9MB
 0:07.35 PASS Test passed, loaded good/module_1.mjs
 0:07.35 PASS Test passed, loaded good/module_2.mjs
 0:07.35 PASS Test passed, loaded good/module_7.mjs
 0:07.37 TEST_END: Test OK. Subtests passed 3/4. Unexpected 1

Yoshi, do you think you could take a look?

Flags: needinfo?(allstars.chh)
Assignee: nobody → allstars.chh
Flags: needinfo?(allstars.chh)
Severity: -- → S3
Priority: -- → P2
Pushed by allstars.chh@gmail.com: https://hg.mozilla.org/integration/autoland/rev/67f13af428e3 Don't add the URI into mFetchedModules if it has a parse error and is preloaded. r=jonco

Backed out for causing crashes and assertion failures on ModuleLoaderBase.cpp

[task 2024-02-02T20:28:19.212Z] 20:28:19     INFO - TEST-START | /fetch/api/headers/headers-no-cors.any.worker.html
[task 2024-02-02T20:28:19.216Z] 20:28:19     INFO - Closing window b8e784bf-c0c9-4b0d-82b8-4583a1ca7914
[task 2024-02-02T20:28:19.692Z] 20:28:19     INFO - mozcrash Saved minidump as /builds/worker/workspace/build/blobber_upload_dir/5a07ba3b-000a-f3c1-8f44-e67a05682e41.dmp
[task 2024-02-02T20:28:19.693Z] 20:28:19     INFO - mozcrash Saved app info as /builds/worker/workspace/build/blobber_upload_dir/5a07ba3b-000a-f3c1-8f44-e67a05682e41.extra
[task 2024-02-02T20:28:19.830Z] 20:28:19     INFO - PROCESS-CRASH | MOZ_ASSERT(found) [@ JS::loader::ModuleLoaderBase::GetFetchedModule] | /html/semantics/scripting-1/the-script-element/module/compilation-error-2.html 
[task 2024-02-02T20:28:19.833Z] 20:28:19     INFO - Process type: content
[task 2024-02-02T20:28:19.835Z] 20:28:19     INFO - Process pid: 14262
[task 2024-02-02T20:28:19.836Z] 20:28:19     INFO - Mozilla crash reason: MOZ_ASSERT(found)
[task 2024-02-02T20:28:19.836Z] 20:28:19     INFO - Crash dump filename: /tmp/tmpfk097ei3/minidumps/5a07ba3b-000a-f3c1-8f44-e67a05682e41.dmp
[task 2024-02-02T20:28:19.836Z] 20:28:19     INFO - Operating system: Linux
[task 2024-02-02T20:28:19.836Z] 20:28:19     INFO -                   4.4.0-1014-aws #14taskcluster1-Ubuntu SMP Tue Apr 3 10:27:00 UTC 2018
[task 2024-02-02T20:28:19.836Z] 20:28:19     INFO - CPU: amd64
[task 2024-02-02T20:28:19.836Z] 20:28:19     INFO -      family 6 model 85 stepping 7
[task 2024-02-02T20:28:19.836Z] 20:28:19     INFO -      4 CPUs
[task 2024-02-02T20:28:19.837Z] 20:28:19     INFO - Linux Ubuntu 18.04 - bionic (Ubuntu 18.04.6 LTS)
[task 2024-02-02T20:28:19.837Z] 20:28:19     INFO - 
[task 2024-02-02T20:28:19.837Z] 20:28:19     INFO - Crash reason:  SIGSEGV / SEGV_MAPERR
[task 2024-02-02T20:28:19.837Z] 20:28:19     INFO - Crash address: 0x0000000000000000
[task 2024-02-02T20:28:19.837Z] 20:28:19     INFO - Crashing instruction: `mov dword [0x0], 0x24a`
[task 2024-02-02T20:28:19.837Z] 20:28:19     INFO - Memory accessed by instruction:
[task 2024-02-02T20:28:19.837Z] 20:28:19     INFO -   0. Address: 0x0000000000000000
[task 2024-02-02T20:28:19.837Z] 20:28:19     INFO -      Size: 4
[task 2024-02-02T20:28:19.837Z] 20:28:19     INFO - Process uptime: not available
[task 2024-02-02T20:28:19.837Z] 20:28:19     INFO - 
[task 2024-02-02T20:28:19.837Z] 20:28:19     INFO - Thread 0 Web Content (crashed)
[task 2024-02-02T20:28:19.838Z] 20:28:19     INFO -  0  libxul.so!JS::loader::ModuleLoaderBase::GetFetchedModule(nsIURI*) const [ModuleLoaderBase.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 586 + 0x0]
[task 2024-02-02T20:28:19.838Z] 20:28:19     INFO -      rax = 0x00007fad0b2db5e2    rdx = 0x0000000000000000
[task 2024-02-02T20:28:19.838Z] 20:28:19     INFO -      rcx = 0x0000563e59ae36b8    rbx = 0x00007fad033842e0
[task 2024-02-02T20:28:19.838Z] 20:28:19     INFO -      rsi = 0x00007fad23d638b0    rdi = 0x00007fad23d62680
[task 2024-02-02T20:28:19.838Z] 20:28:19     INFO -      rbp = 0x00007ffcc40a3920    rsp = 0x00007ffcc40a38a0
[task 2024-02-02T20:28:19.838Z] 20:28:19     INFO -       r8 = 0x00007fad23d638b0     r9 = 0x00007fad24c47780
[task 2024-02-02T20:28:19.838Z] 20:28:19     INFO -      r10 = 0x0000000000000002    r11 = 0x0000000000000000
[task 2024-02-02T20:28:19.839Z] 20:28:19     INFO -      r12 = 0x0000000000000001    r13 = 0x0000000000000000
[task 2024-02-02T20:28:19.839Z] 20:28:19     INFO -      r14 = 0x00007fad046f3530    r15 = 0x00007fad050e0530
[task 2024-02-02T20:28:19.839Z] 20:28:19     INFO -      rip = 0x00007fad0ec3db43
[task 2024-02-02T20:28:19.839Z] 20:28:19     INFO -     Found by: given as instruction pointer in context
[task 2024-02-02T20:28:19.839Z] 20:28:19     INFO -  1  libxul.so!JS::loader::ModuleLoadRequest::ModuleLoaded() [ModuleLoadRequest.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 130 + 0x4]
[task 2024-02-02T20:28:19.839Z] 20:28:19     INFO -      rbx = 0x00007fad046c0200    rbp = 0x00007ffcc40a3960
[task 2024-02-02T20:28:19.840Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a3930    r12 = 0x0000000000000001
[task 2024-02-02T20:28:19.840Z] 20:28:19     INFO -      r13 = 0x0000000000000000    r14 = 0x00007fad04114d60
[task 2024-02-02T20:28:19.840Z] 20:28:19     INFO -      r15 = 0x00007fad050e0530    rip = 0x00007fad0ec3d776
[task 2024-02-02T20:28:19.840Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.840Z] 20:28:19     INFO -  2  libxul.so!JS::loader::ModuleLoaderBase::ResumeWaitingRequest(JS::loader::ModuleLoadRequest*, bool) [ModuleLoaderBase.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 550]
[task 2024-02-02T20:28:19.840Z] 20:28:19     INFO -     Found by: inlining
[task 2024-02-02T20:28:19.846Z] 20:28:19     INFO -  3  libxul.so!JS::loader::ModuleLoaderBase::ResumeWaitingRequests(JS::loader::ModuleLoaderBase::WaitingRequests*, bool) [ModuleLoaderBase.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 543]
[task 2024-02-02T20:28:19.846Z] 20:28:19     INFO -     Found by: inlining
[task 2024-02-02T20:28:19.846Z] 20:28:19     INFO -  4  libxul.so!JS::loader::ModuleLoaderBase::SetModuleFetchFinishedAndResumeWaitingRequests(JS::loader::ModuleLoadRequest*, nsresult) [ModuleLoaderBase.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 536 + 0x6]
[task 2024-02-02T20:28:19.846Z] 20:28:19     INFO -      rbx = 0x0000000000000000    rbp = 0x00007ffcc40a39b0
[task 2024-02-02T20:28:19.846Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a3970    r12 = 0x0000000000000001
[task 2024-02-02T20:28:19.847Z] 20:28:19     INFO -      r13 = 0x0000000000000000    r14 = 0x00007fad04114d60
[task 2024-02-02T20:28:19.847Z] 20:28:19     INFO -      r15 = 0x00007fad050e0530    rip = 0x00007fad0ec42ea7
[task 2024-02-02T20:28:19.847Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.847Z] 20:28:19     INFO -  5  libxul.so!JS::loader::ModuleLoaderBase::OnFetchComplete(JS::loader::ModuleLoadRequest*, nsresult) [ModuleLoaderBase.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 614 + 0xc]
[task 2024-02-02T20:28:19.847Z] 20:28:19     INFO -      rbx = 0x0000000000000000    rbp = 0x00007ffcc40a3a00
[task 2024-02-02T20:28:19.847Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a39c0    r12 = 0x00007fad050e05e8
[task 2024-02-02T20:28:19.847Z] 20:28:19     INFO -      r13 = 0xfff9800000000000    r14 = 0x00007fad046c0e00
[task 2024-02-02T20:28:19.847Z] 20:28:19     INFO -      r15 = 0x00007fad046f3500    rip = 0x00007fad0ec4312f
[task 2024-02-02T20:28:19.847Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.847Z] 20:28:19     INFO -  6  libxul.so!mozilla::dom::ScriptLoader::PrepareLoadedRequest(JS::loader::ScriptLoadRequest*, nsIIncrementalStreamLoader*, nsresult) [ScriptLoader.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 3898 + 0x9]
[task 2024-02-02T20:28:19.848Z] 20:28:19     INFO -      rbx = 0x00007fad046f2ac0    rbp = 0x00007ffcc40a3c30
[task 2024-02-02T20:28:19.848Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a3a10    r12 = 0x00007ffcc40a3b00
[task 2024-02-02T20:28:19.848Z] 20:28:19     INFO -      r13 = 0xaaaaaaaaaaaaaaaa    r14 = 0x00007fad046c0e00
[task 2024-02-02T20:28:19.848Z] 20:28:19     INFO -      r15 = 0x0000000000000000    rip = 0x00007fad1251459c
[task 2024-02-02T20:28:19.848Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.848Z] 20:28:19     INFO -  7  libxul.so!mozilla::dom::ScriptLoader::OnStreamComplete(nsIIncrementalStreamLoader*, JS::loader::ScriptLoadRequest*, nsresult, nsresult, mozilla::dom::SRICheckDataVerifier*) [ScriptLoader.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 3363 + 0x14]
[task 2024-02-02T20:28:19.848Z] 20:28:19     INFO -      rbx = 0x00007fad046f2ac0    rbp = 0x00007ffcc40a3c80
[task 2024-02-02T20:28:19.848Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a3c40    r12 = 0x0000000000000000
[task 2024-02-02T20:28:19.848Z] 20:28:19     INFO -      r13 = 0x00007fad04119220    r14 = 0x00007fad046c0e00
[task 2024-02-02T20:28:19.848Z] 20:28:19     INFO -      r15 = 0x0000000000000000    rip = 0x00007fad12501951
[task 2024-02-02T20:28:19.848Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.848Z] 20:28:19     INFO -  8  libxul.so!mozilla::dom::ScriptLoadHandler::OnStreamComplete(nsIIncrementalStreamLoader*, nsISupports*, nsresult, unsigned int, unsigned char const*) [ScriptLoadHandler.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 459 + 0xa]
[task 2024-02-02T20:28:19.848Z] 20:28:19     INFO -      rbx = 0x00007fad05033b30    rbp = 0x00007ffcc40a3d60
[task 2024-02-02T20:28:19.848Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a3c90    r12 = 0x00007fad04119220
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO -      r13 = 0x0000000000000000    r14 = 0x00007fad235a0a60
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO -      r15 = 0x0000000000000000    rip = 0x00007fad12500fcf
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO -  9  libxul.so!nsIncrementalStreamLoader::OnStopRequest(nsIRequest*, nsresult) [nsIncrementalStreamLoader.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 82 + 0x11]
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO -      rbx = 0x00007fad04119220    rbp = 0x00007ffcc40a3db0
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a3d70    r12 = 0x00007fad04119250
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO -      r13 = 0x0000000000000000    r14 = 0x00007fad056ace58
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO -      r15 = 0x00007fad04119248    rip = 0x00007fad0e38546d
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO - 10  libxul.so!nsCORSListenerProxy::OnStopRequest(nsIRequest*, nsresult) [nsCORSListenerProxy.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 683 + 0xb]
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO -      rbx = 0x00007fad0411a040    rbp = 0x00007ffcc40a3df0
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a3dc0    r12 = 0x00007fad0411a0b0
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO -      r13 = 0x00007ffcc40a3f60    r14 = 0x0000000000000000
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO -      r15 = 0x00007fad04105e88    rip = 0x00007fad0e83db97
[task 2024-02-02T20:28:19.849Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.850Z] 20:28:19     INFO - 11  libxul.so!mozilla::net::HttpChannelChild::DoOnStopRequest(nsIRequest*, nsresult) [HttpChannelChild.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 1279 + 0x9]
[task 2024-02-02T20:28:19.850Z] 20:28:19     INFO -      rbx = 0x00007fad04105e00    rbp = 0x00007ffcc40a3e70
[task 2024-02-02T20:28:19.850Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a3e00    r12 = 0x0000000000000001
[task 2024-02-02T20:28:19.850Z] 20:28:19     INFO -      r13 = 0x00007ffcc40a3f60    r14 = 0x00007fad23542700
[task 2024-02-02T20:28:19.850Z] 20:28:19     INFO -      r15 = 0x0000000000000000    rip = 0x00007fad0e7bc55c
[task 2024-02-02T20:28:19.850Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.850Z] 20:28:19     INFO - 12  libxul.so!mozilla::net::HttpChannelChild::OnStopRequest(nsresult const&, mozilla::net::ResourceTimingStructArgs const&, mozilla::net::nsHttpHeaderArray const&) [HttpChannelChild.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 1098 + 0x11]
[task 2024-02-02T20:28:19.850Z] 20:28:19     INFO -      rbx = 0x00007fad04105e00    rbp = 0x00007ffcc40a4050
[task 2024-02-02T20:28:19.850Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a3e80    r12 = 0x00007fad0411a350
[task 2024-02-02T20:28:19.850Z] 20:28:19     INFO -      r13 = 0x00007ffcc40a3f60    r14 = 0x00007ffcc40a3fc0
[task 2024-02-02T20:28:19.850Z] 20:28:19     INFO -      r15 = 0x00007fad0411a348    rip = 0x00007fad0e7bbeac
[task 2024-02-02T20:28:19.850Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.850Z] 20:28:19     INFO - 13  libxul.so!mozilla::net::HttpChannelChild::ProcessOnStopRequest(nsresult const&, mozilla::net::ResourceTimingStructArgs const&, mozilla::net::nsHttpHeaderArray const&, nsTArray<mozilla::net::ConsoleReportCollected>&&, bool, mozilla::TimeStamp const&)::$_2::operator()() [HttpChannelChild.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 925]
[task 2024-02-02T20:28:19.850Z] 20:28:19     INFO -     Found by: inlining
[task 2024-02-02T20:28:19.851Z] 20:28:19     INFO - 14  libxul.so!std::_Function_handler<void (), mozilla::net::HttpChannelChild::ProcessOnStopRequest(nsresult const&, mozilla::net::ResourceTimingStructArgs const&, mozilla::net::nsHttpHeaderArray const&, nsTArray<mozilla::net::ConsoleReportCollected>&&, bool, mozilla::TimeStamp const&)::$_2>::_M_invoke(std::_Any_data const&) [std_function.h : 297 + 0x92]
[task 2024-02-02T20:28:19.851Z] 20:28:19     INFO -      rbx = 0x00000af3cced54eb    rbp = 0x00007ffcc40a4080
[task 2024-02-02T20:28:19.851Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4060    r12 = 0x00007ffcc40a40b8
[task 2024-02-02T20:28:19.851Z] 20:28:19     INFO -      r13 = 0x00007fad050c3880    r14 = 0x00007fad0411a340
[task 2024-02-02T20:28:19.851Z] 20:28:19     INFO -      r15 = 0x00007fad0a37ea08    rip = 0x00007fad0e80874e
[task 2024-02-02T20:28:19.851Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.851Z] 20:28:19     INFO - 15  libxul.so!mozilla::net::ChannelEventQueue::FlushQueue() [ChannelEventQueue.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 94 + 0x5]
[task 2024-02-02T20:28:19.851Z] 20:28:19     INFO -      rbx = 0x00007fad0a37ea28    rbp = 0x00007ffcc40a40f0
[task 2024-02-02T20:28:19.851Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4090    r12 = 0x00007ffcc40a40b8
[task 2024-02-02T20:28:19.851Z] 20:28:19     INFO -      r13 = 0x00007fad050c3880    r14 = 0x00007fad0a37ea00
[task 2024-02-02T20:28:19.851Z] 20:28:19     INFO -      r15 = 0x00007fad0a37ea08    rip = 0x00007fad0e9920f7
[task 2024-02-02T20:28:19.851Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.851Z] 20:28:19     INFO - 16  libxul.so!mozilla::net::ChannelEventQueue::ResumeInternal()::CompleteResumeRunnable::Run() [ChannelEventQueue.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 152 + 0x4]
[task 2024-02-02T20:28:19.851Z] 20:28:19     INFO -      rbx = 0x00007fad04113800    rbp = 0x00007ffcc40a4100
[task 2024-02-02T20:28:19.852Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4100    r12 = 0x0000000000000016
[task 2024-02-02T20:28:19.852Z] 20:28:19     INFO -      r13 = 0xaaaaaaaaaaaaaaaa    r14 = 0x00007ffcc40a41b0
[task 2024-02-02T20:28:19.852Z] 20:28:19     INFO -      r15 = 0x00007fad04113800    rip = 0x00007fad0e9b69b2
[task 2024-02-02T20:28:19.852Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.852Z] 20:28:19     INFO - 17  libxul.so!mozilla::RunnableTask::Run() [TaskController.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 578 + 0x5]
[task 2024-02-02T20:28:19.852Z] 20:28:19     INFO -      rbx = 0x00007fad04113800    rbp = 0x00007ffcc40a4120
[task 2024-02-02T20:28:19.852Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4110    r12 = 0x0000000000000016
[task 2024-02-02T20:28:19.852Z] 20:28:19     INFO -      r13 = 0xaaaaaaaaaaaaaaaa    r14 = 0x00007ffcc40a41b0
[task 2024-02-02T20:28:19.852Z] 20:28:19     INFO -      r15 = 0x00007fad04113800    rip = 0x00007fad0e1662c8
[task 2024-02-02T20:28:19.852Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.852Z] 20:28:19     INFO - 18  libxul.so!mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [TaskController.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 905 + 0x8]
[task 2024-02-02T20:28:19.853Z] 20:28:19     INFO -      rbx = 0x0000000000000004    rbp = 0x00007ffcc40a4740
[task 2024-02-02T20:28:19.853Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4130    r12 = 0x0000000000000016
[task 2024-02-02T20:28:19.853Z] 20:28:19     INFO -      r13 = 0xaaaaaaaaaaaaaaaa    r14 = 0x00007ffcc40a41b0
[task 2024-02-02T20:28:19.853Z] 20:28:19     INFO -      r15 = 0x00007fad04113800    rip = 0x00007fad0e15be37
[task 2024-02-02T20:28:19.853Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.853Z] 20:28:19     INFO - 19  libxul.so!mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) [TaskController.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 728 + 0xa]
[task 2024-02-02T20:28:19.853Z] 20:28:19     INFO -      rbx = 0x00007fad23531300    rbp = 0x00007ffcc40a4790
[task 2024-02-02T20:28:19.853Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4750    r12 = 0x00000af3cce84fa7
[task 2024-02-02T20:28:19.853Z] 20:28:19     INFO -      r13 = 0x00007ffcc40a47a8    r14 = 0x00007fad235425e0
[task 2024-02-02T20:28:19.853Z] 20:28:19     INFO -      r15 = 0x00007fad23531328    rip = 0x00007fad0e15a888
[task 2024-02-02T20:28:19.853Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.853Z] 20:28:19     INFO - 20  libxul.so!mozilla::TaskController::ProcessPendingMTTask(bool) [TaskController.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 514 + 0x7]
[task 2024-02-02T20:28:19.853Z] 20:28:19     INFO -      rbx = 0x00007fad23531300    rbp = 0x00007ffcc40a47e0
[task 2024-02-02T20:28:19.854Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a47a0    r12 = 0x00000af3cce84fa7
[task 2024-02-02T20:28:19.854Z] 20:28:19     INFO -      r13 = 0xaaaaaaaaaaaaaaaa    r14 = 0x0000000000000000
[task 2024-02-02T20:28:19.854Z] 20:28:19     INFO -      r15 = 0x00007fad23531328    rip = 0x00007fad0e15ad06
[task 2024-02-02T20:28:19.854Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.854Z] 20:28:19     INFO - 21  libxul.so!mozilla::TaskController::TaskController()::$_0::operator()() const [TaskController.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 232]
[task 2024-02-02T20:28:19.854Z] 20:28:19     INFO -     Found by: inlining
[task 2024-02-02T20:28:19.854Z] 20:28:19     INFO - 22  libxul.so!mozilla::detail::RunnableFunction<mozilla::TaskController::TaskController()::$_0>::Run() [nsThreadUtils.h:67f13af428e383eb2f3472448564da31a6cd3eae : 548 + 0x12]
[task 2024-02-02T20:28:19.854Z] 20:28:19     INFO -      rbx = 0x00007fad235723c0    rbp = 0x00007ffcc40a47f0
[task 2024-02-02T20:28:19.854Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a47f0    r12 = 0x00000af3cce84fa7
[task 2024-02-02T20:28:19.854Z] 20:28:19     INFO -      r13 = 0xaaaaaaaaaaaaaaaa    r14 = 0x0000000000000001
[task 2024-02-02T20:28:19.854Z] 20:28:19     INFO -      r15 = 0x00007ffcc40a4880    rip = 0x00007fad0e16a267
[task 2024-02-02T20:28:19.854Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.854Z] 20:28:19     INFO - 23  libxul.so!nsThread::ProcessNextEvent(bool, bool*) [nsThread.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 1199 + 0x5]
[task 2024-02-02T20:28:19.855Z] 20:28:19     INFO -      rbx = 0x00007fad235723c0    rbp = 0x00007ffcc40a4920
[task 2024-02-02T20:28:19.855Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4800    r12 = 0x00000af3cce84fa7
[task 2024-02-02T20:28:19.855Z] 20:28:19     INFO -      r13 = 0xaaaaaaaaaaaaaaaa    r14 = 0x0000000000000001
[task 2024-02-02T20:28:19.855Z] 20:28:19     INFO -      r15 = 0x00007ffcc40a4880    rip = 0x00007fad0e17eaf3
[task 2024-02-02T20:28:19.855Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.856Z] 20:28:19     INFO - 24  libxul.so!NS_ProcessNextEvent(nsIThread*, bool) [nsThreadUtils.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 480 + 0xf]
[task 2024-02-02T20:28:19.857Z] 20:28:19     INFO -      rbx = 0x0000000000000000    rbp = 0x00007ffcc40a4950
[task 2024-02-02T20:28:19.858Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4930    r12 = 0x0000000000000001
[task 2024-02-02T20:28:19.858Z] 20:28:19     INFO -      r13 = 0x00007fad235a0710    r14 = 0x00007ffcc40a4b18
[task 2024-02-02T20:28:19.858Z] 20:28:19     INFO -      r15 = 0x00007fad235723c0    rip = 0x00007fad0e18589e
[task 2024-02-02T20:28:19.858Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.858Z] 20:28:19     INFO - 25  libxul.so!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [MessagePump.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 85 + 0x9]
[task 2024-02-02T20:28:19.859Z] 20:28:19     INFO -      rbx = 0x00007fad235a06f0    rbp = 0x00007ffcc40a49a0
[task 2024-02-02T20:28:19.859Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4960    r12 = 0x0000000000000001
[task 2024-02-02T20:28:19.859Z] 20:28:19     INFO -      r13 = 0x00007fad235a0710    r14 = 0x00007ffcc40a4b18
[task 2024-02-02T20:28:19.859Z] 20:28:19     INFO -      r15 = 0x00007fad235723c0    rip = 0x00007fad0eb78a87
[task 2024-02-02T20:28:19.859Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.859Z] 20:28:19     INFO - 26  libxul.so!MessageLoop::RunHandler() [message_loop.cc:67f13af428e383eb2f3472448564da31a6cd3eae : 363]
[task 2024-02-02T20:28:19.859Z] 20:28:19     INFO -     Found by: inlining
[task 2024-02-02T20:28:19.859Z] 20:28:19     INFO - 27  libxul.so!MessageLoop::Run() [message_loop.cc:67f13af428e383eb2f3472448564da31a6cd3eae : 345 + 0x4]
[task 2024-02-02T20:28:19.860Z] 20:28:19     INFO -      rbx = 0x00007fad0a3a9100    rbp = 0x00007ffcc40a49d0
[task 2024-02-02T20:28:19.860Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a49b0    r12 = 0x00007ffcc40a4b18
[task 2024-02-02T20:28:19.860Z] 20:28:19     INFO -      r13 = 0x0000000000000470    r14 = 0x00007fad235723c0
[task 2024-02-02T20:28:19.860Z] 20:28:19     INFO -      r15 = 0x00007fad235bba00    rip = 0x00007fad0eaf5b22
[task 2024-02-02T20:28:19.860Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.860Z] 20:28:19     INFO - 28  libxul.so!nsBaseAppShell::Run() [nsBaseAppShell.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 148 + 0xc]
[task 2024-02-02T20:28:19.860Z] 20:28:19     INFO -      rbx = 0x00007fad0a3a9100    rbp = 0x00007ffcc40a49f0
[task 2024-02-02T20:28:19.860Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a49e0    r12 = 0x00007ffcc40a4b18
[task 2024-02-02T20:28:19.860Z] 20:28:19     INFO -      r13 = 0x0000000000000470    r14 = 0x00007fad235723c0
[task 2024-02-02T20:28:19.861Z] 20:28:19     INFO -      r15 = 0x00007fad235bba00    rip = 0x00007fad12769599
[task 2024-02-02T20:28:19.861Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.861Z] 20:28:19     INFO - 29  libxul.so!nsAppShell::Run() [nsAppShell.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 470 + 0x7]
[task 2024-02-02T20:28:19.861Z] 20:28:19     INFO -      rbx = 0x00007fad0a3a9100    rbp = 0x00007ffcc40a4a30
[task 2024-02-02T20:28:19.861Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4a00    r12 = 0x00007ffcc40a4b18
[task 2024-02-02T20:28:19.861Z] 20:28:19     INFO -      r13 = 0x0000000000000470    r14 = 0x00007fad235a06f0
[task 2024-02-02T20:28:19.861Z] 20:28:19     INFO -      r15 = 0x00007fad235bba00    rip = 0x00007fad1281b649
[task 2024-02-02T20:28:19.861Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.861Z] 20:28:19     INFO - 30  libxul.so!XRE_RunAppShell() [nsEmbedFunctions.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 721 + 0x5]
[task 2024-02-02T20:28:19.862Z] 20:28:19     INFO -      rbx = 0x00007ffcc40a4b18    rbp = 0x00007ffcc40a4a70
[task 2024-02-02T20:28:19.862Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4a40    r12 = 0x00007ffcc40a4b18
[task 2024-02-02T20:28:19.862Z] 20:28:19     INFO -      r13 = 0x0000000000000470    r14 = 0x00007fad235a06f0
[task 2024-02-02T20:28:19.862Z] 20:28:19     INFO -      r15 = 0x00007fad235bba00    rip = 0x00007fad1410337c
[task 2024-02-02T20:28:19.862Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.862Z] 20:28:19     INFO - 31  libxul.so!mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) [MessagePump.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 235 + 0x4]
[task 2024-02-02T20:28:19.862Z] 20:28:19     INFO -      rbx = 0x00007ffcc40a4b18    rbp = 0x00007ffcc40a4aa0
[task 2024-02-02T20:28:19.862Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4a80    r12 = 0x00007ffcc40a4b18
[task 2024-02-02T20:28:19.863Z] 20:28:19     INFO -      r13 = 0x0000000000000470    r14 = 0x00007fad235a06f0
[task 2024-02-02T20:28:19.863Z] 20:28:19     INFO -      r15 = 0x00007fad235bba00    rip = 0x00007fad0eb79431
[task 2024-02-02T20:28:19.863Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.863Z] 20:28:19     INFO - 32  libxul.so!MessageLoop::RunHandler() [message_loop.cc:67f13af428e383eb2f3472448564da31a6cd3eae : 363]
[task 2024-02-02T20:28:19.863Z] 20:28:19     INFO -     Found by: inlining
[task 2024-02-02T20:28:19.863Z] 20:28:19     INFO - 33  libxul.so!MessageLoop::Run() [message_loop.cc:67f13af428e383eb2f3472448564da31a6cd3eae : 345 + 0x4]
[task 2024-02-02T20:28:19.863Z] 20:28:19     INFO -      rbx = 0x0000000000000001    rbp = 0x00007ffcc40a4ad0
[task 2024-02-02T20:28:19.864Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4ab0    r12 = 0x00007ffcc40a4b18
[task 2024-02-02T20:28:19.864Z] 20:28:19     INFO -      r13 = 0x0000000000000470    r14 = 0x00007ffcc40a4b18
[task 2024-02-02T20:28:19.864Z] 20:28:19     INFO -      r15 = 0x00007fad235bba00    rip = 0x00007fad0eaf5b22
[task 2024-02-02T20:28:19.864Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.864Z] 20:28:19     INFO - 34  libxul.so!XRE_InitChildProcess(int, char**, XREChildData const*) [nsEmbedFunctions.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 656 + 0x7]
[task 2024-02-02T20:28:19.865Z] 20:28:19     INFO -      rbx = 0x0000000000000001    rbp = 0x00007ffcc40a4dc0
[task 2024-02-02T20:28:19.865Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4ae0    r12 = 0x00007ffcc40a4b18
[task 2024-02-02T20:28:19.865Z] 20:28:19     INFO -      r13 = 0x0000000000000470    r14 = 0x00007ffcc40a4b18
[task 2024-02-02T20:28:19.865Z] 20:28:19     INFO -      r15 = 0x00007fad235bba00    rip = 0x00007fad14102bea
[task 2024-02-02T20:28:19.865Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.865Z] 20:28:19     INFO - 35  firefox-bin!content_process_main(mozilla::Bootstrap*, int, char**) [plugin-container.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 57]
[task 2024-02-02T20:28:19.866Z] 20:28:19     INFO -     Found by: inlining
[task 2024-02-02T20:28:19.873Z] 20:28:19     INFO - 36  firefox-bin!main [nsBrowserApp.cpp:67f13af428e383eb2f3472448564da31a6cd3eae : 375 + 0x2a]
[task 2024-02-02T20:28:19.873Z] 20:28:19     INFO -      rbx = 0x0000000000000016    rbp = 0x00007ffcc40a5e30
[task 2024-02-02T20:28:19.873Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a4dd0    r12 = 0x00007ffcc40a5f18
[task 2024-02-02T20:28:19.874Z] 20:28:19     INFO -      r13 = 0xaaaaaaaaaaaaaaaa    r14 = 0x00007fad235036e0
[task 2024-02-02T20:28:19.874Z] 20:28:19     INFO -      r15 = 0x00007ffcc40a5f18    rip = 0x0000563e59a0b2c9
[task 2024-02-02T20:28:19.874Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.874Z] 20:28:19     INFO - 37  libc.so.6 + 0x21b96
[task 2024-02-02T20:28:19.874Z] 20:28:19     INFO -      rbx = 0x0000000000000000    rbp = 0x0000563e59add1c0
[task 2024-02-02T20:28:19.874Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a5e40    r12 = 0x0000563e59a0acf0
[task 2024-02-02T20:28:19.874Z] 20:28:19     INFO -      r13 = 0x00007ffcc40a5f10    r14 = 0x0000000000000000
[task 2024-02-02T20:28:19.875Z] 20:28:19     INFO -      r15 = 0x0000000000000000    rip = 0x00007fad23997b97
[task 2024-02-02T20:28:19.875Z] 20:28:19     INFO -     Found by: call frame info
[task 2024-02-02T20:28:19.875Z] 20:28:19     INFO - 38  ld-linux-x86-64.so.2 + 0x10782
[task 2024-02-02T20:28:19.875Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a5ec0    rip = 0x00007fad24ad9783
[task 2024-02-02T20:28:19.875Z] 20:28:19     INFO -     Found by: stack scanning
[task 2024-02-02T20:28:19.875Z] 20:28:19     INFO - 39  libmozsandbox.so!<.plt ELF section in libmozsandbox.so> + 0x15e7
[task 2024-02-02T20:28:19.875Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a5ec8    rip = 0x00007fad24cec0b8
[task 2024-02-02T20:28:19.875Z] 20:28:19     INFO -     Found by: stack scanning
[task 2024-02-02T20:28:19.876Z] 20:28:19     INFO - 40  libpthread.so.0 + 0x219baf
[task 2024-02-02T20:28:19.876Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a5ed0    rip = 0x00007fad24ac3bb0
[task 2024-02-02T20:28:19.876Z] 20:28:19     INFO -     Found by: stack scanning
[task 2024-02-02T20:28:19.876Z] 20:28:19     INFO - 41  firefox-bin!_start + 0x28
[task 2024-02-02T20:28:19.876Z] 20:28:19     INFO -      rsp = 0x00007ffcc40a5f00    rip = 0x0000563e59a0ad19
[task 2024-02-02T20:28:19.876Z] 20:28:19     INFO -     Found by: stack scanning
[task 2024-02-02T20:28:19.876Z] 20:28:19     INFO - 
Flags: needinfo?(allstars.chh)

The scripts in WPTs have SyntaxError and expect error to be thrown, will check that again.

Flags: needinfo?(allstars.chh)
Attachment #9377895 - Attachment description: Bug 1877703 - Don't add the URI into mFetchedModules if it has a parse error and is preloaded. → Bug 1877703 - Part 1: Don't add the URI into mFetchedModules if it has a parse error and is preloaded.

To fix failure in WPT /html/semantics/scripting-1/the-script-element/module/compilation-error-2.html
Adding a StaticImportError to distinguish it from SyntaxError.

// a.mjs
import "./b.mjs";

// b.mjs
import { x } from "invalid";

// test.html
<script type="module" src="a.mjs">
<script type="module" src="b.mjs">

The fetching is as follows:
preload a.mjs
preload b.mjs // we call this b1

a.mjs is fetched, fetch submodule b.mjs // we call this b2, this will be added
into a WaitingRequests

When b1 is fetched, it can't resolve "invalid" so has a
StaticImportError, and won't be put into the mFetchedModules map.

But the ModuleScript is created, so a success=true will be passed to
ResumeWaitingRequests, which in turn call b2's ModuleLoaded

And it will call GetFetchedModules, but the ModuleScript isn't inserted
into mFetchedModules (Because b1 has a StaticImportError and is preload)
so caused an assertion failure.

When there's an ongoing fetching with the same URI, we will put the
requests of the same URI into a WaitingRequests before the ongoing
requests is fetched.

But if the ongoing request is canceled, those requests in
WaitingRequests will be canceled as well!
This might cause some problem.

For example:

// a.mjs
import "./b.mjs";

// index.html
<script type="module" src="a.mjs">
<script type="module" src="b.mjs">

Then the fetching will be as follows:

  1. preload a.mjs // we call this a1
  2. preload b.mjs // we call this b1
  3. b1 is fetched.
  4. a1 is fetched, fetch b.mjs // we call this b2
  5. An import map is inserted,
  6. In ScriptLoader::ProcessExternalScript(), we check if the preloaded requests
    can be reused.
    6-1. We found there's an import map registered and a1 is fetched, so we cancel a1,
    and create a new request for a.mjs, we call it a2. 1
    6-2. Canceling a1 will in turn cancel b2 as well.
  7. Like above, cancel b1 and create a new request for b.mjs, we call it b3. b3 will
    be in the WaitingRequests of b2.
  8. b2 is fetched, but it is canceled in step 6-2, so this makes b3 will
    fail, which makes index.html fail to load the scripts.

To Fix this, when a ModuleLoadRequest is canceled, we need to make sure
the WaitingRequests won't be affected, in the above example,
scenario 1:
b2 is fetching, then when b2 is canceled, we remove b2 from
mFetchingModules immediately, originally we remove b2 when
b2's OnFetchComplete is called, but at that time b3 could have been in
the WaitingRequests already.

scenario 2:
b2 is fetching, then b3 is added into WaitingRequests of b2.
Then when b2 is canceled, we need to start fetching b3 again.

Attachment #9377895 - Attachment description: Bug 1877703 - Part 1: Don't add the URI into mFetchedModules if it has a parse error and is preloaded. → Bug 1877703 - Part 1: Add mFetchedWithImportMapModules.
Attachment #9379443 - Attachment description: Bug 1877703 - Part 5: test case to verify Part 3 and Part 4. → Bug 1877703 - Part 2: Add another test.
Attachment #9379440 - Attachment is obsolete: true
Attachment #9379441 - Attachment is obsolete: true
Attachment #9379442 - Attachment is obsolete: true
Assignee: allstars.chh → jcoppeard
Attachment #9382363 - Attachment description: WIP: Bug 1877703 - Remove speculatively preloaded module from the module map when import map is registered → Bug 1877703 - Part 1: Remove speculatively preloaded modules from the module map when import map is registered r?smaug

Currently we record the URI of each fetching modules and any addtional requests
that are blocked waiting on that fetch. This adds the fetching module request
itself.

This is needed by the next patch.

A further problem with dynamically inserted import maps was discovered where
sometimes module scripts would never execute. This happens when the script is
still being fetched when the import map is added.

To fix this, cancel all fetching module preloads as well when an import map is
registered and remove them from the module map. In theory this shouldn't be
necessary but I wasn't able to make the tests pass without this step.

For simplicity also remove all module preloads from the scriptloader's list of
preload requests rather than detecting and ignoring them later on.

Attachment #9377393 - Attachment description: WIP: Bug 1877703 - Add testcase for dynamically inserted import map → Bug 1877703 - Part 4: Add testcases for dynamically inserted import maps r?smaug

The following patch is waiting for review from a reviewer who resigned from the review:

ID Title Author Reviewer Status
D200431 Bug 1877703 - Part 1: Add mFetchedWithImportMapModules. allstars.chh jonco: Resigned from review

:allstars.chh, could you please find another reviewer?

For more information, please visit BugBot documentation.

Flags: needinfo?(allstars.chh)
Attachment #9377895 - Attachment is obsolete: true
Flags: needinfo?(allstars.chh)
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/591b5483bcd8 Part 1: Remove speculatively preloaded modules from the module map when import map is registered r=smaug,allstarschh https://hg.mozilla.org/integration/autoland/rev/1e17b87ab7f8 Part 2: Track request for currently fetching module in the module map r=smaug https://hg.mozilla.org/integration/autoland/rev/bc9c70289244 Part 3: Also remove currently fetching preload modules from the module map when import map is registered r=smaug https://hg.mozilla.org/integration/autoland/rev/6b99c1c567b4 Part 4: Add testcases for dynamically inserted import maps r=smaug

Backed out for causing ScriptLoader related wpt failures

Backout link

Push with failures

Failure log

Flags: needinfo?(jcoppeard)
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7ee0827809fb Part 1: Remove speculatively preloaded modules from the module map when import map is registered r=smaug,allstarschh https://hg.mozilla.org/integration/autoland/rev/64281b11237e Part 2: Track request for currently fetching module in the module map r=smaug https://hg.mozilla.org/integration/autoland/rev/5921d1fb831e Part 3: Also remove currently fetching preload modules from the module map when import map is registered r=smaug https://hg.mozilla.org/integration/autoland/rev/5eb60e36ef79 Part 4: Add testcases for dynamically inserted import maps r=smaug
Attachment #9379443 - Attachment is obsolete: true
Regressions: 1885443
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 125 Branch → ---

In the bug 1885443, one module "glob" will be resolved to "https://ga.jspm.io/npm:glob@10.3.10/dist/esm/index.js"
The module "glob" will in turn fetch another submodule called "path-scurry", however, there is no such entry "path-scurry" in the import map hence causing the resolve failure, and this makes the call SetHadImportMap() wasn't executed because the ModuleRequest has an error.

Flags: needinfo?(jcoppeard)
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4dfc3e6aa365 Part 1: Remove speculatively preloaded modules from the module map when import map is registered r=smaug,allstarschh https://hg.mozilla.org/integration/autoland/rev/afc004c3327e Part 2: Track request for currently fetching module in the module map r=smaug https://hg.mozilla.org/integration/autoland/rev/2d8319093c13 Part 3: Also remove currently fetching preload modules from the module map when import map is registered r=smaug https://hg.mozilla.org/integration/autoland/rev/4e604bbbfd9c Part 4: Add testcases for dynamically inserted import maps r=smaug
Pushed by allstars.chh@gmail.com: https://hg.mozilla.org/integration/autoland/rev/dbb1856b4f33 Part 5: Call SetHadImportMap when the module script is created. r=jonco
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: