Account for repeated calls to TtsController ensureInitialized
When the tts extension gets initialized either on startup or when being woken as an event page, it initializes itself via:
- a nacl embed node
- a boolean flag |initialized_|.
It is possible that the embeded node gets added to the document, but initialized_| is not yet set to true while other calls to |onSpeak| come through.
In those instances, it is appropriate to consider the extension uninitialized, but not assert that the embed is still null.
BUG=chromium:616636
TEST=let tts go idle (i.e. tts controller's nativeTts_gets nullified. Verify calls to tts results in speech even when there are multiple such calls.
Change-Id: I2e091162d3bca866b10731ff0836ae61667f1767
Reviewed-on: https://chromium-review.googlesource.com/455001
Commit-Queue: David Tseng <dtseng@chromium.org>
Trybot-Ready: David Tseng <dtseng@chromium.org>
Tested-by: David Tseng <dtseng@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: James Weatherall <wez@chromium.org>
1 file changed