Commit 1da62d7
Use async CreateBrowser() + pump loop on Linux to avoid CreateBrowserSync() deadlock
CefBrowserHost::CreateBrowserSync() creates an internal nested RunLoop that
cannot drive the in-process renderer thread when --single-process is active
and Python owns the UI thread via CefDoMessageLoopWork(). The result is a
~60s timeout and a null browser return.
Fix: on Linux, call the async CefBrowserHost::CreateBrowser() instead and
pump CefDoMessageLoopWork() in a Python loop until OnAfterCreated fires and
populates g_pyBrowsers. Then retrieve the CefBrowser ref from there.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 89f54a0 commit 1da62d7
2 files changed
Lines changed: 36 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
806 | 806 | | |
807 | 807 | | |
808 | 808 | | |
809 | | - | |
810 | | - | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
811 | 818 | | |
812 | 819 | | |
813 | 820 | | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
814 | 839 | | |
815 | 840 | | |
816 | 841 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
| |||
0 commit comments