diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 08:58:31 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 08:58:31 +0000 |
commit | c250d0224a2ff6befb6a1692f2ed596b09f17447 (patch) | |
tree | 2437da6d53f254684f3b31da9bb1ad065bfcef39 /chrome/browser/extensions/extension_browser_event_router.cc | |
parent | e17a8a157bc8b8ba60854296e9ed07137aed8487 (diff) | |
download | chromium_src-c250d0224a2ff6befb6a1692f2ed596b09f17447.zip chromium_src-c250d0224a2ff6befb6a1692f2ed596b09f17447.tar.gz chromium_src-c250d0224a2ff6befb6a1692f2ed596b09f17447.tar.bz2 |
DevTools: remove extensions-related workaround from the docked devtools window destruction.
Review URL: http://codereview.chromium.org/155206
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20139 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_browser_event_router.cc')
-rw-r--r-- | chrome/browser/extensions/extension_browser_event_router.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_browser_event_router.cc b/chrome/browser/extensions/extension_browser_event_router.cc index ad69ba5..89f3951 100644 --- a/chrome/browser/extensions/extension_browser_event_router.cc +++ b/chrome/browser/extensions/extension_browser_event_router.cc @@ -268,7 +268,19 @@ void ExtensionBrowserEventRouter::TabUpdated(TabContents* contents, bool did_navigate) { int tab_id = ExtensionTabUtil::GetTabId(contents); std::map<int, TabEntry>::iterator i = tab_entries_.find(tab_id); - CHECK(tab_entries_.end() != i); + if(tab_entries_.end() == i) { + // TODO(rafaelw): Unregister EBER on TAB_CONTENTS_DESTROYED in order + // not to receive NAV_ENTRY_COMMITTED from objects that are allocated + // at the same address as previously deleted TabContents. + // + // The problem here is that NAV_ENTRY_COMMITTED is issued by the navigation + // controller independently from tabstrip model. One should not rely upon + // TabStripModelObserver events when registering / unregistering + // tab contents events' handlers. + registrar_.Remove(this, NotificationType::NAV_ENTRY_COMMITTED, + Source<NavigationController>(&contents->controller())); + return; + } TabEntry& entry = i->second; DictionaryValue* changed_properties = NULL; |