Граф коммитов

16 Коммитов

Автор SHA1 Сообщение Дата
Tom Ritter 4b715680d2 Bug 1425462 Normalize the JavaScript Engine behavior by adding a callback r=luke
Time Precision Reduction in the JS Engine was handled by a small bit of
duplicated logic. With Time Jittering, and general improvements to the
logic due to float fuzziness, we want to unify the logic for the JS Engine
and the browser into one location. This patch does that.

Note that this will leave the JS Shell without a time jittering implementation.
It currently has a time clamping implementation - but I'm not actually sure if
the shell is doing anything with it, because it's probably not calling
SetTimeResolutionUsec to set it up.  In Bug 1440539 we will add a jitter
implementation for the shell. (And probably turn time rounding and jittering on
for it too.)

MozReview-Commit-ID: 2BTIMzE8MjW

--HG--
extra : rebase_source : db5cd6a219e1b89988f142fc22994bf816507889
2018-02-22 16:05:50 -06:00
Tom Ritter 845ef57dd6 Bug 1425462 When reducing the precision of timestamps, also apply fuzzytime to them r=bkelly
Fuzzytime deterministically generates a random midpoint between two clamped values,
and if the unreduced timestamp is above the midpoint, the time is rounded upwards.
This allows safe time jittering to occur, as time will never go backwards on a given
timeline.

It _is_ possible for time to go backwards when comparing different (but related)
timelines, such as a relative timeline in one page (with its own
performance.timeOrigin) and a relative timeline in an iframe or Worker (which
also has its own performance.timeOrigin). This is the same behavior as the 2ms timer
reduction we previously landed; jitter doesn't make this any better or worse.

MozReview-Commit-ID: IdRLxcWDQBZ

--HG--
extra : rebase_source : 40b29d34e5cc99f9b8e6d5e711a03b9fe9bfa595
2018-03-01 00:07:03 -06:00
Dorel Luca cafaae9ee7 Backed out 6 changesets (bug 1425462) for XPCShell failure on multiple files
Backed out changeset 9ace3811f525 (bug 1425462)
Backed out changeset 7d440e52e3a4 (bug 1425462)
Backed out changeset 85896ea96faf (bug 1425462)
Backed out changeset 127b5d2e6779 (bug 1425462)
Backed out changeset 95ce64d3a29a (bug 1425462)
Backed out changeset ddd2c4da4ba4 (bug 1425462)
2018-03-02 03:33:17 +02:00
Tom Ritter ec702ca7c3 Bug 1425462 Normalize the JavaScript Engine behavior by adding a callback r=luke
Time Precision Reduction in the JS Engine was handled by a small bit of
duplicated logic. With Time Jittering, and general improvements to the
logic due to float fuzziness, we want to unify the logic for the JS Engine
and the browser into one location. This patch does that.

Note that this will leave the JS Shell without a time jittering implementation.
It currently has a time clamping implementation - but I'm not actually sure if
the shell is doing anything with it, because it's probably not calling
SetTimeResolutionUsec to set it up.  In Bug 1440539 we will add a jitter
implementation for the shell. (And probably turn time rounding and jittering on
for it too.)

MozReview-Commit-ID: 2BTIMzE8MjW

--HG--
extra : rebase_source : 035f84a88413e2ea34b239ae0228e9c1ec9a39d7
2018-02-22 16:05:50 -06:00
Tom Ritter 06ecc9a63d Bug 1425462 When reducing the precision of timestamps, also apply fuzzytime to them r=bkelly
Fuzzytime deterministically generates a random midpoint between two clamped values,
and if the unreduced timestamp is above the midpoint, the time is rounded upwards.
This allows safe time jittering to occur, as time will never go backwards on a given
timeline.

It _is_ possible for time to go backwards when comparing different (but related)
timelines, such as a relative timeline in one page (with its own
performance.timeOrigin) and a relative timeline in an iframe or Worker (which
also has its own performance.timeOrigin). This is the same behavior as the 2ms timer
reduction we previously landed; jitter doesn't make this any better or worse.

