-
petewil authored
Revert of Don't use ::GetFileVersionInfo() in CreateFileVersionInfoForModule() (patchset #13 id:240001 of https://codereview.chromium.org/2046583002/ ) Reason for revert: Sheriff reverting on suspicion of causing the Win x64 build to fail: https://build.chromium.org/p/chromium/builders/Win%20x64/builds/1995 From the log: FAILED: obj/base/base.file_version_info_win.obj ninja -t msvc -e environment.x64 -- C:\b\build\slave\cache\cipd\goma/gomacc "C:\b\depot_tools\win_toolchain\vs_files\95ddda401ec5678f15eeed01d2bee08fcbc5ee97\VC\bin\amd64\cl.exe" /nologo /showIncludes /FC @obj\base\base.file_version_info_win.obj.rsp /c ..\..\base\file_version_info_win.cc /Foobj\base\base.file_version_info_win.obj /Fdobj\base\base.cc.pdb c:\b\build\slave\win_x64\build\src\base\file_version_info_win.cc(81): error C2220: warning treated as error - no 'object' file generated c:\b\build\slave\win_x64\build\src\base\file_version_info_win.cc(81): warning C4267: 'argument': conversion from 'size_t' to 'DWORD', possible loss of data [8341/32887] CXX obj\base\threading\base.thread_collision_warner.obj Original issue's description: > Don't use ::GetFileVersionInfo() in CreateFileVersionInfoForModule() > > 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 > > Committed: https://crrev.com/f177a678814f97f0b35bd6aa678c1cf885ad1656 > Cr-Commit-Position: refs/heads/master@{#402549} TBR=grt@chromium.org,thestig@chromium.org,fdoray@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=609709 Review-Url: https://codereview.chromium.org/2102363002 Cr-Commit-Position: refs/heads/master@{#402616}
d916fc3b