• Wei Lee's avatar
    [CCA] Fix circular dependencies · 50cb1a54
    Wei Lee authored
    We should fix the circular dependencies to avoid potential wrong order
    when importing modules.
    
    For example, if the dependencies of modules are like:
      A --> B --> ... --> A
    If we import B but A needs B when loading A, it might hit "access
    before initialization" error.
    
    Bug: 1121457
    Test: tast run [DUT] camera.CCAUI*
    Test: npx madge --circular main.js
    Test: (Replace some js with SWA version and run "npx madge" again)
    
    Change-Id: Ib41b85425fc256a3394b31a8c573f68177d45c3a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505397
    Commit-Queue: Wei Lee <wtlee@chromium.org>
    Reviewed-by: default avatarShik Chen <shik@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#822107}
    50cb1a54
main.js 10.6 KB