-
Notifications
You must be signed in to change notification settings - Fork 893
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
Round off high-resolution timers #15309
Conversation
chromium_src/third_party/blink/renderer/core/timing/time_clamper.cc
Outdated
Show resolved
Hide resolved
chromium_src/third_party/blink/renderer/core/timing/time_clamper.cc
Outdated
Show resolved
Hide resolved
chromium_src/third_party/blink/renderer/core/timing/time_clamper.cc
Outdated
Show resolved
Hide resolved
chromium_src/third_party/blink/renderer/core/timing/time_clamper.h
Outdated
Show resolved
Hide resolved
...ium_src/third_party/blink/renderer/modules/video_rvfc/video_frame_callback_requester_impl.cc
Outdated
Show resolved
Hide resolved
chromium_src/third_party/blink/renderer/core/loader/document_load_timing.h
Outdated
Show resolved
Hide resolved
...mium_src/third_party/blink/renderer/modules/video_rvfc/video_frame_callback_requester_impl.h
Outdated
Show resolved
Hide resolved
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.
please rebase to latest master.
Includes rounding of DOMHighResTimeStamps and other timers with resolution higher than 1 ms. Behind "BraveRoundTimeStamps" feature flag, enabled by default.
c231b5e
to
7dd9448
Compare
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.
lgtm with few nits.
Why was privacy/security review skipped since this is a security feature? Does it actually increase security? See discussion thread: w3c/hr-time#79 The excessive rounding makes JS animations (ones that use requestAnimationFrame) janky and WebGL based browser games or apps unviable. I recommend going to 100 microseconds coarse resolution to be the same as Chrome. Edit: Rounding to an integer is not helpful because an attacker can just repeat the timed operation 10^N times and find N decimals from performance.now(). |
Sounds like a solid reason to be dropping 'Brave' from the roster :) |
@outermeasure |
...ium_src/third_party/blink/renderer/modules/video_rvfc/video_frame_callback_requester_impl.cc
Show resolved
Hide resolved
using blink::features::kBraveRoundTimeStamps; | ||
|
||
class BraveTimeStampRoundingRenderViewTest | ||
: public content::RenderViewTest, |
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.
you have a RenderViewTest in browser. This belongs in renderer
Includes rounding of DOMHighResTimeStamps and other timers with resolution higher than 1 ms.
Behind "BraveRoundTimeStamps" feature flag, enabled by default.
Resolves brave/brave-browser#24681
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: