perf: fold browser stream ref cleanup into unmount (#4144)

This commit is contained in:
Neil
2026-05-31 05:57:02 -07:00
committed by GitHub
parent 983bc71761
commit 041ac5ca56
@@ -1183,6 +1183,7 @@ function RemoteBrowserPagePane({
remoteTabRefreshTimerRef.current = null
}
clearPendingRemoteWheel()
restartRemoteStreamForViewportRef.current = () => {}
if (streamFrameUrlRef.current) {
URL.revokeObjectURL(streamFrameUrlRef.current)
streamFrameUrlRef.current = null
@@ -1783,12 +1784,6 @@ function RemoteBrowserPagePane({
restartRemoteStreamForViewportRef.current = restartRemoteStreamForViewport
}, [restartRemoteStreamForViewport, startRemoteStream])
useEffect(() => {
return () => {
restartRemoteStreamForViewportRef.current = () => {}
}
}, [])
useEffect(() => {
if (!isActive) {
return