You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the overloaded Date constructor, creating new Date objects takes at least an order of magnitude longer on Firefox, blocking the main JS thread and causing performance issues on sites that process large number of dates.
This is largely due to the new URL(...) constructor being called multiple times to extract origin of each script on the stack during the new Date call, to check if Date hasTaintedMethod. The URL constructor is much slower than the Date constructor (about ~ 9x times slower).
I'm not sure why such check for tainted methods on Date object is important, but I would suggest to at least check if taintedOrigins is not-empty before doing
With the overloaded
Date
constructor, creating new Date objects takes at least an order of magnitude longer on Firefox, blocking the main JS thread and causing performance issues on sites that process large number of dates.This is largely due to the
new URL(...)
constructor being called multiple times to extract origin of each script on the stack during thenew Date
call, to check if DatehasTaintedMethod
. TheURL
constructor is much slower than theDate
constructor (about ~ 9x times slower).I'm not sure why such check for tainted methods on Date object is important, but I would suggest to at least check if
taintedOrigins
is not-empty before doingcontent-scope-scripts/src/utils.js
Line 392 in aff1438
The text was updated successfully, but these errors were encountered: