ExtensionMessageFilter: Prevent data race.

The |browser_context_| member of ExtensionMessageFilter is only supposed to be
read on the UI thread, but is also read in OnMessageReceived which might not be
invoked on the UI thread (for messages not handled by the
ExtensionMessageFilter). This is racy and can lead to accessing the variable
simultaneously on multiple threads.

Remove the check for a valid |browser_context_| in
ExtensionMessageFilter::OnMessageReceived. It's redundant anyway since all the
message handler functions do already check for a valid browser context.


Change-Id: Ib34ac14b9a1ff609224a9fdf80202070098760e9
Reviewed-on: https://chromium-review.googlesource.com/1144606
Commit-Queue: Karan Bhatia <karandeepb@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576953}
1 file changed