Commit Graph

1130 Commits

Author SHA1 Message Date
Nika Layzell
1f06e7ba7b Bug 1793463 - Part 6: Remove nsIProtocolHandler.{defaultPort,protocolFlags}, r=necko-reviewers,valentin
This removes all implementations of these types. Some implementations in JS
code were also removed in the previous part, when updating tests to use
`Services.io.registerProtocolHandler`.

Code which used to access these members should go through the IOService now
instead.

Differential Revision: https://phabricator.services.mozilla.com/D162805
2022-12-01 15:43:19 +00:00
Nika Layzell
98304d1200 Bug 1793463 - Part 5: Stop using contractids to fetch protocol handlers, r=necko-reviewers,xpcom-reviewers,webdriver-reviewers,whimboo,valentin,kmag
This patch replaces the previous ContractID-based lookup system for protocol
handlers, and replaces it with a new custom system in nsIOService. It will be
pre-populated with non-overridable static protocol handlers using the
StaticComponents infrastructure added in the previous part, and callers can
also dynamically register new protocol handlers at runtime.

This new system is intended to provide access to the default port and
non-dynamic protocol flags off-main-thread, by requiring these values to be
provided up-front as constants, rather than getting them from the xpcom
interface. The data is then guarded by an RWLock.

Callers which look up specific handlers by their contractID are not changed, as
the contract IDs for existing handlers have not been changed, so the lookup
will still succeed.

This change as-implemented breaks the nsGIOProtocolHandler on Linux, as it
removes the special code which would try to use that handler for some
protocols. This will be fixed in a later part by making the
nsGIOProtocolHandler use the dynamic registration APIs to register and
un-register protocol handlers at runtime in response to the GIO pref.

Differential Revision: https://phabricator.services.mozilla.com/D162804
2022-12-01 15:43:19 +00:00
Nika Layzell
bca0a6965b Bug 1793463 - Part 4: Generate static components entries for protocols, r=necko-reviewers,xpcom-reviewers,valentin,kmag
This adds a new set of options to static components.conf files to allow
specifying the protocol flags and default ports of a protocol handler, and
generates a separate table just for this purpose.

This will be used in the next part as part of replacing the existing protocol
handler lookup infrastructure.

Differential Revision: https://phabricator.services.mozilla.com/D162803
2022-12-01 15:43:19 +00:00
Nika Layzell
41f2e0d881 Bug 1793463 - Part 1: Remove unused nsIProtocolHandlerWithDynamicFlags impls, r=necko-reviewers,valentin
These implementations of nsIProtocolHandlerWithDynamicFlags were actually
always returning the same flags, so can be simplified.

Differential Revision: https://phabricator.services.mozilla.com/D162800
2022-12-01 15:43:17 +00:00
Marian-Vasile Laza
7492025127 Backed out 7 changesets (bug 1793463) for causing bustages on nsIOService.cpp. CLOSED TREE
Backed out changeset 47c3acb30de2 (bug 1793463)
Backed out changeset 71afe900eb17 (bug 1793463)
Backed out changeset d168599a269e (bug 1793463)
Backed out changeset d0f18d300818 (bug 1793463)
Backed out changeset a116e6f089f2 (bug 1793463)
Backed out changeset eba1123c8b56 (bug 1793463)
Backed out changeset 68a3eb8a3057 (bug 1793463)
2022-12-01 02:30:02 +02:00
Nika Layzell
20db36cecb Bug 1793463 - Part 6: Remove nsIProtocolHandler.{defaultPort,protocolFlags}, r=necko-reviewers,valentin
This removes all implementations of these types. Some implementations in JS
code were also removed in the previous part, when updating tests to use
`Services.io.registerProtocolHandler`.

Code which used to access these members should go through the IOService now
instead.

