Index: chrome/browser/extensions/extension_host.cc |
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc |
index a2eae23b00acd049d7624f12b93b85a169f950f5..2714b0b4a83b340ed79fd039777aa0b9239b61ad 100644 |
--- a/chrome/browser/extensions/extension_host.cc |
+++ b/chrome/browser/extensions/extension_host.cc |
@@ -340,6 +340,10 @@ void ExtensionHost::DidStopLoading() { |
#endif |
} |
if (notify) { |
+ content::NotificationService::current()->Notify( |
+ chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, |
+ content::Source<Profile>(profile_), |
+ content::Details<ExtensionHost>(this)); |
if (extension_host_type_ == chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE) { |
UMA_HISTOGRAM_TIMES("Extensions.BackgroundPageLoadTime", |
since_created_.Elapsed()); |
@@ -355,13 +359,6 @@ void ExtensionHost::DidStopLoading() { |
} else if (extension_host_type_ == chrome::VIEW_TYPE_APP_SHELL) { |
UMA_HISTOGRAM_TIMES("Extensions.ShellLoadTime", since_created_.Elapsed()); |
} |
- |
- // Send the notification last, because it might result in this being |
- // deleted. |
- content::NotificationService::current()->Notify( |
- chrome::NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING, |
- content::Source<Profile>(profile_), |
- content::Details<ExtensionHost>(this)); |
} |
} |