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

Issue 6136006: Fix leak in PrerenderResourceHandlerTest. (Closed)

Created:
9 years, 11 months ago by cbentzel
Modified:
9 years, 7 months ago
Reviewers:
gavinp, tburkard
CC:
chromium-reviews, Timur Iskhodzhanov, Alexander Potapenko, pam+watch_chromium.org, stuartmorgan+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Fix leak in PrerenderResouceHandlerTest. ResourceHandler's expect to be deleted on the IO thread after their ref count goes to 0. Change the unit test to explicitly drop ref count and run the IO thread's message loop. BUG=69414 TEST=valgrind trybots Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71798

Patch Set 1 #

Patch Set 2 : Run IO thread in test destructor to delete resource handler. #

Patch Set 3 : Fix leak with MockResourceHandler #

Patch Set 4 : Merge with trunk #

Total comments: 2

Patch Set 5 : Merged #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -17 lines) Patch
M chrome/browser/prerender/prerender_resource_handler_unittest.cc View 1 2 3 4 3 chunks +14 lines, -5 lines 0 comments Download
M tools/heapcheck/suppressions.txt View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
M tools/valgrind/memcheck/suppressions.txt View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
cbentzel
9 years, 11 months ago (2011-01-14 18:57:49 UTC) #1
cbentzel
On 2011/01/14 18:57:49, cbentzel wrote: It seems a little wrong to share the same message ...
9 years, 11 months ago (2011-01-14 18:58:56 UTC) #2
cbentzel
The valgrind trybot failures are not PrerenderResourceHandler related.
9 years, 11 months ago (2011-01-18 11:56:29 UTC) #3
cbentzel
On 2011/01/18 11:56:29, cbentzel wrote: > The valgrind trybot failures are not PrerenderResourceHandler related. And, ...
9 years, 11 months ago (2011-01-18 12:59:35 UTC) #4
gavinp
LGTM! http://codereview.chromium.org/6136006/diff/10001/chrome/browser/prerender/prerender_resource_handler_unittest.cc File chrome/browser/prerender/prerender_resource_handler_unittest.cc (right): http://codereview.chromium.org/6136006/diff/10001/chrome/browser/prerender/prerender_resource_handler_unittest.cc#newcode105 chrome/browser/prerender/prerender_resource_handler_unittest.cc:105: // reference count go to 0. The grammar ...
9 years, 11 months ago (2011-01-18 22:25:05 UTC) #5
tburkard
LGTM
9 years, 11 months ago (2011-01-18 23:54:10 UTC) #6
cbentzel
9 years, 11 months ago (2011-01-19 13:55:17 UTC) #7
I'll land after trybots are happy.

http://codereview.chromium.org/6136006/diff/10001/chrome/browser/prerender/pr...
File chrome/browser/prerender/prerender_resource_handler_unittest.cc (right):

http://codereview.chromium.org/6136006/diff/10001/chrome/browser/prerender/pr...
chrome/browser/prerender/prerender_resource_handler_unittest.cc:105: //
reference count go to 0.
On 2011/01/18 22:25:06, gavinp wrote:
> The grammar above confused me, especially the apostrophe.  I think a more
clear
> comment is:
> 
> "The ResourceHandlers will post a task to get deleted when their reference
count
> goes to 0."

I changed the comment to be clearer.

Powered by Google App Engine
This is Rietveld 408576698