summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_browser_event_router.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extension_browser_event_router.cc')
-rw-r--r--chrome/browser/extensions/extension_browser_event_router.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_browser_event_router.cc b/chrome/browser/extensions/extension_browser_event_router.cc
index a689d32..1fcb3e7 100644
--- a/chrome/browser/extensions/extension_browser_event_router.cc
+++ b/chrome/browser/extensions/extension_browser_event_router.cc
@@ -85,8 +85,10 @@ ExtensionBrowserEventRouter* ExtensionBrowserEventRouter::GetInstance() {
static void DispatchEvent(Profile* profile,
const char* event_name,
const std::string json_args) {
- ExtensionMessageService::GetInstance(profile->GetRequestContext())->
- DispatchEventToRenderers(event_name, json_args);
+ if (profile->GetExtensionMessageService()) {
+ profile->GetExtensionMessageService()->
+ DispatchEventToRenderers(event_name, json_args);
+ }
}
static void DispatchSimpleBrowserEvent(Profile* profile,