Dev Tools block module Worker creation (in Nightly and Developer)
Categories
(Core :: DOM: Workers, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox113 | --- | verified |
People
(Reporter: roy.hashimoto, Assigned: ochameau)
References
Details
Attachments
(1 file)
Steps to reproduce:
Called new Worker('script.js', { type: "module" }) with and without Dev Tools open. There is a test case web page at:
https://rhashimoto.github.io/browser-test-cases/worker-modules/
On that page, you can start a module Worker or a classic Worker by pressing the buttons, and the Worker will respond by posting a message that is displayed on the page.
Actual results:
With Dev Tools closed, both module and classic Workers can be created. With Dev Tools open, only classic Workers are created.
This is true for the latest Nightly 112.0a1 and Developer 111.0b1 releases (Nightly troubleshooting info appended below). In Developer I set dom.workers.modules.enabled to true (it is already set in Nightly). No extensions are being used.
Application Basics
Name: Firefox
Version: 112.0a1
Build ID: 20230215093902
Distribution ID:
Update Channel: nightly
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/112.0
OS: Darwin 21.6.0 Darwin Kernel Version 21.6.0: Mon Dec 19 20:44:01 PST 2022; root:xnu-8020.240.18~2/RELEASE_X86_64
Rosetta Translated: false
Multiprocess Windows: 1/1
Fission Windows: 1/1 Enabled by default
Remote Processes: 7
Enterprise Policies: Inactive
Google Location Service Key: Found
Google Safebrowsing Key: Found
Mozilla Location Service Key: Found
Safe Mode: false
Memory Size (RAM): 16.0 GB
Disk Space Available: 253 GB
Crash Reports for the Last 3 Days
Nightly Features
Name: Firefox Screenshots
Version: 39.0.1
ID: screenshots@mozilla.org
Name: Form Autofill
Version: 1.0.1
ID: formautofill@mozilla.org
Name: Picture-In-Picture
Version: 1.0.0
ID: pictureinpicture@mozilla.org
Name: Web Compatibility Interventions
Version: 111.0.0
ID: webcompat@mozilla.org
Name: WebCompat Reporter
Version: 1.5.1
ID: webcompat-reporter@mozilla.org
Remote Features
Experiment for Additional Metrics for Product Insights - Rollout Clone 2 - 45%: (control-rollout)
Remote Processes
Type: Extension
Count: 1
Type: Privileged About
Count: 1
Type: Isolated Web Content
Count: 1
Type: Preallocated
Count: 3
Type: Socket
Count: 1
Add-ons
Name: Add-ons Search Detection
Type: extension
Version: 2.0.0
Enabled: true
ID: addons-search-detection@mozilla.com
Name: Amazon.com
Type: extension
Version: 1.4
Enabled: true
ID: amazondotcom@search.mozilla.org
Name: Bing
Type: extension
Version: 1.4
Enabled: true
ID: bing@search.mozilla.org
Name: DuckDuckGo
Type: extension
Version: 1.3
Enabled: true
ID: ddg@search.mozilla.org
Name: eBay
Type: extension
Version: 1.4
Enabled: true
ID: ebay@search.mozilla.org
Name: Google
Type: extension
Version: 1.3
Enabled: true
ID: google@search.mozilla.org
Name: Wikipedia (en)
Type: extension
Version: 1.2
Enabled: true
ID: wikipedia@search.mozilla.org
Graphics
Features
Window Device Pixel Ratios: 1
Compositing: WebRender
Asynchronous Pan/Zoom: wheel input enabled; scrollbar drag enabled; keyboard enabled; autoscroll enabled; smooth pinch-zoom enabled
WebGL 1 Driver WSI Info: CGL IsWebglOutOfProcessEnabled: 1
WebGL 1 Driver Renderer: Intel Inc. -- Intel Iris OpenGL Engine
WebGL 1 Driver Version: 4.1 INTEL-18.8.6
WebGL 1 Driver Extensions: GL_ARB_blend_func_extended GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_ES2_compatibility GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader5 GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_occlusion_query2 GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_shading_language_include GL_ARB_tessellation_shader GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_vertex_attrib_64bit GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_sRGB_decode GL_APPLE_client_storage GL_APPLE_container_object_shareable GL_APPLE_flush_render GL_APPLE_object_purgeable GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_texture_range GL_ATI_texture_mirror_once GL_NV_texture_barrier
WebGL 1 Extensions: ANGLE_instanced_arrays EXT_blend_minmax EXT_color_buffer_half_float EXT_float_blend EXT_frag_depth EXT_shader_texture_lod EXT_sRGB EXT_texture_compression_rgtc EXT_texture_filter_anisotropic MOZ_debug OES_element_index_uint OES_fbo_render_mipmap OES_standard_derivatives OES_texture_float OES_texture_float_linear OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_depth_texture WEBGL_draw_buffers WEBGL_lose_context
WebGL 2 Driver WSI Info: CGL IsWebglOutOfProcessEnabled: 1
WebGL 2 Driver Renderer: Intel Inc. -- Intel Iris OpenGL Engine
WebGL 2 Driver Version: 4.1 INTEL-18.8.6
WebGL 2 Driver Extensions: GL_ARB_blend_func_extended GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_ES2_compatibility GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader5 GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_occlusion_query2 GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_shading_language_include GL_ARB_tessellation_shader GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_vertex_attrib_64bit GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_sRGB_decode GL_APPLE_client_storage GL_APPLE_container_object_shareable GL_APPLE_flush_render GL_APPLE_object_purgeable GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_texture_range GL_ATI_texture_mirror_once GL_NV_texture_barrier
WebGL 2 Extensions: EXT_color_buffer_float EXT_float_blend EXT_texture_compression_rgtc EXT_texture_filter_anisotropic MOZ_debug OES_draw_buffers_indexed OES_texture_float_linear WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context
Target Frame Rate: 60
GPU #1
Active: Yes
Vendor ID: 0x8086
Device ID: 0x0a2e
RAM: 0
Diagnostics
AzureCanvasBackend: skia
AzureContentBackend: skia
AzureFallbackCanvasBackend: skia
CMSOutputProfile: AAACCGFwcGwEAAAAbW50clJHQiBYWVogB+cAAgAOABYAEgAvYWNzcEFQUEwAAAAAQVBQTAAAAAAAAAAAAAAAAAAAAAAAAPbWAAEAAAAA0y1hcHBs3cIqSdPRL/8fIVDjanCI9QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKZGVzYwAAAPwAAAAwY3BydAAAASwAAABQd3RwdAAAAXwAAAAUclhZWgAAAZAAAAAUZ1hZWgAAAaQAAAAUYlhZWgAAAbgAAAAUclRSQwAAAcwAAAAQY2hhZAAAAdwAAAAsYlRSQwAAAcwAAAAQZ1RSQwAAAcwAAAAQbWx1YwAAAAAAAAABAAAADGVuVVMAAAAUAAAAHABEAEUATABMACAAVQAyADQAMQA1bWx1YwAAAAAAAAABAAAADGVuVVMAAAA0AAAAHABDAG8AcAB5AHIAaQBnAGgAdAAgAEEAcABwAGwAZQAgAEkAbgBjAC4ALAAgADIAMAAyADNYWVogAAAAAAAA9tYAAQAAAADTLVhZWiAAAAAAAABv8QAAN84AAADGWFlaIAAAAAAAAGCTAAC27gAAFPdYWVogAAAAAAAAJlIAABFEAAC9cHBhcmEAAAAAAAAAAAAB9gRzZjMyAAAAAAABC7cAAAWW///zVwAABykAAP3X///7t////aYAAAPaAADA9g==
Display0: 1920x1200@0Hz scales:1.000000|1.000000
DisplayCount: 1
Decision Log
HW_COMPOSITING:
default: available
OPENGL_COMPOSITING:
default: available
WEBRENDER:
default: available
WEBRENDER_COMPOSITOR:
default: available
WEBRENDER_PARTIAL:
default: disabled
WEBRENDER_SHADER_CACHE:
default: disabled
WEBRENDER_OPTIMIZED_SHADERS:
default: available
WEBRENDER_ANGLE:
default: available
env: unavailable
WEBRENDER_DCOMP_PRESENT:
default: available
user: disabled
env: unavailable
runtime: unavailable
WEBGPU:
default: available
VP8_HW_DECODE:
default: available
VP9_HW_DECODE:
default: available
BACKDROP_FILTER:
default: available
CANVAS_RENDERER_THREAD:
default: available
ACCELERATED_CANVAS2D:
default: available
Media
Audio Backend: audiounit-rust
Max Channels: 2
Preferred Sample Rate: 44100
Codec Support Information:
Output Devices
Name: Group
Creative USB Headset: Creative USB Headset:041E:0400
Dell AC511 USB SoundBar: Dell AC511 USB SoundBar:413C:A503
Internal Speakers: builtin-internal-mic|spk
DELL U2415: AppleHDA:108
Input Devices
Name: Group
Unknown USB Audio Device: Unknown USB Audio Device:046D:09A6
Creative USB Headset: Creative USB Headset:041E:0400
Dell AC511 USB SoundBar: Dell AC511 USB SoundBar:413C:A503
Media Capabilities
Enumerate database
Environment Variables
DISPLAY: /private/tmp/com.apple.launchd.urYKsWw6IQ/org.xquartz:0
MOZ_CRASHREPORTER_EVENTS_DIRECTORY: /Users/roy/Library/Application Support/Firefox/Profiles/zfxs0p0a.default-nightly/crashes/events
MOZ_CRASHREPORTER_RESTART_ARG_0: /Applications/Firefox Nightly.app/Contents/MacOS/firefox
MOZ_CRASHREPORTER_RESTART_ARG_1: -foreground
MOZ_CRASHREPORTER_DATA_DIRECTORY: /Users/roy/Library/Application Support/Firefox/Crash Reports
MOZ_CRASHREPORTER_PING_DIRECTORY: /Users/roy/Library/Application Support/Firefox/Pending Pings
MOZ_CRASHREPORTER_STRINGS_OVERRIDE: /Applications/Firefox Nightly.app/Contents/Resources/browser/crashreporter-override.ini
MOZ_LAUNCHED_CHILD:
MOZ_APP_SILENT_START:
XRE_PROFILE_PATH:
XRE_PROFILE_LOCAL_PATH:
XRE_START_OFFLINE:
XRE_BINARY_PATH:
XRE_RESTARTED_BY_PROFILE_MANAGER:
MOZ_APP_RESTART: 1
MOZ_CRASHREPORTER_RESTART_ARG_2:
Experimental Features
about:home startup cache (browser.startup.homepage.abouthome_cache.enabled): true
Accessibility cache (accessibility.cache.enabled): true
Cookies: SameSite=None requires secure attribute (network.cookie.sameSite.noneRequiresSecure): true
CSS: Masonry Layout (layout.css.grid-template-masonry-value.enabled): true
Developer Tools: Compatibility Panel (devtools.inspector.compatibility.enabled): true
Developer Tools: Service Worker debugging (devtools.debugger.features.windowless-service-workers): false
Media: JPEG XL (image.jxl.enabled): false
Address Bar: show results during IME composition (browser.urlbar.keepPanelOpenDuringImeComposition): false
Web API: WebGPU (dom.webgpu.enabled): false
WebRTC Global Mute Toggles (privacy.webrtc.globalMuteToggles): false
Remote Experiments
Important Modified Preferences
accessibility.typeaheadfind.flashBar: 0
browser.contentblocking.category: standard
browser.search.region: US
browser.sessionstore.upgradeBackup.latestBuildID: 20230215093902
browser.startup.homepage_override.buildID: 20230215093902
browser.startup.homepage_override.mstone: 112.0a1
browser.tabs.crashReporting.includeURL: true
browser.urlbar.placeholderName: Google
browser.urlbar.quicksuggest.migrationVersion: 2
browser.urlbar.quicksuggest.scenario: offline
browser.urlbar.tipShownCount.searchTip_onboard: 4
browser.urlbar.tipShownCount.searchTip_persist: 1
doh-rollout.doneFirstRun: true
doh-rollout.home-region: US
doh-rollout.mode: 2
doh-rollout.self-enabled: true
doh-rollout.uri: https://mozilla.cloudflare-dns.com/dns-query
dom.forms.autocomplete.formautofill: true
extensions.lastAppVersion: 112.0a1
idle.lastDailyNotification: 1676406840
media.gmp-gmpopenh264.abi: x86_64-gcc3
media.gmp-gmpopenh264.lastDownload: 1671120461
media.gmp-gmpopenh264.lastInstallStart: 1671120460
media.gmp-gmpopenh264.lastUpdate: 1671120461
media.gmp-gmpopenh264.version: 1.8.1.2
media.gmp-manager.buildID: 20230215093902
media.gmp-manager.lastCheck: 1676473643
media.gmp-manager.lastEmptyCheck: 1676473643
media.gmp-widevinecdm.abi: x86_64-gcc3
media.gmp-widevinecdm.lastDownload: 1671120463
media.gmp-widevinecdm.lastInstallStart: 1671120461
media.gmp-widevinecdm.lastUpdate: 1671120463
media.gmp-widevinecdm.version: 4.10.2557.0
media.gmp.storage.version.observed: 1
places.database.lastMaintenance: 1676406840
privacy.purge_trackers.date_in_cookie_database: 0
privacy.purge_trackers.last_purge: 1676406840555
privacy.sanitize.pending: [{"id":"newtab-container","itemsToClear":[],"options":{}}]
security.sandbox.content.tempDirSuffix: da6c9806-dbb7-41d3-80df-e9984686e384
services.sync.engine.addresses.available: true
storage.vacuum.last.index: 1
storage.vacuum.last.places.sqlite: 1675377347
Important Locked Preferences
fission.autostart.session: true
Places Database
Entity: sqlite_schema
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 22.3
Sequentiality (%): 100
Entity: moz_origins
Count: 15
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 1.7
Sequentiality (%): 100
Entity: sqlite_autoindex_moz_origins_1
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 1.5
Sequentiality (%): 100
Entity: moz_places
Count: 42
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 29
Sequentiality (%): 100
Entity: moz_historyvisits
Count: 55
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 3.9
Sequentiality (%): 100
Entity: moz_inputhistory
Count: 1
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0.1
Sequentiality (%): 100
Entity: sqlite_autoindex_moz_inputhistory_1
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0
Sequentiality (%): 100
Entity: moz_bookmarks
Count: 13
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 2.5
Sequentiality (%): 100
Entity: moz_bookmarks_deleted
Count: 0
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0
Sequentiality (%): 100
Entity: sqlite_autoindex_moz_bookmarks_deleted_1
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0
Sequentiality (%): 100
Entity: moz_keywords
Count: 2
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0.1
Sequentiality (%): 100
Entity: sqlite_autoindex_moz_keywords_1
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0.1
Sequentiality (%): 100
Entity: sqlite_sequence
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0.1
Sequentiality (%): 100
Entity: moz_anno_attributes
Count: 0
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0
Sequentiality (%): 100
Entity: sqlite_autoindex_moz_anno_attributes_1
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0
Sequentiality (%): 100
Entity: moz_annos
Count: 0
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0
Sequentiality (%): 100
Entity: moz_items_annos
Count: 0
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0
Sequentiality (%): 100
Entity: moz_meta
Count: 3
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0.3
Sequentiality (%): 100
Entity: moz_places_metadata
Count: 30
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 3
Sequentiality (%): 100
Entity: moz_places_metadata_search_queries
Count: 0
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0
Sequentiality (%): 100
Entity: sqlite_autoindex_moz_places_metadata_search_queries_1
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0
Sequentiality (%): 100
Entity: moz_previews_tombstones
Count: 0
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0
Sequentiality (%): 100
Entity: sqlite_stat1
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 3.5
Sequentiality (%): 100
Entity: moz_places_url_hashindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 1.7
Sequentiality (%): 100
Entity: moz_places_hostindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 3.1
Sequentiality (%): 100
Entity: moz_places_visitcount
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0.9
Sequentiality (%): 100
Entity: moz_places_frecencyindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 1.1
Sequentiality (%): 100
Entity: moz_places_lastvisitdateindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 1.8
Sequentiality (%): 100
Entity: moz_places_guid_uniqueindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 2.5
Sequentiality (%): 100
Entity: moz_places_originidindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 1
Sequentiality (%): 100
Entity: moz_historyvisits_placedateindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 2.9
Sequentiality (%): 100
Entity: moz_historyvisits_fromindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 1.3
Sequentiality (%): 100
Entity: moz_historyvisits_dateindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 2.5
Sequentiality (%): 100
Entity: moz_bookmarks_itemindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0.4
Sequentiality (%): 100
Entity: moz_bookmarks_parentindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0.4
Sequentiality (%): 100
Entity: moz_bookmarks_itemlastmodifiedindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0.7
Sequentiality (%): 100
Entity: moz_bookmarks_dateaddedindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0.6
Sequentiality (%): 100
Entity: moz_bookmarks_guid_uniqueindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0.8
Sequentiality (%): 100
Entity: moz_keywords_placepostdata_uniqueindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0.1
Sequentiality (%): 100
Entity: moz_annos_placeattributeindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0
Sequentiality (%): 100
Entity: moz_items_annos_itemattributeindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0
Sequentiality (%): 100
Entity: moz_places_metadata_placecreated_uniqueindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 1.4
Sequentiality (%): 100
Entity: moz_places_metadata_referrerindex
Count: -
Size (KiB): 32
Size (%): 2.3
Efficiency (%): 0.7
Sequentiality (%): 100
Accessibility
Activated: false
Prevent Accessibility: 0
Library Versions
NSPR
Expected minimum version: 4.35
Version in use: 4.35
NSS
Expected minimum version: 3.88.1
Version in use: 3.88.1
NSSSMIME
Expected minimum version: 3.88.1
Version in use: 3.88.1
NSSSSL
Expected minimum version: 3.88.1
Version in use: 3.88.1
NSSUTIL
Expected minimum version: 3.88.1
Version in use: 3.88.1
Sandbox
Content Process Sandbox Level: 3
Effective Content Process Sandbox Level: 3
Win32k Lockdown State for Content Process: Win32k Lockdown disabled -- Operating system not supported
GPU Process Sandbox Level: 0
Startup Cache
Disk Cache Path: /Users/roy/Library/Caches/Firefox/Profiles/zfxs0p0a.default-nightly/startupCache/startupCache.8.little
Ignore Disk Cache: false
Found Disk Cache on Init: false
Wrote to Disk Cache: true
Internationalization & Localization
Application Settings
Requested Locales: ["en-US"]
Available Locales: ["en-US"]
App Locales: ["en-US"]
Regional Preferences: ["en-US"]
Default Locale: "en-US"
Operating System
System Locales: ["en-US"]
Regional Preferences: ["en-US"]
Remote Debugging (Chromium Protocol)
Accepting Connections: false
URL:
Printing
Modified print settings
Expected results:
The page should be able to create both module and classic Workers whether or not Dev Tools is open. It works on Chrome and Safari.
Worker modules is a newly added feature (see Bug 1247687 Implement worker modules), so no comparison with the current version of Firefox.
Comment 1•2 years ago
|
||
This is probably related to the devtools use of nsIWorkerDebugger::setDebuggerReady
// Indicate whether the debugger has finished initializing. By default the
// debugger will be considered initialized when the onRegister hooks in all
// nsIWorkerDebuggerManagerListener have been called.
//
// setDebuggerReady(false) can be called during an onRegister hook to mark
// the debugger as not being ready yet. This will prevent all content from
// running in the worker, including the worker's main script and any messages
// posted to it. Other runnables will still execute in the worker as normal.
//
// When the debugger is ready, setDebuggerReady(true) should then be called
// to allow the worker to begin executing content.
void setDebuggerReady(in boolean ready);
Comment 2•2 years ago
|
||
Thanks for the report and the pointer. I will take a look once I finish up the dynamic import work. I agree this looks devtools specific and I likely missed a case during implementation.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 3•2 years ago
|
||
Based on Yulia's investigation we believe the setDebuggerReady message signaling is probably experiencing a scheduling issue that is preventing the "worker-thread-attached" message from calling setDebuggerReady(true). While the JS team has a meet-up, I'm going to drive the next steps of the investigation until we at least ensure that the worker event targets aren't the problem. We're going to start from with-debugger and without-debugger pernosco traces. cc'ing :ochameau for devtools expertise but I'll needinfo if we have an active question.
Comment 4•2 years ago
•
|
||
As I think makes sense, we didn't have any devtools debugger tests that try and create module workers. (I also didn't see any debugger window tests that jumped out at me as using modules either, but some of the files in the examples directory like react are using module syntax, but there's also transpiled files in there too.)
I created a very basic test derived from browser_dbg-worker-scopes.js and was able to reproduce the hang under pernosco, trace is at https://pernos.co/debug/qMtUwUHzk6CVz0WYC6SJ7A/index.html (title: "bug 1816933 module hang"). I also ran browser_dbg-worker-scopes.js itself to get a successful example of the debugger working, which gives us https://pernos.co/debug/9hJWJ1YWGULVY6YVlwjnFQ/index.html (title: "bug 1816933 scope success")
At least part of the problem seems to be that in LoadAllScripts we are making decisions on how to load the debugger script based on what WorkerPrivate::WorkerType() returns, which is an oversight since the debugger's script type should not vary based on how content is using the worker. We should probably change nsIWorkerDebugger::initialize(url) to take an extra arg. That said, the top-level load seems to return fine and the calls to LoadSubScript generally look happy, but there does seem to be a point where the devtools worker bootstrap script goes async as indicated by the CompilerDebuggerScriptRunnable::WorkerRun having returned but the calls to LoadSubScript still continue, so if things go off the rails after that, that isn't captured by the return value. So there's more to investigate still.
| Assignee | ||
Comment 5•2 years ago
|
||
As you said, devtools/server/startup/worker.js which is loaded via nsIWorkerDebugger::initialize ends up being loaded as a ES Module.
So the easiest immediate action would be to force loading it as before (I have no idea how to name the way it is loaded currently? worker script?).
Am I paraphrasing you if I suggest passing a workerType from WorkerDebugger::Initialize to CompilerDebuggerScriptRunnable > LoadMainScript > loadAllScripts so that we force calling:
if (loader->DispatchLoadScripts()) {
syncLoop.Run();
}
instead of the if (aWorkerPrivate->WorkerType() == WorkerType::Module) { branch?
https://searchfox.org/mozilla-central/rev/af78418c4b5f2c8721d1a06486cf4cf0b33e1e8d/dom/workers/ScriptLoader.cpp#238-257
When testing against https://rhashimoto.github.io/browser-test-cases/worker-modules/ we actually have the following exception that isn't displayed anywhere:
ex: TypeError: can't access property "rpc" of undefined
which relates to this line: https://searchfox.org/mozilla-central/rev/af78418c4b5f2c8721d1a06486cf4cf0b33e1e8d/devtools/server/startup/worker.js#21
If I fix this, I then get: WorkerDebuggerGlobalScope.loadSubScript: Using ImportScripts inside a Module Worker is disallowed..
One alternative would be to move forward with bug 1817259 and always load worker modules as ES Modules.
It sounds like doing a similar opposite patch, where WorkerDebugger::Initialize would force loadAllScripts to go the WorkerType::Module way.
Note that this may be more complex as DevTools might not be ready to move to ES Modules in all deps related to workers.
| Assignee | ||
Comment 6•2 years ago
|
||
| Assignee | ||
Comment 7•2 years ago
|
||
The attached patch fixes ES Module loading of comment 0 test page: https://rhashimoto.github.io/browser-test-cases/worker-modules/
This forces loading the debugger script, loaded via WorkerDebugger.initialize as a regular/classic non-es-module script.
The patch looks a bit gross as I added !IsDebuggerScript next to all checks testing if the worker is a ESM. Or IsDebuggerScript() for checks testing if the worker is "classic".
We should probably factorize this in a method, WDYT?
Doing this would later help migrate the debugger script to ESM. A pref would be fine, so that I can experiment ESMifying the debugger script as that's won't be trivial.
Updated•2 years ago
|
Comment 9•2 years ago
|
||
| bugherder | ||
Updated•2 years ago
|
Reproduced the initial issue described in comment 0 using an old Nightly before the fix, verified that using latest Firefox 113.0b8 across platforms (macOS 13, Ubuntu 22.04 and Windows 10) the module Worker is now created with any tool from Web Developer Tools opened.
Description
•