()
| 439 | } |
| 440 | |
| 441 | function performFullCleanup() { |
| 442 | // Potentially, if react hasn't loaded yet and user closed the browser DevTools |
| 443 | clearReactPollingInstance(); |
| 444 | |
| 445 | if ( |
| 446 | (componentsPortalContainer || |
| 447 | profilerPortalContainer || |
| 448 | suspensePortalContainer) && |
| 449 | root |
| 450 | ) { |
| 451 | // This should also emit bridge.shutdown, but only if this root was mounted |
| 452 | flushSync(() => root.unmount()); |
| 453 | } else { |
| 454 | bridge?.shutdown(); |
| 455 | } |
| 456 | |
| 457 | componentsPortalContainer = null; |
| 458 | profilerPortalContainer = null; |
| 459 | suspensePortalContainer = null; |
| 460 | root = null; |
| 461 | |
| 462 | mostRecentOverrideTab = null; |
| 463 | store = null; |
| 464 | bridge = null; |
| 465 | render = null; |
| 466 | |
| 467 | port?.disconnect(); |
| 468 | port = null; |
| 469 | } |
| 470 | |
| 471 | function connectExtensionPort() { |
| 472 | if (port) { |
nothing calls this directly
no test coverage detected