Skip to content
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

Messageport: use a microtask to "maybe add pending port" #24738

Open
gterzian opened this issue Nov 14, 2019 · 0 comments
Open

Messageport: use a microtask to "maybe add pending port" #24738

gterzian opened this issue Nov 14, 2019 · 0 comments
Labels

Comments

@gterzian
Copy link
Member

@gterzian gterzian commented Nov 14, 2019

The global, when first noting a transfer-received port, queues a task to then run the "maybe add pending port logic". The purpose of the task is to only add the port if it isn't transferred in the same task in which it is received.

// Queue a task to complete the transfer,

Queuing a task does leave open the possibility for JS to run and transfer the port again, before the queued task actually run. This can happen with timers, or UI events, which currently dispatch JS events without going through the task-queue and hence can be run before a task scheduled on the task-queue(see also #24737).

This could be made more robust by queuing a micro-task, or perhaps not queuing anything at all in the light of the changes introduced by #24664

@gterzian gterzian mentioned this issue Dec 8, 2019
0 of 7 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.