Commit Graph

155 Commits

Author SHA1 Message Date
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
Andrea Marchesini
ddcdb92776 Bug 1558923 - Simplify URL API, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D34766

--HG--
extra : moz-landing-system : lando
2019-06-13 10:19:03 +00:00
Kershaw Chang
993dce095a Bug 1546041 - Throw TypeError if mode is Navigate r=baku
According to spec, we should throw TypeError if the mode is Navigate.

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

--HG--
extra : moz-landing-system : lando
2019-05-27 13:51:16 +00:00
Brindusan Cristian
58d68b812b Backed out changeset 3b6338393cc7 (bug 1546041) for mochitest failures at test_request.html. CLOSED TREE 2019-05-27 12:56:32 +03:00
Kershaw Chang
b53ba78d32 Bug 1546041 - Throw TypeError if mode is Navigate r=baku
According to spec, we should throw TypeError if the mode is Navigate.

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

--HG--
extra : moz-landing-system : lando
2019-05-15 20:36:09 +00:00
Ryan Hunt
00e98538aa Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21106

--HG--
extra : rebase_source : ea3f51c2c11247114deccbc86e90fb02b8a97257
2019-02-25 16:05:29 -06:00
Andrea Marchesini
ff58880fe3 Bug 1517448 - Set PrincipalInfo for Request and Response objects, r=smaug 2019-01-03 19:24:30 +01:00
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Till Schneidereit ext:(%2C%20Jason%20Orendorff%20%3Cjorendorff%40mozilla.com%3E)
2cfba34b8d Bug 1385890 - Fix Streams implementation in multiple-global uses. r=baku,tcampbell,jorendorff
Streams have multiple parts that can be JS objects from different compartments.
For example, the [[reader]] internal slot of a stream can point to a reader
object in another compartment.

This patch makes the ReadableStream implementation robust against mixing and
matching stream-related objects and methods from different globals.

This also removes ReadableStreamBYOBReader and ReadableStreamBYOBRequest for
now, with a view toward enabling basic ReadableStream features by default in
bug 1389628.

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

--HG--
extra : rebase_source : 71d73bed5bc82557efcb6b1ecb231275fd3e1189
extra : amend_source : de29f663b9929eb2858b23cc6f4e7ba97b23a28c
extra : source : f91eb962df6a06d5f51ad13caa2a4a9c2947f293
2018-10-11 14:18:43 -05:00
Andrea Marchesini
1393a9184a Bug 1488427 - AbortSignal::Unfollow() must be called when unlinked, r=smaug 2018-09-07 11:05:47 +02:00
Andrea Marchesini
6ea7fbc592 Bug 1480366 - Traverse/Unlink mAbortFollowing in any object exposed to content, r=smaug 2018-08-28 17:27:58 +02:00
Andrea Marchesini
e1a0b51543 Bug 1478101 - Split AbortSignal in 2 classes: AbortSignal and AbortSignalImpl, r=bz 2018-08-26 14:16:21 +02:00
Valentin Gosu
7937c7c4cc Bug 1476928 - Remove nsIURI.CloneIgnoringRef and nsIURI.CloneWithNewRef r=JuniorHsu
The patch introduces NS_GetURIWithNewRef and NS_GetURIWithNewRef which perform the same function.

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

--HG--
extra : moz-landing-system : lando
2018-07-23 11:28:47 +00:00
Andrea Marchesini
bc5414c5f3 Bug 1471189 - Removing 'Terminating' state in workers, r=mrbkap 2018-07-12 19:33:41 +02:00
Ben Kelly
dc7660b692 Bug 1394399 P1 Default Request.credentials to "same-origin" instead of "omit". r=baku 2018-04-20 08:45:13 -07:00
Andrea Marchesini
4b23deda27 Bug 1448328 - Use thread-safe nsIURI in the URI API - part 1 - No getter/setter runnables, r=valentin 2018-04-14 01:06:35 +02:00
Eric Rahm
9f798eecf1 Bug 1437188 - Part 1: Remove verbose fetch related warnings. r=bkelly
This removes the most verbose fetch related warnings. Cumulatively these
account for about 11,000 warnings during testing.

--HG--
extra : rebase_source : ee930dec1e18b9a7f34d5c66944dc015be10be69
2018-02-09 14:04:03 -08:00
Andrea Marchesini
26352bfee1 Bug 1432963 - Fixing workers headers - part 17 - no LIBS=[workers] in moz.build files, r=smaug 2018-01-31 08:25:30 +01:00
Andrea Marchesini
2c7c69af24 Bug 1432963 - Fixing workers headers - part 14 - WorkerPrivate without workers namespace, r=smaug 2018-01-31 08:24:08 +01:00