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

Issue 960223002: Detach SpeechRecognitionController upon page detach. (Closed)

Created:
5 years, 10 months ago by sof
Modified:
5 years, 9 months ago
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Detach SpeechRecognitionController upon page detach. When a page is notified destroyed, it is no longer safe to access the page's SpeechRecognitionController as its lifetime is that of the page. R=haraken BUG=455857 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=190993

Patch Set 1 #

Patch Set 2 : typo #

Patch Set 3 : Adjust assert and allow repeated observer detaches #

Total comments: 2

Patch Set 4 : Make SpeechRecognition a FrameDestructionObserver #

Total comments: 2

Patch Set 5 : have SpeechRecognition observe the page instead #

Total comments: 2

Patch Set 6 : replace null check with assert #

Patch Set 7 : Allow controller-detached creation of SpeechRecognition objects #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -17 lines) Patch
A LayoutTests/fast/speech/scripted/speechrecognition-detached-no-crash.html View 1 2 3 4 5 6 1 chunk +44 lines, -0 lines 0 comments Download
A LayoutTests/fast/speech/scripted/speechrecognition-detached-no-crash-expected.txt View 1 2 3 4 5 6 1 chunk +17 lines, -0 lines 0 comments Download
M Source/modules/speech/SpeechRecognition.h View 1 2 3 4 5 6 4 chunks +19 lines, -2 lines 0 comments Download
M Source/modules/speech/SpeechRecognition.cpp View 1 2 3 4 5 6 6 chunks +24 lines, -15 lines 2 comments Download

Messages