Differential Revision: https://phabricator.services.mozilla.com/D162805
2022-11-30 18:13:43 +00:00
Nika Layzell
9cc8ee8c01 Bug 1793463 - Part 5: Stop using contractids to fetch protocol handlers, r=necko-reviewers,xpcom-reviewers,webdriver-reviewers,whimboo,valentin,kmag
This patch replaces the previous ContractID-based lookup system for protocol
handlers, and replaces it with a new custom system in nsIOService. It will be
pre-populated with non-overridable static protocol handlers using the
StaticComponents infrastructure added in the previous part, and callers can
also dynamically register new protocol handlers at runtime.

This new system is intended to provide access to the default port and
non-dynamic protocol flags off-main-thread, by requiring these values to be
provided up-front as constants, rather than getting them from the xpcom
interface. The data is then guarded by an RWLock.

Callers which look up specific handlers by their contractID are not changed, as
the contract IDs for existing handlers have not been changed, so the lookup
will still succeed.

This change as-implemented breaks the nsGIOProtocolHandler on Linux, as it
removes the special code which would try to use that handler for some
protocols. This will be fixed in a later part by making the
nsGIOProtocolHandler use the dynamic registration APIs to register and
un-register protocol handlers at runtime in response to the GIO pref.

Differential Revision: https://phabricator.services.mozilla.com/D162804
2022-11-30 18:13:43 +00:00
Nika Layzell
90f7562d95 Bug 1793463 - Part 4: Generate static components entries for protocols, r=necko-reviewers,xpcom-reviewers,valentin,kmag
This adds a new set of options to static components.conf files to allow
specifying the protocol flags and default ports of a protocol handler, and
generates a separate table just for this purpose.

This will be used in the next part as part of replacing the existing protocol
handler lookup infrastructure.

Differential Revision: https://phabricator.services.mozilla.com/D162803
2022-11-30 18:13:42 +00:00
Nika Layzell
322b4b0ab8 Bug 1793463 - Part 1: Remove unused nsIProtocolHandlerWithDynamicFlags impls, r=necko-reviewers,valentin
These implementations of nsIProtocolHandlerWithDynamicFlags were actually
always returning the same flags, so can be simplified.

