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

Implement self.queueMicrotask() #21574

Closed
CYBAI opened this issue Sep 1, 2018 · 1 comment
Closed

Implement self.queueMicrotask() #21574

CYBAI opened this issue Sep 1, 2018 · 1 comment

Comments

@CYBAI
Copy link
Collaborator

@CYBAI CYBAI commented Sep 1, 2018

whatwg/html#2789

Spec: https://html.spec.whatwg.org/multipage/#microtask-queuing

Related Bugzilla for Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1480236

Also, we'll need to update the webidl of WindowOrWorkerGlobalScope for the method

  // microtask queuing
  void queueMicrotask(VoidFunction callback);

Ref: https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin:dom-queuemicrotask

@pshaughn
Copy link
Member

@pshaughn pshaughn commented Jan 13, 2020

Being able to just queue microtasks when we want from script code will make questions like #25016 (comment) easier to answer.

@pshaughn pshaughn self-assigned this Jan 13, 2020
@pshaughn pshaughn mentioned this issue Jan 13, 2020
4 of 4 tasks complete
bors-servo added a commit that referenced this issue Jan 13, 2020
Implement queueMicrotask

<!-- Please describe your changes on the following line: -->
The VoidFunction of a user-queued microtask is identical to a PromiseJobCallback in everything but type name, so implementing this method turned out to be just a matter of attaching a WebIDL frontend to a copy-and-pasted backend. All the remaining queueMicrotask WPT failures are because we don't have shared/service workers.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #21574

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
bors-servo added a commit that referenced this issue Jan 13, 2020
Implement queueMicrotask

<!-- Please describe your changes on the following line: -->
The VoidFunction of a user-queued microtask is identical to a PromiseJobCallback in everything but type name, so implementing this method turned out to be just a matter of attaching a WebIDL frontend to a copy-and-pasted backend. All the remaining queueMicrotask WPT failures are because we don't have shared/service workers.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #21574

<!-- Either: -->
- [X] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
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.

3 participants
You can’t perform that action at this time.