Commit Graph

340 Commits

Author SHA1 Message Date
Jan de Mooij
cbb67627a3 Bug 722345 part 3 - Remove request API. r=luke
Differential Revision: https://phabricator.services.mozilla.com/D4424

--HG--
extra : rebase_source : 1842588c00dbc8fb4294ce5436cdb787190909b4
2018-08-28 09:53:30 +02:00
Henri Sivonen
7753be203b Bug 1484990 - Use BulkWrite instead of write past length via BeginWriting() in XHR. r=baku
The old code assumes that it's OK to use nsAString::BeginWriting() to write
past the string's logical length if the string has enough capacity. This is
bogus, because the string doesn't know of data written past its logical
length.

The BulkWrite API has been created precisely for this purpose and allows
orderly capacity-aware low-level writes to the string.

MozReview-Commit-ID: BYQHl8Z9Fbd

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

--HG--
extra : moz-landing-system : lando
2018-08-30 14:24:58 +00:00
Andreea Pavel
f5d1a4b1c3 Backed out changeset 510decfb443d (bug 1484990) for breaking many test suites e.g. Wr on a CLOSED TREE 2018-08-29 12:16:24 +03:00
Henri Sivonen
374b92a848 Bug 1484990 - Use BulkWrite instead of write past length via BeginWriting() in XHR. r=baku
The old code assumes that it's OK to use nsAString::BeginWriting() to write
past the string's logical length if the string has enough capacity. This is
bogus, because the string doesn't know of data written past its logical
length.

The BulkWrite API has been created precisely for this purpose and allows
orderly capacity-aware low-level writes to the string.

MozReview-Commit-ID: BYQHl8Z9Fbd

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

--HG--
extra : moz-landing-system : lando
2018-08-29 07:43:24 +00:00
Jeff Walden
e4f79e2a19 Bug 1484421 - Move JSON-related functionality into js/public/JSON.h that isn't #include'd in jsapi.h. r=jandem 2018-08-20 07:54:45 -07:00
Henri Sivonen
d3a158ae38 Bug 1483764 - Fix EOF behavior when decoding responseText lazily. r=smaug
* Drop the decoder when it finishes regardless of who called it.
 * Match criteria for having mDecoder process EOF from OnStopRequest to
   the criteria used for eager decoding in StreamReaderFunc.
 * Process EOF when decoding lazily.
 * Get rid of the useless mResponseCharset field.

MozReview-Commit-ID: 7oJwyKQYP8K

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

--HG--
extra : moz-landing-system : lando
2018-08-17 17:04:22 +00:00
Thomas Wisniewski
78af5fd2ae Bug 1454590 - Align overrideMIMEType with the XMLHttpRequest Standard. r=hsivonen
MozReview-Commit-ID: 5k34F96jRPX

--HG--
extra : rebase_source : 95944acc3123406dbf490f2fd1837b8decaa3e0b
2018-08-13 16:12:10 -04:00
Henri Sivonen
22d42c4507 Bug 1482640 - Null out mDecoder in OnStopRequest to avoid asserting when there is more than one OnStopRequest. r=smaug
MozReview-Commit-ID: K25XhiYGzhl

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

--HG--
extra : moz-landing-system : lando
2018-08-13 17:10:06 +00:00
Thomas Wisniewski
d4606b265f Bug 1070763 - Ensure that XHRs sniff the BOM for non-JSON responseTypes, and flush the decoder upon end-of-stream; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D3063

--HG--
extra : moz-landing-system : lando
2018-08-10 06:38:01 +00:00
Thomas Wisniewski
a0847cc720 Bug 1362354 - Handle XHRs with aborted bindings as aborted rather than network errors. r=baku
MozReview-Commit-ID: 86e00dRe6qc

--HG--
extra : rebase_source : 992523d5ca534923b4e1b38c7e5e0351dcf322eb
2018-08-02 19:07:07 -07:00
Thomas Wisniewski
0471de08a0 Bug 1456421 - Align XHR username/password precedence rules with current spec. r=baku
MozReview-Commit-ID: FXCFoNhCVJz

--HG--
extra : rebase_source : fa9ecd5b6f04c1102fb9326291e5760c8285841d
2018-07-31 09:49:00 -04:00
Thomas Wisniewski
35f7d4241c Bug 1459984 - avoid firing progress type ProgressEvents for sync XHRs in workers. r=baku
MozReview-Commit-ID: LVOMGGy73HV

