Rewritten #1517 patch for TBB/ESR45
Our patch, "Reduce precision of time for Javascript." needed re-writing because a lot of the underlying code changed in mozilla-central. Here it is for review:
https://github.com/arthuredelstein/tor-browser/commit/29474920f53107547ed34263cc292a43f4c305ed
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Arthur Edelstein added TorBrowserTeam201603R in Legacy / Trac component::applications/tor browser in Legacy / Trac ff45-esr in Legacy / Trac owner::tbb-team in Legacy / Trac parent::15197 in Legacy / Trac priority::medium in Legacy / Trac resolution::fixed in Legacy / Trac severity::normal in Legacy / Trac status::closed in Legacy / Trac type::defect in Legacy / Trac labels
added TorBrowserTeam201603R in Legacy / Trac component::applications/tor browser in Legacy / Trac ff45-esr in Legacy / Trac owner::tbb-team in Legacy / Trac parent::15197 in Legacy / Trac priority::medium in Legacy / Trac resolution::fixed in Legacy / Trac severity::normal in Legacy / Trac status::closed in Legacy / Trac type::defect in Legacy / Trac labels
- Author
Link to original ticket legacy/trac#1517 (moved).
Trac:
Status: new to needs_review r=brade, r=mcs The new patch looks okay to us.
- Developer
Trac:
Keywords: N/A deleted, TorBrowserTeam201603R added r=bugzilla replace
floor()
withtrunc()
removeconst double maxResolutionMs = 100;
and add100.0
directly into the expression (as in other places).return static_cast<double>(mEvent->time / 100)*100;
->return static_cast<double>(mEvent->time / 100) * 100.0;
+ double now = static_cast<double>(PRMJ_Now() / PRMJ_USEC_PER_MSEC); + return TimeClip(floor(now/100.0)*100.0);
to
return TimeClip(static_cast<double>(PRMJ_Now() / (PRMJ_USEC_PER_MSEC * 100)) * 100.0);
- // Only expose milliseconds of accuracy, since ms is the smallest time unit
- // for animations anyway. If it is used to measure FPS of animations, then 1000 FPS (1 ms) is enough for all fingerprinting needs. Maybe, standard 40 ms (25 FPS) is more suitable.
- // Truncate all timers to microsecond accuracy Is this defense too weak?
- Developer
Looks good to me as well.
Trac:
Resolution: N/A to fixed
Keywords: N/A deleted, ff45-esr added
Status: needs_review to closed - Trac closed
closed
- Trac moved from legacy/trac#18631 (moved)
moved from legacy/trac#18631 (moved)
- Trac removed 1 deleted label
removed 1 deleted label