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

399 Коммитов

Автор SHA1 Сообщение Дата
Michael Comella 3f9fef6bd8 Bug 1767063 - make PerformanceEntry.mEpoch narrowing conversion explicit. r=sefeng
The converted value gets passed into TimingNotification which assigns the value
into a PerformanceEntry (this is the only usage). Since PerformanceEntry is
defined in WebIDL, we could not change its types (which is double for mEpoch) so
we were forced to safely convert the value where we did.

I don't think the existing conversion code had any bugs since we converted a
64-bit signed integer timestamp into uint64_t (safe) into a double (which is
safe for the reasons mentioned in the code comments).

Differential Revision: https://phabricator.services.mozilla.com/D145142
2022-05-18 17:22:15 +00:00
Kagami Sascha Rosylight eb5642168c Bug 1768189 - Part 24: Apply modernize-concat-nested-namespaces to dom/performance/PerformanceNavigation.h ... r=andi
Depends on D145757

Differential Revision: https://phabricator.services.mozilla.com/D145758
2022-05-09 20:41:12 +00:00
Kagami Sascha Rosylight ce3a9b21da Bug 1768189 - Part 23: Apply modernize-concat-nested-namespaces to dom/network/TCPServerSocketChild.h ... r=andi
Depends on D145756

Differential Revision: https://phabricator.services.mozilla.com/D145757
2022-05-09 20:41:12 +00:00
Dmitrij Feller f5e797a969 Bug 1766725 - Fix the mRawStarTime typo in PerformancePaintTiming.r=sefeng
Differential Revision: https://phabricator.services.mozilla.com/D145128
2022-05-09 14:33:23 +00:00
Michael Comella 1e0c9ead32 Bug 1724645 - add test_performance_user_timing_dying_global.html. r=sefeng,smaug
This test tests for a bug I discovered in my code that would crash the browser
if certain User Timing APIs were called on the dying iframe global.

I created a new test, rather than using test_performance_user_timing.html,
because it seemed like the code I added to set up the iframe did not easily fit
into the testing model of test_performance_user_timing.

Differential Revision: https://phabricator.services.mozilla.com/D143214
2022-04-26 19:30:53 +00:00
Michael Comella b6153dda2b Bug 1724645 - update PerformanceMark to User Timing L3. r=sefeng,smaug
To follow the spec more closely, some functionality moved from
`performance.mark` to the PerformanceMark constructor.

I verified the new fingerprinting protection behavior with :tjr: they said it's
okay to return a PerformanceMark as long as it uses the same reduced precision
of `performance.now`.

Differential Revision: https://phabricator.services.mozilla.com/D142625
2022-04-26 19:30:52 +00:00
Sean Feng 893710b672 Bug 1765866 - Update the BUG_COMPONENT for Performance APIs to DOM: Performance r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144340
2022-04-22 00:27:38 +00:00
Randell Jesup 258c7cbfe7 Bug 1207753 - dom misc thread-safety annotations r=hsivonen,smaug
Differential Revision: https://phabricator.services.mozilla.com/D130598
2022-03-25 13:32:35 +00:00
Csoregi Natalia 8183a2d0cd Backed out changeset 22dd9ee7e4a4 (bug 1207753) for causing bustage on ProcessHangMonitor.cpp. CLOSED TREE 2022-03-22 01:31:19 +02:00
Randell Jesup b18c3e4ebb Bug 1207753 - dom misc thread-safety annotations r=hsivonen,smaug,media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D130598
2022-03-21 23:02:23 +00:00
Sean Feng cb38883dfa Bug 1751678 - Make FetchStart uses StarTime when TAO check fails for PerformanceResourceTiming r=smaug
Given the recent Fetch spec updates, Step 8.1 in
https://fetch.spec.whatwg.org/#finalize-and-report-timing specifies
that start time(StartTime) and post-redirect start time(FetchStart) should
be start time when TAO check fails.

Differential Revision: https://phabricator.services.mozilla.com/D141366
2022-03-18 16:08:12 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Nika Layzell be0d18a401 Bug 1754037 - Part 4: Implement IPDLParamTraits in terms of ParamTraits, r=ipc-reviewers,mccr8
This flips around the relationship between IPDLParamTraits and ParamTraits so
that callers can always use ParamTraits instead of IPDLParamTraits.

Differential Revision: https://phabricator.services.mozilla.com/D140005
2022-03-04 15:39:41 +00:00
Nika Layzell 05dc5e0d76 Bug 1754037 - Part 3c: Automatically update all ParamTraits implementations, r=ipc-reviewers,media-playback-reviewers,bryce,mccr8
Automatically generated rewrites of all ParamTraits and IPDLParamTraits
implementations in-tree to use IPC::Message{Reader,Writer}.

Differential Revision: https://phabricator.services.mozilla.com/D140004
2022-03-04 15:39:41 +00:00
Eden Chuang e06a90c8d7 Bug 1754365 - Saving NavigationPreload's PerformanceTimingData into worker's PerformanceStorage. r=dom-worker-reviewers,jesup
Depends on D138251

Differential Revision: https://phabricator.services.mozilla.com/D138252
2022-02-27 00:26:22 +00:00
Eden Chuang 94eb54f155 Bug 1754365 - Adding IPCPerformanceTimingData for serialize/deserialize PerformanceTimingData for IPC. r=dom-worker-reviewers,jesup
PerformanceTimingData supports to transfer through IPC. However, it could not be combined into other struct defined in ipdl/ipdlh
This patch creates IPCPerformanceTimingData to support PerformanceTimingData can be integrated with other ipc structs.

Depends on D138249

