-
Notifications
You must be signed in to change notification settings - Fork 60
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
WIP Use sanitize.js script #267
base: main
Are you sure you want to change the base?
WIP Use sanitize.js script #267
Conversation
Before:
After:
|
window.requestAnimationFrame = (cb) => window.setTimeout(cb, 0); | ||
window.cancelAnimationFrame = window.clearTimeout; | ||
const setTimeout = window.setTimeout; | ||
window.setTimeout = function (handler, timeout) { |
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.
Why is this code needed?
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.
The idea was since we have to do it in some benchmarks we can apply it globally and not run the risk of potentially skipping work.
resources/sanitize.js
Outdated
setTimeout(handler, 0); | ||
}; | ||
|
||
window.requestIdleCallback = function (callback) {}; |
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.
We should set it to undefined so that fallback patch will work in each workload instead.
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.
ah yes, I fixed that already locally. 👍
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.
I don't think we should be making semantics changes at the same time refactoring the code.
Make sure all workloads run with the same removed APIs