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

475 Коммитов

Автор SHA1 Сообщение Дата
serge-sans-paille e54774d573 Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-28 08:21:19 +00:00
Alexandru Marc 191ccbe7fe Backed out changeset d92f391b3b0c (bug 1922838) for backing out bug 1915351 2024-10-25 16:42:33 +03:00
serge-sans-paille 53068cdf31 Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 09:06:01 +00:00
Alexandru Marc 83543f20f2 Backed out changeset 448597bce69d (bug 1922838) for causing build bustages. CLOSED TREE 2024-10-24 11:37:49 +03:00
serge-sans-paille c7a369b29a Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 07:38:30 +00:00
Bob Owen caa2cde4ba Bug 1901554 p1: Call CoTaskMemFree directly from combase.dll for MFTEncoder. r=padenot
This prevents us from having to preload ole32.dll and all of its associated
dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D213256
2024-06-14 10:39:55 +00:00
Ray Kraesig 50c943690c Bug 1869053 - [5/5] templatize and further simplify AgileReference r=handyman,win-reviewers
Lift `aIid` to compile-time, as a template parameter `InterfaceT`. This
simplifies the common case for using `Resolve()`, where the desired and
supplied interfaces are the same. (For the as-yet-unattested case where
they're not, retain the old functionality by means of a small family of
`ResolveAs()` functions.)

Additionally, to eliminate a swath of custom logic and magic-number
choices surrounding `mHResult`, eliminate `mHResult` itself as well.
Instead, since its value was derived from the creation of the underlying
`IAgileReference`, any callers that might care can acquire it as an
additional return value from a named-constructor function.

These collectively trim `AgileReference`'s footprint down to a single
`RefPtr`, with all its special member functions having only default
implementations.

Differential Revision: https://phabricator.services.mozilla.com/D196513
2023-12-21 19:46:55 +00:00
Ray Kraesig d1a2476c7a Bug 1869053 - [4/5] remove EnsureMTA::CreateInstance r=handyman
This function has not been used since its introduction in 2019.

Differential Revision: https://phabricator.services.mozilla.com/D196512
2023-12-21 19:46:55 +00:00
Ray Kraesig 149e60c039 Bug 1869053 - [2/5] eliminate all implicit conversions between RefPtr and AgileReference r=handyman,win-reviewers
Remove all of the code in `RefPtr` and `AgileReference` that allowed
for implicitly converting between the two in via constructors or the
assignment operator.

Replace these with a slightly-less-convenient-but-substantially-more-
explicit `Resolve` function family.

(This also eliminates the dependency that `class RefPtr` had on
`class AgileReference`.)

Differential Revision: https://phabricator.services.mozilla.com/D196365
2023-12-21 19:46:54 +00:00
Ray Kraesig 2fd12fe1ad Bug 1869053 - [1/5] modernize our `mscom::AgileReference` class r=handyman
As we no longer support Windows versions without `RoGetAgileReference`,
we can drop the old global-interface-table manipulation version of this
code.

We temporarily retain the dynamic linking of `RoGetAgileReference` on
MinGW builds, as MinGW doesn't know how to link it yet.

Differential Revision: https://phabricator.services.mozilla.com/D196364
2023-12-21 19:46:54 +00:00
Sandor Molnar a1bf4a20be Backed out 5 changesets (bug 1869053) for causing build bustages. CLOSED TREE
Backed out changeset 0a1ec143adbc (bug 1869053)
Backed out changeset 687e7683752c (bug 1869053)
Backed out changeset 59d9b136a3f2 (bug 1869053)
Backed out changeset 6ab85972356d (bug 1869053)
Backed out changeset 6addaa9e88be (bug 1869053)
2023-12-20 19:42:52 +02:00
Ray Kraesig 5816fe0886 Bug 1869053 - [5/5] templatize and further simplify AgileReference r=handyman,win-reviewers
Lift `aIid` to compile-time, as a template parameter `InterfaceT`. This
simplifies the common case for using `Resolve()`, where the desired and
supplied interfaces are the same. (For the as-yet-unattested case where
they're not, retain the old functionality by means of a small family of
`ResolveAs()` functions.)

