GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — worker: handle detached `MessagePort` from a different context by juanarbol · Pull Request #49150 · nodejs/node Conversation
Member
When Fixes: #49075 Note aside, this could be fixed as well by the next diff: diff --git a/src/node_messaging.cc b/src/node_messaging.cc index 00e1db3bab..b46ae022ce 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -741,9 +741,6 @@ MessagePort* MessagePort::New( // but it's better to be safe than sorry.) Mutex::ScopedLock lock(port->data_->mutex_); port->data_->owner_ = port; - // If the existing MessagePortData object had pending messages, this is - // the easiest way to run that queue. - port->TriggerAsync(); } else if (sibling_group) { sibling_group->Entangle(port->data_.get()); } IMO that could change how the workers behave, then I prefer a "handle case" approach.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
juanarbol
force-pushed
the
juan/fix-worker-issue
branch
3 times, most recently
from
36978ae to
f100bf8
Compare
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This was referenced
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
addaleax
reviewed
Uh oh!
There was an error while loading. Please reload this page.
juanarbol
force-pushed
the
juan/fix-worker-issue
branch
from
f100bf8 to
1d8f4ea
Compare
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
addaleax
approved these changes
Uh oh!
There was an error while loading. Please reload this page.
juanarbol
commented
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for reviewing this!
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
juanarbol
force-pushed
the
juan/fix-worker-issue
branch
from
1d8f4ea to
4462700
Compare
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
22 tasks
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
19 tasks
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
25 tasks
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Can anyone from @nodejs/workers review this one? Please, haha |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in c206b2a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
When `worker.moveMessagePortToContext` is used, the async handle associated with the port, will be triggered more than needed (at least one more time) and with null data. That can be avoided by simply checking that the data is present and the port is not detached. Fixes: #49075 Signed-off-by: Juan José Arboleda <[email protected]> PR-URL: #49150 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
When `worker.moveMessagePortToContext` is used, the async handle associated with the port, will be triggered more than needed (at least one more time) and with null data. That can be avoided by simply checking that the data is present and the port is not detached. Fixes: #49075 Signed-off-by: Juan José Arboleda <[email protected]> PR-URL: #49150 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Segmentation Fault on Contextifying MessagePort Transferred to a Worker Thread
There was an error while loading. Please reload this page.