DescriptionUse a proper profile in NaClBrowserDelegateImpl::MapUrlToLocalFilePath
not to slow down open_resource IRT call on Chrome OS (and on Chrome
with multiple profiles).
The function should use a profile associated with the renderer rather
than the one created in chrome/browser/chrome_browser_main.cc. Otherwise,
MapUrlToLocalFilePath may see an invalid set of extensions and may
return false when it should return true.
For example, on Chrome OS, the profile created in chrome_browser_main.cc
is basically only for the login screen except a few minor cases (e.g.
browser crash recovery), and therefore is not suitable for the use in
MapUrlToLocalFilePath.
This fix allows NaCl apps, both in SFI and non-SFI mode, to open a NaCl
resource file with the fast __nacl_irt_open_resource path (see the bug
for more details).
BUG=360277
TEST=Manually tested. Add two CHECK() calls to DoOpenNaClExecutableOnThreadPool()
and OnLaunchNaCl() so that Chrome will crash if MapUrlToLocalFilePath()
returns false, build Chrome for Chrome OS, copy it to Chromebook, reboot
it, sign in, and then try to load a dynamically linked NaCl app. Confirm
that Chrome does not crash.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=269210
Patch Set 1 #Patch Set 2 : review #Patch Set 3 : fix tests #Patch Set 4 : rebase #
Total comments: 4
Patch Set 5 : git cl format #Messages
Total messages: 10 (0 generated)
|