Additionally, to eliminate a swath of custom logic and magic-number
choices surrounding `mHResult`, eliminate `mHResult` itself as well.
Instead, since its value was derived from the creation of the underlying
`IAgileReference`, any callers that might care can acquire it as an
additional return value from a named-constructor function.

These collectively trim `AgileReference`'s footprint down to a single
`RefPtr`, with all its special member functions having only default
implementations.

Differential Revision: https://phabricator.services.mozilla.com/D196513
2023-12-20 17:06:23 +00:00
Ray Kraesig 411db0a777 Bug 1869053 - [4/5] remove EnsureMTA::CreateInstance r=handyman
This function has not been used since its introduction in 2019.

Differential Revision: https://phabricator.services.mozilla.com/D196512
2023-12-20 17:06:22 +00:00
Ray Kraesig 3665ce2e0b Bug 1869053 - [2/5] eliminate all implicit conversions between RefPtr and AgileReference r=handyman,win-reviewers
Remove all of the code in `RefPtr` and `AgileReference` that allowed
for implicitly converting between the two in via constructors or the
assignment operator.

Replace these with a slightly-less-convenient-but-substantially-more-
explicit `Resolve` function family.

(This also eliminates the dependency that `class RefPtr` had on
`class AgileReference`.)

Differential Revision: https://phabricator.services.mozilla.com/D196365
2023-12-20 17:06:21 +00:00
Ray Kraesig 6c53829edd Bug 1869053 - [1/5] modernize our `mscom::AgileReference` class r=handyman
As we no longer support Windows versions without `RoGetAgileReference`,
we can drop the old global-interface-table manipulation version of this
code.

Differential Revision: https://phabricator.services.mozilla.com/D196364
2023-12-20 17:06:21 +00:00
Ray Kraesig eea516a253 Bug 1865867 - [1/2] Modernize ApartmentRegion{,T} r=handyman
Modernize and clean up ApartmentRegion.h:

- Apply all of clang-tidy's suggestions.

- Rename the template parameter `T` (which, as a template parameter, is
  typically reserved for types) to `AptType`.

- When using `ApartmentRegionT`, include `COINIT_DISABLE_OLE1DDE` by
  default. (Out of an abundance of caution, do not do so for
  `ApartmentRegion`.)

Differential Revision: https://phabricator.services.mozilla.com/D194302
2023-11-30 02:43:39 +00:00
Emilio Cobos Álvarez 25c0d10932 Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.

I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).

Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
Masatoshi Kimura 0a7dc6a618 Bug 1852806 - Remove macros for older Windows SDK from ipc/. r=handyman,mccr8,ipc-reviewers
Depends on D188024

Differential Revision: https://phabricator.services.mozilla.com/D188025
2023-09-15 03:19:27 +00:00
Cosmin Sabou f8c16a8f94 Backed out 15 changesets (bug 1852806) for causing mda failures on test_video_low_power_telemetry.html. CLOSED TREE
Backed out changeset faea1f4cb9a9 (bug 1852806)
Backed out changeset 4db93c374f9b (bug 1852806)
Backed out changeset 7e40e0e04921 (bug 1852806)
Backed out changeset b0a66c4269ce (bug 1852806)
Backed out changeset 4ff3545936f9 (bug 1852806)
Backed out changeset 02c0a8eb3fd6 (bug 1852806)
Backed out changeset ae2c7b33acfb (bug 1852806)
Backed out changeset 2b89ba254a1a (bug 1852806)
Backed out changeset dfa4f73fc548 (bug 1852806)
Backed out changeset daffcc4c1877 (bug 1852806)
Backed out changeset 33855bcdf15e (bug 1852806)
Backed out changeset 694f29707f3e (bug 1852806)
Backed out changeset 1891eda22a59 (bug 1852806)
Backed out changeset 1b854941389c (bug 1852806)
Backed out changeset 2f7cfe04be59 (bug 1852806)
2023-09-15 09:48:27 +03:00
Masatoshi Kimura de1f5d602e Bug 1852806 - Remove macros for older Windows SDK from ipc/. r=handyman,mccr8,ipc-reviewers
Depends on D188024

