Commit Graph

174 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
Matthew Gaudet
d07e459e7b Bug 1757241 - Remove !MOZ_DOM_STREAMS code from most files r=smaug
I've also tested to verify that JS Streams remains enabled in the JS Shell package

Differential Revision: https://phabricator.services.mozilla.com/D142620
2022-04-13 18:57:48 +00:00
Emilio Cobos Álvarez
2b25e0298a Bug 1758702 - Avoid including RemoteWorkerChild in WorkerPrivate.h. r=asuth
This avoids having to include PRemoteBrowser* headers etc, which are not
exported otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D140659
2022-03-17 19:06:51 +00:00
criss
9302fa739c Backed out 2 changesets (bug 1758702) for causing build bustages. CLOSED TREE
Backed out changeset 3e00d9203851 (bug 1758702)
Backed out changeset 66625baf0875 (bug 1758702)
2022-03-17 15:21:31 +02:00
Emilio Cobos Álvarez
dd7770da6c Bug 1758702 - Avoid including RemoteWorkerChild in WorkerPrivate.h. r=asuth
This avoids having to include PRemoteBrowser* headers etc, which are not
exported otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D140659
2022-03-17 12:15:20 +00:00
Kagami Sascha Rosylight
19504fbdf1 Bug 1751453 - Part 1: Remove AbortFollower::Unlink() r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D136658
2022-01-24 13:18:33 +00:00
Kagami Sascha Rosylight
9d024af1cc Bug 1660555 - Make AbortFollower::mFollowingSignal a WeakPtr r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D136446
2022-01-21 14:40:38 +00:00
Kagami Sascha Rosylight
cd40833835 Bug 1750543 - Don't abort by signal if consuming request body by DOM methods r=smaug
There are two cases when reading request body by DOM methods:

1. It's being read before fetch()
2. or after fetch()

The first case shouldn't be affected by abort signal per the spec, since the abort step is added only within fetch().

https://fetch.spec.whatwg.org/#ref-for-abortsignal-add

The second case should still fail but with `TypeError: Body has already been consumed`, not AbortError.

Differential Revision: https://phabricator.services.mozilla.com/D136262
2022-01-21 11:18:17 +00:00
Jan Varga
c7d00f4557 Bug 1750931 - Fix non-unified-build bustage in dom/events, dom/fetch and dom/streams; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D136315
2022-01-19 11:09:55 +00:00
Matthew Gaudet
e6f0e756a1 Bug 1734873 - Fetch/Response/Blob ReadableStream integration r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131550
2022-01-14 21:09:20 +00:00
Kagami Sascha Rosylight
712c0d58c7 Bug 1737771 - Implement AbortSignal.reason r=mgaudet,smaug
Differential Revision: https://phabricator.services.mozilla.com/D132281
2021-12-13 21:08:55 +00:00
Tom Schuster
a865c88907 Bug 1684634 - Use InternalHeaders for MimeType instead of caching in the Response/Request constructor. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D101159
2021-01-12 10:38:25 +00:00
Simon Giesecke
971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Sylvestre Ledru
fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila
964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru
5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Jeff Walden
29f576510d Bug 1660555 - Move traverse/unlink operations on |AbortFollower| and |AbortSignalImpl| into static member functions. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92322
2020-10-29 08:02:58 +00:00
Andi-Bogdan Postelnicu
85c179d8f3 Bug 1671641 - Make dom/fetch buildable outside of unified-build environment. r=sg
Depends on D93998

Differential Revision: https://phabricator.services.mozilla.com/D94015
2020-10-21 08:00:18 +00:00
Simon Giesecke
de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Simon Giesecke
e3c223da3e Bug 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80861
2020-07-01 08:34:12 +00:00
Simon Giesecke
cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Matt Woodrow
2083b054bd Bug 1631405 - Make sure we initialize all fields of WindowGlobalParent in the constructor. r=nika
Previously we only set some fields as part of WindowGlobalInit, but WindowGlobalParent sets itself as the current window global on the CanonicalBrowsingContext.

This exposes a period of time where only part of the document state was set, and this was observable to consumers.

This makes OnNewDocument only run when there is a new Document for the same WindowGlobal.

Differential Revision: https://phabricator.services.mozilla.com/D75446
2020-05-27 00:27:30 +00:00
Bogdan Tara
a54ec3073f Backed out 4 changesets (bug 1631405) for multiple mochitest failures CLOSED TREE
Backed out changeset 9963cc0b23cb (bug 1631405)
Backed out changeset 469ac933ed7c (bug 1631405)
Backed out changeset 0c5f55864268 (bug 1631405)
Backed out changeset 20dcbcc2f3b8 (bug 1631405)
2020-05-27 01:30:20 +03:00
Matt Woodrow
5b64e9bae2 Bug 1631405 - Make sure we initialize all fields of WindowGlobalParent in the constructor. r=nika
Previously we only set some fields as part of WindowGlobalInit, but WindowGlobalParent sets itself as the current window global on the CanonicalBrowsingContext.

This exposes a period of time where only part of the document state was set, and this was observable to consumers.

This makes OnNewDocument only run when there is a new Document for the same WindowGlobal.

Differential Revision: https://phabricator.services.mozilla.com/D75446
2020-05-26 21:15:42 +00:00
Eden Chuang
c42e8d4e87 Bug 1532287 - P1 Saving the loading document/worker's COEP in InternalRequest. r=dom-workers-and-storage-reviewers,perry
Currently, the worker's COEP value is saved in WorkerPrivate and it is not respected for fetch/cache API in workers.
This patch saving the COEP value which fetch/cache API should be respected when using in workers.
Notice that for the dedicated workers, it is not only respected to worker's COEP but also its owner's.

For fetch in workers, P2 will propagate the COEP value through nsILoadInfo to HttpChannels, such that COEP can be respected in parent process when calling ProcessCrossOriginResourcePolicyHeader() and ProcessCrossOriginEmbedderPolicyHeader().

For cache in workers. We handle it in bug 1603168. COEP will be propagated through CacheRequest to the parent process and respected in CacheOpParent::OnOpComplete().

Differential Revision: https://phabricator.services.mozilla.com/D73689
2020-05-19 12:50:36 +00:00
Simon Giesecke
75c988ec13 Bug 1627892 - Use SafeRefPtr for Request. r=dom-workers-and-storage-reviewers,perry
Differential Revision: https://phabricator.services.mozilla.com/D70390
2020-05-11 12:13:48 +00:00
Simon Giesecke
32076b1063 Bug 1627892 - Make InternalRequest derive from SafeRefCounted. r=dom-workers-and-storage-reviewers,perry
Differential Revision: https://phabricator.services.mozilla.com/D69958
2020-05-11 12:10:53 +00:00
Andrea Marchesini
6e5bd2d254 Bug 1402784 - Use nsIContentPolicy::TYPE_INTERNAL_AUDIOWORKLET and nsIContentPolicy::TYPE_INTERNAL_PAINTWORKLET in Worklet code, r=smaug
Depends on D67105

Differential Revision: https://phabricator.services.mozilla.com/D67106

--HG--
extra : moz-landing-system : lando
2020-03-17 22:24:39 +00:00
Boris Zbarsky
00cd5d4380 Bug 1619112 part 5. Stop accepting nsAString in ErrorResult error-throwing. r=smaug
Callers should pass in UTF-8, since that's what the JS engine ends up with in the end anyway.

The various URL changes are because NS_NewURI converts incoming nsAString to
UTF-8 anyway.  So we might as well do that up-front and then use the UTF-8
string for both the NS_NewURI call and the error-reporting if it fails.

Differential Revision: https://phabricator.services.mozilla.com/D65543

--HG--
extra : moz-landing-system : lando
2020-03-06 21:08:02 +00:00
Boris Zbarsky
c878a8bb26 Bug 1619112 part 2. Pass char literals instead of char16_t literals into ErrorResult throwing methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D65538

--HG--
extra : moz-landing-system : lando
2020-03-06 21:04:58 +00:00
Simon Giesecke
daf97da936 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/fetch. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63165

--HG--
extra : moz-landing-system : lando
2020-02-20 16:53:06 +00:00
Boris Zbarsky
05327f8a52 Bug 1613978. Allow passing u"...", not just nsAStrings, to templated ThrowType/RangeError. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D62061

--HG--
extra : moz-landing-system : lando
2020-02-10 13:08:48 +00:00
Boris Zbarsky
cbc90e1aca Bug 1602090 part 2. Create separate CheckMayLoad and CheckMayLoadWithReporting APIs. r=ckerschb
CheckMayLoadAndReport takes a window ID.  This allows us to report
errors from it to the web console as needed.  Most consumers know statically
whether they want reporting or not, so there's no reason to force the ones that
don't to provide window ids.

Differential Revision: https://phabricator.services.mozilla.com/D56388

--HG--
extra : moz-landing-system : lando
2019-12-13 06:24:12 +00:00
Ciure Andrei
6c95adafed Backed out 4 changesets (bug 1602483, bug 1602090) for causing perma leackchecks CLOSED TREE
Backed out changeset 6b057ba06b4a (bug 1602483)
Backed out changeset 9be3269d781d (bug 1602483)
Backed out changeset e3e2c1d7478e (bug 1602090)
Backed out changeset fdc4a588912e (bug 1602090)
2019-12-12 18:37:01 +02:00
Boris Zbarsky
e0acf6e9fc Bug 1602090 part 2. Create separate CheckMayLoad and CheckMayLoadWithReporting APIs. r=ckerschb
CheckMayLoadAndReport takes a window ID.  This allows us to report
errors from it to the web console as needed.  Most consumers know statically
whether they want reporting or not, so there's no reason to force the ones that
don't to provide window ids.

Differential Revision: https://phabricator.services.mozilla.com/D56388

--HG--
extra : moz-landing-system : lando
2019-12-12 13:03:42 +00:00
Ehsan Akhgari
03fa12d685 Bug 1593162 - Remove the expired telemetry probes added in bug 1127552; r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D51335

--HG--
extra : moz-landing-system : lando
2019-11-01 13:43:15 +00:00
Kagami Sascha Rosylight
e30a6dbb4a Bug 824857: Support IDL stringifier attributes r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D48355

--HG--
extra : moz-landing-system : lando
2019-10-23 04:55:54 +00:00
Boris Zbarsky
0cbc6daf1f Bug 1589285 part 3. Use the new GetString methods for Web IDL enums in various places. r=edgar
The idea is to stop directly accessing EnumTypeValues::strings in type-unsafe
ways from consumer code.

Differential Revision: https://phabricator.services.mozilla.com/D49533

--HG--
extra : moz-landing-system : lando
2019-10-17 23:40:57 +00:00
Boris Zbarsky
e26682d684 Bug 1581173 part 1. Add a way to more easily throw TypeErrors and RangeErrors with custom message strings via ErrorResult. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45932

--HG--
extra : moz-landing-system : lando
2019-09-20 02:19:18 +00:00
Thomas Nguyen
32ab8293ff Bug 1528697 - Expose ReferrerPolicy.webidl and use referrerpolicy enum r=smaug
ReferrerPolicy gets tossed back and forth as a uint32_t and
ReferrerPolicy enum in header file. Expose ReferrerPolicyValues from
webidl file and use consistently in native code.

Differential Revision: https://phabricator.services.mozilla.com/D41954

--HG--
extra : moz-landing-system : lando
2019-08-21 13:24:45 +00:00
Boris Zbarsky
75aa8f554d Bug 1565767 part 4. Remove some unnecesary refcounting at Document::GetBaseURI callsites. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D37972

--HG--
extra : moz-landing-system : lando
2019-07-15 18:28:43 +00:00
Boris Zbarsky
5062731c15 Bug 1565688. Remove unused IOService arg from NS_NewURI. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D37968

--HG--
extra : moz-landing-system : lando
2019-07-15 13:39:51 +00:00
Andrea Marchesini
ee11e667ec Bug 1557781 - Better life-time management for BodyStream/FetchStream - part 2 - BodyStream, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D35529

--HG--
extra : moz-landing-system : lando
2019-07-01 20:01:17 +00:00
Thomas Nguyen
1d636c1d2d Bug 1557636 Use Referrer info in worker and fix sharedworker's wrong referrer r=baku
SharedWorker should use worker's referrer info instead of default value

Differential Revision: https://phabricator.services.mozilla.com/D34861

--HG--
extra : moz-landing-system : lando
2019-06-13 20:37:34 +00:00
Andrea Marchesini
7009293bd7 Bug 1558923 - Simplify URL API, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D34766

--HG--
extra : moz-landing-system : lando
2019-06-13 19:45:19 +00:00
Narcis Beleuzu
8e2da98d46 Backed out 2 changesets (bug 1558923) for mochitest crashes on AssertIsOnMainThread(). CLOSED TREE
Backed out changeset 643de99320a8 (bug 1558923)
Backed out changeset f758b5ccd0c0 (bug 1558923)
2019-06-13 20:59:33 +03:00
Andrea Marchesini
ac563a2551 Bug 1558923 - Simplify URL API, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D34766

--HG--
extra : moz-landing-system : lando
2019-06-13 16:23:11 +00:00
Noemi Erli
dec16f16c7 Backed out 2 changesets (bug 1558923) for failures in nsContentUtils.cpp
Backed out changeset 12c977801cb2 (bug 1558923)
Backed out changeset d8a688f1b7ce (bug 1558923)
2019-06-13 19:19:05 +03:00
Andrea Marchesini
b35598172a Bug 1558923 - Simplify URL API, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D34766

--HG--
extra : moz-landing-system : lando
2019-06-13 15:10:24 +00:00
Cosmin Sabou
934be35969 Backed out 2 changesets (bug 1558923) for build bustages on dom/URL.h. CLOSED TREE
Backed out changeset 0bb5857422f2 (bug 1558923)
Backed out changeset d0411a373ace (bug 1558923)
2019-06-13 13:35:54 +03:00