Try capturing incorrect re-entrancy into DWriteFontProxy
One new theory of why DWriteFontProxy comes back with empty FontHandles is as follows: Suppose the renderer process calls an asynchronous Mojo method A, with callback b and continues execution. Then it reaches one of the DWriteFontProxy methods, let's call it F, and calls F(). Then Mojo goes into a blocking loop waiting for responses. Normally it would just receive the response to F() and continue execution where the font call left of. However, if A is in flight, there might be a situation in which the Mojo loop receives the response for A(), then calls callback b() and the renderer continues to execute in a different spot, until it reaches another DWriteFontProxy call F2() and calls it synchronously while a previous one is in flight, which would probably break. This CL is intended to detect this situation with setting a thread local boolean while the Mojo DWriteFontProxy call is in flight, and crashing with an assertion failure if another one is issued while the first response was not received and processed. Bug: 561873 Change-Id: I15ad4e3484fec8b793206b1e92f319e58aee1cfd Reviewed-on: https://chromium-review.googlesource.com/1140497 Commit-Queue: Dominik Röttsches <drott@chromium.org> Reviewed-by:Antoine Labour <piman@chromium.org> Reviewed-by:
Ken Rockot <rockot@chromium.org> Cr-Commit-Position: refs/heads/master@{#576518}
Showing
Please register or sign in to comment