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-on: https://chromium-review.googlesource.com/c/chromium/src/+/1675353
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672056}
2 files changed