Differential Revision: https://phabricator.services.mozilla.com/D138250
2022-02-27 00:26:21 +00:00
Marian-Vasile Laza af4995d8ba Backed out 4 changesets (bug 1754365) for causing wpt failures on service-worker/navigation-headers.https.html. CLOSED TREE
Backed out changeset 9ee546b9fd2b (bug 1754365)
Backed out changeset cf972fe0d961 (bug 1754365)
Backed out changeset f8afd25bf41e (bug 1754365)
Backed out changeset 34d4e99f8219 (bug 1754365)
2022-02-26 01:51:59 -08:00
Eden Chuang d3aabddeb0 Bug 1754365 - Saving NavigationPreload's PerformanceTimingData into worker's PerformanceStorage. r=dom-worker-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D138252
2022-02-26 08:40:26 +00:00
Eden Chuang 777caec00b Bug 1754365 - Adding IPCPerformanceTimingData for serialize/deserialize PerformanceTimingData for IPC. r=dom-worker-reviewers,jesup
PerformanceTimingData supports to transfer through IPC. However, it could not be combined into other struct defined in ipdl/ipdlh
This patch creates IPCPerformanceTimingData to support PerformanceTimingData can be integrated with other ipc structs.

Depends on D138249

Differential Revision: https://phabricator.services.mozilla.com/D138250
2022-02-26 08:40:25 +00:00
Eden Chuang 2266b31d41 Bug 1744025 - Replace include "mozilla/dom/WorkerPrivate.h" with include "mozilla/dom/WorkerScope.h" where WorkerPrivate->GlobalScope() is called. r=dom-worker-reviewers,smaug,jstutte
#include "mozilla/dom/WorkerScope.h" is removed from WorkerPrivate.h, where calling WorkerPrivate::GlobalScope() without include "WorkerScope.h" makes WorkerScope as an incomplete type.


Depends on 132800

Depends on D132800

Differential Revision: https://phabricator.services.mozilla.com/D133483
2022-01-25 08:53:03 +00:00
Jens Stutte b7adbf2325 Bug 1744025: Use CheckedUnsafePtr<WorkerPrivate> in PerformanceWorker. r=dom-worker-reviewers,edenchuang
Depends on D132797

Differential Revision: https://phabricator.services.mozilla.com/D132799
2022-01-25 08:53:02 +00:00
Eden Chuang 4de896f8ef Bug 1744025: Use CheckedUnsafePtr<WorkerPrivate> in WorkerGlobalScopeBase. r=dom-worker-reviewers,asuth
Depends on D132708

Differential Revision: https://phabricator.services.mozilla.com/D132709
2022-01-25 08:53:00 +00:00
Norisz Fay 5edb88e27a Backed out 9 changesets (bug 1744025) for causing wpt failures on CheckedUnsafePtr.h CLOSED TREE
Backed out changeset 89dca4fc5940 (bug 1744025)
Backed out changeset 7aa395dcdbe4 (bug 1744025)
Backed out changeset 1580a4ea1a85 (bug 1744025)
Backed out changeset af171636a87f (bug 1744025)
Backed out changeset a5edfa1c9cd6 (bug 1744025)
Backed out changeset 8abd6ba69815 (bug 1744025)
Backed out changeset cfb822df5b3f (bug 1744025)
Backed out changeset 5598943a94fd (bug 1744025)
Backed out changeset 43186fbbf8b4 (bug 1744025)
2021-12-15 18:46:01 +02:00
Eden Chuang 4146950108 Bug 1744025 - Replace include "mozilla/dom/WorkerPrivate.h" with include "mozilla/dom/WorkerScope.h" where WorkerPrivate->GlobalScope() is called. r=dom-worker-reviewers,smaug,jstutte
#include "mozilla/dom/WorkerScope.h" is removed from WorkerPrivate.h, where calling WorkerPrivate::GlobalScope() without include "WorkerScope.h" makes WorkerScope as an incomplete type.


Depends on 132800

Depends on D132800

Differential Revision: https://phabricator.services.mozilla.com/D133483
2021-12-15 13:48:19 +00:00
Jens Stutte 5786ca5988 Bug 1744025: Use CheckedUnsafePtr<WorkerPrivate> in PerformanceWorker. r=dom-worker-reviewers,edenchuang
Depends on D132797

Differential Revision: https://phabricator.services.mozilla.com/D132799
2021-12-15 13:48:19 +00:00
Eden Chuang fe725492f9 Bug 1744025: Use CheckedUnsafePtr<WorkerPrivate> in WorkerGlobalScopeBase. r=dom-worker-reviewers,asuth
Depends on D132708

Differential Revision: https://phabricator.services.mozilla.com/D132709
2021-12-15 13:48:17 +00:00
Sandor Molnar 68afd87d02 Backed out 8 changesets (bug 1744025) for causing bp-hybrid bustages in dom/clients/api/Clients.cpp. CLOSED TREE
Backed out changeset b6452430763d (bug 1744025)
Backed out changeset 46e9f06636da (bug 1744025)
Backed out changeset 913cdee4824f (bug 1744025)
Backed out changeset e1bc4e2066c7 (bug 1744025)
Backed out changeset e6b99af4b7ca (bug 1744025)
Backed out changeset e9b749f80ec2 (bug 1744025)
Backed out changeset 26d3176a00ef (bug 1744025)
Backed out changeset 2c8941fdcee5 (bug 1744025)
2021-12-08 01:30:06 +02:00
Jens Stutte a8e287b431 Bug 1744025: Use CheckedUnsafePtr<WorkerPrivate> in PerformanceWorker. r=dom-worker-reviewers,edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D132799
2021-12-07 16:47:17 +00:00
Jens Stutte d53627390a Bug 1744025: Use CheckedUnsafePtr<WorkerPrivate> in WorkerGlobalScopeBase. r=dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D132709
2021-12-07 16:47:15 +00:00
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