Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Unified Diff: chrome/browser/extensions/extension_host.cc

Issue 9350024: Unrevert again r119770 - "Event pages: remember events that the page registered for,"" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_host.cc
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 2714b0b4a83b340ed79fd039777aa0b9239b61ad..a2eae23b00acd049d7624f12b93b85a169f950f5 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -340,10 +340,6 @@ 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());
@@ -359,6 +355,13 @@ 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));
}
}
« no previous file with comments | « chrome/browser/extensions/extension_event_router.cc ('k') | chrome/browser/extensions/extension_process_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698