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

Unified Diff: chrome/browser/renderer_host/render_widget_host_unittest.cc

Issue 353008: Fix a memory bug in the new ResizeThenCrash test.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host_unittest.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_unittest.cc (revision 30722)
+++ chrome/browser/renderer_host/render_widget_host_unittest.cc (working copy)
@@ -311,13 +311,14 @@
EXPECT_TRUE(process_->sink().GetUniqueMessageMatching(ViewMsg_Resize::ID));
// Simulate a renderer crash before the paint message. Ensure all the resize
- // ack logic is cleared.
+ // ack logic is cleared. Must clear the view first so it doesn't get deleted.
+ host_->set_view(NULL);
host_->RendererExited();
EXPECT_FALSE(host_->resize_ack_pending_);
EXPECT_EQ(gfx::Size(), host_->in_flight_size_);
// Reset the view so we can exit the test cleanly.
- view_.reset(new TestView(host_.get()));
+ host_->set_view(view_.get());
}
// Tests setting custom background
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698