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

366 Коммитов

Автор SHA1 Сообщение Дата
Gerald Squelart 5399574d8b Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-08 23:59:35 +00:00
Cristian Tuns 1aeac93d23 Backed out 5 changesets (bug 1738627) for causing xpcshell failures on test_ext_geckoProfiler_schema.js CLOSED TREE
Backed out changeset 42d385d7da97 (bug 1738627)
Backed out changeset edeb3a338954 (bug 1738627)
Backed out changeset 98f02e35134d (bug 1738627)
Backed out changeset 711daa6dd24b (bug 1738627)
Backed out changeset 49e12753a40c (bug 1738627)
2021-11-05 05:12:28 -04:00
Gerald Squelart 7fa084ae7c Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-05 05:52:28 +00:00
Masayuki Nakano 4341d6fb0c Bug 1455514 - part 1: Add accessors and static helper methods to retrieve `nsINode` or its concrete classes from `EventTarget` r=smaug
Currently, checking whether an `EventTarget` is `nsINode` (or its concrete
classes) or not requires a QI, but it's expensive and used a lot while we
handle each event.  Therefore, it'd be nicer for creating a virtual method,
`EventTarget::IsNode()` and use it for the check.

If trying to convert `EventTarget` to a concrete class, it may require two
virtual method calls.  I'm not sure whether it's cheaper than a QI, but at
least, it won't depend on the UUID check order of `QueryInterface()` when
multiple interfaces are implemented.

Differential Revision: https://phabricator.services.mozilla.com/D129781
2021-11-02 13:03:43 +00:00
Gerald Squelart df50ece611 Bug 1735697 - Remove profiler_can_accept_markers(), use profiler_thread_is_being_profiled() instead - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D128577
2021-10-18 23:11:30 +00:00
Evgenia Kotovich 0d0980ee0d Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-18 09:26:33 +00:00
Noemi Erli 2bba3cec69 Backed out changeset 2ab6bb03dcc1 (bug 1576768) for causing failures in test_double_submit.html CLOSED TREE 2021-10-18 02:05:57 +03:00
Evgenia Kotovich 3e3dff109c Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-17 14:59:14 +00:00
Alexandru Michis dac6815201 Backed out changeset 7c08aa027893 (bug 1576768) for causing multiple failures.
CLOSED TREE
2021-10-15 16:52:43 +03:00
Evgenia Kotovich a8b32926fa Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-15 12:58:11 +00:00
amurali 204f95e233 Bug 1675640 - Renaming internal FirstContentfulPaint to FirstContentfulComposite r=sefeng,mstange
Renaming older versions of FirstContentfulPaint - literal,variables and method to FirstContentfulComposite

Differential Revision: https://phabricator.services.mozilla.com/D110133
2021-10-01 17:02:49 +00:00
Sean Feng a861907936 Bug 1733503 - Don't expose redirectStart and redirectEnd when there's a cross-origin redirect for PerformanceNavigationTiming r=smaug
The actual text for hiding these information is actually missing at the
moment. This is the pending PR https://github.com/whatwg/html/pull/7105
which should fix it.

In addition to this PR, the obsolete (obsolete, but still accurate) definition
for `redirectStart` and `redirectEnd` has specified that when there's a
cross-origin redirect, these timings should not be exposed.

Obsolete definition: https://w3c.github.io/navigation-timing/#dom-performancetiming-redirectstart

Differential Revision: https://phabricator.services.mozilla.com/D127200
2021-10-01 16:58:36 +00:00
Olli Pettay 4523798061 Bug 1731293, change the assertion to check only that we aren't on the main thread since the worker thread isn't really running, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D125999
2021-09-17 20:20:33 +00:00
Gerald Squelart c4a6f1bac7 Bug 1663382 - Remove dangerous ProfilerStringView::Data() - r=florian
`ProfilerStringView::Data()` would return a pointer to the start of the string, but there may not be a null terminator at the end!
To reduce the likelihood of misuses, that function has now been removed.
Instead, callers must now access the data through `AsSpan` or the `Span` conversion operator (which makes it easy to use with `NS_ConvertUTF16toUTF8` for example).

It was not an issue until now, because deserialized string would always be terminated when copied out of the profile buffer, but a following patch will add optimized code where the non-terminated string inside the buffer will be directly pointed at.

Differential Revision: https://phabricator.services.mozilla.com/D125027
2021-09-10 11:43:47 +00:00
Sean Feng 179b13c16b Bug 1373086 - Optimize Performance::GetEntriesByName r=smaug
We did two optimizations in this patch
  1. Since mResourceEntries and mUserEntries are presorted
  arrays, we could just merge them by iterating them over without
  performing a quick sort.
  2. Don't perform quick sort if entry type is provided.

Differential Revision: https://phabricator.services.mozilla.com/D124797
2021-09-08 19:22:52 +00:00
Nazım Can Altınova a38b25b295 Bug 1728544 - Make the MarkerSchema::Format enum class values CamelCased r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D124241
2021-09-03 14:30:10 +00:00
Nazım Can Altınova ddae0f7cd6 Bug 1728544 - Make the MarkerSchema::Location enum class values CamelCased r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D124240
2021-09-03 14:30:09 +00:00
Andi-Bogdan Postelnicu 250fa0d795 Bug 1725145 - header files fixes in the hybrid build env. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D122343
2021-08-22 10:21:55 +00:00
Kagami Sascha Rosylight ad1eb3ed7e Bug 1723050 - Part 21: Replace typedef by using in dom/performance/ r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D121319
2021-08-09 13:37:29 +00:00
Tom Ritter 1b9b6b72db Bug 1666222: Cut over a ton of NowUnfuzzed calls -> Now 4/5 r=smaug,extension-reviewers,zombie
With Fuzzyfox removed, Now() does what NowUnfuzzed() did.

Differential Revision: https://phabricator.services.mozilla.com/D119639
2021-07-14 18:18:17 +00:00
Tooru Fujisawa cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Florian Quèze cd399a71a2 Bug 1717991 - Remove ifdefs around code that adds profiler markers with custom marker schemas, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D118680
2021-06-25 13:28:01 +00:00
Emilio Cobos Álvarez 9410c0a59b Bug 1716481 - Improve ManagedPostRefreshObserver. r=smaug
Make it less sketchy.

Differential Revision: https://phabricator.services.mozilla.com/D118284
2021-06-24 22:05:12 +00:00
Peter Van der Beken f206ae96e4 Bug 1712725 - Stop clearing JS things when calling mozilla::DropJSObjects. r=mccr8
There's a pattern of clearing JS things when calling mozilla::DropJSObjects,
but mozilla::DropJSObjects already clears the JS things itself by calling
CycleCollectedJSRuntime::RemoveJSHolder.

Differential Revision: https://phabricator.services.mozilla.com/D115885
2021-05-27 08:35:40 +00:00
Peter Van der Beken af93c19a09 Bug 1712725 - Pass the correct object to mozilla::DropJSObjects. r=mccr8
Various code was passing 'this' to mozilla::DropJSObjects in unlink, but that's
the CC participant. The right object to pass is 'tmp'. I also added static
asserts in mozilla::Hold/DropJSObjects to block this in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115884
2021-05-27 08:35:40 +00:00
Sean Feng 22e7aa390f Bug 1710682 - Make Event::GetEventName returns a char16_t r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D114872
2021-05-11 20:11:01 +00:00
Sean Feng f6a4e52580 Bug 1706132 - Suppress the ErrorResult in EventCounts::EventCounts r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D114122
2021-05-06 01:36:51 +00:00
Sean Feng 7f054950d5 Bug 1709232 - Make PerformanceObserver.supportedEntryTypes respects dom.enable_event_timing r=emilio
PerformanceObserver.supportedEntryTypes doesn't check whether
PerformanceEventTiming is enabled or not, so it'll falsely claims
PerformanceEventTiming is supported even if the pref is disabled.

This patch fixes that by adding a guard to it.

Differential Revision: https://phabricator.services.mozilla.com/D114250
2021-05-05 17:20:12 +00:00
Emilio Cobos Álvarez de258a4e58 Bug 1699844 - Make promiseDocumentFlushed handle presshell destruction correctly. r=smaug,botond
By resolving the relevant promises, instead of crashing (and if we
didn't crash we'd leave the window registered as a refresh driver
observer, which would be bad).

I wanted to reject them, since that's what we do when the page has no
pres shell, but that'd make this test fail:

   https://searchfox.org/mozilla-central/rev/d8194cbbeaec11962ed67f83aea9984bf38f7c63/dom/base/test/browser_promiseDocumentFlushed.js#165-186

For this, we modify the OneShotPostRefreshObserver API to be more
generic (and rename it OneShotManagedRefreshObserver).

We fix APZ's usage of this API, which was doing something extremely
weird (returning a refcounted object in a UniquePtr). This seems like an
artifact from recent OneShotPostRefreshObserver cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D111851
2021-04-14 19:34:23 +00:00
Sean Feng a0fc34d157 Bug 1693327 - Assert the global is dying when EventCounts fails to set values r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D106530
2021-03-22 23:22:23 +00:00
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