Commit b5b6a3ee authored by Minoru Chikamune's avatar Minoru Chikamune Committed by Commit Bot

Specify HeapMojoWrapperMode::kForceWithoutContextObserver to SpeechSynthesis

We are going to deprecate kWithoutContextObserver. But SpeechSynthesis had a problem with kWithContextObserver mode. To avoid this problem, we temporally need to specify kForceWithoutContextObserver.

When the ExecutionContext was destroyed, HeapMojo wrappers will automatically
reset the mojom_synthesis_ mojo::Remote object.

After that, if the `blink::SpeechSynthesis::cancel` is called,
Null-dereference READ will be happen because it's already reset.

To avoid this problem, HeapMojoWrapperMode::kForceWithoutContextObserver have to be specified.
if this was specified, HeapMojoRemote doesn't reset mojo::Remote object when the ExecutionContext was destroyed.

see also: https://chromium-review.googlesource.com/c/chromium/src/+/2123493

Bug: 1049056, 1058076
Change-Id: I84484ce85ddfc95705acbc7a9e0739a39b2a55ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2269597
Commit-Queue: Minoru Chikamune <chikamune@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#782845}
parent 6f433bc8
...@@ -131,10 +131,10 @@ class MODULES_EXPORT SpeechSynthesis final ...@@ -131,10 +131,10 @@ class MODULES_EXPORT SpeechSynthesis final
HeapMojoReceiver<mojom::blink::SpeechSynthesisVoiceListObserver, HeapMojoReceiver<mojom::blink::SpeechSynthesisVoiceListObserver,
SpeechSynthesis, SpeechSynthesis,
HeapMojoWrapperMode::kWithoutContextObserver> HeapMojoWrapperMode::kForceWithoutContextObserver>
receiver_; receiver_;
HeapMojoRemote<mojom::blink::SpeechSynthesis, HeapMojoRemote<mojom::blink::SpeechSynthesis,
HeapMojoWrapperMode::kWithoutContextObserver> HeapMojoWrapperMode::kForceWithoutContextObserver>
mojom_synthesis_; mojom_synthesis_;
HeapVector<Member<SpeechSynthesisVoice>> voice_list_; HeapVector<Member<SpeechSynthesisVoice>> voice_list_;
HeapDeque<Member<SpeechSynthesisUtterance>> utterance_queue_; HeapDeque<Member<SpeechSynthesisUtterance>> utterance_queue_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment