summaryrefslogtreecommitdiffstats
path: root/extensions/browser/extension_function_dispatcher.cc
diff options
context:
space:
mode:
authorderat <derat@chromium.org>2014-08-23 21:10:31 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-24 04:15:43 +0000
commit5122f4eb8fa975f8e7037e5c27075e0acb3c0890 (patch)
tree180d6e3a3bdd878bbff67cc526517eb0133619ed /extensions/browser/extension_function_dispatcher.cc
parent975cfe4b7709fb5c39406dad7ac6f9197daf212a (diff)
downloadchromium_src-5122f4eb8fa975f8e7037e5c27075e0acb3c0890.zip
chromium_src-5122f4eb8fa975f8e7037e5c27075e0acb3c0890.tar.gz
chromium_src-5122f4eb8fa975f8e7037e5c27075e0acb3c0890.tar.bz2
extensions: Speculative fix for crash on IO thread.
Make ExtensionFunctionDispatcher::DispatchOnIOThread() return early if the extension that was passed to it doesn't exist anymore. BUG=406062 Review URL: https://codereview.chromium.org/489033003 Cr-Commit-Position: refs/heads/master@{#291618}
Diffstat (limited to 'extensions/browser/extension_function_dispatcher.cc')
-rw-r--r--extensions/browser/extension_function_dispatcher.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/extensions/browser/extension_function_dispatcher.cc b/extensions/browser/extension_function_dispatcher.cc
index 4dfb7fe..a825d01 100644
--- a/extensions/browser/extension_function_dispatcher.cc
+++ b/extensions/browser/extension_function_dispatcher.cc
@@ -231,6 +231,8 @@ void ExtensionFunctionDispatcher::DispatchOnIOThread(
const ExtensionHostMsg_Request_Params& params) {
const Extension* extension =
extension_info_map->extensions().GetByID(params.extension_id);
+ if (!extension)
+ return;
ExtensionFunction::ResponseCallback callback(
base::Bind(&IOThreadResponseCallback, ipc_sender, routing_id,