Differential Revision: https://phabricator.services.mozilla.com/D162800
2022-11-30 18:13:41 +00:00
Otto Länd
cda6577f9f No bug: apply code formatting via Lando
# ignore-this-changeset
2022-11-29 13:46:10 +00:00
Tom Ritter
9820fb3f10 Bug 1778510: Cut over Blob Timestamps to the new design r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D156507
2022-11-29 13:34:21 +00:00
Butkovits Atila
cb853b7f77 Backed out 33 changesets (bug 1778510) for causing build bustages at nsIGlobalObject.h. CLOSED TREE
Backed out changeset f2a53c9e497c
Backed out changeset 59350ca6f3f2 (bug 1778510)
Backed out changeset abbba7e72b57 (bug 1778510)
Backed out changeset 6cf7473afae8 (bug 1778510)
Backed out changeset 74fb5fed93ea (bug 1778510)
Backed out changeset 5b5dc70cdd0a (bug 1778510)
Backed out changeset ff93191cafd2 (bug 1778510)
Backed out changeset 39cc006b610c (bug 1778510)
Backed out changeset dfaef3ad17a9 (bug 1778510)
Backed out changeset 8fbabeb8244b (bug 1778510)
Backed out changeset 45051b62e3f1 (bug 1778510)
Backed out changeset 86c0923fd81f (bug 1778510)
Backed out changeset a49c0f69d519 (bug 1778510)
Backed out changeset cfad733d4aaf (bug 1778510)
Backed out changeset df6d0fe89d5b (bug 1778510)
Backed out changeset 704db76eab17 (bug 1778510)
Backed out changeset 0651c128e369 (bug 1778510)
Backed out changeset 1e650de647c0 (bug 1778510)
Backed out changeset fa15a3572741 (bug 1778510)
Backed out changeset 4ceffd409eae (bug 1778510)
Backed out changeset 47db43142c62 (bug 1778510)
Backed out changeset ebb21153aaac (bug 1778510)
Backed out changeset a87eaaec3f9c (bug 1778510)
Backed out changeset 43ad5ee21f79 (bug 1778510)
Backed out changeset 5f20af8e1263 (bug 1778510)
Backed out changeset b78576875db0 (bug 1778510)
Backed out changeset d801fdeac90b (bug 1778510)
Backed out changeset 5af032c628c0 (bug 1778510)
Backed out changeset 86aa59de11b4 (bug 1778510)
Backed out changeset 58642357a19c (bug 1778510)
Backed out changeset c575e824e291 (bug 1778510)
Backed out changeset 32a358de4843 (bug 1778510)
Backed out changeset 40e0708c01e7 (bug 1778510)
2022-11-28 23:14:52 +02:00
Tom Ritter
8f9beca6dc Bug 1778510: Cut over Blob Timestamps to the new design r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D156507
2022-11-28 18:04:12 +00:00
Cosmin Sabou
d245f666b9 Backed out 33 changesets (bug 1778510) for causing bp-hybrid bustages on nsIPrincipal.h. CLOSED TREE
Backed out changeset 282f589ede4a
Backed out changeset e23d03ba5a89 (bug 1778510)
Backed out changeset cbdb34cf7c8d (bug 1778510)
Backed out changeset d9a54521f3fb (bug 1778510)
Backed out changeset f5b7f8ce38b0 (bug 1778510)
Backed out changeset eb64607765a9 (bug 1778510)
Backed out changeset 18291e692834 (bug 1778510)
Backed out changeset bb71cc94a8be (bug 1778510)
Backed out changeset 507e84e1dafe (bug 1778510)
Backed out changeset 6d42e7a083ac (bug 1778510)
Backed out changeset 53799e6a46dd (bug 1778510)
Backed out changeset ff20d709839a (bug 1778510)
Backed out changeset 328d4d2df591 (bug 1778510)
Backed out changeset 9ba44fd8a440 (bug 1778510)
Backed out changeset eb1b7e30e519 (bug 1778510)
Backed out changeset c0927de6153b (bug 1778510)
Backed out changeset 02a306acd093 (bug 1778510)
Backed out changeset 2c5eecc4ad4c (bug 1778510)
Backed out changeset 38a9f45c9621 (bug 1778510)
Backed out changeset 35b7c7df62ce (bug 1778510)
Backed out changeset 187d71f42593 (bug 1778510)
Backed out changeset 450f4ccd6cd0 (bug 1778510)
Backed out changeset 915149e27da0 (bug 1778510)
Backed out changeset 9c6e85369f15 (bug 1778510)
Backed out changeset c6a9fe0ce713 (bug 1778510)
Backed out changeset a2f00462157e (bug 1778510)
Backed out changeset 5278e40b80c3 (bug 1778510)
Backed out changeset dba220581d93 (bug 1778510)
Backed out changeset 17a63044b0dc (bug 1778510)
Backed out changeset 68d607aaa121 (bug 1778510)
Backed out changeset e93004f91f6f (bug 1778510)
Backed out changeset 41d6d9f889e1 (bug 1778510)
Backed out changeset 28ac62019086 (bug 1778510)
2022-11-28 07:34:46 +02:00
Tom Ritter
90cad44dec Bug 1778510: Cut over Blob Timestamps to the new design r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D156507
2022-11-28 04:21:33 +00:00
Mark Banner
a9ec0b8434 Bug 1799314 - Convert consumers of testing modules to import ES modules direct (uriloader/ dom/ docshell/). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161909
2022-11-17 12:00:28 +00:00
Daniel Holbert
7f83cbcfba Bug 1800342: Make NS_NewPipe2 and NS_NewPipe infallible, to reflect reality. r=xpcom-reviewers,necko-reviewers,nika,kershaw
This patch doesn't change behavior; these APIs were already effectively
infallible, in the sense that it was impossible for them to return anything
other than NS_OK.

The actual API changes here are in xpcom/io/nsIPipe.idl and
xpcom/io/nsPipe3.cpp, and the rest of this patch is just updates to callsites,
removing code that handled failure-flavored return values from these functions.
(All of this removed code was already dead code, effectively.)

Differential Revision: https://phabricator.services.mozilla.com/D161947
2022-11-14 23:22:16 +00:00
Dan Robertson
d349734f89 Bug 1771423 - Set Content-Type to an empty string for an blob with no type. r=kershaw,smaug,Gijs
Set the Content-Type to an empty string for an blob when the type was not
given. Ensure that the channel Content-Type is not overriden in the case
that it was previously set and the blob type is not valid.

Differential Revision: https://phabricator.services.mozilla.com/D147481
2022-11-14 15:26:36 +00:00
Jens Stutte
f466a8ebee Bug 1797688 - Part 1: Remove unnecessary check for gXPCOMThreadsShutDown in the ReleasingTimerHolder. r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D160619
2022-11-01 14:08:43 +00:00
Jan Varga
09461e0f96 Bug 1791761 - Add support for nsISerialEventTarget and nsIDirectTaskDispatcher to RemoteLazyInputStreamThread; r=dom-storage-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D157818
2022-10-28 11:24:57 +00:00
Jan Varga
940cf12bc4 Bug 1791747 - AutoSyncLoopHolder::GetEventTarget should return nsISerialEventTarget (instead of nsIEventTarget); r=dom-worker-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D157805
2022-10-28 06:18:10 +00:00
Jens Stutte
1c8fbe7d18 Bug 1796687 - Check if we can bind to actor during deserialize and wrap. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D160047
2022-10-25 10:14:13 +00:00
Andrew McCreight
2da84b8ac4 Bug 1792574, part 3 - Don't include nsMemory where it isn't needed. r=xpcom-reviewers,necko-reviewers,valentin,nika
There are only 3 places where nsMemory.h is still needed (image/RasterImage.cpp,
gfx/thebes/gfxFT2FontList.cpp, and nsMemory.cpp). Remove the rest.

Differential Revision: https://phabricator.services.mozilla.com/D158213
2022-09-28 15:17:46 +00:00
Norisz Fay
dff4f6d15e Backed out 2 changesets (bug 1771423) for causing webcompat regressions CLOSED TREE
Backed out changeset c1d1be434427 (bug 1771423)
Backed out changeset 2b7d886f374f (bug 1771423)
2022-09-13 16:26:16 +03:00
Jens Stutte
25dc1787a6 Bug 1776209 - RemoteLazyInputStreamThread: Replace gShutdownHasStarted with appropriate IsInOrBeyond check. r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D156794
2022-09-09 16:47:40 +00:00
Jens Stutte
e582f89bec Bug 1776209 - Improve RemoteLazyInputStreamThread::InitializeXxx error handling. r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D156395
2022-09-08 07:51:13 +00:00
Nika Layzell
59b1986aa4 Bug 1785940 - Fix buggy error path in IPCBlobUtils::Serialize, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D156723
2022-09-07 23:40:30 +00:00
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
Jens Stutte
e35bf3b292 Bug 1788368 - Audit RemoteLazyInputStreamThread singleton uses. r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D156164
2022-09-03 07:59:56 +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
Dan Robertson
27907e8f9a Bug 1771423 - Set Content-Type to an empty string for an empty blob with no type. r=kershaw,smaug,necko-reviewers
Set the Content-Type to an empty string for an blob when the type was not
given. Ensure that the channel Content-Type is not overriden in the case
that it was previously set and the blob type is not valid.

Depends on D147568

