-
Notifications
You must be signed in to change notification settings - Fork 140
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
🐛 [RUMF-1449] workaround for Firefox memory leak when using Zone.js #1860
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1860 +/- ##
==========================================
+ Coverage 93.16% 93.19% +0.03%
==========================================
Files 134 137 +3
Lines 5135 5161 +26
Branches 1148 1150 +2
==========================================
+ Hits 4784 4810 +26
Misses 351 351
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
aa0bf66
to
37efd06
Compare
67dc751
to
751c525
Compare
Use the native name rather than introducing our own concept.
751c525
to
02b4a7b
Compare
02b4a7b
to
669b1ec
Compare
const browserWindow = window as BrowserWindowWithZoneJs | ||
let original: Target[Name] | undefined | ||
if (browserWindow.Zone) { | ||
original = (target as any)[browserWindow.Zone.__symbol__(name)] |
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.
❓ question: Are we sure it works for all version of Angular/zone.js?
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.
Yes this is something we used before:
const zoneSymbol = browserWindow.Zone.__symbol__ |
@@ -9,39 +10,6 @@ export const ONE_YEAR = 365 * ONE_DAY | |||
export const ONE_KIBI_BYTE = 1024 | |||
export const ONE_MEBI_BYTE = 1024 * ONE_KIBI_BYTE | |||
|
|||
export const enum DOM_EVENT { |
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.
👏 praise: I totally agree on moving it to /browser
👍
* 🐛 [RUMF-1337] Fix incorrect fetch duration ♻️ remove unused imports ♻️ remove responseDurationInfo ♻️ remove unused import * 🔥 remove `resolveDuration` * 🔥 remove `resolveDuration` * 🐛 [RUMF-1449] workaround for Firefox memory leak when using Zone.js (#1860) * ♻️ [RUMF-1449] rename EventEmitter to EventTarget Use the native name rather than introducing our own concept. * 🚚 [RUMF-1449] move addEventListener functions to a dedicated module * 🐛 [RUMF-1449] implement a workaround for Firefox memory leak * 👌🚚 move stubZoneJs in its own module * 👷 Bump staging to staging-51 * 🔊 Collect computed and perf entry durations (#1861) * 🔊 Collect computed and perf entry durations * ✨Allow internal analytics subdomain (#1863) * 🔥 remove `resolveDuration` 🔥 remove `resolveDuration` Co-authored-by: Benoît <[email protected]> Co-authored-by: ci.browser-sdk <[email protected]> Co-authored-by: Aymeric <[email protected]>
Motivation
Firefox is leaking memory when using Zone.js +
visualViewport.addEventListener
: https://bugzilla.mozilla.org/show_bug.cgi?id=1804409Changes
addEventListener
method instead of the patched oneTesting
I have gone over the contributing documentation.