Commit Graph

336 Commits

Author SHA1 Message Date
Simon Giesecke
fb4e3cda44 Bug 1673931 - Add missing include directives. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D107189
2021-03-04 14:32:14 +00:00
Sean Feng
04790aa069 Bug 1695328 - PerformanceObserver should throw TypeError instead of SyntaxError r=smaug
According to the latest spec
https://w3c.github.io/performance-timeline/#observe-method,
TypeError should be thrown, however we throw SyntaxError.

Differential Revision: https://phabricator.services.mozilla.com/D106669
2021-03-01 21:45:59 +00:00
smolnar
11a45394a8 Backed out changeset 60a3eddb183b (bug 1695328) for causing failures in PerformanceObserver. CLOSED TREE 2021-03-01 17:16:51 +02:00
Sean Feng
2096c9da69 Bug 1695328 - PerformanceObserver should throw TypeError instead of SyntaxError r=smaug
According to the latest spec
https://w3c.github.io/performance-timeline/#observe-method,
TypeError should be thrown, however we throw SyntaxError.

Differential Revision: https://phabricator.services.mozilla.com/D106669
2021-03-01 14:38:32 +00:00
amurali
8632afe08c Bug 1691453 - Remove ObservesTypeOfEntry again in PerformanceObserver::QueueEntry.r=sefeng
Differential Revision: https://phabricator.services.mozilla.com/D106290
2021-02-24 18:07:35 +00:00
Sean Feng
fc9a6223a7 Bug 1693059 - Make PerformanceObserver::Disconnect clears its option list r=smaug
Per spec, `disconnect` should clear its option list, such that
doing a `observe`->`disconnect`->`observe` will not be reusing
the same options from the first `observe`.

Spec: https://w3c.github.io/performance-timeline/#disconnect-method

Differential Revision: https://phabricator.services.mozilla.com/D105329
2021-02-24 15:01:37 +00:00
Sean Feng
5c67d2bffc Bug 1692213 - Use raw timestamp internally for PerformanceEventTiming r=smaug
Currently, whenever the algorithm requires to get timestamps, it'll
try to get the corresponding precision reduced timestamps. However,
this creates some memory overhead because the calculation of precision
reduced timestamps. So instead of always generating the precision
reduced timestamps, we use the raw timestamps internally to avoid
generating precision reduced timestamps unnecessarily.

Differential Revision: https://phabricator.services.mozilla.com/D105829
2021-02-22 15:36:45 +00:00
Sean Feng
3963c2761d Bug 1692213 - Use nsTArray for PerformanceEventTiming buffer instead of AutoTArray r=smaug
AutoTArray gives us some memory overhead and the benefits it provides
might not be that useful since PerformanceEventTiming only works
for certain event types.

Differential Revision: https://phabricator.services.mozilla.com/D105078
2021-02-16 14:42:34 +00:00
Sean Feng
52117ce9a4 Bug 1692199 - Performance object shouldn't create eventCounts when the pref is not set r=smaug,aryx
Upon the construction of `eventCounts`, a wrapper of it will be created
because we set the initial values to 0. This exposes the interface
despite the pref is not set.

Differential Revision: https://phabricator.services.mozilla.com/D104872
2021-02-12 20:02:15 +00:00
Sean Feng
b03a010048 Bug 1667836 - Implement EventCounts Interface r=smaug
This interface is part of PerformanceEventTiming.

Spec: https://wicg.github.io/event-timing/#sec-event-counts

Differential Revision: https://phabricator.services.mozilla.com/D102037
2021-02-09 18:54:48 +00:00
Sean Feng
a7786149e0 Bug 1667836 - Allow performance event entries can only be retrieved by PerformanceObserver r=smaug
Performance event entries should only be retrieved by
PerformanceObserver, so it can't be retrieved by using
Performance.GetEntries* APIs.

Differential Revision: https://phabricator.services.mozilla.com/D102036
2021-02-09 18:54:48 +00:00
Sean Feng
228f53a393 Bug 1667836 - Implement PerformanceEventTiming Interface r=smaug
Spec: https://wicg.github.io/event-timing/#sec-performance-event-timing

Differential Revision: https://phabricator.services.mozilla.com/D102035
2021-02-09 18:54:47 +00:00
Sean Feng
0c6204c1bd Bug 1667836 - Use nsAtom for entry comparison in GetEntriesByType r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103908
2021-02-09 18:54:46 +00:00
Sean Feng
4c30f0fb30 Bug 1667836 - Make performance entries may have different should add entry algorithm r=smaug
According to https://w3c.github.io/timing-entrytypes-registry/#registry,
unlike other performance entries, `event` and `first-input` entries have
their own algorithms to determine whether it can be added to observers.
This patch factors some code to allow such algorithms can be
implemented.

