Commit graph

417 commits

Author SHA1 Message Date
Olli Pettay
93acdfad59 Bug 1777574, automate CC zone handling, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D155084
2022-09-07 11:22:51 +00:00
Mark Banner
783a2f2187 Bug 1788037 - Turn on ESLint rule for prefer-boolean-length-check for dom. r=asuth,karlt
Differential Revision: https://phabricator.services.mozilla.com/D155965
2022-09-02 11:05:17 +00:00
Michael Comella
2f4dbb0e6b Bug 1772417 - correct web-platform convert name to timestamp. r=sefeng
This fixes the performance-measure-invalid.worker.html test. The test failed
because User Timing L3 section 4.2, "Convert a name to a timestamp", was not
implemented - the code was presumably residual from an earlier version of User
Timing. In particular, we never threw if the global object was not a Window. We
also corrected the code order for section 4.1, "Convert a mark to a timestamp",
which was incorrect but didn't cause any tests to fail.

Differential Revision: https://phabricator.services.mozilla.com/D154820
2022-08-18 21:18:25 +00:00
Michael Comella
312bff454e Bug 1772417 - align IsPerformanceTimingAttribute to user-timing spec. r=sefeng
IsPerformanceTimingAttribute can be called by both Window and WorkerGlobalScope
global objects so we move it to the Performance* superclass.

Differential Revision: https://phabricator.services.mozilla.com/D154819
2022-08-18 21:18:24 +00:00
Fabrice Desré
c50cb528fc Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +00:00
Andreea Pavel
3ccd75af8d Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel
fdb7cb2ecd Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
Mark Banner
7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Andreea Pavel
89d63c91e6 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00
Fabrice Desré
0f4ac7ad97 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-02 00:49:41 +00:00
Michael Comella
90e0d5b6e0 Bug 1775499 - update user_timing_dying_global test for performance.measure. r=sefeng
Root cause of test failure: the updates in this bug caused performance.measure
to throw an exception if there is a dying global. However, the test didn't try
to catch the exception so it failed with an uncaught exception. I updated the
test to handle this case which it was already doing for performance.mark.

Additionally, I corrected some indentation.

Depends on D151960

Differential Revision: https://phabricator.services.mozilla.com/D152814
2022-07-27 18:17:17 +00:00
Michael Comella
bd58669a22 Bug 1775499 - check for null GetParentObject in Performance::Measure. r=sefeng
Root cause: the global object can be null but I wasn't checking for it so it
caused a crash. I don't remember under what conditions it can be null but I saw
I had checked for null when I wrote Performance::Mark and remember debugging it
so it makes sense to do so here as well.

Differential Revision: https://phabricator.services.mozilla.com/D151960
2022-07-27 18:17:17 +00:00
Csoregi Natalia
534e4ed4cc Backed out changeset 1644072b7eac (bug 1775499) for causing failures on /test_performance_user_timing_dying_global.html. CLOSED TREE 2022-07-25 19:46:17 +03:00
Michael Comella
f9dff05051 Bug 1775499 - check for null GetParentObject in Performance::Measure. r=sefeng
Root cause: the global object can be null but I wasn't checking for it so it
caused a crash. I don't remember under what conditions it can be null but I saw
I had checked for null when I wrote Performance::Mark and remember debugging it
so it makes sense to do so here as well.

Differential Revision: https://phabricator.services.mozilla.com/D151960
2022-07-25 16:07:13 +00:00
Sean Feng
6910219457 Bug 1778345 - Align PerformanceEventTiming::GetAnElement with the spec r=emilio
There are two bugs in this function, first the function doesn't do
the `is not connected` check correctly as it supposes to use
`IsInComposed()` but rather `IsInUnComposed()`. Second, it
doesn't get the root of the element correctly.

Also this patch converts the function be static so that it can be
reused.

Differential Revision: https://phabricator.services.mozilla.com/D151081
2022-07-06 20:11:44 +00:00
Sean Feng
a0027872bc Bug 1770001 - Update TimingAllowCheck function to align spec updates r=necko-reviewers,dragana
Given the Fetch spec, the TAO check algorithm has been updated to
be more restricted. This patch updates the algorithm to match the
spec.

Differential Revision: https://phabricator.services.mozilla.com/D146737
2022-06-17 15:04:18 +00:00
Sean Feng
0294dfaf7a Bug 1768583 - Allow having a PerformanceResourceTiming entry for cross origin redirects r=necko-reviewers,dragana
According to the latest Fetch spec, we should generate a opaque
PerformanceResourceTiming entry for cross origin redirects, rather than
not generating it at all.

Plus the timings for cross-origin redirects won't be leaked unless all
redirects pass the TAO check.

Differential Revision: https://phabricator.services.mozilla.com/D146580
2022-06-16 14:09:31 +00:00
Michael Comella
6dfd826505 Bug 1762482 - update PerformanceMeasure to User Timing L3. r=sefeng,smaug
Differential Revision: https://phabricator.services.mozilla.com/D143858
2022-05-31 16:48:14 +00:00
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