Address race condition between IPC and font lookup table getting ready

If a renderer asks for the font lookup table asynchronously using
GetUniqueNameLookupTableIfAvailable and recevied the information that
it's not ready yet, then queues a callback for receiving it, but the
font table has become ready in between, callbacks may be missed. Cover
for the situation in QueueShareMemoryRegionWhenReady() by posting
callbacks if the table was already prepared. We cannot DCHECK on
!font_table_built_.IsSignaled() as there is a small time window in which
the table gets ready between the two IPCs reaching the browser process.

Bug: 977283
Tbr: pkasting
Change-Id: I9e7b8d7b9a7afe761a5a0e9d11c894eedc0e452a
Reviewed-by: Dominik Röttsches <>
Reviewed-by: Rune Lillesveen <>
Commit-Queue: Dominik Röttsches <>
Cr-Commit-Position: refs/heads/master@{#672056}
2 files changed