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
Problem
In Piwik.js The function beforeUnloadHandler() is entering a semi-infinite loop
Scenario
when the User changes the System Time to some time previous to the current (let's say an hour back in time).
Then the semi-infinite loop starts on the call to beforeUnloadHandler function:
This is due to the part of the code:
do {
now = new Date();
} while (now.getTimeAlias() < expireDateTime);
since the now is not near the expireDateTime, it would take lot's of loops to get to the expireDateTime, mean while the browser is stack.
The text was updated successfully, but these errors were encountered:
Good point. I think we should limit set expireDateTime to max 3 seconds in the beginning of that function to prevent such cases and possibly other issues. Do you mind maybe creating a PR?
Problem
In Piwik.js The function beforeUnloadHandler() is entering a semi-infinite loop
Scenario
when the User changes the System Time to some time previous to the current (let's say an hour back in time).
Then the semi-infinite loop starts on the call to beforeUnloadHandler function:
This is due to the part of the code:
do {
now = new Date();
} while (now.getTimeAlias() < expireDateTime);
since the now is not near the expireDateTime, it would take lot's of loops to get to the expireDateTime, mean while the browser is stack.
The text was updated successfully, but these errors were encountered: