X Tutup
Skip to content

fix: make sure that Zone does not show up in angular2.d.ts#7655

Closed
mhevery wants to merge 2 commits intoangular:masterfrom
mhevery:zones
Closed

fix: make sure that Zone does not show up in angular2.d.ts#7655
mhevery wants to merge 2 commits intoangular:masterfrom
mhevery:zones

Conversation

@mhevery
Copy link
Copy Markdown
Contributor

@mhevery mhevery commented Mar 18, 2016

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit-message-format
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
  • What is the current behavior? (You can also link to an open issue here)
  • What is the new behavior (if this is a feature change)?
  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
  • Other information:

@mhevery mhevery modified the milestone: beta. Mar 18, 2016
@mhevery mhevery changed the title Zones fix: make sure that Zone does not show up in angular2.d.ts Mar 18, 2016
throw new Error('Angular2 needs to be run with Zone.js polyfill.');
}
}
this.inner = this.inner.fork({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: this gets pretty deeply nested, did you consider a private inner class that implements ZoneSpec?

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.

Yes, I thought about it, but this is cheaper in terms of number of bytes. If you feel strongly I can make the change.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nope, don't feel strongly.

On Thu, Mar 17, 2016 at 9:56 PM Miško Hevery notifications@github.com
wrote:

In modules/angular2/src/core/zone/ng_zone_impl.ts
#7655 (comment):

@@ -45,52 +44,56 @@ export class NgZoneImpl implements ZoneSpec {
if (trace) {
this.inner = this.inner.fork(Zone['longStackTraceZoneSpec']);
}

  •  this.inner = this.inner.fork(this);
    
  • } else {
  •  throw new Error('Angular2 needs to be run with Zone.js polyfill.');
    
  • }
  • }
  •  this.inner = this.inner.fork({
    

Yes, I thought about it, but this is cheaper in terms of number of bytes.
If you feel strongly I can make the change.


You are receiving this because you were assigned.
Reply to this email directly or view it on GitHub
https://github.com/angular/angular/pull/7655/files/17c5193fc0b648d83b017c1a2badb29c3ea9a035#r56613191

@robwormald
Copy link
Copy Markdown
Contributor

LGTM, tested build locally, fixes failure in .10

mhevery referenced this pull request Mar 18, 2016
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`

Closes #7345
@mhevery mhevery added pr_state: LGTM action: merge The PR is ready for merge by the caretaker labels Mar 18, 2016
@mary-poppins
Copy link
Copy Markdown

Merging PR #7655 on behalf of @jelbourn to branch presubmit-jelbourn-pr-7655.

@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 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

X Tutup