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

Unified Diff: chrome/browser/ui/tabs/tab_strip_model.cc

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/master again, resolved conflicts Created 6 years, 7 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/ui/tabs/tab_strip_model.cc
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc
index 06ac829caee55219f88d5b595bef67b64b3762d0..098d89d303ad3d9cef7e7662ddbaec5f78829b3b 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -73,7 +73,7 @@ class CloseTracker {
private:
// WebContentsObserver:
- virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE {
+ virtual void WebContentsDestroyed() OVERRIDE {
parent_->OnWebContentsDestroyed(this);
}
@@ -161,7 +161,7 @@ class TabStripModel::WebContentsData : public content::WebContentsObserver {
private:
// Make sure that if someone deletes this WebContents out from under us, it
// is properly removed from the tab strip.
- virtual void WebContentsDestroyed(WebContents* web_contents) OVERRIDE;
+ virtual void WebContentsDestroyed() OVERRIDE;
// The WebContents being tracked by this WebContentsData. The
// WebContentsObserver does keep a reference, but when the WebContents is
@@ -224,13 +224,12 @@ void TabStripModel::WebContentsData::SetWebContents(WebContents* contents) {
Observe(contents);
}
-void TabStripModel::WebContentsData::WebContentsDestroyed(
- WebContents* web_contents) {
- DCHECK_EQ(contents_, web_contents);
+void TabStripModel::WebContentsData::WebContentsDestroyed() {
+ DCHECK_EQ(contents_, web_contents());
// Note that we only detach the contents here, not close it - it's
// already been closed. We just want to undo our bookkeeping.
- int index = tab_strip_model_->GetIndexOfWebContents(web_contents);
+ int index = tab_strip_model_->GetIndexOfWebContents(web_contents());
DCHECK_NE(TabStripModel::kNoTab, index);
tab_strip_model_->DetachWebContentsAt(index);
}
« no previous file with comments | « chrome/browser/ui/tab_contents/core_tab_helper.cc ('k') | chrome/browser/ui/tabs/tab_strip_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698