Closed
      
        Bug 1779538
      
      
        Opened 3 years ago
          Closed 3 years ago
      
        
    
  
Convert ChromeUtils.importESModule at top-level in ESM to static import in ./mach esmify   
    Categories
(Core :: XPConnect, task, P1)
        Core
          
        
        
      
        
    
        XPConnect
          
        
        
      
        
    Tracking
()
        RESOLVED
        FIXED
        
    
  
        
            104 Branch
        
    
  
| Tracking | Status | |
|---|---|---|
| firefox104 | --- | fixed | 
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
./mach esmify --imports detects ChromeUtils.import and Cu.import at the top-level and replace it with static import if the file is .sys.mjs.
This doesn't cover the following case:
- ./mach esmify --convert A.jsmconverts- A.jsminto- A.sys.mjs
- ./mach esmify --imports .rewrites- ChromeUtils.import("A.jsm")at top-level of- B.jsmwith- ChromeUtils.importESModule("A.sys.mjs")
- ./mach esmify --convert B.jsmconverts- B.jsminto- B.sys.mjs
- ./mach esmify --imports .to rewrite consumers in- B.sys.mjs
At step 4, ChromeUtils.importESModule("A.sys.mjs") is not handled, but it should be replaced with static import, given it's at the top-level.
| Assignee | ||
| Comment 1•3 years ago
           | ||
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/aa33ade6d8e5
Rewrite ChromeUtils.importESModule with static import in sys.mjs. r=yulia
|   | ||
| Comment 3•3 years ago
           | ||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
          status-firefox104:
          --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
          You need to log in
          before you can comment on or make changes to this bug.
        
Description
•