DescriptionKeep PlatformSpeechSynthesisVoice off the Oilpan heap.
Keeping this object on the heap makes some sense in terms of regularity:
all the other Blink objects that refer to it are on the heap. However,
it is problematic to do so for this value object considering how
the embedder might use its WebSpeechSynthesisVoice wrapper object.
That is, creating or allocating a WebSpeechSynthesisVoice on the stack
by the embedder will bring about a heap allocation, which in turn can
trigger a GC when the embedder isn't prepared for that -- see
associated bug for stack trace and details.
This is normally a detail the embedder doesn't need to worry about,
but as TtsDispatcher keeps an (unsavory) weak reference to its speech
synthesizer client we're forced to consider GC safety and take
that into account.
Embedder code that keep these bare, but intended weak, references
to Oilpan heap objects should be reworked into something safer,
but to address this local problem, PlatformSpeechSynthesisVoice is
moved off the heap where it can reside just as well. By doing so,
WebSpeechSynthesisVoice allocations won't allocate on the Oilpan
heap, avoid said GC unsafety.
R=dmazzoni,jochen
BUG=539511
Committed: https://crrev.com/3ebb67d8abcd3d39dc4d67947dfc6a586583fc7e
Cr-Commit-Position: refs/heads/master@{#370960}
Patch Set 1 #Patch Set 2 : fix oilpan compilation #Messages
Total messages: 20 (10 generated)
|