summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-13 16:50:43 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-13 16:50:43 +0000
commit67ffd0a92abdfdf0f1692cb9da2e26c361ee45e2 (patch)
treefd6eca2153639ad38baee0f457b7c86ffff4a3ab /content
parent34fc8fbac1d57ebc674496795e0400b69a491171 (diff)
downloadchromium_src-67ffd0a92abdfdf0f1692cb9da2e26c361ee45e2.zip
chromium_src-67ffd0a92abdfdf0f1692cb9da2e26c361ee45e2.tar.gz
chromium_src-67ffd0a92abdfdf0f1692cb9da2e26c361ee45e2.tar.bz2
Adds some debugging code in hopes of identifying a crasher.
BUG=107172 TEST=none R=ben@chromium.org,avi@chromium.org Review URL: http://codereview.chromium.org/8921032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114221 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/tab_contents/tab_contents_delegate.cc6
-rw-r--r--content/public/browser/notification_types.h5
2 files changed, 11 insertions, 0 deletions
diff --git a/content/browser/tab_contents/tab_contents_delegate.cc b/content/browser/tab_contents/tab_contents_delegate.cc
index f88e99e..1bb95f2 100644
--- a/content/browser/tab_contents/tab_contents_delegate.cc
+++ b/content/browser/tab_contents/tab_contents_delegate.cc
@@ -10,6 +10,8 @@
#include "content/browser/javascript_dialogs.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/intents_host.h"
+#include "content/public/browser/notification_service.h"
+#include "content/public/browser/notification_types.h"
#include "content/public/common/url_constants.h"
#include "ui/gfx/rect.h"
#include "webkit/glue/web_intent_data.h"
@@ -337,6 +339,10 @@ TabContentsDelegate::~TabContentsDelegate() {
tab_contents->set_delegate(NULL);
}
DCHECK(attached_contents_.empty());
+ content::NotificationService::current()->Notify(
+ content::NOTIFICATION_TAB_CONTENTS_DELEGATE_DESTROYED,
+ content::Source<TabContentsDelegate>(this),
+ content::NotificationService::NoDetails());
}
void TabContentsDelegate::Attach(TabContents* tab_contents) {
diff --git a/content/public/browser/notification_types.h b/content/public/browser/notification_types.h
index 51c64c3..23f947a 100644
--- a/content/public/browser/notification_types.h
+++ b/content/public/browser/notification_types.h
@@ -265,6 +265,11 @@ enum NotificationType {
// Source<TabContents>.
NOTIFICATION_TAB_CONTENTS_DESTROYED,
+ // This notification is sent when a TabContentsDelegate is being
+ // destroyed. The source is a Source<TabContentsDelegate>.
+ // TODO(sky): Remove when we figure out http://crbug.com/107172.
+ NOTIFICATION_TAB_CONTENTS_DELEGATE_DESTROYED,
+
// A RenderViewHost was created for a TabContents. The source is the
// associated TabContents, and the details is the RenderViewHost
// pointer.