-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
inspector: supported NodeRuntime domain in worker #27706
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -115,6 +115,11 @@ DispatchResponse WorkerAgent::disable() { | |
| return DispatchResponse::OK(); | ||
| } | ||
|
|
||
| DispatchResponse WorkerAgent::detach(const String& sessionId) { | ||
| workers_->Detached(sessionId); | ||
|
||
| return DispatchResponse::OK(); | ||
| } | ||
|
|
||
| void NodeWorkers::WorkerCreated(const std::string& title, | ||
| const std::string& url, | ||
| bool waiting, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need
attachfor symmetry? The problem I see is that we do not track worker separately from a session so introducing attach would definitely make it more confusing...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case should we have a little bit crazy
NodeRuntime.disconnectmethod that works for main and worker thread?I don't know any use case for
NodeWorker.attach. Since workers are not waiting for attach by default, this method does not add any value withoutwaitForDebuggerOnStartflag. Could we add it later when we know use case better?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One potential problem I see with the
detachis that the worker is kind of "lost" once session is detached. A frontend may detach from the worker early and then there will be no way of attaching again. IMHO,attachcan be implemented later if needed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think this is necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to ping me when someone would ask about this feature!