summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_provider.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/automation/automation_provider.cc')
-rw-r--r--chrome/browser/automation/automation_provider.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 7705d94..53ff71e 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -219,11 +219,11 @@ class NavigationNotificationObserver : public NotificationObserver {
automation_->Send(*response);
*response = NULL; // *response is deleted by Send.
}
- automation_->RemoveNavigationStatusListener(this);
delete this;
}
void Unregister() {
+ automation_->RemoveNavigationStatusListener(this);
NotificationService* service = NotificationService::current();
service->RemoveObserver(this, NOTIFY_NAV_ENTRY_COMMITTED,
Source<NavigationController>(controller_));