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

104 Коммитов

Автор SHA1 Сообщение Дата
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
Kagami Sascha Rosylight ac006ba3c4 Bug 1803386 - Part 1: Replace ReadableStream::mNativeUnderlyingSource with GetBodyStreamHolder() r=smaug
The underlying source algorithms class already has strong ref, so just use it.

Differential Revision: https://phabricator.services.mozilla.com/D166533
2023-01-12 13:43:58 +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
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
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
Eden Chuang 44f5b17747 Bug 1577346 - P3 Make InternalResponse be SafeRefcounted. r=dom-worker-reviewers,ytausky
Depends on D126243

Differential Revision: https://phabricator.services.mozilla.com/D126244
2021-11-08 13:29:32 +00:00
Matthew Gaudet 3bcfc27cef Bug 1730589 - Initial Implementation of ReadableStreams using WebIDL and DOM technologies r=smaug
This patch begins re-implements ReadableStreams using WebIDL and DOM technology (vs the existing JS streams implementation).   Some more background is [here](https://docs.google.com/document/d/1MWRkF32KV60ngOY-Ip4PnKbCMvl6VK_Y9QLED8MJJxg/edit#)

This is guarded under a configure flag `--enable-dom-streams`

1. ByteStreams and ReadableStream.tee will come in future patches.
2. I intentionally crash in other parts of the DOM that require streams (Fetch, Response, Blob), until the integration work is done in future patches.

   My current plan for that integration doesn't involve re-creating the alternative 'external streams' API from SpiderMonkey's implementation, but I have yet to do enough development to verify that will work.

Differential Revision: https://phabricator.services.mozilla.com/D122643
2021-10-06 18:43:01 +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
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
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
Boris Zbarsky 75124bdd98 Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53067

--HG--
extra : moz-landing-system : lando
2019-12-05 04:44:32 +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 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
Boris Zbarsky e29b81501a Bug 1580082. Align Response constructor IDL with spec. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D45411

--HG--
extra : moz-landing-system : lando
2019-09-11 11:06:58 +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
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
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
Andrea Marchesini 16d8326f76 Bug 1557121 - Implement Blob.text()/Blob.arrayBuffer()/Blob.stream() - part 1 - Rename FetchStream to BodyStream, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D33826

--HG--
rename : dom/fetch/FetchStream.cpp => dom/base/BodyStream.cpp
rename : dom/fetch/FetchStream.h => dom/base/BodyStream.h
extra : moz-landing-system : lando
2019-06-07 13:09:12 +00:00
Perry Jiang 144e795dbb Bug 1426562 - Don't crash on `Response` constructor in WebExtensions. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D29365

--HG--
extra : moz-landing-system : lando
2019-05-13 17:03:58 +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
Jason Orendorff 172aa066bc Bug 1507248 - Use virtual methods for external readable stream callbacks. r=baku,jwalden
Differential Revision: https://phabricator.services.mozilla.com/D11926

--HG--
extra : moz-landing-system : lando
2018-11-29 22:33:43 +00:00
Andrea Marchesini 223d7172bf Bug 1486698 - Update Fetch+Stream implementation to throw when the stream is disturbed or locked, r=bz
In this patch, I went through any place in DOM fetch code, where there are
ReadableStreams and update the locked, disturbed, readable checks.

Because we expose streams more often, we need an extra care in the use of
ErrorResult objects. JS streams can now throw exceptions and we need to handle
them.

This patch also fixes a bug in FileStreamReader::CloseAndRelease() which could
be called in case mReader creation fails.
2018-10-31 18:30:18 +01:00
Andrea Marchesini 4ba16f8d4b Bug 1503276 - Response.redirect() should throw TypeError if the input is an invalid URL, r=smaug 2018-10-30 20:07:28 +01:00
Diego Pino Garcia 8feb556198 Bug 1453612 - Response.redirect() should have empty string statusText. r=baku 2018-10-14 16:36:00 +03: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 e1a0b51543 Bug 1478101 - Split AbortSignal in 2 classes: AbortSignal and AbortSignalImpl, r=bz 2018-08-26 14:16:21 +02: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
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
Ben Kelly 1a6be56766 Bug 1432272 Make Fetch API use the global's base URL instead of the entry document's base URL. r=bz
The fetch spec used to use the entry settings as the base for parsing relative
Request/Response URL's, but this is no longer the case.  This was changed in:

https://github.com/whatwg/fetch/issues/367

Update our code to match this behavior.  We basically convert GetEntryDocument()
to QI the global to nsGlobalWindowInner and use its ExtantDoc instead.

No changes are needed for workers since its not possible to perform cross-global
javascript access in worker threads.
2018-01-23 09:38:21 -05:00
Xidorn Quan 2bf366e30a Bug 1303025 - Accept null for body param in constructor of Response. r=bkelly
MozReview-Commit-ID: LeEFcQzPJlv

--HG--
extra : rebase_source : 37980f7601143692989d17a2e715f0c5284730a4
2018-01-13 14:20:50 +11:00
Edouard Oger ee0f18811d Bug 1416842 - Allow fetch to reject with nsresult in chrome code. r=bkelly
MozReview-Commit-ID: FD2NUJZtAhT

--HG--
extra : rebase_source : cff033ea3d7e9581112392e7725290819fbec18b
2017-11-15 14:53:42 -05:00
Andrea Marchesini a441d6f43c Bug 1378342 - AbortSignal/AbortController - part 8 - Aborting ReadableStream when AbortSignal is aborted, r=bkelly 2017-08-29 11:31:06 +02:00