• Dan Clark's avatar
    Don't double-fetch a module specified on the d8 command line · 8ee40cfc
    Dan Clark authored
    Shell::FetchModuleTree assumes that the module at file_name wasn't
    already fetched. Shell::ExecuteModule is calling into
    FetchModuleTree without checking if the module is already in the module
    map, violating this assumption.
    
    This change fixes this by having Shell::ExecuteModule check for the
    existence of the module before calling into Shell::ExecuteModule, the
    same way that Shell::DoHostImportModuleDynamically does.
    
    Bug: v8:12530
    Change-Id: Ia038cbd1715e85c9c92c4554fd486c657ef952e8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3388130Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
    Commit-Queue: Marja Hölttä <marja@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#78636}
    8ee40cfc
d8-multiple-module-exec.js 338 Bytes