mirror of
				https://github.com/microsoft/playwright.git
				synced 2025-06-26 21:40:17 +00:00 
			
		
		
		
	 190ed9465f
			
		
	
	
		190ed9465f
		
			
		
	
	
	
	
		
			
			This prevents shared workers from stalling upon restart. We receive `Inspector.targetCrashed` and `Inspector.targetReloadedAfterCrash` events that assume `Runtime.runIfWaitingForDebugger` from any attached client. It is easier and more stable to just detach from shared workers, because we do not inspect them. For service workers, we should actually issue `Runtime.runIfWaitingForDebugger` in such cases, because we attach to them. Fixes #18932.
		
			
				
	
	
		
			7 lines
		
	
	
		
			242 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			7 lines
		
	
	
		
			242 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <script>
 | |
|   window.sharedWorkerResponsePromise = new Promise(f => {
 | |
|     window.myWorker = new SharedWorker("shared-worker.js");
 | |
|     window.myWorker.port.postMessage('hello');
 | |
|     window.myWorker.port.onmessage = e => f(e.data);
 | |
|   });
 | |
| </script> |