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

Issue 148343008: Speech Recognition API: Safeguarding against page closes during startup (Closed)

Created:
6 years, 10 months ago by Tommy Widenflycht
Modified:
6 years, 10 months ago
CC:
chromium-reviews, tfarina
Visibility:
Public.

Description

It can happen that when a page with an Speech Recognition enabled input goes away directly after pressing the speech icon that the bubble is using a stale pointer; so instead of cashing a WebContents pointer I look it up every time instead. BUG=330660 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=252269

Patch Set 1 #

Total comments: 5

Patch Set 2 : Fixed tests and Mac/GTK #

Patch Set 3 : Cleanup #

Total comments: 1

Patch Set 4 : Removed WebContent versions #

Total comments: 4

Patch Set 5 : Review comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -60 lines) Patch
M chrome/browser/speech/speech_recognition_bubble.h View 1 2 3 3 chunks +15 lines, -8 lines 0 comments Download
M chrome/browser/speech/speech_recognition_bubble.cc View 1 2 3 4 chunks +13 lines, -6 lines 0 comments Download
M chrome/browser/speech/speech_recognition_bubble_browsertest.cc View 1 2 3 3 chunks +23 lines, -8 lines 0 comments Download
M chrome/browser/speech/speech_recognition_bubble_controller.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/speech/speech_recognition_bubble_controller_unittest.cc View 1 2 3 3 chunks +7 lines, -13 lines 0 comments Download
M chrome/browser/ui/cocoa/speech_recognition_bubble_cocoa.mm View 1 2 3 4 5 chunks +16 lines, -7 lines 0 comments Download
M chrome/browser/ui/gtk/speech_recognition_bubble_gtk.cc View 1 2 3 4 5 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/speech_recognition_bubble_views.cc View 1 2 3 4 4 chunks +13 lines, -8 lines 2 comments Download

Messages

