• wez's avatar
    Add ScopedAllowIO to allow get of FILE_EXE etc paths from non-IO-thread. · adb3c215
    wez authored
    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
    
    Review-Url: https://codereview.chromium.org/2145003004
    Cr-Commit-Position: refs/heads/master@{#405577}
    adb3c215
base_paths_mac.mm 3.95 KB