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

Issue 2878005: TranslateInfoBarDelegate2 were leaked. (Closed)

Created:
10 years, 6 months ago by Jay Civelli
Modified:
9 years, 7 months ago
Reviewers:
sky
CC:
chromium-reviews, Paweł Hajdan Jr., ben+cc_chromium.org
Base URL:
git://codf21.jail/chromium.git
Visibility:
Public.

Description

TranslateInfoBarDelegate2 were leaked. (Relanding, the changed unit-test was flaky. Turns out comparing pointers in that context to see that an object changed is a bad idea as a new object might be at the exact same address as an old object.) This revealed that the NormalTranslate unit-test was incorrect (it was not testing that changing the source or target language from the after translate infobar causes a translation). This also revealed that returning reference string in the delegate is not a brilliant idea as when we switch infobars, the new infobar might be using a string from the old infobar that might have been deleted. BUG=None TEST=Linux heap check bot should be green. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=50920

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -18 lines) Patch
M chrome/browser/translate/translate_infobar_delegate2.h View 3 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/translate/translate_infobar_delegate2.cc View 3 chunks +10 lines, -6 lines 0 comments Download
M chrome/browser/translate/translate_manager2_unittest.cc View 1 chunk +24 lines, -7 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Jay Civelli
10 years, 6 months ago (2010-06-26 01:31:34 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698