Description[Extensions] Fix a data race in ChromeExtensionMessageFilter.
There is a data race in OnGetExtMessageBundleOnBlockingPool method. It calls
InfoMap::extensions() on a blocking pool, but all InfoMap methods must be
called on the IO thread.
This CL does the following:
1. Add DCHECK_CURRENTRY_ON(..) in extensions::InfoMap.
With those DCHECKs browser_tests.ExtensionApiTest.SharedModuleLocale starts
crashing (because of a wrong thread).
2. Remove calls to IO-only methods from
LoadMessageBundleSubstitutionMapWithImport and rename that function.
3. Use OnGetExtMessageBundle to collect all necessary information before
posting a task to a blocking pool.
4. Remove NOTREACHED(), because an extension might be removed
before OnGetExtMessageBundle message was received.
TEST=browser_tests.ExtensionApiTest.SharedModuleLocale
BUG=
Review-Url: https://codereview.chromium.org/2686463003
Cr-Commit-Position: refs/heads/master@{#451339}
Committed: https://chromium.googlesource.com/chromium/src/+/54e8d335c0e4bebe49fbb2cacc5e49c06f29dc6e
Patch Set 1 #Patch Set 2 : [Extensions] Fix a data race in ChromeExtensionMessageFilter. #
Total comments: 7
Patch Set 3 : [Extensions] Fix a data race in ChromeExtensionMessageFilter. #
Total comments: 8
Patch Set 4 : [Extensions] Fix a data race in ChromeExtensionMessageFilter. #
Total comments: 4
Patch Set 5 : [Extensions] Fix a data race in ChromeExtensionMessageFilter. #
Messages
Total messages: 20 (8 generated)
|