Total messages: 17 (0 generated)
Tommy Widenflycht
Reviewers, can you take an initial look? I need to make the same changes to ...
6 years, 10 months ago (2014-02-10 18:18:32 UTC) #1
Primiano Tucci (use gerrit)
LGTM % 1 nit. P.S. Also, the commit message format should be 1 line + ...
6 years, 10 months ago (2014-02-10 21:43:36 UTC) #2
tommi (sloooow) - chröme
lgtm https://codereview.chromium.org/148343008/diff/1/chrome/browser/speech/speech_recognition_bubble.cc File chrome/browser/speech/speech_recognition_bubble.cc (right): https://codereview.chromium.org/148343008/diff/1/chrome/browser/speech/speech_recognition_bubble.cc#newcode152 chrome/browser/speech/speech_recognition_bubble.cc:152: DCHECK(web_contents); nit: since you check web_contents immediately after, ...
6 years, 10 months ago (2014-02-10 22:32:53 UTC) #3
Tommy Widenflycht
https://codereview.chromium.org/148343008/diff/1/chrome/browser/ui/views/speech_recognition_bubble_views.cc File chrome/browser/ui/views/speech_recognition_bubble_views.cc (right): https://codereview.chromium.org/148343008/diff/1/chrome/browser/ui/views/speech_recognition_bubble_views.cc#newcode387 chrome/browser/ui/views/speech_recognition_bubble_views.cc:387: if (bubble_ && web_contents) On 2014/02/10 21:43:37, Primiano Tucci ...
6 years, 10 months ago (2014-02-12 11:35:42 UTC) #4
Tommy Widenflycht
sky: Can you have a look at the chrome/browser/ui files, please?
6 years, 10 months ago (2014-02-12 15:36:36 UTC) #5
sky
https://codereview.chromium.org/148343008/diff/120001/chrome/browser/speech/speech_recognition_bubble.h File chrome/browser/speech/speech_recognition_bubble.h (right): https://codereview.chromium.org/148343008/diff/120001/chrome/browser/speech/speech_recognition_bubble.h#newcode64 chrome/browser/speech/speech_recognition_bubble.h:64: // This should ONLY be called from for tests ...
6 years, 10 months ago (2014-02-12 18:12:18 UTC) #6
Tommy Widenflycht
On 2014/02/12 18:12:18, sky wrote: > https://codereview.chromium.org/148343008/diff/120001/chrome/browser/speech/speech_recognition_bubble.h > File chrome/browser/speech/speech_recognition_bubble.h (right): > > https://codereview.chromium.org/148343008/diff/120001/chrome/browser/speech/speech_recognition_bubble.h#newcode64 > ...
6 years, 10 months ago (2014-02-13 12:40:46 UTC) #7
sky
If you have a WebContents can't you get the ids from it? -Scott On Thu, ...
6 years, 10 months ago (2014-02-13 17:59:11 UTC) #8
Tommy Widenflycht
On 2014/02/13 17:59:11, sky wrote: > If you have a WebContents can't you get the ...
6 years, 10 months ago (2014-02-14 12:51:21 UTC) #9
sky
I think these comments apply to all your implementations. https://codereview.chromium.org/148343008/diff/280001/chrome/browser/ui/views/speech_recognition_bubble_views.cc File chrome/browser/ui/views/speech_recognition_bubble_views.cc (right): https://codereview.chromium.org/148343008/diff/280001/chrome/browser/ui/views/speech_recognition_bubble_views.cc#newcode386 chrome/browser/ui/views/speech_recognition_bubble_views.cc:386: ...
6 years, 10 months ago (2014-02-14 16:37:56 UTC) #10
Tommy Widenflycht
https://codereview.chromium.org/148343008/diff/280001/chrome/browser/ui/views/speech_recognition_bubble_views.cc File chrome/browser/ui/views/speech_recognition_bubble_views.cc (right): https://codereview.chromium.org/148343008/diff/280001/chrome/browser/ui/views/speech_recognition_bubble_views.cc#newcode386 chrome/browser/ui/views/speech_recognition_bubble_views.cc:386: if (bubble_ && GetWebContents()) On 2014/02/14 16:37:56, sky wrote: ...
6 years, 10 months ago (2014-02-17 09:46:33 UTC) #11
sky
https://codereview.chromium.org/148343008/diff/400001/chrome/browser/ui/views/speech_recognition_bubble_views.cc File chrome/browser/ui/views/speech_recognition_bubble_views.cc (right): https://codereview.chromium.org/148343008/diff/400001/chrome/browser/ui/views/speech_recognition_bubble_views.cc#newcode391 chrome/browser/ui/views/speech_recognition_bubble_views.cc:391: if (bubble_ && GetWebContents()) How come the other implementations ...
6 years, 10 months ago (2014-02-18 17:29:44 UTC) #12
Tommy Widenflycht
https://codereview.chromium.org/148343008/diff/400001/chrome/browser/ui/views/speech_recognition_bubble_views.cc File chrome/browser/ui/views/speech_recognition_bubble_views.cc (right): https://codereview.chromium.org/148343008/diff/400001/chrome/browser/ui/views/speech_recognition_bubble_views.cc#newcode391 chrome/browser/ui/views/speech_recognition_bubble_views.cc:391: if (bubble_ && GetWebContents()) On 2014/02/18 17:29:45, sky wrote: ...
6 years, 10 months ago (2014-02-19 08:50:25 UTC) #13
sky
Ah, I see it. Sorry. LGTM
6 years, 10 months ago (2014-02-19 14:59:04 UTC) #14
Tommy Widenflycht
The CQ bit was checked by tommyw@chromium.org
6 years, 10 months ago (2014-02-20 12:34:19 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommyw@chromium.org/148343008/400001
6 years, 10 months ago (2014-02-20 12:51:47 UTC) #16
commit-bot: I haz the power
6 years, 10 months ago (2014-02-20 16:56:58 UTC) #17
Message was sent while issue was closed.
Change committed as 252269

Powered by Google App Engine
This is Rietveld 408576698