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

Issue 10071040: Fixed a memory leak in SpeechRecognitionManagerImpl causing ChromeSpeechInputManagerDelegate to be … (Closed)

Created:
8 years, 8 months ago by Primiano Tucci (use gerrit)
Modified:
8 years, 8 months ago
Reviewers:
Satish, jam
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Fixed a memory leak in SpeechRecognitionManagerImpl causing ChromeSpeechInputManagerDelegate to be never freed. BUG=123116, 116954 TEST=Run Valgrind tests. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=132401

Patch Set 1 #

Patch Set 2 : Nits. #

Total comments: 2

Patch Set 3 : Fixed nits according to jam@ review. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -13 lines) Patch
M content/browser/speech/speech_recognition_manager_impl.h View 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/speech/speech_recognition_manager_impl.cc View 1 2 10 chunks +11 lines, -12 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Primiano Tucci (use gerrit)
8 years, 8 months ago (2012-04-13 10:00:56 UTC) #1
Primiano Tucci (use gerrit)
Made a minor stylistic fix, seems that ".get()" is superfluous since scoped_ptr has an overriden ...
8 years, 8 months ago (2012-04-13 10:16:40 UTC) #2
Primiano Tucci (use gerrit)
Just a further question: since SpeechRecognitionManagerImpl is a singleton (since, indeed, we expect to have ...
8 years, 8 months ago (2012-04-13 10:37:48 UTC) #3
jam
http://codereview.chromium.org/10071040/diff/4003/content/browser/speech/speech_recognition_manager_impl.cc File content/browser/speech/speech_recognition_manager_impl.cc (right): http://codereview.chromium.org/10071040/diff/4003/content/browser/speech/speech_recognition_manager_impl.cc#newcode175 content/browser/speech/speech_recognition_manager_impl.cc:175: if (delegate_ != NULL) { by convention we don't ...
8 years, 8 months ago (2012-04-13 18:19:54 UTC) #4
jam
On 2012/04/13 10:37:48, Primiano Tucci wrote: > Just a further question: > since SpeechRecognitionManagerImpl is ...
8 years, 8 months ago (2012-04-13 18:20:54 UTC) #5
Primiano Tucci (use gerrit)
http://codereview.chromium.org/10071040/diff/4003/content/browser/speech/speech_recognition_manager_impl.cc File content/browser/speech/speech_recognition_manager_impl.cc (right): http://codereview.chromium.org/10071040/diff/4003/content/browser/speech/speech_recognition_manager_impl.cc#newcode175 content/browser/speech/speech_recognition_manager_impl.cc:175: if (delegate_ != NULL) { On 2012/04/13 18:19:54, John ...
8 years, 8 months ago (2012-04-16 08:47:37 UTC) #6
Satish
lgtm
8 years, 8 months ago (2012-04-16 09:00:32 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/primiano@chromium.org/10071040/9001
8 years, 8 months ago (2012-04-16 09:16:57 UTC) #8
commit-bot: I haz the power
Try job failure for 10071040-9001 (retry) on win_rel for step "browser_tests". It's a second try, ...
8 years, 8 months ago (2012-04-16 11:44:44 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/primiano@chromium.org/10071040/9001
8 years, 8 months ago (2012-04-16 11:51:56 UTC) #10
commit-bot: I haz the power
Try job failure for 10071040-9001 (retry) on win_rel for step "browser_tests". It's a second try, ...
8 years, 8 months ago (2012-04-16 14:20:56 UTC) #11
jam
On 2012/04/16 08:47:37, Primiano Tucci wrote: > http://codereview.chromium.org/10071040/diff/4003/content/browser/speech/speech_recognition_manager_impl.cc > File content/browser/speech/speech_recognition_manager_impl.cc (right): > > http://codereview.chromium.org/10071040/diff/4003/content/browser/speech/speech_recognition_manager_impl.cc#newcode175 ...
8 years, 8 months ago (2012-04-17 03:19:03 UTC) #12
Primiano Tucci (use gerrit)
8 years, 8 months ago (2012-04-17 08:20:48 UTC) #13
> it seems that this is orthogonal. whether you use smart pointer or not, the
left
> side of the operator is the only thing that's affected. i.e. if (naked_ptr) vs
> if (smart_pointer.get()). with both of these you can add a "!= NULL" but that
> doesn't add anything

Hmm my point was that "if (x != NULL)" seemed to me a bit more "universal",
since it works both in the case of a naked or a smart pointer. So, in the case
of future changes to the pointer type, no changes are required on the
corresponding "if" lines.
On the other side, "if (x)" works only with a naked pointer (and similarly "if
(x.get())" does only with a smart one)

Powered by Google App Engine
This is Rietveld 408576698