-
Notifications
You must be signed in to change notification settings - Fork 804
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
Remove unnecessary this
overwrite in stack context manager
#873
Remove unnecessary this
overwrite in stack context manager
#873
Conversation
@@ -112,7 +112,7 @@ export class StackContextManager implements ContextManager { | |||
this._currentContext = context || Context.ROOT_CONTEXT; | |||
|
|||
try { | |||
return fn.apply(context); | |||
return fn(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@obecny would like to get your reviews on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm it was a bit tricky from what I remember, but if the all tests are working fine, then I guess it should be fine too ?. Can you check the the examples replacing the zone scope manager with the stack if nothing is missing ?.
this
overwrite in stack context manager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one comment
@@ -112,7 +112,7 @@ export class StackContextManager implements ContextManager { | |||
this._currentContext = context || Context.ROOT_CONTEXT; | |||
|
|||
try { | |||
return fn.apply(context); | |||
return fn(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm it was a bit tricky from what I remember, but if the all tests are working fine, then I guess it should be fine too ?. Can you check the the examples replacing the zone scope manager with the stack if nothing is missing ?.
@obecny the tracer web example is failing for unrelated reasons. The window.addEventListener fails. It fails in the same way with and without the changes. Because the tests are passing and it appears to be working with my local testing, i'm going to merge this. |
Stack scope manager was calling
fn.apply(context, args)
which causes thethis
infn
to be set tocontext
rather than what it would have been normally. It appears not to affect the working of the Context Manager