feat(zone.js): monkey patches queueMicrotask()#38904
Closed
JiaLiPassion wants to merge 1 commit intoangular:masterfrom
Closed
feat(zone.js): monkey patches queueMicrotask()#38904JiaLiPassion wants to merge 1 commit intoangular:masterfrom
JiaLiPassion wants to merge 1 commit intoangular:masterfrom
Conversation
mhevery
suggested changes
Sep 30, 2020
Contributor
mhevery
left a comment
There was a problem hiding this comment.
LGTM, but please incorporate these changes.
65ef811 to
8b2b9ae
Compare
alfaproject
reviewed
Sep 30, 2020
8b2b9ae to
af0784e
Compare
af0784e to
ac008ad
Compare
mhevery
reviewed
Sep 30, 2020
mhevery
approved these changes
Oct 1, 2020
AndrewKushnir
approved these changes
Oct 1, 2020
Contributor
AndrewKushnir
left a comment
There was a problem hiding this comment.
LGTM (based on the comment here)
Reviewed-for: size-tracking
atscott
approved these changes
Oct 1, 2020
Contributor
atscott
left a comment
There was a problem hiding this comment.
Reviewed-for: size-tracking
ac008ad to
aadfc31
Compare
Contributor
Close angular#38863 Monkey patches `queueMicrotask()` API, so the callback runs in the zone when scheduled, and also the task is run as `microTask`. ``` Zone.current.fork({ name: 'queueMicrotask', onScheduleTask: (delegate: ZoneDelegate, curr: Zone, target: Zone, task: Task) => { logs.push(task.type); logs.push(task.source); return delegate.scheduleTask(target, task); } }).run(() => { queueMicrotask(() => { expect(logs).toEqual(['microTask', 'queueMicrotask']); expect(Zone.current.name).toEqual('queueMicrotask'); done(); }); }); ```
aadfc31 to
9c09845
Compare
Contributor
|
@JiaLiPassion is this a breaking change? If not it could be |
Contributor
Author
|
@jelbourn , got it, updated, thanks. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close #38863
Monkey patches
queueMicrotask()API, so the callback runs in the zonewhen scheduled, and also the task is run as
microTask.