Differential Revision: https://phabricator.services.mozilla.com/D188025
2023-09-15 03:19:27 +00:00
Masatoshi Kimura dd444d46f2 Bug 1849927 - Fix MinGW build errors. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D186837
2023-09-06 21:25:09 +00:00
Masatoshi Kimura 1518105f40 Bug 1844908 - Remove pre-Win10-specific codepath from ipc/. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D184295
2023-07-26 08:52:51 +00:00
Natalia Csoregi 72a7b95555 Backed out 19 changesets (bug 1844908) for causing win bustage on AvailableMemoryTracker.cpp. CLOSED TREE
Backed out changeset 44c66f2233cf (bug 1844908)
Backed out changeset a8010ff534bf (bug 1844908)
Backed out changeset 225dc3aeb220 (bug 1844908)
Backed out changeset a1414db64e33 (bug 1844908)
Backed out changeset 7f1e0a527839 (bug 1844908)
Backed out changeset 6dc7646d1ffa (bug 1844908)
Backed out changeset 8d715131510f (bug 1844908)
Backed out changeset 4b6fe8a4e7db (bug 1844908)
Backed out changeset 2b419fabf1e8 (bug 1844908)
Backed out changeset af84e701d616 (bug 1844908)
Backed out changeset 2fa203969ec5 (bug 1844908)
Backed out changeset 2b3d2df94db3 (bug 1844908)
Backed out changeset 7eca452f5fd7 (bug 1844908)
Backed out changeset 3d961cf25afe (bug 1844908)
Backed out changeset 3c59143f8dd7 (bug 1844908)
Backed out changeset ab50c6c5425a (bug 1844908)
Backed out changeset b2c5636df673 (bug 1844908)
Backed out changeset e9a0f1c6760c (bug 1844908)
Backed out changeset 945ccbedde0b (bug 1844908)
2023-07-25 19:55:35 +03:00
Masatoshi Kimura 83598950c1 Bug 1844908 - Remove pre-Win10-specific codepath from ipc/. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D184295
2023-07-25 14:41:02 +00:00
Bob Owen 18e588031f Bug 1821440: If process is in an app container, add the container SID to the COM ACL. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D180207
2023-06-09 10:41:07 +00:00
James Teh e4c5cc5d7a Bug 1821972 part 2: Remove ipc/mscom code only used by the old accessibility architecture based on content process COM proxies. r=bobowen
Nothing else uses any of this or is likely to use it, so I don't think it makes sense to leave it as dead code.

Differential Revision: https://phabricator.services.mozilla.com/D177967
2023-05-22 20:19:46 +00:00
James Teh 6023de86b6 Bug 1821963 part 4: Remove alertable wait from IPC message loops. r=handyman
This was only ever used by the old accessibility architecture based on content process COM proxies, which is now being removed.

Differential Revision: https://phabricator.services.mozilla.com/D177964
2023-05-22 20:19:45 +00:00
James Teh cd328c4093 Bug 1821963 part 3: Remove various components supporting the old accessibility architecture based on content process COM proxies. r=nlapre,nalexander
This includes AccessibleHandler, HandlerProvider, IGeckoCustom and the IAccessible2 COM proxy dll.
Even with the new architecture, we still use IAccessible2, but we no longer need a COM proxy because we aren't using COM across processes ourselves.
If clients want to use IAccessible2 across processes, they're responsible for registering a COM proxy themselves as with all other IAccessible2 applications.
Alternatively, they can rely on the IAccessible2 COM proxy which is included with Windows 10 and later.

