Commit b66d52c
committed
Fixes CEF freeze (between reconnects) introduced by ec248d4 as well, e.g:
ERROR: [browser_info_manager.cc] Timeout of new browser info response for frame [id] (has_rfh=1)
Regarding the directly above, about the added safety checks;
Especially needed now that the Initialise() return logic changed. Previously, on initialization fail, it would leave CEF in a partial state.
The new code now properly returns false and cleans up m_pWebCore.
Before (buggy code):
When Initialise() failed, the code deleted m_pWebCore with SAFE_DELETE
Next call to GetWebCore() created a new CWebCore and call CefInitialize() again
Problem: CEF only allows calling CefInitialize() ONCE per process - second call causes freeze
After (fixed code):
Initialise() stores the result in m_bInitialised flag
m_pWebCore is NEVER deleted, even if initialization fails
Added IsInitialised() method that returns the m_bInitialised flag
What this means for callers (Hence all the new checks being added now):
- GetWebCore() can now return a non-null pointer that is not usable.
Before: If you got a pointer back from GetWebCore(), it was always safe to use
After: You need to check if the pointer is nullptr because we now return nullptr when initialization failed
Example:
IsWebCoreLoaded() now checks both that the pointer exists AND that CEF initialized successfully
Every caller of GetWebCore() needs to handle nullptr return value
Every method in CClientWebBrowser needs to check m_pWebView ins't null before using it
1 parent 0772fcc commit b66d52c
File tree
28 files changed
+849
-190
lines changed- Client
- ceflauncher_DLL
- ceflauncher
- cefweb
- core
- loader-proxy
- loader
- mods/deathmatch/logic
- luadefs
- sdk/core
28 files changed
+849
-190
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
56 | 61 | | |
57 | 62 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
73 | | - | |
| 77 | + | |
74 | 78 | | |
75 | | - | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
32 | 61 | | |
33 | 62 | | |
34 | 63 | | |
| |||
39 | 68 | | |
40 | 69 | | |
41 | 70 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 71 | | |
48 | 72 | | |
49 | 73 | | |
| |||
108 | 132 | | |
109 | 133 | | |
110 | 134 | | |
111 | | - | |
112 | | - | |
| 135 | + | |
| 136 | + | |
113 | 137 | | |
114 | 138 | | |
115 | 139 | | |
| |||
137 | 161 | | |
138 | 162 | | |
139 | 163 | | |
140 | | - | |
| 164 | + | |
141 | 165 | | |
142 | 166 | | |
143 | 167 | | |
| |||
153 | 177 | | |
154 | 178 | | |
155 | 179 | | |
156 | | - | |
| 180 | + | |
157 | 181 | | |
158 | 182 | | |
159 | 183 | | |
160 | 184 | | |
161 | 185 | | |
162 | | - | |
| 186 | + | |
163 | 187 | | |
164 | 188 | | |
165 | 189 | | |
| |||
168 | 192 | | |
169 | 193 | | |
170 | 194 | | |
171 | | - | |
| 195 | + | |
172 | 196 | | |
173 | | - | |
| 197 | + | |
174 | 198 | | |
175 | 199 | | |
176 | | - | |
| 200 | + | |
177 | 201 | | |
178 | 202 | | |
179 | 203 | | |
| |||
197 | 221 | | |
198 | 222 | | |
199 | 223 | | |
200 | | - | |
| 224 | + | |
201 | 225 | | |
202 | 226 | | |
203 | 227 | | |
| |||
0 commit comments