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

Issue 6381004: Fix a potential assert in SpeechRecognizer dtor. (Closed)

Created:
9 years, 11 months ago by Satish
Modified:
9 years, 7 months ago
Reviewers:
hans
CC:
chromium-reviews
Visibility:
Public.

Description

Fix a potential assert in SpeechRecognizer dtor. When StopRecognition is invoked and no data was recorded, there is a possibility that the delegate might release the recognizer within the DidCompleteRecognition callback. So we now perform cleanup tasks such as freeing the encoder_ object before invoking the delegate. Without this change there would be an assert in the SpeechRecognizer dtor about encoder_ remaining valid. BUG=none TEST=Manual, double-click on the speech button quickly a few times and verify no assert pops up in the dtor. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71994

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -3 lines) Patch
M chrome/browser/speech/speech_recognizer.cc View 2 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Satish
9 years, 11 months ago (2011-01-20 18:10:55 UTC) #1
hans
9 years, 11 months ago (2011-01-20 18:18:45 UTC) #2
On 2011/01/20 18:10:55, Satish wrote:

lgtm

Powered by Google App Engine
This is Rietveld 408576698