Differential Revision: https://phabricator.services.mozilla.com/D102034
2021-02-09 18:54:46 +00:00
Markus Stange
5850226b47 Bug 1688941 - Enforce and document that mTimingData is always non-null. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103007
2021-01-27 19:24:19 +00:00
Olli Pettay
c7fd62bbcb Bug 1688312 - Consider to use nsAtoms in PerformanceEntry, r=sefeng
Differential Revision: https://phabricator.services.mozilla.com/D102807
2021-01-24 12:16:55 +00:00
Masatoshi Kimura
a29e207781 Bug 1685900 - Split internal and external contentPolicyType. r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D101271
2021-01-15 12:07:16 +00:00
Narcis Beleuzu
0322452233 Backed out changeset a52961071dcd (bug 1685900) for Build bustage in nsContentSecurityManager.cpp. CLOSED TREE 2021-01-15 04:04:37 +02:00
Masatoshi Kimura
b384f14cde Bug 1685900 - Split internal and external contentPolicyType. r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D101271
2021-01-15 04:02:41 +02:00
Dorel Luca
9ed19e2828 Backed out changeset a52961071dcd (bug 1685900) for Build bustage in nsContentSecurityManager.cpp. CLOSED TREE 2021-01-15 02:45:34 +02:00
Masatoshi Kimura
87e50835c4 Bug 1685900 - Split internal and external contentPolicyType. r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D101271
2021-01-14 20:44:54 +00:00
Sean Feng
d82519ce96 Bug 1682011 - Make performance objects to keep observers alive r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D99495
2020-12-11 22:27:27 +00:00
Simon Giesecke
4cab6ac723 Bug 1677466 - Move ParamTraits specializations with extra dependencies out of IPCMessageUtils.h. r=mccr8
This moves parts of IPCMessageUtils.h to two new header files and adapts
the include directives as necessary. The new header files are:
- EnumSerializer.h, which defines the templates for enum serializers
- IPCMessageUtilsSpecializations.h, which defines template specializations
  of ParamTraits with extra dependencies (building upon both IPCMessageUtils.h
  and EnumSerializer.h)

This should minimize the dependencies pulled in by every consumer of
IPCMessageUtils.h

Differential Revision: https://phabricator.services.mozilla.com/D94459
2020-12-10 11:09:21 +00:00
Simon Giesecke
971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Olli Pettay
25c8782343 Bug 1674254 - Inside a WebWorker context, calling performance.addEventListener throws a generic NS_ERROR_FAILURE, r=barret
Differential Revision: https://phabricator.services.mozilla.com/D97805
2020-11-20 22:39:58 +00:00
Gerald Squelart
b3314a1582 Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-18 21:56:57 +00:00
Gerald Squelart
8ed348d0c7 Bug 1675409 - Migrated UserTimingMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96051
2020-11-18 21:53:09 +00:00
Razvan Maries
b7eeb731df Backed out 23 changesets (bug 1675409) for build bustages on Preferences.cpp. CLOSED TREE
Backed out changeset c1a131a55767 (bug 1675409)
Backed out changeset 47d210802a5d (bug 1675409)
Backed out changeset e8ebb1c58d30 (bug 1675409)
Backed out changeset 69a1e9aeff2a (bug 1675409)
Backed out changeset 68f330b387a8 (bug 1675409)
Backed out changeset e4750d9ef5a1 (bug 1675409)
Backed out changeset bb6bb71e5ab3 (bug 1675409)
Backed out changeset 988d7f4716df (bug 1675409)
Backed out changeset ca41382e891c (bug 1675409)
Backed out changeset 90f3fbbbbeda (bug 1675409)
Backed out changeset 9b109d61a6f6 (bug 1675409)
Backed out changeset 3dd66abfdaa2 (bug 1675409)
Backed out changeset 44181df5f0db (bug 1675409)
Backed out changeset bb2603d947fc (bug 1675409)
Backed out changeset 97055cf20a56 (bug 1675409)
Backed out changeset f88fcf09de0d (bug 1675409)
Backed out changeset 7963e1c49786 (bug 1675409)
Backed out changeset 4c379c1061c3 (bug 1675409)
Backed out changeset b8be8ae7da63 (bug 1675409)
Backed out changeset 0b90aa89421e (bug 1675409)
Backed out changeset c10fb46467c9 (bug 1675409)
Backed out changeset 894ac233b290 (bug 1675409)
Backed out changeset 075d1d8e34c2 (bug 1675409)
2020-11-18 20:06:28 +02:00
Gerald Squelart
ced008cc9f Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-17 22:26:20 +00:00
Gerald Squelart
2ab89b23a6 Bug 1675409 - Migrated UserTimingMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96051
2020-11-17 22:22:34 +00:00
Mihai Alexandru Michis
c0d25b01b2 Backed out 24 changesets (bug 1666566, bug 1675409) for causing hazard failures in profiler/core/platform.cpp
CLOSED TREE