Differential Revision: https://phabricator.services.mozilla.com/D177963
2023-05-22 20:19:45 +00:00
James Teh 7c26e1ede2 Bug 1821963 part 2: Remove COM registration supporting the old accessibility architecture based on content process COM proxies. r=nlapre,bobowen
Differential Revision: https://phabricator.services.mozilla.com/D177962
2023-05-22 20:19:45 +00:00
Narcis Beleuzu ed1139f199 Backed out 6 changesets (bug 1821963) for build bustages. CLOSED TREE
Backed out changeset a92c62e304f0 (bug 1821963)
Backed out changeset da6cba0b0dd4 (bug 1821963)
Backed out changeset 4ed7ca0eb04a (bug 1821963)
Backed out changeset f2fba0ef15d9 (bug 1821963)
Backed out changeset 706e46fc2688 (bug 1821963)
Backed out changeset 6de2b9548dc6 (bug 1821963)
2023-05-22 14:05:20 +03:00
James Teh 4bb4256ad6 Bug 1821963 part 4: Remove alertable wait from IPC message loops. r=handyman
This was only ever used by the old accessibility architecture based on content process COM proxies, which is now being removed.

Differential Revision: https://phabricator.services.mozilla.com/D177964
2023-05-22 10:00:21 +00:00
James Teh 3a3b50114d Bug 1821963 part 3: Remove various components supporting the old accessibility architecture based on content process COM proxies. r=nlapre,nalexander
This includes AccessibleHandler, HandlerProvider, IGeckoCustom and the IAccessible2 COM proxy dll.
Even with the new architecture, we still use IAccessible2, but we no longer need a COM proxy because we aren't using COM across processes ourselves.
If clients want to use IAccessible2 across processes, they're responsible for registering a COM proxy themselves as with all other IAccessible2 applications.
Alternatively, they can rely on the IAccessible2 COM proxy which is included with Windows 10 and later.

Differential Revision: https://phabricator.services.mozilla.com/D177963
2023-05-22 10:00:21 +00:00
James Teh 13afc4eeb2 Bug 1821963 part 2: Remove COM registration supporting the old accessibility architecture based on content process COM proxies. r=nlapre,bobowen
Differential Revision: https://phabricator.services.mozilla.com/D177962
2023-05-22 10:00:20 +00:00
serge-sans-paille 1338134eb7 Bug 1828384 - Make ipc/mscom buildable outside of a unified build environment r=andi
Differential Revision: https://phabricator.services.mozilla.com/D175597
2023-04-18 13:43:20 +00:00
Bob Owen 219f299719 Bug 1772089 p2: Switch to OS temp in InterceptorLog. r=Jamie
This means that the content process sandbox would need to be disabled on an opt
build for this logging to work.

Differential Revision: https://phabricator.services.mozilla.com/D168593
2023-02-24 08:44:40 +00:00
Nika Layzell 59be033e1c Bug 1809753 - Part 1: Remove quantum-dom nsIThread::EventTarget methods, r=mccr8
We aren't likely to try to make these changes any time soon, so cleaning out
these unnecessary methods which just return `this` will simplify things.

I was unable to find any calls to the `.eventTarget` getter in JS, which makes
sense, as the nsIThread type is only really used in JS as a wrapper around the
main thread in older code. Because of that, it has been removed as well.

Differential Revision: https://phabricator.services.mozilla.com/D166605
2023-01-16 23:14:10 +00:00
Sandor Molnar 41b78439d0 Backed out 6 changesets (bug 1809752, bug 1809753) for causing perma failures in browser/components/firefoxview/tests/browser/browser_feature_callout_position.js
Backed out changeset ea05784d74c4 (bug 1809753)
Backed out changeset 7c9b20eebcc8 (bug 1809753)
Backed out changeset d0267ac2256d (bug 1809753)
Backed out changeset aa9f2971bd6f (bug 1809753)
Backed out changeset f0d9fcfaa6f8 (bug 1809752)
Backed out changeset 6d58c799cffe (bug 1809752)
2023-01-17 03:19:24 +02:00
Nika Layzell f410f28a30 Bug 1809753 - Part 1: Remove quantum-dom nsIThread::EventTarget methods, r=mccr8
We aren't likely to try to make these changes any time soon, so cleaning out
these unnecessary methods which just return `this` will simplify things.

