This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 407
Zone long stack traces generates wrong stack trace #1195
Comments
@thekip , thanks for posting this issue, I will check it. |
JiaLiPassion
added a commit
to JiaLiPassion/zone.js
that referenced
this issue
Mar 6, 2019
… TASKDATA in event task
JiaLiPassion
added a commit
to JiaLiPassion/zone.js
that referenced
this issue
Mar 7, 2019
… TASKDATA in event task
JiaLiPassion
added a commit
to JiaLiPassion/zone.js
that referenced
this issue
Mar 7, 2019
… TASKDATA in event task
JiaLiPassion
added a commit
to JiaLiPassion/zone.js
that referenced
this issue
Mar 7, 2019
… TASKDATA in event task
JiaLiPassion
added a commit
to JiaLiPassion/zone.js
that referenced
this issue
Mar 7, 2019
… TASKDATA in event task
JiaLiPassion
added a commit
to JiaLiPassion/zone.js
that referenced
this issue
Mar 7, 2019
… TASKDATA in event task
mhevery
pushed a commit
that referenced
this issue
Mar 12, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I created a small stackblitz repo which shows the problem:
https://stackblitz.com/edit/typescript-ouevfy?file=index.html
Click on both buttons, and you will see that place of actual definition of event handler is incorrect. Here is a really simple example where both definitions really close to each other, but in real application, the situation is much worse.
Actually for all EventTasks (not sure about other, haven't tested it) captured stacktrace equals to the latest one defined event handler.
This caused because here long-stack-trace.ts
data
property from ZoneTask is a reference to global object defined here asOPTIMIZED_ZONE_EVENT_TASK_DATA
constant.And all execution of this callback just mutate this object and all tasks inherit the same stack trace.
There are two possible ways to resolve the problem.
It's either possible to modify
long-stack-trace.ts
fileOr break the reference in ZoneTask itself
The text was updated successfully, but these errors were encountered: