Commit Graph

16135 Commits

Author SHA1 Message Date
Bobby Holley
2b985ab718 Bug 1451421 - Add a ToLowerCaseASCII utility method for nsAtom. r=hisvonen 2018-04-06 15:30:15 -07:00
Francois Marier
6ed7327a36 Bug 1430803 - Ignore SameSite cookie attribute when value is empty or unrecognised. r=valentin
Make the parsing the the attribute spec-compliant:
https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-02#section-5.3.7

MozReview-Commit-ID: 8YpkZvgryJb

--HG--
extra : rebase_source : 52140ffdcd50cb7a90c3824711d3d63c051eac54
2018-04-05 17:09:13 -07:00
Julian Descottes
c87c82b440 Bug 1452187 - fix localization note mismatch;r=flod
Cleanup of all localization notes that refer to entities
that are not listed in the corresponding localization file.

MozReview-Commit-ID: Bl0VU9HoPfa

--HG--
extra : rebase_source : 86680b8ae037783304f045e94c7af7053a0f69e9
2018-04-06 20:21:35 +02:00
arthur.iakab
a63676a8df Merge mozilla-central to autoland 2018-04-06 01:14:00 +03:00
Marco Castelluccio
dbeabc37e3 Bug 1423667 - Reenable some tests that were disabled because of a Clang update. r=jmaher
--HG--
extra : rebase_source : 1ace11df58e858905e9d53c32d9cf8e1f75046d4
2018-04-05 09:20:47 +01:00
Daniel Stenberg
7ca074617e bug 1451750 - treat rrsets from different resolvers as different r=mcmanus
... even if all the addresses are identical.

Otherwise the IsTRR() bit would be dropped, resulting in
about:networking showing false for this entry while in reality being
TRR. Or vice versa.

MozReview-Commit-ID: JABLm09iCnn

--HG--
extra : rebase_source : 24f9ff8b6818c00359069add23d1354ab2f1b1f9
2018-04-05 16:30:10 +02:00
Henri Sivonen
a6b323b14d Bug 1448297 - Assume contiguous XPCOM strings in nsCookie.cpp. r=Ehsan
MozReview-Commit-ID: 8aOh13vz6lM

--HG--
extra : rebase_source : bfb7160ff30ed3b29cae3d61bd7ed656aa4dc92f
2018-03-23 14:16:23 +02:00
Valentin Gosu
44b773489f Bug 1450726 - Missing null check for mLoadInfo r=jkt
MozReview-Commit-ID: Cz7qj1qulK1

--HG--
extra : rebase_source : 79fc4e37ea6b9fc280dcaf11c2b9661a1493c04c
2018-04-02 20:18:53 +03:00
Daniel Stenberg
695dbf5db9 bug 1451150 - make TRRService wait for the correct CP event r=valentin
MozReview-Commit-ID: LwBjw7EKBhR

--HG--
extra : rebase_source : 404f132e48b1c57a3b93cc1efcd64a16a425f32b
2018-04-04 00:16:55 +02:00
Ben Kelly
0145a9634a Bug 1450874 P2 Don't save service worker time stamps if the fetch event didn't actually dispatch. r=asuth 2018-04-03 19:53:21 -07:00
Ciure Andrei
7208a2fee8 Merge inbound to mozilla-central. a=merge 2018-04-04 00:54:16 +03:00
Dave Townsend
e2dffad4ac Bug 1448500: Add speculative request content policy type. r=bz, r=kmag
Adds a new TYPE_SPECULATIVE to nsIContentPolicy uses it as the type for
speculative connection channels from the IO service. I believe I've added it to
all the content policies in tree to make sure it behaves the same as TYPE_OTHER
used to.

The webextension test shows that the webextension proxy API sees speculative
lookups requested through the IO service.

MozReview-Commit-ID: DQ4Kq0xdUOD

--HG--
extra : rebase_source : d9460fdac118bc68f0db79749a16f181b580f2e7
2018-03-23 15:27:08 -07:00
Daniel Stenberg
a204c8eb02 bug 1450583 - require macOS 10.13.4 (uname 17.5.0) for enabling TFO r=mcmanus
MozReview-Commit-ID: LbfgT9oS9O

--HG--
extra : rebase_source : 6099048103e227d25550a2ed2358cf1b3118042a
2018-04-03 14:49:39 +02:00
Daniel Stenberg
e443c66c37 bug 1447642 - no more DNSService restarts r=valentin
The DNS service was shutdown and restarted again in several scenarios,
for example when one of its prefs changed and by nsIOService when going
offline/online. The DNSService restart dragged the resolver, TRRService
and others with it and they too were thus restarted.

Most notably this hurt TRR resolving, as the restart caused short gaps
in time when there was no TRRService available and nsHostResolver
defaults to TRR Mode "native" if there's no TRRservice up, causing the
name resolver to occasionally use the wrong or unexpected resolver even
though TRR is enabled.

The resolver restart also flushed the DNS cache which is now avoided.

It is also a performance gain.

MozReview-Commit-ID: pp4Y8bNQJk

--HG--
extra : rebase_source : 9e3b3e6c0df16b8ca6287d8045f594026ae9ad6d
2018-03-21 14:35:53 +01:00
Andrew McCreight
e80864c94c Bug 1438688, part 3 - Remove XPT files from the packaging process. r=glandium
Now that XPT files are not loaded from files at runtime, code for
packaging XPT files can be removed.

This means that a couple of test XPIDL interfaces will get shipped in
builds to users that weren't before, but I don't think that matters
much.

This also puts XPT files into the local objdir for the XPIDL makefile,
instead of dist/bin, because they are no longer part of the
distribution.

MozReview-Commit-ID: 7gWj8KWUun3

--HG--
extra : rebase_source : 65bac47c2cd1a20b3c675a01b44a25a1d2d3ab7a
2018-03-05 14:27:29 -08:00
Dorel Luca
f24505d99e Backed out 7 changesets (bug 1438688) for android xpcshell failures on builds/worker/workspace/build/tests/bin/components/test_necko.xpt
Backed out changeset 8786eabb61a4 (bug 1438688)
Backed out changeset e05ec1e08b46 (bug 1438688)
Backed out changeset 4c437ba9d984 (bug 1438688)
Backed out changeset 2f243bca1af3 (bug 1438688)
Backed out changeset 4da0e1839353 (bug 1438688)
Backed out changeset 186f916dcc7a (bug 1438688)
Backed out changeset 08b1a5f904e4 (bug 1438688)
2018-04-03 02:30:53 +03:00
Andrew McCreight
fc09560f06 Bug 1438688, part 3 - Remove XPT files from the packaging process. r=glandium
Now that XPT files are not loaded from files at runtime, code for
packaging XPT files can be removed.

This means that a couple of test XPIDL interfaces will get shipped in
builds to users that weren't before, but I don't think that matters
much.

This also puts XPT files into the local objdir for the XPIDL makefile,
instead of dist/bin, because they are no longer part of the
distribution.

MozReview-Commit-ID: 7gWj8KWUun3

--HG--
extra : rebase_source : 6f7d4fd1d6cdea2c14866705a2dc972eb5f43382
2018-03-05 14:27:29 -08:00
Dorel Luca
a7d5a65268 Merge mozilla-inbound to mozilla-central. a=merge 2018-04-03 01:00:11 +03:00
Michal Novotny
e4fe2d6393 Bug 1436809 - Check that stream message was converted to string correctly. r=valentin
--HG--
extra : amend_source : a4dbdaa91a4af641b0a538aa208c19a122d30ae4
2018-04-02 12:59:18 -04:00
Honza Bambas
951c3c0c9e Bug 1441726 - Include CacheStorageService::mPurgeTimeStamps hashtable in the memory reporter. r=michal 2018-03-27 10:21:00 +03:00
Henri Sivonen
eb75469c5b Bug 1448755 - Use AssignLiteral and AssignASCII for short zero-terminated strings in networking. r=jduell.
MozReview-Commit-ID: HPzng5p6qkb

--HG--
extra : rebase_source : 20cec6b448c3152dddac5ac93d678745958a993a
2018-03-26 09:02:32 +03:00
Kirk Steuber
42a3fa21d7 Bug 1429169 - Facilitate testing of cookie-related enterprise policy by always firing the cookie-db-read event r=jimm
There seems to be no reason to conditionally fire the cookie-db-read event. Currently it is not fired if no cookies were read. There seems to be only one other consumer of this event (a test) which should work fine if the event were fired every time. This change would eliminate a particularly ugly workaround in cookie-related policy testing.

MozReview-Commit-ID: FbD1cvsBZBO

--HG--
extra : rebase_source : 6611debb3567310c61e5a5dc9cedadeae888cfe5
2018-03-20 14:56:02 -07:00
Andreea Pavel
f08ea922ba Backed out 4 changesets (bug 1429169) for failing browser chrome at browser/components/enterprisepolicies/tests/browser/browser_policy_cookie_settings.js on a CLOSED TREE
Backed out changeset a49df97d2ad9 (bug 1429169)
Backed out changeset 437f677d3808 (bug 1429169)
Backed out changeset 2f744fd3d77c (bug 1429169)
Backed out changeset dd305f45f746 (bug 1429169)
2018-03-30 03:35:01 +03:00
Kirk Steuber
544cf05b75 Bug 1429169 - Facilitate testing of cookie-related enterprise policy by always firing the cookie-db-read event r=jimm
There seems to be no reason to conditionally fire the cookie-db-read event. Currently it is not fired if no cookies were read. There seems to be only one other consumer of this event (a test) which should work fine if the event were fired every time. This change would eliminate a particularly ugly workaround in cookie-related policy testing.

MozReview-Commit-ID: FbD1cvsBZBO

--HG--
extra : rebase_source : ff5049f36c7f3df3ad182ebb1a6ccc5db1032e23
2018-03-20 14:56:02 -07:00
Christoph Kerschbaumer
3739c23b85 Bug 1439713 - Add flag to loadinfo for skipping certain security policy checks. r=bz 2018-03-29 11:14:35 +02:00
Christoph Kerschbaumer
a929955d1f Bug 1439713 - Change nsIContentPolicy shouldLoad to take an <uri, loadInfo> pair instead of the various args. r=bz 2018-03-29 12:16:23 +02:00
Tom Ritter
449237fc51 Bug 1378552 - Reduce the liklihood of inadvertently misusing NullPrincipal::Create(). r=ckerschb
NullPrincipal::Create() (will null OA) may cause an OriginAttributes bypass.
We change Create() so OriginAttributes is no longer optional, and rename
Create() with no arguments to make it more explicit about what the caller is doing.

MozReview-Commit-ID: 7DQGlgh1tgJ
2018-03-22 13:36:20 -05:00
Honza Bambas
d6561f3cd0 Bug 1433088 - Make the HTTP cache entry age based validation calculation work with the internal one-second only round-down resolution to make max-age=0 force immediate expiration. r=michal 2018-03-28 08:35:00 -04:00
Nicholas Nethercote
fd81947ea1 Bug 1448220 - Convert all network predictor VarCache prefs to the new StaticPrefList form. r=hurley
MozReview-Commit-ID: JiPbv84btDc

--HG--
extra : rebase_source : 46fb2b41d4233341166ced3a67100a086a7ffad7
2018-03-16 13:26:04 +11:00
Honza Bambas
d0b352582e Bug 1442784 - Carry isMainDocumentChannel HTTP channel flag to redirected HTTP channels, r=michal
--HG--
extra : rebase_source : fc3fa8510359725c8c7165f973f1aae7a1cc5def
2018-03-26 10:49:00 +03:00
Nathan Froyd
55e0321931 Bug 1448021 - make TicklerTimer's constructor explicit; r=valentin
Attempting to stand up the static analysis for Android builds revealed
that we weren't being explicit enough.
2018-03-27 10:51:32 -04:00
Franziskus Kiefer
806baa5430 Bug 1415279 - Move error strings for certError and netError pages to frontend, r=johannh,keeler,Honza,snorp
This patch moves all TLS error string handling to the frontend.
Dev-tools doesn't show the same error code as the page does anymore but only the error code as string.
All logging of these error messages has been removed.

Bug #: 1415279

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

--HG--
extra : rebase_source : 61e2d94cb21ef4c02b81448531609205c85a9707
2018-03-27 13:31:52 +02:00
Bogdan Tara
39d9b048b9 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-27 12:16:26 +03:00
Bogdan Tara
302a55b534 Merge inbound to mozilla-central. a=merge 2018-03-27 12:12:57 +03:00
Nicholas Nethercote
136f284c7d Bug 1436655 - Introduce a mechanism for VarCache prefs to be defined entirely in the binary. r=glandium
Currently VarCache prefs are setup in two parts:

- The vanilla pref part, installed via a data file such as all.js, or via an
  API call.

- The VarCache variable part, setup by an Add*VarCache() call.

Both parts are needed for the pref to actually operate as a proper VarCache
pref. (There are various prefs for which we do one but not the other unless a
certain condition is met.)

This patch introduces a new way of doing things. There is a new file,
modules/libpref/init/StaticPrefList.h, which defines prefs like this:

> VARCACHE_PREF(
>   "layout.accessiblecaret.width",
>   layout_accessiblecaret_width,
>   float, 34.0
> )

This replaces both the existing parts.

The preprocessor is used to generate multiple things from this single
definition:

- A global variable (the VarCache itself).

- A getter for that global variable.

- A call to an init function that unconditionally installs the pref in the
  prefs hash table at startup.

C++ files can include the new StaticPrefs.h file to access the getter.

Rust code cannot use the getter, but can access the global variable directly
via structs.rs. This is similar to how things currently work for Rust code.

Non-VarCache prefs can also be declared in StaticPrefList.h, using PREF instead
of the VARCACHE_PREF.

The new approach has the following advantages.

+ It eliminates the duplication (in all.js and the Add*VarCache() call) of the
  pref name and default value, preventing potential mismatches. (This is a real
  problem in practice!)

+ There is now a single initialization point for these VarCache prefs.
  + This avoids need to find a place to insert the Add*VarCache() calls, which
    are currently spread all over the place.
  + It also eliminates the common pattern whereby these calls are wrapped in a
    execute-once block protected by a static boolean (see bug 1346224).
  + It's no longer possible to have a VarCache pref for which only one of the
    pieces has been setup.

+ It encapsulates the VarCache global variable, so there is no need to declare
  it separately.

+ VarCache reads are done via a getter (e.g. StaticPrefs::foo_bar_baz())
  instead of a raw global variable read.
  + This makes it clearer that you're reading a pref value, and easier to
    search for uses.
  + This prevents accidental writes to the global variable.
  + This prevents accidental mistyping of the pref name.
  + This provides a single chokepoint in the code for such accesses, which make
    adding checking and instrumentation feasible.

+ It subsumes MediaPrefs, and will allow that class to be removed. (gfxPrefs is
  a harder lift, unfortunately.)

+ Once all VarCache prefs are migrated to the new approach, the VarCache
  mechanism will be better encapsulated, with fewer details publicly visible.

+ (Future work) This will allow the pref names to be stored statically, saving
  memory in every process.

The main downside of the new approach is that all of these prefs are in a
single header that is included in quite a few places, so any changes to this
header will cause a fair amount of recompilation.

Another minor downside is that all VarCache prefs are defined and visible from
start-up. For test-only prefs like network.predictor.doing-tests, having them
show in about:config isn't particularly useful.

The patch also moves three network VarCache prefs to the new mechanism as a
basic demonstration. (And note the inconsistencies in the multiple initial
values that were provided for
network.auth.subresource-img-cross-origin-http-auth-allow!) There will be
numerous follow-up bugs to convert the remaining VarCache prefs.

MozReview-Commit-ID: 9ABNpOR16uW
* * *
[mq]: fixup

MozReview-Commit-ID: 6ToT9dQjIAq
2018-03-26 09:39:40 +11:00
Henri Sivonen
eaa2f6b46b Bug 1395114 - Remove nsIUnicharStreamLoader. r=emilio,michal
MozReview-Commit-ID: ECKNnJt80oK

--HG--
extra : rebase_source : 6f09937e0648c65d035dfb4935d6e9a06d0223df
2018-03-26 12:45:31 +03:00
Florian Quèze
02569d8da2 Bug 1448033 - Update the progress of downloading an update every 100ms, r=mcmanus. 2018-03-23 19:41:52 +01:00
Noemi Erli
1270a21724 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-23 01:00:18 +02:00
Valentin Gosu
105a3dd952 Bug 1447194 - Use threadsafe refcounting in all nsIURI implementations r=mayhemer
It seem that only nsStandardURL and nsSimpleURI (and classes that inherit them) do not have threadsafe refcounting yet.

MozReview-Commit-ID: J8gLoBSPCTl

--HG--
extra : rebase_source : 0e1659c28b18909e31b2e3e74baf74edf1e100c8
2018-03-20 15:51:17 +01:00
Valentin Gosu
83e7f0c0ea Bug 1447190 - Remove internal mutability from nsStandardURL r=mayhemer
* Removes mSpecEncoding since the spec is always ASCII encoded
* nsStandardURL::InitGlobalObjects is now called from nsNetStartup
* Removes prefObserver from nsStandardURL
* mDisplayHost is now initialized every time that we change the hostname
* Adds locking to the gAllURLs list

MozReview-Commit-ID: 93mwECxYxWl
* * *
[mq]: overfix

MozReview-Commit-ID: 98nyTYa5ZeR

--HG--
extra : rebase_source : 82045e10771038d7168d1f235143c24c72dd5a45
2018-03-22 02:59:32 +01:00
Boris Zbarsky
d989f864ea Bug 1444143 part 14. Rename nsIFrameLoader.idl to nsIFrameLoaderOwner.idl. r=mystor
MozReview-Commit-ID: 1XpEjoFLSQh

--HG--
rename : dom/base/nsIFrameLoader.idl => dom/base/nsIFrameLoaderOwner.idl
2018-03-21 22:43:17 -04:00
Boris Zbarsky
9cb6df0dac Bug 1444143 part 2. Remove nsIFrameLoader::GetDocShell. r=mystor
The change from "docShell" to "mDocShell" for the SetName call in the
OwnerIsMozBrowserFrame case in nsFrameLoader::MaybeCreateDocShell is a
drive-by correctness fix for a bug the rename of "docShell" to "parentDocShell"
caught: setting the name of our _parent_ docshell based on the name attr of our
owner makes no sense.

MozReview-Commit-ID: DwnWt8jTokV
2018-03-21 22:43:15 -04:00
arthur.iakab
161c0e01f4 Merge mozilla-central to mozilla-inbound 2018-03-22 02:02:06 +02:00
Valentin Gosu
ed088d0c3e Bug 1416791 - Eliminate mutability from nsHostObjectURI by removing nsIURIWithBlobImpl r=baku
* blobImpl references are now only kept in nsHostObjectProtocolHandler
* removes nsHostObjectProtocolHandler.idl
* Makes nsHostObjectURI no longer inherit from nsSupportsWeakReference

MozReview-Commit-ID: AC1klrfsMnn

--HG--
extra : rebase_source : 142802f9a6fa6aae5611dccf117d88f96a9985a6
2018-03-21 15:33:15 +01:00
Honza Bambas
ee49bea9fc Bug 1447566 - Remove all remaning MOZ_ASSERT(!mSynTimer) checks from nsHalfOpenSocket, since we no longer enforce it null under certain conditions. r=valentin 2018-03-21 08:28:00 -04:00
Miko Mynttinen
65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Tiberius Oros
649398dfd9 Merge inbound to mozilla-central. a=merge 2018-03-21 12:03:08 +02:00
Kris Maglione
98aba60038 Bug 1446571: Follow-up: Fix another test that expected raw numeric errors. r=bustage DONTBUILD
MozReview-Commit-ID: 7e3THFQd2CZ
2018-03-20 21:00:28 -07:00
Kris Maglione
140cc17b5d Bug 1446571: Follow-up: Fix test that expected raw numeric errors. r=bustage
MozReview-Commit-ID: 1Y7kPAvApPo
2018-03-20 20:13:17 -07:00
Kris Maglione
96e4667ef9 Bug 1446571: Part 2a - Stop throwing raw numeric values in https.js. r=aswan
This isn't strictly related, but I ran into it for the nth time while updating
tests, and I got fed up with having my tests fail with a useless numeric value
with no indication of where it came from.

MozReview-Commit-ID: 6OjgVYw7tNd

--HG--
extra : rebase_source : 259667d2a26ec4252a0f8a097ca35b3b702b17a0
extra : histedit_source : 492f541471b896a9a4b941baad2b14de8faf9113
2018-03-16 17:48:13 -07:00
Valentin Gosu
eccc344c51 Bug 1442242 - Make the constuctors of URI implementations private r=mayhemer
MozReview-Commit-ID: LonNnZyJjVO

--HG--
extra : rebase_source : ceefc81a669b17f68f193fce5f172f9f2268a998
2018-03-20 23:23:31 +01:00
Valentin Gosu
d4bfa7921c Bug 1442242 - Add nsIURIMutator method to mark when the URI implementation should support nsIFileURL r=mayhemer
* This is needed in order to make the constructors of URI implementations private

MozReview-Commit-ID: 8dddDXbmrfF

--HG--
extra : rebase_source : b8e471d228617ae4bd07c5ed6317951c06ce8d56
2018-03-20 12:52:43 +01:00
Thom Chiovoloni
a76a5bce76 Bug 1447086 - Return a promise from stop() in httpd.js r=ted.mielczarek
MozReview-Commit-ID: 7pxiQazBMqg

--HG--
extra : rebase_source : 5e2fab84ba91e987d101784296d3ec09ec439df7
2018-03-19 11:40:18 -07:00
Nils Ohlmeier [:drno]
6d558b16f6 Bug 1443032: stop closing usrsctp on callback. r=jesup
MozReview-Commit-ID: BgX9I1shVeN

--HG--
extra : rebase_source : ffee150924da89bd7e7564730c9c08fa59653223
2018-03-20 11:19:14 +00:00
Cosmin Sabou
66b7c55e79 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-21 00:51:18 +02:00
Valentin Gosu
ba3f9989ec Bug 1426353 - Do not allow the parent process to consume alt-data generated in the content process. r=michal
MozReview-Commit-ID: htQ28muaBI

--HG--
rename : netwerk/test/unit/test_alt-data_simple.js => netwerk/test/unit/test_alt-data_cross_process.js
rename : netwerk/test/unit_ipc/test_alt-data_simple_wrap.js => netwerk/test/unit_ipc/test_alt-data_cross_process_wrap.js
2018-03-06 02:44:51 +01:00
Valentin Gosu
87857475e6 Bug 1433609 - Ensure that deserialized URL is correct r=mayhemer
MozReview-Commit-ID: BMQfPzPhDhc
2018-02-14 14:40:05 +01:00
Kris Maglione
c09b0c1a99 Bug 1446833: Part 2 - Stop using Task.jsm in xpcshell/head.js. r=florian
MozReview-Commit-ID: 6vSpwih9Fnr

--HG--
extra : rebase_source : 9ca452486f144a35514f00742722b6a59efadacd
extra : histedit_source : af6cc6fef47116a4c98113fcd4fd157217a75106
2018-03-18 15:27:04 -07:00
Dave Townsend
2debd7677a Bug 1449259: Don't do proxy lookups for loads that are only going to come from the cache. r=mayhemer
MozReview-Commit-ID: GI9t8HWesZY

--HG--
extra : rebase_source : 9ef3adaacce86c03371957a4b8a6babcffbc7a89
2018-04-04 16:17:25 -07:00
Valentin Gosu
0f7acc7f3e Bug 1451295 - Add a null check for mChannel r=michal
MozReview-Commit-ID: 7YYhFQuKsPk

--HG--
extra : rebase_source : 1fd1ed99038e5f785aac4e8bde40cecf71dd2cea
2018-04-05 17:47:14 +03:00
Valentin Gosu
2e450c1c59 Bug 1451063 - nsICache does not inherit from nsISupports r=michal
MozReview-Commit-ID: 9azOJAEy5DH

--HG--
extra : rebase_source : 3f296ad00897cb2cf54ac24c1276535e76f64c6e
2018-04-05 16:58:44 +03:00
Valentin Gosu
659634effe Bug 1451262 - Clear gSocketThread after finishing all operations so we don't trigger thread assertions r=mayhemer
MozReview-Commit-ID: AHMPd72S2GB

--HG--
extra : rebase_source : fe5fb1604e771f223d78f23fcf9d37b1f85763f9
2018-04-04 13:47:46 +03:00
Andrea Marchesini
41b639fbc7 Bug 1448795 - nsMIMEInputStream must call OnInputStreamReady() with the correct nsIAsyncInputStream, r=asuth 2018-03-26 19:06:31 +02:00
vinoth
24cafeec62 Bug 1416045. r=mayhemer CLOSED TREE
Reviewers: mayhemer

Reviewed By: mayhemer

Subscribers: freddyb, dveditz, mayhemer, ckerschb, vinoth

Tags: PHID-PROJ-wkydohdk6pajyfn2llkb

Bug #: 1416045

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

--HG--
extra : rebase_source : 65fb235d787b6955da1433ea2ffd56082cab0b30
extra : amend_source : affac492394597daf9b3294d4aca2f61bc27fc73
2018-03-22 21:02:16 +02:00
Andreea Pavel
d9d9517a78 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-03-20 00:42:18 +02:00
David Keeler
aa1464d4a7 bug 1444265 - break a potential cycle in BackgroundFileSaver to prevent leaks r=jduell
BackgroundFileSaver holds a reference to its nsIBackgroundFileSaverObserver
(observer). If such an observer has an enclosure that captures the
BackgroundFileSaver itself (as in test_backgroundfilesaver.js), this causes a
cycle that won't be caught by the cycle collector. Thus, we have to manually
break the cycle when we're done with the observer (in
BackgroundFileSaver::NotifySaveComplete). Note that this currently relies on the
fact that this implementation requires that Finish always be called (see remarks
in nsIBackgroundFileSaver.idl).

MozReview-Commit-ID: GOO9q2vFRso

--HG--
extra : rebase_source : f62b0ec513e0b681da3e76c0af31077d2fa03fea
extra : amend_source : 2b3a11d4b17df10705bad38e02b6ce130b456448
2018-03-14 15:02:49 -07:00
Honza Bambas
e5943f18e9 Bug 1445796 - Add logging of a calling JS script to more http channel methods. r=valentin 2018-03-16 09:28:00 -04:00
Richard Pospesel
2ba1e92974 Bug 1441327 - Allow for seccomp filtering of socket(AF_INET/AF_INET_6) calls on Linux when using UNIX Domain Sockets for SOCKS Proxy. r=bagder
The initialization path for the SOCKS proxy in firefox involves creating
a generic AF_INET socket, and then replacing it if the actual
configuration requires something else (either AF_INET6 or AF_LOCAL).
With syscall filtering configured to return an error in the event of
AF_INET or AF_INET6 socket creation, this initialization path fails.  We
would like this capability so that we can prevent firefox from making
network requests outside of the Tor proxy.

This patch adds a check in the initial socket creation path to see if
the SOCKS proxy host begins with file:// with the assumption that such
URIs point to a UNIX Domain Socket (on Linux+macOS only).  In that case,
we create an AF_LOCAL socket rather than the requested type.  A similar
check for Windows already exists to determine if the proxy is actually a
named pipe.

In the subsequent replacing step no work occurs as the passed in socket
matches the type we need, so no changes need to be made there.

NOTE: With this change there is still a one-time request for an AF_INET6
socket that occurs.  This code path exists to determine whether the
system supports IPv6; if socket(AF_INET6...) fails then it is assumed
that the system does not.  However, this check only affects code that is
unreachable when using AF_LOCAL sockets so it seems safe leave as it is.
However, this does mean that firefox will still be incompatible with
seccomp policies which kill the calling thread in the event of a
socket(AF_INET6,...) call.
2018-03-07 12:58:00 -05:00
Honza Bambas
f5cc301b66 Bug 1446117 - Make sure we also mark timeout epoch on a network socket when we are polling it for read/write, fix regression from bug 1444160. r=valentin 2018-03-19 07:48:00 -04:00
Honza Bambas
c940bbdf06 Bug 1430659 - Network requests in "blocked" state for long time (1+ minute) when ipv6 hosts are no longer available. r=valentin 2018-03-16 09:06:00 -04: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
Daniel Stenberg
144d65c4d6 bug 1446749 - make resolver keep TRR status when cherry-picking adddresses r=mcmanus
... as they otherwise appear in the about:networking list as "false"
while having been resolved by TRR.

MozReview-Commit-ID: 9g9fUExvyjS

--HG--
extra : rebase_source : 3098b7c3f7d01e55f5a8c031fc6a73e53f7edb05
2018-03-18 15:39:56 +01:00
Daniel Stenberg
75ba9a2870 bug 1446352 TRR: make "only mode" not wait for CP confirmation r=mcmanus
... to avoid a catch-22 as CP needs name resolve to work.

MozReview-Commit-ID: DC1CjlUy4cJ

--HG--
extra : rebase_source : 3bc0f146071f04757d44b76f352e48b2abb4dad0
2018-03-17 19:56:12 +01:00
Valentin Gosu
af5eeff2e3 Bug 1442239 - Make URI deserialization (nsISerializable.read) happen via nsIURIMutator only r=mayhemer
* Deserialization now only happens via a mutator
* The CID for URI implementations actually returns the nsIURIMutator for each class
* The QueryInterface of mutators implementing nsISerializable will now act as a finalizer if passed the IID of an interface implemented by the URI it holds

MozReview-Commit-ID: H5MUJOEkpia

--HG--
extra : rebase_source : 01c8d16f7d31977eda6ca061e7889cedbf6940c2
2018-03-19 20:22:32 +01:00
Honza Bambas
55a95407a1 Bug 1395760 - In offline mode, fail HTTP load when a cache entry is partial, r=michal 2018-03-02 13:42:00 +02:00
Gurzau Raul
3057041352 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-16 19:58:27 +02:00
Sylvestre Ledru
fa45a3c670 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR

--HG--
extra : rebase_source : 5f5e37517aa80c2e7b5933962178d761074886e7
2018-03-16 14:29:15 +01:00
Andreea Pavel
e5950c0d39 Backed out 2 changesets (bug 1442239) for xpcshell failures at widget/tests/unit/test_taskbar_jumplistitems.js on a CLOSED TREE
Backed out changeset 513cd669aca1 (bug 1442239)
Backed out changeset aef4c73f736f (bug 1442239)
2018-03-19 21:19:26 +02:00
Valentin Gosu
f0c7a1ae13 Bug 1442239 - Make URI deserialization (nsISerializable.read) happen via nsIURIMutator only r=mayhemer
* Deserialization now only happens via a mutator
* The CID for URI implementations actually returns the nsIURIMutator for each class
* The QueryInterface of mutators implementing nsISerializable will now act as a finalizer if passed the IID of an interface implemented by the URI it holds

MozReview-Commit-ID: H5MUJOEkpia

--HG--
extra : rebase_source : 8ebb459445cab23288a6c4c86e4e00c6ee611e34
2018-03-08 13:35:10 +01:00
L. David Baron
ed8327b354 Bug 1446079 - Remove test_predictor.js setting of new-cache preferences that are no longer needed. r=hurley
These are the only occurrences of "browser.cache.use_new_backend" in the tree.

MozReview-Commit-ID: IOSw0uUD5FW

--HG--
extra : rebase_source : c6c7e6abfdf2c3ff23c1f18e36110781f6b5580b
2018-03-16 08:45:08 -07:00
Ryan VanderMeulen
5383105dd9 Bug 1086964 - Remove uses of no_pgo that are no longer needed. r=dmajor 2018-03-14 18:18:32 -04:00
David Keeler
394c8f01a3 bug 1444532 - fix a leak in SHA256 in nsHttpConnectionInfo.cpp r=mayhemer
The original code (from bug 1200802) declared an XPCOM object as a static bare
pointer, which for future reference is probably never the right thing to do. It
might have worked if it was cleared before shutdown but it never was.

MozReview-Commit-ID: EMe7wgzm6zv

--HG--
extra : rebase_source : 572ce6822e297692bab3311a65e1143785b913c4
2018-03-09 14:16:57 -08:00
Jonathan Kingston
10ebc30d5d Bug 1440701 - Adding in telemetry for upgrading display content. r=ckerschb,valentin
MozReview-Commit-ID: 7oEIith4Ehv

--HG--
extra : rebase_source : 454d56277aa5dc08bf8cfd7cd9c1e24d31014838
2018-03-04 14:33:33 +00:00
Coroiu Cristina
0f6841e0d2 Backed out 2 changesets (bug 1443080) for spidermonkey build bustage at build/src/js/src/jit/BaselineCacheIRCompiler.cpp
Backed out changeset 7d509bb8a35d (bug 1443080)
Backed out changeset 53bdcd5937cd (bug 1443080)

--HG--
extra : rebase_source : 59b5350d2959c0b065aedd34bfe8337216c0ea4b
2018-03-14 11:13:21 +02:00
Sylvestre Ledru
c07eb73986 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR

--HG--
extra : rebase_source : 17c91bfd7241e3e522b1413b6e544df74f5361a0
2018-03-05 13:43:54 +01:00
Tom Ritter
9c3d32ebab Bug 1444490 Declare classses (and one method) in network/ final to reduce virtual function calls r=nwgh
MozReview-Commit-ID: 4oaazbPhpbc

--HG--
extra : rebase_source : 7c01066363605c64fc76332686b2c4d9c2af6518
2018-03-09 08:37:18 -06:00
Andreea Pavel
8fa0b32c84 Merge mozilla-inbound to mozilla-cenral. a=merge 2018-03-13 19:01:32 +02:00
Narcis Beleuzu
298d1d55b5 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-13 12:36:54 +02:00
Daniel Stenberg
c999b36f90 bug 1441131 - TRR: proxy storage removal to the mainthread r=valentin
MozReview-Commit-ID: K4Ar0RbSRzS

--HG--
extra : rebase_source : 6cefcc668f6004a59c09b065f2152250dbc83879
2018-03-12 15:57:13 +01:00
Daniel Stenberg
cc208144a3 bug 1445183 store TRR duration when the response is used r=valentin
Previously it would store the time even for early AAAA responses that
weren't used until the A response came in, thus getting the timing
wrong.

MozReview-Commit-ID: KctUjMjH5FR

--HG--
extra : rebase_source : fafd7ad25cd1b7a43d4b4a5653600cad830b471d
2018-03-13 10:37:50 +01:00
Daniel Stenberg
de5b0bf154 bug 1444887 TRR: get captive portal state in init r=valentin
To prevent it from sitting waiting for an event that was sent before the
TRRService started.

MozReview-Commit-ID: 9F0IlWGdA9O

--HG--
extra : rebase_source : 6a70210a4e538d8a1b240684a0b3ed5fed38e6ad
2018-03-12 14:48:49 +01:00
Noemi Erli
ac0a30f58c Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-03-13 01:16:04 +02:00
Daniel Stenberg
51e2dbf071 bug 1444858 - TRR: respect network.dns.disableIPv6 r=valentin
MozReview-Commit-ID: 18STac9ASIB

--HG--
extra : rebase_source : e3e8956feee2ec9e4dfe438e1b6c20dc0c478ab9
2018-03-12 13:19:22 +01:00
Honza Bambas
ea33c31195 Bug 1444160 - Fix calculation of network socket timeout logic. r=valentin, mayhemer 2018-03-12 07:00:00 +02:00
Patrick McManus
aebf4bd069 Bug 1444453 - require version >= 10.13.4 for tfo on mac r=bagder
MozReview-Commit-ID: 6jYWQtcxRuA

--HG--
extra : rebase_source : 522fc28a04b951063c1c199f8017836c4f5f9e6a
2018-03-09 12:26:06 -05:00
Daniel Stenberg
f0caae2f7c bug 1441391 - TRR: restart failed NS confirms in TRR-only mode r=valentin
MozReview-Commit-ID: FHw3Zx07iFG

--HG--
extra : rebase_source : 55a09920127aa54e542ed736b92ca6fda63f889c
2018-03-09 09:05:48 +01:00
Dorel Luca
150521bb4b Backed out changeset 798a47cd74d5 (bug 1441391) for build bustages. CLOSED TREE 2018-03-09 14:49:02 +02:00
Daniel Stenberg
fd2336dfd3 bug 1441391 - TRR: restart failed NS confirms in TRR-only mode r=valentin
MozReview-Commit-ID: FHw3Zx07iFG

--HG--
extra : rebase_source : baa674f1a488c6ee5383a4f72c66bb595285db60
2018-03-09 09:05:48 +01:00
Brindusan Cristian
eb51abf4fb Merge inbound to mozilla-central. a=merge 2018-03-08 20:00:36 +02:00
Nathan Froyd
d260382328 Bug 1443900 - don't allocate nsCStrings when doing integer parsing; r=michal
There's no need to allocate a completely new nsCString when all we want
to do is parse a character string into an integer.  We can allocate a
dependent string instead, which will avoid some memory churn.
2018-03-08 09:43:00 -05:00
Eric Rahm
cc1509e530 Bug 1442756 - Switch nsHttpAuthCache::mDB to nsClassHashtable. r=mayhemer
--HG--
extra : rebase_source : 398e2105ea78c26f14419179fb0387c771384858
2018-03-02 15:04:25 -08:00
Daniel Stenberg
20d398643b bug 1441256 - bypass cache when retrying connection without TRR r=mcmanus,valentin
Otherwise it will just load back the same (problematic) addresses from the
cache again the second time. This introduces a new resolver bit
(REFRESH_CACHE) that also invalidates the existing cache entry while doing the
new resolve.

MozReview-Commit-ID: 5Bc2KiAGYYA

--HG--
extra : rebase_source : ae368c88a5db27f0980b9928439d27588bc84815
2018-03-06 14:50:21 +01:00
Honza Bambas
ecd9c51e6f Bug 1440567 - Add non-null checks around assignment of warning report to preflight HTTP channel in nsCORSListenerProxy::StartCORSPreflight. r=dveditz 2018-03-07 08:03:00 -05:00
Nathan Froyd
72e140cbf6 Bug 1443316 - part 3 - make cache entry request checking more readable; r=ckerschb
What we're really doing in CacheEntry::CheckRequest is checking:

a) Whether the method is contained in our allowed methods; and
b) Whether all of the headers are contained in our allowed headers.

nsTArray lets us check directly for containing elements, so let's use
that facility rather than rolling our own.
2018-03-07 13:39:54 -05:00
Nathan Froyd
4e5f97268e Bug 1443316 - part 2 - don't repeatedly construct comparators when checking cache entries; r=ckerschb
nsCaseInsensitiveCStringComparator ought to be cheap to construct, but
the object actually has a vtable to install and whatnot.  So it's
beneficial to pull the construction of it outside of the headers loop.
2018-03-07 13:39:54 -05:00
Nathan Froyd
4e03eee08a Bug 1443316 - part 1 - micro-optimize purging expired preflight cache entries; r=ckerschb
The entries in mMethods and mHeaders aren't sorted in any special way,
so we can remove expired entries using UnorderedRemoveElementAt, which
is faster than RemoveElementAt.
2018-03-07 13:39:54 -05:00
Nathan Froyd
19a0b532bc Bug 1443613 - don't allocate temporary strings for DNSRequestChild; r=mayhemer
DNSRequestChild's constructor takes `const nsCString&` parameters.  If
you have a `const nsACString&` argument to pass in to the constructor,
you're forced to construct a temporary nsCString object to satisfy the
prototype.  But the temporary string will just get copied inside the
constructor and you'll have to destroy the temporary string object you
created.

Let's skip all this, and just have DNSRequestChild take `const
nsACString&` arguments instead, and avoid the temporary object.
2018-03-07 12:22:03 -05:00
Bogdan Tara
f93e407658 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-03-07 12:06:25 +02:00
Daniel Stenberg
80c6547919 bug 1443489 - TRR: require a pref set to allow early AAAA responses r=valentin
Early AAAA responses might cause issues on hosts without working native
IPv6 connectivity, of course especially notable in TRR-only mode.

MozReview-Commit-ID: 6ZqE6AKnucH

--HG--
extra : rebase_source : ff42cb8daf941a3fa1f7e783c76d823e879024c3
2018-03-06 16:07:29 +01:00
Honza Bambas
8aaa7351b0 Bug 1438935 - Serialize selected LoadInfo properties from HTTPChannelParent to HTTPChannelChild through OnStartRequest and Redirect1Begin, r=asuth
--HG--
extra : rebase_source : 6d93112fbd0bcd9562094a05c70cb02e0c3bb4b9
2018-03-06 08:07:00 +02:00
Cosmin Sabou
c17d867e25 Merge inbound to mozilla-central. a=merge
--HG--
rename : browser/base/content/tabbrowser.js => browser/modules/AsyncTabSwitcher.jsm
2018-03-06 06:27:48 +02:00
Cosmin Sabou
ed1b2a8736 Backed out 4 changesets (bug 1437167) for build bustages on nsUpdateDriver.cpp and WindowsMessageLoop.cpp on a CLOSED TREE.
Backed out changeset b98740e7c639 (bug 1437167)
Backed out changeset 4476e8f51fa6 (bug 1437167)
Backed out changeset c79dc40faa41 (bug 1437167)
Backed out changeset b608d2dcbb86 (bug 1437167)
2018-03-06 00:09:46 +02:00
Nika Layzell
7f7a76ec67 Bug 1440771 - Part 4: Use nsCOMPtr<nsIInputStream> directly in PNecko, r=baku
MozReview-Commit-ID: COnMiadbCjn
2018-03-05 16:00:06 -05:00
Nika Layzell
19803dc200 Bug 1440511 - Part 1: Correctly namespace nsHttpResponseHead in NeckoChannelParams.ipdlh, r=froydnj
MozReview-Commit-ID: DVkTwAmqmkc
2018-03-05 16:00:01 -05:00
Nika Layzell
262be91f75 Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj
MozReview-Commit-ID: BN18I8Q6c7S
2018-03-05 16:00:00 -05:00
Valentin Gosu
34872b6d20 Bug 1441688 - Remove nsIIPCSerializableURI.Deserialize r=mayhemer
MozReview-Commit-ID: 8gwX3vSKWNX

--HG--
extra : rebase_source : a2c21a7e66aa8be3c2e345ca64feea967b380491
2018-03-05 04:14:44 +01:00
Valentin Gosu
f102a081b2 Bug 1434163 - Make all nsIURI attributes readonly r=mayhemer
MozReview-Commit-ID: KtjO8VWjPF5

--HG--
extra : rebase_source : 061a6db73e36b3a0b3732d44379bbc10e8268f9a
2018-02-27 00:07:48 +01:00
Kirk Steuber
06cca893ea Bug 1442429 - Correct the documentation for nsIBrowserSearchService::addEngineWithDetails r=mkaply
MozReview-Commit-ID: EryCTRT5t5I

--HG--
extra : rebase_source : c771bebb9fe894390ea272ca4259a9847aeaaa8a
2018-03-01 14:13:51 -08:00
Andrea Marchesini
5784769019 Bug 1443079 - nsScriptError.isFromPrivateWindow must match the correct value also in e10s mode, r=smaug 2018-03-13 06:40:38 +01:00
Nicholas Nethercote
439e258873 Bug 1438433 - Make network.predictor.cleaned-up a non-VarCache pref. r=hurley.
mCleanedUp is a VarCache variable, which mirrors the canonical value of the
network.predictor.cleaned-up pref. When the canonical pref value is modified,
e.g. by SetBool(), then mCleanedUp is also updated.

But the updating relationship is one-way -- if mCleanedUp is modified, the
canonical value of the pref is not updated. Such an inconsistency is bad! For
example, Predictor.cpp will use mCleanedUp's value, but about:config will show
the canonical value.

(For this reason, VarCache prefs are meant to be read-only outside of libpref.
Bug 1436655 will enforce this.)

This patch changes mCleanedUp so it's not a VarCache variable, avoiding the
mirroring issue.

MozReview-Commit-ID: LIG02gMkRjF

--HG--
extra : rebase_source : 273b2372ce718b0f346695a0dc96a189cd3ba233
2018-03-13 13:06:30 +11:00
Nicholas Nethercote
f87fadb9cb Bug 1438433 - Remove the network.predictor.redirect-likely-confidence pref. r=hurley.
It's unused.

MozReview-Commit-ID: DmHwJ3oW3Vq

--HG--
extra : rebase_source : 89d49a7d680e07383de82c2b4cb3a74a13f09c1e
2018-03-07 15:50:14 +11:00
Nathan Froyd
edc7498b90 Bug 1444472 - fix incorrect clang warning in nsCORSListenerProxy; r=valentin
Older versions of clang complain about this code, with:

netwerk/protocol/http/nsCORSListenerProxy.cpp:230:5: error: default initialization of an object of const type 'const struct CheckHeaderToken' without a user-provided default constructor

Later versions of the standard were amended to make this not an error,
but clang still warns.  Pacify clang by making the object not const.
2018-03-12 16:46:33 -04:00
Ben Kelly
6a92d27239 Bug 1440775 Make fetch API force-cache and only-if-cached use VALIDATE_NEVER instead of LOAD_FROM_CACHE. r=mayhemer 2018-03-01 07:37:31 -08:00
Ben Kelly
251a6dfaf4 Bug 1440565 P1 Make sure to clear any existing cache related load flags when setting the default fetch() RequestCache value. r=asuth 2018-02-28 10:34:13 -08:00
Florian Quèze
f3ee8dd20b Bug 1433175 - more aggressive scripted patch to replace remaining Components.classes, Components.interfaces, Components.utils and Components.results uses with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:35 +01:00
Florian Quèze
6df7549a3e Bug 1433175 - semi-automated indent fix, r=Mossop. 2018-02-28 18:51:34 +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
Sebastian Hengst
769222fadf merge mozilla-inbound to mozilla-central. a=merge
--HG--
rename : browser/base/content/tabbrowser.xml => browser/base/content/tabbrowser.js
2018-02-28 12:54:12 +02:00
Andrea Marchesini
18cabbba7b Bug 1431646 - Adding a completed boolean to know if the operation is completed in NS_ReadInputStreamToBuffer(), r=smaug 2018-02-28 07:14:41 +01:00
Andrea Marchesini
4ce2708b72 Bug 1441502 - nsBufferedInputStream should not change the exposed interfaces, r=smaug 2018-02-28 07:14:41 +01:00
Nathan Froyd
b5d5605a54 Bug 1441584 - part 2 - declare some URI classes final; r=valentin 2018-02-27 20:13:57 -05:00
Nathan Froyd
c821ec9351 Bug 1441584 - part 1 - declare inner URI Mutator classes final; r=valentin
For documentation purposes and to assist the compiler.
2018-02-27 20:13:57 -05:00
Honza Bambas
281502cac6 Bug 1363284 - HTTP/2 anonymous/onymous session (connection) coalescing, r=mayhemer
--HG--
extra : rebase_source : 66192a32668de8a9cd99722d1e0860cce2f84030
2018-02-15 09:10:00 +02:00
Valentin Gosu
823bcbf677 Bug 1434766 - Make nsIFileURL attributes readonly r=mayhemer
MozReview-Commit-ID: AN5EzyuuKuJ

--HG--
extra : rebase_source : 20794ce1c867915b4cae71b7abb9dcdca27fd290
2018-02-26 05:24:09 +01:00
arthur.iakab
17cd218519 Backed out changeset 56336c4873fe (bug 1434766) for build bustages on a CLOSED TREE 2018-02-27 17:14:15 +02:00
Valentin Gosu
f77fba2c4c Bug 1434766 - Make nsIFileURL attributes readonly r=mayhemer
MozReview-Commit-ID: AN5EzyuuKuJ

--HG--
extra : rebase_source : 2d986fa39930469472f24a208d9b06650ddb78f4
2018-02-26 05:24:09 +01:00
Valentin Gosu
ed218f0a19 Bug 1433958 - Change code that sets nsIURI.scheme to use nsIURIMutator r=mayhemer
MozReview-Commit-ID: GgyIkZSG2y3

--HG--
extra : rebase_source : 5398a29d8cb910c909ed88e1a6cbd9fd63e6b745
2018-02-26 20:43:47 +01:00
Valentin Gosu
2a78b51a84 Bug 1433958 - If setting the host succeeds, SetHostPort should not return an error code r=mayhemer
WebPlatformTests expect that when calling
url.host = "host:" // port missing
url.host = "host:65536" // port too big
url.host = "host:bla" // invalid port
that the hostname will be set, but the port will be left unchanged.
Since DOM APIs are the only consumers for SetHostPort it means we can change this behaviour to match the WPT expectations.
As such, SetHostPort will return NS_OK if setting the host succeded, and will ignore if setting the port failed.

MozReview-Commit-ID: LoMw8hCWlCv

--HG--
extra : rebase_source : db28b73d98060c2f66f899afe1a4ae26f4db85db
2018-02-26 20:43:47 +01:00
Valentin Gosu
27e9e0be9f Bug 1433958 - Change code that sets nsIURI.host to use nsIURIMutator r=mayhemer
MozReview-Commit-ID: 7T5gCu8WOfa

--HG--
extra : rebase_source : 752c34e5f9dde2e16fc9243c11860b987acbcb93
2018-02-26 20:43:47 +01:00
Valentin Gosu
7f3b09b694 Bug 1433958 - Change code that sets nsIURI.port to use nsIURIMutator r=mayhemer
MozReview-Commit-ID: 7Lu7JJvDUGF

--HG--
extra : rebase_source : 8d5a9bb1c4a5a525f7c5bc8d07c1e7029d2029a3
2018-02-26 20:43:46 +01:00
Valentin Gosu
ec9082b60a Bug 1433958 - Change code that sets nsIURI.query to use nsIURIMutator r=mayhemer
MozReview-Commit-ID: JKW8IsaFY10

--HG--
extra : rebase_source : 45ffa07c34739adf4de681fec1370645b0f74985
2018-02-26 20:43:46 +01:00
Valentin Gosu
4c1c2d2005 Bug 1433958 - Change code that sets nsIURI.ref to use nsIURIMutator r=mayhemer
MozReview-Commit-ID: 4caicZFBkcQ

--HG--
extra : rebase_source : fe32f156392a9e0ce69fa6030278eaca43a69482
2018-02-26 20:43:46 +01:00
Valentin Gosu
139db586dc Bug 1433958 - Don't fail when setting an empty password if the username is already empty r=mayhemer
We normally fail in nsStandardURL::SetPassword if the username is empty.
But if the password we are trying to set is also empty, we should't really fail.

MozReview-Commit-ID: FIDqkPrb1gp

--HG--
extra : rebase_source : 9080c44e91e27acd210f3ace3a234528513928c3
2018-02-26 20:43:46 +01:00
Valentin Gosu
55537212a8 Bug 1433958 - Change code that sets nsIURI.password to use nsIURIMutator r=mayhemer
MozReview-Commit-ID: I8igxClMM5L

--HG--
extra : rebase_source : edca02a7b10ab2e9f5f5498a1164890b9aa75985
2018-02-26 20:43:46 +01:00
Valentin Gosu
8617010c5f Bug 1433958 - Change code that sets nsIURI.username to use nsIURIMutator r=mayhemer
MozReview-Commit-ID: 7E63pAIOZCs

--HG--
extra : rebase_source : 54164efbc967146f4811552498aea5e5db1edfc2
2018-02-26 20:43:46 +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
Valentin Gosu
710c2e2fc9 Bug 1433958 - Change code that sets nsIURI.filePath to use nsIURIMutator r=mayhemer
MozReview-Commit-ID: GYHpakKPEbe

--HG--
extra : rebase_source : 521966b446284fbe215dfc8518acafc5de9ded5c
2018-02-26 20:43:45 +01:00
Valentin Gosu
7bd0336d01 Bug 1433958 - Change code that sets nsIURI.pathQueryRef to use nsIURIMutator r=mayhemer
MozReview-Commit-ID: HVyZ3E1XuLN

--HG--
extra : rebase_source : fd122b3122e0f3eb371d429bd86ad35d09dcfbf6
2018-02-26 20:43:45 +01:00
Valentin Gosu
a49f1ae73b Bug 1433958 - Make NS_MutateURI methods warn immediately after calling method that fails r=mayhemer
Calling NS_ENSURE_SUCCESS at the begining of the methods shows the error in the console, but what we really care about is where the error code comes from. So it is best to use if (NS_FAILED(mStatus) {} at the begining of the methods, and NS_ENSURE_SUCCESS right after calling the appropriate method on mMutator.

MozReview-Commit-ID: 5vVuHk3N4FU

--HG--
extra : rebase_source : f477f0f87b3303422a595f27d9b39ac25335d701
2018-02-26 20:43:45 +01:00
Valentin Gosu
76fe90c6ed Bug 1433958 - Change code that uses nsIURI.setHostAndPort() to use nsIURIMutator r=mayhemer
* Removes setHostAndPort from nsIURIMutator as it only has one use
* Instead, the consumer sets the port to -1 before calling setHostPort()

MozReview-Commit-ID: Jx9UMW440hq

--HG--
extra : rebase_source : cb60e76c905db6bb308ddfd8fa548cc13d3afe06
2018-02-26 20:43:45 +01:00