MozReview-Commit-ID: IdRLxcWDQBZ

--HG--
extra : rebase_source : e455f934e6e6d65d54c122a6cec9f6cabbd5ac78
2018-03-01 00:07:03 -06:00
Jason Orendorff f5bc70ac9c Bug 1429206 - Part 1: Use js/TypeDecls.h instead of redeclaring certain types. r=jandem.
This adds JS::Zone to TypeDecls.h. Arguably that is pretty borderline, but
even though the Zone type is only used in a dozen or so places in Gecko,
it's a central concept.

--HG--
extra : rebase_source : 2267ad26c8888f3db9213acdb64ce7a56b1c16e5
extra : source : 7f7eb82a83f47c8e1a4b67527c42f88e35f9ff4a
2017-12-18 14:45:06 -06:00
Jonathan Hao dca1a28633 Bug 1217238 - Reduce time precision when privacy.resistFingerprinting is on. r=mystor
This patch is adapted from Tor bug 1517.

To offer some protection against timing attacks by JS content pages, in this
patch we round the various time-exposing APIs (such as Date and
Event.timeStamps) to the nearest 100 ms when the pref "privacy.resistFingerprinting" is on.

MozReview-Commit-ID: eGucM9nGTn

--HG--
extra : rebase_source : 3ee600b07943f3954e9a2a9561391f2f7821bb86
2017-06-06 11:45:14 +08:00
Jessica Jong 4f5f57be29 Bug 1310078 - Implement valueAsNumber and valueAsDate for <input type=datetime-local>. r=smaug,Waldo 2017-01-03 22:33:00 +01:00
Jessica Jong c35a0bf546 Bug 1278186 - Implement valueAsNumber and valueAsDate for <input type=week>. r=smaug,Waldo 2016-09-29 01:08:00 +02:00
Jeff Walden 790d87d4be Bug 1208808 - Move time zone adjustment information out of JSRuntime, into global state protected by a spinlock. r=till
--HG--
extra : rebase_source : b412e298217a2857bf34b73b1128c97cc047e6af
2015-10-30 16:14:32 -07:00
Phil Ringnalda b79efb4eaf Back out changeset 6e21339a66ed (bug 1208808) for bustage in the mislabelled and deceptive arm64 simulator
CLOSED TREE
2015-10-31 01:44:22 -07:00
Jeff Walden 1b692c0c1a Bug 1208808 - Move time zone adjustment information out of JSRuntime, into global state protected by a spinlock. r=till
--HG--
extra : rebase_source : 1c59ffd1509c52791ab737df338962cf2c68dbc0
2015-10-30 16:14:32 -07:00
Jeff Walden 1b62a9d07b Bug 1158399 - Expose the [[DateValue]] field in Date objects only through a ClippedTime class that enforces prior TimeClip-ing on the given value. r=evilpie, r=bz, r=dhylands, r=mt, r=froydnj, r=khuey, r=baku, r=smaug
--HG--
extra : rebase_source : 803fe39f338b6b32cb0fe2be6cf4056bab57283a
2015-05-01 19:12:52 -07:00
Jeff Walden d1382d428b Bug 1158399 - Ensure/assert that DateObject::setUTCTime never stores a non-TimeClip'd value in the reserved slot. r=evilpie
--HG--
extra : rebase_source : eb91b123c9d3edac9e249ee8ab5052931bb95a3e
2015-04-30 20:03:30 -07:00
Emanuel Hoogeveen e0a70e1fe3 Bug 883697 (part 1) - Make include guards consistent in js/ductwork/, js/ipc/ and js/public/. r=njn.
--HG--
extra : rebase_source : 34f5559ba6e64831905686e12356b70109d873a8
2013-06-19 17:59:09 -07:00
Boris Zbarsky 2bf051349f Bug 867312. Expose some APIs for working with millisecond timestamps corresponding to JS dates. r=waldo 2013-05-01 23:44:11 -04:00