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

Issue 10444125: Valgrind: Fix a leak in OneClickSigninHelperTest. (Closed)

Created:
8 years, 6 months ago by James Hawkins
Modified:
8 years, 6 months ago
CC:
chromium-reviews, mihaip-chromium-reviews_chromium.org, Aaron Boodman, pam+watch_chromium.org, timurrrr+watch_chromium.org, glider+watch_chromium.org, bruening+watch_chromium.org
Visibility:
Public.

Description

Valgrind: Fix a leak in OneClickSigninHelperTest. Fix is to run the current MessageLoop in test TearDown to cleanup DeleteSoon()s. BUG=130246 TEST=OneClickSigninHelperTest.* R=groby TBR=atwilson Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=139968

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -21 lines) Patch
M chrome/browser/extensions/api/identity/web_auth_flow_unittest.cc View 1 chunk +0 lines, -4 lines 3 comments Download
M chrome/browser/ui/sync/one_click_signin_helper_unittest.cc View 1 chunk +1 line, -0 lines 3 comments Download
M tools/valgrind/memcheck/suppressions.txt View 3 chunks +0 lines, -17 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
James Hawkins
8 years, 6 months ago (2012-05-31 22:30:19 UTC) #1
groby-ooo-7-16
lgtm
8 years, 6 months ago (2012-05-31 22:33:07 UTC) #2
Roger Tawa OOO till Jul 10th
Hi James, I already had a change out for review to fix this leak, see ...
8 years, 6 months ago (2012-06-01 13:56:42 UTC) #3
James Hawkins
https://chromiumcodereview.appspot.com/10444125/diff/1/chrome/browser/extensions/api/identity/web_auth_flow_unittest.cc File chrome/browser/extensions/api/identity/web_auth_flow_unittest.cc (left): https://chromiumcodereview.appspot.com/10444125/diff/1/chrome/browser/extensions/api/identity/web_auth_flow_unittest.cc#oldcode73 chrome/browser/extensions/api/identity/web_auth_flow_unittest.cc:73: return web_contents_; On 2012/06/01 13:56:42, Roger Tawa wrote: > ...
8 years, 6 months ago (2012-06-01 23:53:13 UTC) #4
Roger Tawa OOO till Jul 10th
8 years, 6 months ago (2012-06-04 14:50:40 UTC) #5
https://chromiumcodereview.appspot.com/10444125/diff/1/chrome/browser/extensi...
File chrome/browser/extensions/api/identity/web_auth_flow_unittest.cc (left):

https://chromiumcodereview.appspot.com/10444125/diff/1/chrome/browser/extensi...
chrome/browser/extensions/api/identity/web_auth_flow_unittest.cc:73: return
web_contents_;
On 2012/06/01 23:53:13, James Hawkins wrote:
> On 2012/06/01 13:56:42, Roger Tawa wrote:
> > Why is this change needed to fix the memory leak?
> 
> Didn't say it was.  It's drive-by cleanup I saw while fixing this issue.

OK, the CL description did not mention it included other drive by cleanup, so it
was not clear it was that.  Maybe update the CL description?

https://chromiumcodereview.appspot.com/10444125/diff/1/chrome/browser/ui/sync...
File chrome/browser/ui/sync/one_click_signin_helper_unittest.cc (right):

https://chromiumcodereview.appspot.com/10444125/diff/1/chrome/browser/ui/sync...
chrome/browser/ui/sync/one_click_signin_helper_unittest.cc:70:
MessageLoop::current()->RunAllPending();
On 2012/06/01 23:53:13, James Hawkins wrote:
> On 2012/06/01 13:56:42, Roger Tawa wrote:
> > Are you sure this should/can be done after destroying the browser context
> (i.e.
> > test profile) and ui thread?
> 
> In what context are you asking this question?  What are your concerns?

My concern is calling RunAllPending() after the destruction of the
content::TestBrowserThread object. Also, there may be tasks to run for the
browsing context.  Other tests make sure not to do this, see TearDown() in
src/content/test/test_renderer_host.cc for example.

Powered by Google App Engine
This is Rietveld 408576698