Commit Graph

1142 Commits

Author SHA1 Message Date
Kagami Sascha Rosylight
5bcfb4442b Bug 1815431 - Remove BlobBodyStreamHolder r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D169069
2023-02-09 07:01:10 +00:00
Emilio Cobos Álvarez
90e1d8d837 Bug 1809126 - Remove moz-fonttable protocol. r=jfkthame,necko-reviewers
We only use it to generate a dummy URI for SVG-in-Opentype documents. We
don't really need the URIs to be unique or anything in practice.

I noticed this code while looking at the load flags set up for
bug 1809006.

Differential Revision: https://phabricator.services.mozilla.com/D166291
2023-01-20 18:41:16 +00:00
Nika Layzell
9d6bb19c23 Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8
This method always returned GetMainThreadSerialEventTarget(). This patch
switches all callers over to use that method instead.

We can't easily switch all calls to be calls to NS_GetMainThread(), as there is
no version of that method returning a bare nsIThread* instance.

I didn't introduce one, as we may want to add a lock around mMainThread in the
future, which would require removing nsThreadManager::GetMainThreadWeak. As
this method only returns nsISerialEventTarget, it method could remain
implemented, however, by returning a statically allocated fake event target
which forwards dispatches (and QIs to nsIThread) to the real main thread.

Differential Revision: https://phabricator.services.mozilla.com/D166608
2023-01-16 23:14:12 +00:00
Nika Layzell
852d02ec16 Bug 1809753 - Part 3: Replace all callers of GetCurrentEventTarget with GetCurrentSerialEventTarget, r=mccr8,necko-reviewers,valentin
This only changes the behaviour when called with a TaskQueue or other type
using SerialEventTargetGuard on the stack. They are being switched over as the
existing GetCurrentEventTarget method is being removed, as it is somewhat
confusing, and poorly documented.

Callers which need to get the current thread even when on a threadpool or
behind a TaskQueue were switched to GetCurrentEventTarget in the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D166607
2023-01-16 23:14:11 +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
f7772bb6ae Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8
This method always returned GetMainThreadSerialEventTarget(). This patch
switches all callers over to use that method instead.

We can't easily switch all calls to be calls to NS_GetMainThread(), as there is
no version of that method returning a bare nsIThread* instance.

I didn't introduce one, as we may want to add a lock around mMainThread in the
future, which would require removing nsThreadManager::GetMainThreadWeak. As
this method only returns nsISerialEventTarget, it method could remain
implemented, however, by returning a statically allocated fake event target
which forwards dispatches (and QIs to nsIThread) to the real main thread.

Differential Revision: https://phabricator.services.mozilla.com/D166608
2023-01-16 23:14:12 +00:00
Nika Layzell
8d118308de Bug 1809753 - Part 3: Replace all callers of GetCurrentEventTarget with GetCurrentSerialEventTarget, r=mccr8,necko-reviewers,valentin
This only changes the behaviour when called with a TaskQueue or other type
using SerialEventTargetGuard on the stack. They are being switched over as the
existing GetCurrentEventTarget method is being removed, as it is somewhat
confusing, and poorly documented.

Callers which need to get the current thread even when on a threadpool or
behind a TaskQueue were switched to GetCurrentEventTarget in the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D166607
2023-01-16 23:14:11 +00:00
Jari Jalkanen
64a6072483 Bug 1798513 - Replace USVString with UTF8String in union types with Blob getter. r=nika
Depends on D165730

Differential Revision: https://phabricator.services.mozilla.com/D165731
2023-01-11 08:33:47 +00:00
Noemi Erli
5b55c170dc Backed out 2 changesets (bug 1798513, bug 1808009) for causing failures in FileSystemDirectoryHandle-removeEntry.https.any.worker.html CLOSED TREE
Backed out changeset 428ea11e738d (bug 1798513)
Backed out changeset 3e69320f3e5c (bug 1808009)
2023-01-10 22:11:45 +02:00
Jari Jalkanen
e4595e9483 Bug 1798513 - Replace USVString with UTF8String in union types with Blob getter. r=nika
Depends on D165730

Differential Revision: https://phabricator.services.mozilla.com/D165731
2023-01-10 19:08:22 +00:00
Jan Varga
860132797b Bug 1803062 - Switch from ordinary bool errors to nsresult errors in code for handling sync loops; r=dom-worker-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D163559
2022-12-12 16:09:12 +00:00
Nika Layzell
bf9f3c01b4 Bug 1443925 - Part 1: Support running GetBlobURLPrincipal off-main-thread, r=asuth
This method isn't actually safe to run off-main-thread yet, as nsIPrincipal
manipulation isn't being made threadsafe until a later part, however it can be
called off-main-thread when creating a new content principal with a Blob URL
spec.

Differential Revision: https://phabricator.services.mozilla.com/D163031
2022-12-02 00:53:49 +00:00
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