obs-browser
obs-browser copied to clipboard
obs-browser: prevent race condition in CEF paint pipeline
- WasHidden & CloseBrowser are now called before bc->bs is dereferenced to disable calls to GetViewRect(), OnPaint() & OnAcceleratedPaint() earlier.
- WasHidden, CloseBrowser, Invalidate, SendProcessMessage are now called on the current thread: execution on CEF UI thread is not required for those calls.
- In CEF paint pipeline (GetViewRect, OnPaint, OnAcceleratedPaint): Save the value of bc->bs befpre checking if it's valid to prevent the condition where bc->bs is checked for validity and immediately invalidated in a parallel thread.