Backed out changeset 4d8af8533fd4 (bug 1666566)
Backed out changeset f031a3a8a20f (bug 1675409)
Backed out changeset 2b7e1a031921 (bug 1675409)
Backed out changeset bda5a24b2d0a (bug 1675409)
Backed out changeset 4282e2284314 (bug 1675409)
Backed out changeset 0637f1b26e9f (bug 1675409)
Backed out changeset 67ae04c8f607 (bug 1675409)
Backed out changeset 6c7b3f3618ef (bug 1675409)
Backed out changeset 2f325c22d169 (bug 1675409)
Backed out changeset 1e48ff70ad8f (bug 1675409)
Backed out changeset 1dfc32d6871d (bug 1675409)
Backed out changeset 4f1f218a777b (bug 1675409)
Backed out changeset e6ac8722b38e (bug 1675409)
Backed out changeset cf132e15fb57 (bug 1675409)
Backed out changeset a126e6b00ba9 (bug 1675409)
Backed out changeset fbc7fbb04f33 (bug 1675409)
Backed out changeset 554c69681474 (bug 1675409)
Backed out changeset 44d0521c701f (bug 1675409)
Backed out changeset 04653dfe4720 (bug 1675409)
Backed out changeset 41ca2c043a00 (bug 1675409)
Backed out changeset 264ae4c805d4 (bug 1675409)
Backed out changeset 5f3bbdac0d52 (bug 1675409)
Backed out changeset 11311c11a6e8 (bug 1675409)
Backed out changeset 0355fbc44baf (bug 1675409)
2020-11-17 19:31:28 +02:00
Gerald Squelart
f8c24dd6a4 Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-17 11:40:46 +00:00
Gerald Squelart
c152b9befc Bug 1675409 - Migrated UserTimingMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96051
2020-11-17 11:37:08 +00:00
Valentin Gosu
bd132e112d Bug 1658097 - [fission] Send resource timing data for cross-origin frames to the correct process r=nika,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D96754
2020-11-13 13:48:00 +00:00
Sean Feng
49e2db87d2 Bug 1675543 - Cache PerformancePaintTiming's StartTime r=smaug
Currently we store the raw `StartTime` as a `TimeStamp` object, and
convert it to `DOMHighResTimeStamp` when calling `StartTime()`. However,
there's no need to do the conversion every time.

Differential Revision: https://phabricator.services.mozilla.com/D96296
2020-11-09 23:11:21 +00:00
Sean Feng
9f50bffe4a Bug 1675543 - Cache PerformanceResourceTiming's StartTime r=smaug
PerformanceResourceTiming recalculates the startTime every time when
`StartTime()` method is called, which slows down `GetEntriesByName()`
due to this method requires `StartTime()` to order the entries.

In addition to that, there's not need to recalculate it every time, since all
required timings are already set when the `PerformanceTimingData`
object is first created.

This patch calculates the `startTime` when it's accessed first time
and caches it.

Differential Revision: https://phabricator.services.mozilla.com/D96295
2020-11-10 01:30:24 +00:00
Csoregi Natalia
ae9d59c708 Backed out 2 changesets (bug 1675543) for marionette failures on test_refresh_firefox.py. CLOSED TREE
Backed out changeset d7af96ca92b4 (bug 1675543)
Backed out changeset d98cf0c9d34e (bug 1675543)
2020-11-09 19:50:09 +02:00
Sean Feng
ad624adcb4 Bug 1675543 - Cache PerformancePaintTiming's StartTime r=smaug
Currently we store the raw `StartTime` as a `TimeStamp` object, and
convert it to `DOMHighResTimeStamp` when calling `StartTime()`. However,
there's no need to do the conversion every time.

Depends on D96295

Differential Revision: https://phabricator.services.mozilla.com/D96296
2020-11-09 12:21:19 +00:00
Sean Feng
13653417af Bug 1675543 - Cache PerformanceResourceTiming's StartTime r=smaug
PerformanceResourceTiming recalculates the startTime every time when
`StartTime()` method is called, which slows down `GetEntriesByName()`
due to this method requires `StartTime()` to order the entries.

In addition to that, there's not need to recalculate it every time, since all
required timings are already set when the `PerformanceTimingData`
object is first created.

This patch calculates the `startTime` in the constructor and caches it.

Differential Revision: https://phabricator.services.mozilla.com/D96295
2020-11-09 12:20:10 +00:00
Sylvestre Ledru
fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila
964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru
5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Andi-Bogdan Postelnicu
e10c399e77 Bug 1626555 - Add dom/performance to the list of non-unified-build-compatible directories. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D95167
2020-10-29 17:37:02 +00:00
Mihai Alexandru Michis
93c1ad0382 Bug 1518999 - Fix python black lint failures in webidl/moz.build and performance/moz.build
CLOSED TREE
2020-10-27 18:54:30 +02:00
Sean Feng
2ce0e3da25 Bug 1518999 - Implement PerformancePaintTiming for FirstContentfulPaint r=smaug,mstange
Spec: https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
We only support FirstContentfulPaint at the moment.

Differential Revision: https://phabricator.services.mozilla.com/D66463
2020-10-27 16:25:50 +00:00
Ricky Stewart
02a7b4ebdf Bug 1654103: Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara
da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart
c0cea3b0fa Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Sean Feng
981acf390f Bug 1518999 - Implement PerformancePaintTiming for FirstContentfulPaint r=smaug,mstange
Spec: https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming
We only support FirstContentfulPaint at the moment.

Differential Revision: https://phabricator.services.mozilla.com/D66463
2020-10-23 19:25:36 +00:00
Dorel Luca
1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00