--HG--
extra : rebase_source : 6f88b2a8ffec21239efb997b49644e7be0878ba3
2018-07-30 20:14:36 -04:00
Boris Zbarsky
f44ce81c0a Bug 1478743 part 3. Remove bogus clearing of the response when xhr.overrideMimeType throws. r=baku 2018-07-30 11:51:52 -04:00
Boris Zbarsky
1e48d9386f Bug 1478743 part 1. Add some test coverage for setting xhr.responseType on workers. r=baku
Most of the change is just making the responseType wpt run on workers and
annotating the resulting failures.

The change to the initial value of mResponseType is a drive-by fix for an
easy-to-fix issue the test caught.  There is a corresponding mochitest fix to
fix our incorrect test for the behavior.

--HG--
rename : testing/web-platform/tests/xhr/responsetype.html => testing/web-platform/tests/xhr/responsetype.any.js
2018-07-30 11:51:47 -04:00
Andrea Marchesini
bc5414c5f3 Bug 1471189 - Removing 'Terminating' state in workers, r=mrbkap 2018-07-12 19:33:41 +02:00
Andi-Bogdan Postelnicu
88cc63910d Bug 1453795 - DOM - Initialize member fields in classes/ structures. r=peterv
--HG--
extra : rebase_source : 249fc26e50bded4e94f5effa4308af0f1e54b908
2018-06-16 17:21:46 +03:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Andrea Marchesini
4ea7edd9be Bug 1455256 - Port more components to WorkerRef - part 5 - XHR, r=asuth 2018-06-18 16:37:21 -04:00
Andrea Marchesini
9a9a71e436 Bug 1469126 - GetAllocationSize should report unique blobs when dealing with nested blobs, r=smaug 2018-06-18 11:35:46 -04:00
Andreea Pavel
99c88126b6 Bug 1468199 - remove references to b2g in test manifests r=jmaher 2018-06-12 14:57:00 +03:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Patrick McManus
f18aa94399 Bug 1462357 - remove the channel and socket interface id r=bagder,baku
the id was a b2g feature only settable via chrome privd xhr and is no
longer active in the code base

MozReview-Commit-ID: 84GPNvhvjNb

--HG--
extra : rebase_source : ab5c2229b98e1407b8b74ef2ee00dcfea45e046a
2018-05-16 16:05:03 -04:00
Adrian Wielgosik
4fca802957 Bug 1460940 - Convert NS_NewDOMDocument to use nsIDocument. r=bz
MozReview-Commit-ID: GoJ30YZGRhq

--HG--
extra : rebase_source : 0995705c2c31c1a779c22c8336482d4c7e89e319
2018-05-11 19:46:15 +02:00
Chris Peterson
71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Ben Kelly
00d42d9d6b Bug 1457157 P2 Clear a worker's ClientSource when it reaches Terminating. r=baku 2018-05-02 06:29:26 -07:00
Boris Zbarsky
a81bb92f43 Bug 1455052 part 10. Remove various unused nsIDOMEvent bits. r=masayuki
MozReview-Commit-ID: Fzckal7RGUv
2018-04-20 12:55:31 -04:00
Boris Zbarsky
4643230674 Bug 1455055 part 6. Clean up HandleEvent implementations in dom. r=masayuki
MozReview-Commit-ID: Ht7HQEhVS8E
2018-04-20 00:49:30 -04:00
Boris Zbarsky
2b6097ae6d Bug 1455055 part 1. Convert nsIDOMEventListener to taking an Event, not an nsIDOMEvent. r=masayuki
This does no cleanup other than what's needed to compile.  Cleanup coming up in
later patches.

MozReview-Commit-ID: 3sOnkj71n09
2018-04-20 00:49:29 -04:00
Andrea Marchesini
0f38ba4351 Bug 1453927 - Get rid of XMLHttpRequestMainThread::Init, r=qdot 2018-04-14 08:11:35 +02:00
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Boris Zbarsky
1483606219 Bug 1452235 part 4. Remove nsIDOMSerializer. r=qdot
MozReview-Commit-ID: 5foaztSLyEC
2018-04-09 16:30:33 -04:00
Boris Zbarsky
83412146ec Bug 1449631 part 13. Remove now-unnecessary forwarding macros. r=smaug
MozReview-Commit-ID: 6teO2KoGqUo
2018-04-05 13:42:42 -04:00
Boris Zbarsky
88937275cc Bug 1449631 part 9. Remove nsIDOMEventTarget::AddEventListener. r=smaug
Also switch the XPCOM-y version of EventTarget::AddEventListner to a
Nullable<bool> for aWantsUntrusted.

The three-arg overload of AddEventListener in ContentFrameMessageManager was
never called, so all the AddEventListener overloads there are not needed.

MozReview-Commit-ID: 4IhqHmPVWzE
2018-04-05 13:42:42 -04:00
Boris Zbarsky
4292bca4ee Bug 1449631 part 6. Remove nsIDOMEventTarget::DispatchEvent. r=smaug
MozReview-Commit-ID: 8YMgmMwZkAL
2018-04-05 13:42:41 -04:00
Boris Zbarsky
1dce94cf16 Bug 1449631 part 2. Remove nsIDOMEventTarget::RemoveEventListener. r=smaug
We can't have a null content in
ScrollbarActivity::StopListeningForScrollAreaEvents, because only viewport
frames have a null GetContent().

MozReview-Commit-ID: 9iAg0ivVqqG
2018-04-05 13:42:40 -04:00
Noemi Erli
ff466e94c1 Merge inbound to mozilla-central. a=merge 2018-04-05 13:02:11 +03:00
Ben Kelly
720c0d53fb Bug 1450358 P1 Add an event listener runtime leak check for XHR. r=baku 2018-04-04 11:25:42 -07:00
akriti
44e0c8ab73 Bug 1442700 : Label added to TELEMETRY_SEND_FAILURE_TYPE and TelemetrySend's XHR_ERROR_TYPE for eTerminated , r=chutten
MozReview-Commit-ID: 5JnGdYynRKF

--HG--
extra : rebase_source : 1dcd2dbefd60ce68a78181998c9dc224a27c735a
2018-03-28 15:27:51 +05:30
Ben Kelly
9bd4654613 Bug 1450266 P7 Make XMLHttpRequestMainThread check for a valid inner window before dispatching events. r=baku r=smaug 2018-04-03 17:10:17 -07:00
Henri Sivonen
95457e2d3d Bug 1448587 - Use AssignASCII for XHR event type. r=baku.
MozReview-Commit-ID: 3WoRer49eQB

--HG--
extra : rebase_source : 508dcba57f3fa6fd38b21589837b7721efcff3fa
2018-03-24 21:21:51 +02:00
Sebastian Hengst
f06205459f Backed out changeset 0f81334efa0a (bug 1445883) for crashes (bug 1446902). a=backout 2018-03-21 11:17:20 +02:00
Narcis Beleuzu
0a0ba8db56 Backed out 1 changesets (bug 1445883) for Linting opt failures on /MANIFEST.json. a=backout
Bug 1445883 - Port XHR to WorkerRef, r=smaug
2018-03-21 00:17:34 +02:00
Sebastian Hengst
144671581e Backed out changeset 0f81334efa0a (bug 1445883) for crashes (bug 1446902). a=backout 2018-03-20 23:21:24 +02:00
Tooru Fujisawa
1adba8c1fc Bug 1442465 - Part 4.2: Stop unnecessarily awaiting on BrowserTestUtils.removeTab (simple part). r=dao 2018-03-19 11:16:45 +09:00
Andrea Marchesini
cc07a166fe Bug 1445883 - Port XHR to WorkerRef, r=smaug 2018-03-16 14:13:04 +01:00
Florian Quèze
c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Emilio Cobos Álvarez
c03ffd9c62 Bug 1425759: Simplify the style backend type setup. r=bholley
Now that what we use to decide whether a document is styled by Servo are only
prefs and the doc principal, we don't need to inherit the style backend type,
since unless the pref has changed, the result will be the same.

MozReview-Commit-ID: KBmeBn1cRne
2018-02-27 12:39:20 +01:00
Valentin Gosu
84b854ce2c Bug 1433958 - Change code that sets nsIURI.userPass to use nsIURIMutator r=mayhemer
* Code in XMLHttpRequestMainThread is converted to set the username and password individually. This is because when the parameters are empty, it ended up calling SetUserPass(":") which always returns an error.

MozReview-Commit-ID: 3cK5HeyzjFE

--HG--
extra : rebase_source : f34400c11245d88648b0ae9c196637628afa9517
2018-02-26 20:43:46 +01:00