Total messages: 24 (3 generated)
sof
Please take a look. Checking with the bots wrt the lifetime observer detachment change, but ...
5 years, 10 months ago (2015-02-26 14:49:36 UTC) #2
haraken
https://codereview.chromium.org/960223002/diff/40001/Source/core/page/Page.cpp File Source/core/page/Page.cpp (right): https://codereview.chromium.org/960223002/diff/40001/Source/core/page/Page.cpp#newcode613 Source/core/page/Page.cpp:613: Page::detachObservers(); Hmm, I might want to avoid introducing another ...
5 years, 10 months ago (2015-02-26 16:29:05 UTC) #3
sof
https://codereview.chromium.org/960223002/diff/40001/Source/core/page/Page.cpp File Source/core/page/Page.cpp (right): https://codereview.chromium.org/960223002/diff/40001/Source/core/page/Page.cpp#newcode613 Source/core/page/Page.cpp:613: Page::detachObservers(); On 2015/02/26 16:29:05, haraken wrote: > > Hmm, ...
5 years, 10 months ago (2015-02-26 17:01:22 UTC) #4
mlamouri (slow - plz ping)
On 2015/02/26 at 17:01:22, sigbjornf wrote: > So, needs more work & thought. Leaning towards ...
5 years, 10 months ago (2015-02-26 18:06:51 UTC) #5
sof
On 2015/02/26 18:06:51, Mounir Lamouri wrote: > On 2015/02/26 at 17:01:22, sigbjornf wrote: > > ...
5 years, 10 months ago (2015-02-26 22:50:27 UTC) #6
haraken
Hmm, this CL will work but it seems a bit strange that SpeechRecognitionController is bound ...
5 years, 9 months ago (2015-02-27 08:23:32 UTC) #7
sof
On 2015/02/27 08:23:32, haraken wrote: > Hmm, this CL will work but it seems a ...
5 years, 9 months ago (2015-02-27 08:32:18 UTC) #8
haraken
On 2015/02/27 08:32:18, sof wrote: > On 2015/02/27 08:23:32, haraken wrote: > > Hmm, this ...
5 years, 9 months ago (2015-02-27 08:54:35 UTC) #9
sof
On 2015/02/27 08:54:35, haraken wrote: > On 2015/02/27 08:32:18, sof wrote: > > On 2015/02/27 ...
5 years, 9 months ago (2015-02-27 09:03:46 UTC) #10
haraken
On 2015/02/27 09:03:46, sof wrote: > On 2015/02/27 08:54:35, haraken wrote: > > On 2015/02/27 ...
5 years, 9 months ago (2015-02-27 09:12:22 UTC) #11
sof
On 2015/02/27 09:12:22, haraken wrote: > On 2015/02/27 09:03:46, sof wrote: > > On 2015/02/27 ...
5 years, 9 months ago (2015-02-27 10:07:13 UTC) #12
sof
https://codereview.chromium.org/960223002/diff/60001/Source/modules/speech/SpeechRecognition.cpp File Source/modules/speech/SpeechRecognition.cpp (right): https://codereview.chromium.org/960223002/diff/60001/Source/modules/speech/SpeechRecognition.cpp#newcode46 Source/modules/speech/SpeechRecognition.cpp:46: LocalFrame* frame = document->frame(); On 2015/02/27 08:23:32, haraken wrote: ...
5 years, 9 months ago (2015-02-27 10:12:21 UTC) #13
haraken
LGTM https://codereview.chromium.org/960223002/diff/80001/Source/modules/speech/SpeechRecognition.cpp File Source/modules/speech/SpeechRecognition.cpp (right): https://codereview.chromium.org/960223002/diff/80001/Source/modules/speech/SpeechRecognition.cpp#newcode44 Source/modules/speech/SpeechRecognition.cpp:44: if (!context) { By calling ConstructorCallWith=ExecutionContext, can we ...
5 years, 9 months ago (2015-02-27 10:47:39 UTC) #14
sof
https://codereview.chromium.org/960223002/diff/80001/Source/modules/speech/SpeechRecognition.cpp File Source/modules/speech/SpeechRecognition.cpp (right): https://codereview.chromium.org/960223002/diff/80001/Source/modules/speech/SpeechRecognition.cpp#newcode44 Source/modules/speech/SpeechRecognition.cpp:44: if (!context) { On 2015/02/27 10:47:39, haraken wrote: > ...
5 years, 9 months ago (2015-02-27 10:50:36 UTC) #15
haraken
On 2015/02/27 10:50:36, sof wrote: > https://codereview.chromium.org/960223002/diff/80001/Source/modules/speech/SpeechRecognition.cpp > File Source/modules/speech/SpeechRecognition.cpp (right): > > https://codereview.chromium.org/960223002/diff/80001/Source/modules/speech/SpeechRecognition.cpp#newcode44 > ...
5 years, 9 months ago (2015-02-27 10:59:17 UTC) #16
sof
On 2015/02/27 10:59:17, haraken wrote: > On 2015/02/27 10:50:36, sof wrote: > > > https://codereview.chromium.org/960223002/diff/80001/Source/modules/speech/SpeechRecognition.cpp ...
5 years, 9 months ago (2015-02-27 11:21:19 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/960223002/120001
5 years, 9 months ago (2015-02-27 11:23:44 UTC) #20
haraken
https://codereview.chromium.org/960223002/diff/120001/Source/modules/speech/SpeechRecognition.cpp File Source/modules/speech/SpeechRecognition.cpp (right): https://codereview.chromium.org/960223002/diff/120001/Source/modules/speech/SpeechRecognition.cpp#newcode46 Source/modules/speech/SpeechRecognition.cpp:46: SpeechRecognition* speechRecognition = new SpeechRecognition(document->page(), context); I think executionContext ...
5 years, 9 months ago (2015-02-27 11:29:54 UTC) #21
sof
https://codereview.chromium.org/960223002/diff/120001/Source/modules/speech/SpeechRecognition.cpp File Source/modules/speech/SpeechRecognition.cpp (right): https://codereview.chromium.org/960223002/diff/120001/Source/modules/speech/SpeechRecognition.cpp#newcode46 Source/modules/speech/SpeechRecognition.cpp:46: SpeechRecognition* speechRecognition = new SpeechRecognition(document->page(), context); On 2015/02/27 11:29:53, ...
5 years, 9 months ago (2015-02-27 11:33:42 UTC) #22
haraken
On 2015/02/27 11:33:42, sof wrote: > https://codereview.chromium.org/960223002/diff/120001/Source/modules/speech/SpeechRecognition.cpp > File Source/modules/speech/SpeechRecognition.cpp (right): > > https://codereview.chromium.org/960223002/diff/120001/Source/modules/speech/SpeechRecognition.cpp#newcode46 > ...
5 years, 9 months ago (2015-02-27 11:40:48 UTC) #23
commit-bot: I haz the power
5 years, 9 months ago (2015-02-27 12:41:50 UTC) #24
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=190993

Powered by Google App Engine
This is Rietveld 408576698