Differential Revision: https://phabricator.services.mozilla.com/D147481
2022-08-15 13:52:12 +00:00
Christian Holler
146a80ecff Bug 1783844 - Remove IPC::Principal type remains from codebase. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D154091
2022-08-10 13:39:11 +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
Andrew Sutherland
51a0dc12c2 Bug 1770630 - Worker stream readers should contribute to busy count. r=dom-worker-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D149185
2022-08-03 00:36:01 +00:00
criss
fe207fe58a Backed out changeset cc893e08aa2f (bug 1770630) for causing wpt failures on FileReader-multiple-reads.any.worker.html. CLOSED TREE 2022-08-03 01:56:06 +03:00
Andrew Sutherland
4c1582ac65 Bug 1770630 - Worker stream readers should contribute to busy count. r=dom-worker-reviewers,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D149185
2022-08-02 20:56:53 +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
Tooru Fujisawa
a032f53a63 Bug 1780543 - Part 5: Add mozilla/chrome-script environment. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152430
2022-07-26 02:46:30 +00:00
Emilio Cobos Álvarez
42b7f1a58c Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.

Non-virtual actors can still use `nsString` if they need to on the
receiving end.

Differential Revision: https://phabricator.services.mozilla.com/D152519
2022-07-25 20:19:48 +00:00
Tooru Fujisawa
47c8f80432 Bug 1667455 - Part 6: Stop importing Services.jsm from chrome-priv JS code, non-top-level or multi-line cases. r=kmag,perftest-reviewers,AlexandruIonescu,sparky
Differential Revision: https://phabricator.services.mozilla.com/D150895
2022-07-11 12:41:51 +00:00
Tooru Fujisawa
bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Olli Pettay
2a78f9ffc0 Bug 1775501 - multipart boundary should be handled as mixed case, r=kershaw
Since https://github.com/w3c/FileAPI/issues/43 is still open, it is unclear how body.type should work.
The current wpts expect some behavior which isn't in the specifications.
So, since the situation is very messy in the specifications, the patch is doing a
spot fix for boundary handling. It is ugly, but shouldn't change other behavior.

Differential Revision: https://phabricator.services.mozilla.com/D150018
2022-07-11 09:18:32 +00:00
Nika Layzell
ffd5c3388d Bug 1773088 - Part 1: Stop requiring an actor to serialize blobs over IPC, r=asuth
This does a somewhat-shallow removal of the argument from the implementation
and all call-sites. Removing it from StructuredCloneData's serialization is
handled in the next part, as it is more widely used and complex.

Differential Revision: https://phabricator.services.mozilla.com/D148531
2022-06-08 15:24:27 +00:00
Nika Layzell
d76981c60a Bug 1770279 - Don't invoke null callbacks in RemoteLazyInputStream, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D147198
2022-05-24 15:56:38 +00:00
Nika Layzell
1aa11ffed6 Bug 1754004 - Part 11: Simplify the IPCStream serialization API, r=asuth,necko-reviewers,kershaw
As serializing IPCStream no longer requires a manager or FileDescriptor array,
the arguments are no longer necessary, and can be removed. The AutoIPCStream
helper can also be removed, as managed actors are no longer used for
serialization, so a delayed start callback is not necessary.

The delayed start parameter is also removed from nsIIPCSerializableInputStream
instances, but is still present as `aAllowLazy` on the toplevel serialization
methods.

Differential Revision: https://phabricator.services.mozilla.com/D141048
2022-05-13 14:16:13 +00:00
Nika Layzell
95a883d65d Bug 1754004 - Part 3: Move RemoteLazyInputStream to its own toplevel protocol, r=asuth,necko-reviewers,dragana
This is a complete rewrite of RemoteLazyInputStream to run off of its own
toplevel protocol, rather than being managed by other protocols like
PBackground or PContent. This should improve performance thanks to no longer
needing to operate on a main or worker thread, and due to no longer needing the
migration step for the stream actor.

This also acts as a step towards no longer requiring a manager actor to
serialize input streams, as the type is now actor-agnostic, and should support
being sent over IPC between any pair of processes.

Differential Revision: https://phabricator.services.mozilla.com/D141040
2022-05-13 14:16:10 +00:00