DescriptionAdd ScopedAllowIO to allow get of FILE_EXE etc paths from non-IO-thread.
PathService::Get() is treated as safe-to-call from any thread, but
PathProviderMac(FILE_EXE,...) looks up the NSExecutable path, and
translates it from relative to absolute using
base::MakeAbsoluteFilePath(), which asserts that IO is allowed on the
calling thread.
This was being hit by code in NaClBrowser in developers' local debug
builds.
As per the discussion on crbug.com/259796, the one-off cost of this
IO (given PathService then caches the result) seems acceptable.
NOPRESUBMIT=true
BUG=373477, 259796
Committed: https://crrev.com/adb3c21551b2f0f7a92878a03cc89782c6b114c4
Cr-Commit-Position: refs/heads/master@{#405577}
Patch Set 1 #Patch Set 2 : Add missing include #Messages
Total messages: 15 (7 generated)
|