I was unable to find any calls to the `.eventTarget` getter in JS, which makes
sense, as the nsIThread type is only really used in JS as a wrapper around the
main thread in older code. Because of that, it has been removed as well.

Differential Revision: https://phabricator.services.mozilla.com/D166605
2023-01-16 23:14:10 +00:00
Nika Layzell f8e46f7fb5 Bug 1797354 - Allow specifying capability type in thread-safety macros, r=jesup,media-playback-reviewers,alwu
It is possible to specify full names for capabilities when using the clang
thread-safety analysis which will be used in error messages. We should use that
form of the attribute rather than the legacy lockable attribute.

Differential Revision: https://phabricator.services.mozilla.com/D160531
2022-10-28 19:55:30 +00:00
Gerald Squelart 4326b92ea7 Bug 1784812 - Use common JSONWriteFuncs when writing to a string - r=canaltinova,media-playback-reviewers,alwu
Most users of JSONWriter want to fill a string, so instead of having all these
similar implementations, we now have central reusable implementations:
- JSONStringWriteFunc contains a string and writes to it.
- JSONStringRefWriteFunc references a string and writes to it. This is most
  useful when the string already exists somewhere, or needs to be returned from
  a function (so we avoid another conversion when returning).

Differential Revision: https://phabricator.services.mozilla.com/D154618
2022-08-17 07:07:54 +00:00
Gerald Squelart 24798f281f Bug 1784812 - JSONWriter::WriteFunc() returns a reference - r=canaltinova
mWriter is never null (and lots of calls just dereference it without checking),
so we may as well enforce it:
- The constructor MOZ_RELEASE_ASSERTs that it's not null.
- The accessor WriteFunc() returns a reference instead of a scary raw pointer.

(Note that we can't make mWriter a NotNull<...>, because the next patch will
give the option to keep that owning pointer null.)

Differential Revision: https://phabricator.services.mozilla.com/D154616
2022-08-17 07:07:53 +00:00
Iulian Moraru 859487ba6b Backed out 4 changesets (bug 1784812) for causing build bustages on DDMediaLogs. CLOSED TREE
Backed out changeset c9998c927079 (bug 1784812)
Backed out changeset d2568bc2f8a6 (bug 1784812)
Backed out changeset 9f01bf89c583 (bug 1784812)
Backed out changeset d8506496d8f2 (bug 1784812)
2022-08-17 05:48:36 +03:00
Gerald Squelart 253bb5dc48 Bug 1784812 - Use common JSONWriteFuncs when writing to a string - r=canaltinova,media-playback-reviewers,alwu
Most users of JSONWriter want to fill a string, so instead of having all these
similar implementations, we now have central reusable implementations:
- JSONStringWriteFunc contains a string and writes to it.
- JSONStringRefWriteFunc references a string and writes to it. This is most
  useful when the string already exists somewhere, or needs to be returned from
  a function (so we avoid another conversion when returning).

Depends on D154617

Differential Revision: https://phabricator.services.mozilla.com/D154618
2022-08-16 22:57:49 +00:00
Gerald Squelart 68a8dee9cc Bug 1784812 - JSONWriter::WriteFunc() returns a reference - r=canaltinova
mWriter is never null (and lots of calls just dereference it without checking),
so we may as well enforce it:
- The constructor MOZ_RELEASE_ASSERTs that it's not null.
- The accessor WriteFunc() returns a reference instead of a scary raw pointer.

(Note that we can't make mWriter a NotNull<...>, because the next patch will
give the option to keep that owning pointer null.)

Differential Revision: https://phabricator.services.mozilla.com/D154616
2022-08-16 22:57:48 +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
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
Mike Hommey af52d87089 Bug 1766561 - Use proper formatting directives in various places. r=gfx-reviewers,nika,necko-reviewers,mhowell,rkraesig,bytesized,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144920
2022-05-03 20:49:09 +00:00