Skip to content
  • fdoray's avatar
    Don't use ::GetFileVersionInfo() in CreateFileVersionInfoForModule() · f177a678
    fdoray authored
    Currently, base::FileVersionInfo::CreateFileVersionInfoForModule()
    calls ::GetModuleFileName and ::GetFileVersionInfo, grabs the loader
    lock and potentially touches the disk to obtain the VS_VERSION_INFO
    of the module. This is gratuitous for a module that is already loaded.
    
    With this CL, base::FileVersionInfo::CreateFileVersionInfoForModule()
    uses base::win::GetResourceFromModule() to get the VS_VERSION_INFO
    resource from memory.
    
    BUG=609709
    
    Review-Url: https://codereview.chromium.org/2046583002
    Cr-Commit-Position: refs/heads/master@{#402549}
    f177a678