Commit cec32ee
Make current_user() a block call waiting for persistent cache to load on desktop.
* Each platform has its own implementation of current_user()
* Avoid calling current_user() internally, except during listener event, since it can potentially be a block call.
* Flip persistent_cache_load_pending in the beginning of AUTH_NOTIFY_LISTENERS() macro so that the user can call current_user() during OnAuthStateChanged() or OnIdTokenChanged().
Integration test: cl/247698227
PiperOrigin-RevId: 2515266741 parent ef6b53c commit cec32ee
File tree
5 files changed
+86
-26
lines changed- auth/src
- android
- desktop
- include/firebase
- ios
5 files changed
+86
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
527 | 545 | | |
528 | 546 | | |
529 | 547 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | 166 | | |
178 | 167 | | |
179 | 168 | | |
| |||
219 | 208 | | |
220 | 209 | | |
221 | 210 | | |
222 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
223 | 214 | | |
224 | 215 | | |
225 | 216 | | |
| |||
321 | 312 | | |
322 | 313 | | |
323 | 314 | | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
324 | 319 | | |
325 | 320 | | |
326 | 321 | | |
| |||
340 | 335 | | |
341 | 336 | | |
342 | 337 | | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | 338 | | |
348 | 339 | | |
349 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
374 | 412 | | |
375 | 413 | | |
376 | 414 | | |
| |||
448 | 486 | | |
449 | 487 | | |
450 | 488 | | |
451 | | - | |
| 489 | + | |
452 | 490 | | |
453 | 491 | | |
454 | 492 | | |
| |||
459 | 497 | | |
460 | 498 | | |
461 | 499 | | |
462 | | - | |
463 | | - | |
| 500 | + | |
| 501 | + | |
464 | 502 | | |
465 | 503 | | |
466 | 504 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
142 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
151 | 150 | | |
152 | 151 | | |
153 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
230 | 244 | | |
231 | 245 | | |
232 | 246 | | |
| |||
0 commit comments