Skip to content

chore: upgrade to new Zone.js API v0.6.4#7345

Closed
mhevery wants to merge 1 commit intoangular:masterfrom
mhevery:zone-upgrade
Closed

chore: upgrade to new Zone.js API v0.6.4#7345
mhevery wants to merge 1 commit intoangular:masterfrom
mhevery:zone-upgrade

Conversation

@mhevery
Copy link
Copy Markdown
Contributor

@mhevery mhevery commented Feb 29, 2016

BREAKING CHANGE

Removed deprecated API from NgZone

  • NgZone.overrideOnTurnStart
  • NgZone.overrideOnTurnDone
  • NgZone.overrideOnEventDone
  • NgZone.overrideOnErrorHandler (1 g3 ref)

Rename NgZone API

  • NgZone.onTurnStart => NgZone.onUnstable (16 g3 ref)
  • NgZone.onTurnDone => NgZone.onMicrotaskEmpty (38 g3 ref)
  • NgZone.onEventDone => NgZone.onStable (12 g3 ref)

cr/117019088 | tap

@mhevery mhevery changed the title WIP: upgraed to new Zone.js chore: upgrade to new Zone.js API v0.6.1 Feb 29, 2016
@mhevery mhevery force-pushed the zone-upgrade branch 4 times, most recently from 8a41411 to c73d217 Compare February 29, 2016 23:16
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should say if current == innerZone.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upon further thought the line is fine.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add some docs as to why we we have to delay.

Because the operation we just executed was caused by MacroTask (such as setTimeout), when the function gets called we are still inside of the MacroTask. This will make _ngZone.hasPendingMacrotask report outstanding tasks. We need to drain the task by jumping to a microtask.

TODO(misko): Consider having NgZone expos onMacroTaskEmpty hook. (As Zone.js already provides this.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@mhevery mhevery force-pushed the zone-upgrade branch 4 times, most recently from 78c70c9 to f0220eb Compare March 5, 2016 00:42
@mhevery mhevery assigned vikerman and unassigned tbosch Mar 8, 2016
@mhevery mhevery added this to the Angular 2 Blocking milestone Mar 8, 2016
@bradlygreen bradlygreen modified the milestone: Angular 2 Blocking Mar 8, 2016
@naomiblack naomiblack added this to the Angular 2 Blocking milestone Mar 8, 2016
@naomiblack naomiblack modified the milestones: Angular 2 Blocking, Angular 2 Release Candidate Mar 8, 2016
@juliemr juliemr mentioned this pull request Mar 14, 2016
@mhevery mhevery force-pushed the zone-upgrade branch 2 times, most recently from fa86d56 to c4136b1 Compare March 15, 2016 22:56
BREAKING CHANGE

Removed deprecated API from NgZone
- `NgZone.overrideOnTurnStart`
- `NgZone.overrideOnTurnDone`
- `NgZone.overrideOnEventDone`
- `NgZone.overrideOnErrorHandler`

Rename NgZone API
- `NgZone.onTurnStart` => `NgZone.onUnstable`
- `NgZone.onTurnDone` => `NgZone.onMicrotaskEmpty`
- `NgZone.onEventDone` => `NgZone.onStable`
@mary-poppins
Copy link
Copy Markdown

Merging PR #7345 on behalf of @alexeagle to branch presubmit-alexeagle-pr-7345.

@alexeagle alexeagle changed the title chore: upgrade to new Zone.js API v0.6.1 chore: upgrade to new Zone.js API v0.6.4 Mar 16, 2016
@mhevery mhevery closed this in 310620f Mar 16, 2016
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants