-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process explorer: update name for service worker process #137427
Comments
Yes, 💯 . I was wrongly assuming we had leaking windows when running integration tests because I saw many many windows appearing that were actually webviews. |
@deepak1556 @bpasero is there anything in the command line that I can use to determine it's a service worker in a way that won't break later? service worker:
real window:
|
Yeah this is really not easy to get right at the moment. It seems to me that a For the shared process I use a hack to tell shared process from normal window apart:
@deepak1556 is there any way to impact the options that are used for these processes so that we can maybe do something similar? To clarify, we only really have the entire command line in hand when trying to figure out what the process is: Line 49 in 494cbbd
|
Let me check on what parent process command lines are inherited by the out of process worker processes and see if we can control them. For the shared process or workbench window, I would recommend to add custom command line arg that vscode can control to help distinguish via for ex:
|
Yeah I can adopt that for the shared process. I just checked and when I pass |
I don't think I can action this yet since window kind doesn't exist on the service worker processes? lmk |
From my testing everything I put on the workbench window is inherited to the out of process iframe (that is what we are talking about here right?). I think we need some kind of hook to set command line arguments on those to tell them apart. PS: the only difference is the sandbox enablement, but as we figured out is not a good hint when the workbench window is sandboxed. |
If there's a way to map the PID to a friendly title on another proc that would work as well, that's how the window names come into the proc explorer: vscode/src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts Lines 243 to 247 in 145e380
Alternatively, I could just show any window without a title returned above as "service-worker", but that feels like it will probably fall apart in the future. |
This requires some plumbing work in the runtime, currently chromium doesn't differentiate the shared worker or service worker which are launched similar to other renderer process via command line arguments, there is lot of internal tracking involved which is what the I will try to add a simple command line arguments to these worker renderers that would let us differentiate them in our process explorer, |
Steps to Reproduce:
window
process with no associated title, it can be mistaken for workbenchInspecting the window via remote debugging, the following are the location information
Service workers are also spawned as renderer processes so it would be good to differentiate them in the explorer.
The text was updated successfully, but these errors were encountered: