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

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

Issue 155206: DevTools: remove extensions-related workaround from the docked devtools windo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « chrome/browser/debugger/devtools_window.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_browser_event_router.cc
===================================================================
--- chrome/browser/extensions/extension_browser_event_router.cc (revision 20134)
+++ chrome/browser/extensions/extension_browser_event_router.cc (working copy)
@@ -268,7 +268,19 @@
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;
« no previous file with comments | « chrome/browser/debugger/devtools_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698