Commit Graph

2930 Commits

Author SHA1 Message Date
Kris Maglione
3e44c16cf9 Bug 1541557: Part 5 - Update callers of ChromeScript.sendSyncMessage to use sendQuery instead. r=nika
Since JSWindowActors don't have direct access to synchronous messaging,
ChromeScript callers are going to need to migrate to asynchronous messaging
and queries instead.

Since there's no comparable API to sendQuery for frame message managers, this
patch adds a stub that uses synchronous messaging, but makes the API appear
asynchronous, and migrates callers to use it instead of direct synchronous
messaging. This will be replaced with a true synchronous API in the actor
migration.

Fortunately, most of the time, this actually leads to simpler code. The
`sendQuery` API doesn't have the odd return value semantics of
`sendSyncMessage`, and can usually just be used as a drop-in replacement. Many
of the `sendSyncMessage` callers don't actually use the result, and can just
be changed to `sendAsyncMessage`. And many of the existing async messaging
users can be changed to just use `sendQuery` rather than sending messages and
adding response listeners.

However, the APZ code is an exception. It relies on intricate properties of
the event loop, and doesn't have an easy way to slot in promise handlers, so I
migrated it to using sync messaging via process message managers instead.

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

--HG--
extra : rebase_source : d5707e87f293a831a5cf2e0b0a7e977090267f78
extra : source : 75ebd6fce136ab3bd0e591c2b8b2d06d3b5bf923
2019-06-12 12:40:51 -07:00
Kris Maglione
f70e67ad2d Bug 1541557: Part 4 - Stop relying on synchronous preference getters/setters. r=nika
The SpecialPowers set*Pref/get*Pref APIs currently use synchronous messaging
to set and get preference values from the parent process. Aside from directly
affecting callers of those APIs, it also affects callers of `pushPrefEnv`,
which is meant to be asynchronous, but is in practice usually synchronous due
to the synchronous messaging it uses.

This patch updates the getPref APIs to use the in-process preference service
(which most callers are expecting anyway), and also updates the callers of
the setPref and pushPrefEnv APIs to await the result if they're relying on it
taking effect immediately.

Unfortunately, there are some corner cases in tests that appear to only work
because of the quirks of the current sync messaging approach. The synchronous
setPref APIs, for instance, trigger preference changes in the parent
instantly, but don't update the values in the child until we've returned to
the event loop and had a chance to process the notifications from the parent.
The differnce in timing leads some tests to fail in strange ways, which this
patch works around by just adding timeouts.

There should be follow-ups for test owners to fix the flakiness.

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

--HG--
extra : rebase_source : 941298157e7c82f420cf50ce057154ce9b85301c
extra : source : 189dc8a359815e059a4a217f788d183260bb2bfe
2019-06-13 09:34:39 -07:00
Valentin Gosu
7f899f94dd Bug 1559356 - Make sure dweb URLs have a proper host r=kershaw
We want dweb URLs to continue working as before bug 1536744 landed.
So we make sure to instantiate it as an nsStandardURL.
This is not a good long-term solution, as we don't want to hardcode
all the various schemes that we want to behave properly.
The fix would be to add a new spec-compliant nsIURI implementation,
based on RustURL and use it for all unknown schemes.

See bug 1561860 for a more complete solution.

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

--HG--
extra : moz-landing-system : lando
2019-06-28 13:12:49 +00:00
Nicholas Hurley
281d858112 Bug 1502555 - Match oppsec .wk format to rfc. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D35136

--HG--
extra : moz-landing-system : lando
2019-06-26 11:44:36 +00:00
Valentin Gosu
11362784ca Bug 1560703 - Make sure creating an FTP channel throws if FTP is disabled r=michal
Previously we would throw in nsFtpProtocolHandler::NewURI. Since that doesn't exist anymore, and creating FTP URLs always works, we need to make sure creating the FTP channel doesn't work anymore.

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

--HG--
extra : moz-landing-system : lando
2019-06-24 10:20:16 +00:00
avneeshsinghal
6b007e9918 Bug 1556844 - Enable more ESLint rules for netwerk, (auto & manual) fixes & format changes , r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D33992

--HG--
extra : moz-landing-system : lando
2019-06-21 20:13:40 +00:00
Valentin Gosu
54d2ce5f01 Bug 1558495 - Make sure we retry the TRR connection if it fails r=agrover
This patch adds:
* tests that we restart the TRR connection if it gets abnormally shut down
* a way to terminate the TRR connection when attempting to resolve closeme.com
* makes sure that resolving excluded domains with the DISABLE_TRR flag does
  not fail. Before this we would return an error code without checking the
  excluded domains first.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 21:49:10 +00:00
Junior Hsu
9b0bca3c35 Bug 1504085 - P3 fix test r=tnguyen
Origin: honors ReferrerPolicy: so we should honor defaultPolicy set by user

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

--HG--
extra : moz-landing-system : lando
2019-06-14 20:15:27 +00:00
Boris Zbarsky
a4410ccb51 Bug 1558726. Stop using [array] in nsISocketTransportService. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D34668

--HG--
extra : moz-landing-system : lando
2019-06-13 04:21:32 +00:00
Cosmin Sabou
f2f19ca465 Backed out changeset 4c1f06f4775c (bug 1543732) for crashtest failures on 785753-1.html.
--HG--
extra : rebase_source : 954910d236daf65f8b130203bfa4a0aec1da7dd1
2019-06-13 18:17:41 +03:00
Emilio Cobos Álvarez
af1495af8e Bug 1543732 - Re-enable a test to get hopefully useful logs eventually. 2019-06-13 14:14:00 +02:00
Boris Zbarsky
8e413da004 Bug 1558738. Stop using [array] in nsIUDPSocket. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D34672

--HG--
extra : moz-landing-system : lando
2019-06-12 07:00:01 +00:00
Edwin Gao
c2dae416e6 Bug 1555454 - migrate xpcshelltests to macosx1014 r=gbrown
Changes:
- move xpcshell from macosx1010 to macosx1014
- updated regex for macosx1014 xpcshell to run on 2 chunks for all variants (for now)

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

--HG--
extra : moz-landing-system : lando
2019-06-11 18:36:19 +00:00
Gijs Kruitbosch
01a4b7d58f Bug 1555671 - tests, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D33153

--HG--
extra : moz-landing-system : lando
2019-06-11 19:02:50 +00:00
Sylvestre Ledru
f1fbd2ff00 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-06-08 08:26:37 +00:00
Valentin Gosu
40d01075ce Bug 1556259 - Make sure CaptiveDetect.jsm interprets any redirect as a locked captive portal r=mayhemer
The problem with CaptiveDetect was that it uses an XMLHttpRequest, and
apparently xhr.status is 0 for failed requests, which here includes cert
errors, redirect loops, etc.
Getting the XHR to not follow redirects was tricky, so a hacky fix was to
set nsIHttpChannel.redirectionLimit = 0;
For any redirect the XHR would now fail with NS_ERROR_REDIRECT_LOOP, which
we need to handle separately.

I also included tests for:
  * redirect to https with invalid cert
  * redirect to same URL causing redirect loop
  * redirect to different URL with different content
  * redirect to different URL with canonical content
All of these cases should be detected as locked captive portals.

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

--HG--
extra : moz-landing-system : lando
2019-06-06 12:08:35 +00:00
Andrea Marchesini
382a3aa030 Bug 1551798 - Store sameSite value as received from the wire in the database - migration 10, r=Ehsan,robwu
Differential Revision: https://phabricator.services.mozilla.com/D32482

--HG--
extra : moz-landing-system : lando
2019-06-05 12:19:54 +00:00
Valentin Gosu
7d213246fb Bug 1555302 - Ensure that nsStandardURL::Resolve() doesn't parse URLs with a different scheme as relative r=mayhemer
Normally, this method will return the entire in string if it has a scheme.
However, mParser->ParseURL may fail, leading to the scheme to be cleared,
and the result will be the same HTTP URL with the input appended to the
path. This triggers the assertion in NS_NewURI that the scheme should not
change.

As a fix, we bail out of nsStandardURL::Resolve() if the parsed scheme of
the input is different than the base URIs current scheme. This condition
is necessary, because we still need to support a deprecated form of relative
URLs like http:file or http:/path/file

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

--HG--
extra : moz-landing-system : lando
2019-06-04 13:42:37 +00:00
Valentin Gosu
1bb0e080b4 Bug 1542561 - Test that a IPv4 NXDOMAIN still uses the IPv6 response, regardless which one comes back first r=dragana
This test uses prefs added in Bug 1518730, but the pref is ignored when it
doesn't exist, so the test is still valid.

Depends on D33471

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

--HG--
extra : moz-landing-system : lando
2019-06-03 21:20:39 +00:00
shindli
b83baa135f Backed out changeset 32f9907bf1f7 (bug 1555302) for causing permafailures in dom/url/tests/test_url.html CLOSED TREE 2019-06-03 23:33:14 +03:00
Valentin Gosu
8c0163caeb Bug 1555302 - Ensure that nsStandardURL::Resolve() doesn't parse URLs with a different scheme as relative r=mayhemer
Normally, this method will return the entire in string if it has a scheme.
However, mParser->ParseURL may fail, leading to the scheme to be cleared,
and the result will be the same HTTP URL with the input appended to the
path. This triggers the assertion in NS_NewURI that the scheme should not
change.

As a fix, we bail out of nsStandardURL::Resolve() if the parsed scheme of
the input is different than the base URIs current scheme. This condition
is necessary, because we still need to support a deprecated form of relative
URLs like http:file or http:/path/file

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

--HG--
extra : moz-landing-system : lando
2019-06-03 19:30:42 +00:00
Valentin Gosu
3cacbcf87b Bug 1552438 - Remove TRR mode 4 (MODE_SHADOW) r=agrover
Differential Revision: https://phabricator.services.mozilla.com/D32997

--HG--
extra : moz-landing-system : lando
2019-06-01 09:44:20 +00:00
Valentin Gosu
4882c4f4ea Bug 1552438 - Remove TRR mode 1 (MODE_PARALLEL) r=agrover
Differential Revision: https://phabricator.services.mozilla.com/D32996

--HG--
extra : moz-landing-system : lando
2019-06-01 09:44:06 +00:00
Honza Bambas
c35df87597 Bug 1545421 - New nsresult error codes for 407, 502 and 504 http response codes returned by proxies + test, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D32817

--HG--
extra : moz-landing-system : lando
2019-05-31 17:29:53 +00:00
Christian Holler
d67b031492 Bug 1528950 - Implement HTTP fuzzing target for Necko. r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D32755

--HG--
extra : moz-landing-system : lando
2019-05-31 09:34:00 +00:00
Andrea Marchesini
aa84d3c812 Bug 1436674 - nsICookieService.idl should use ACString XPIDL type in place of the string type, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D32662

--HG--
extra : moz-landing-system : lando
2019-05-31 09:36:44 +00:00
Andrea Marchesini
b1b122fb20 Bug 1554464 - Merge nsICookie2 and nsICookie in 1 single interface, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D33031

--HG--
extra : moz-landing-system : lando
2019-05-31 09:36:44 +00:00
Valentin Gosu
cc2ad47710 Bug 1552886 - Modernize test_trr.js (part 2) r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D31801

--HG--
extra : moz-landing-system : lando
2019-05-29 21:40:11 +00:00
Csoregi Natalia
a51ae3670f Backed out 5 changesets (bug 1551798) for failures on test_rawSameSite.js. CLOSED TREE
Backed out changeset 11ddc433b632 (bug 1551798)
Backed out changeset f2ac8efb023d (bug 1551798)
Backed out changeset 0f6e797b434f (bug 1551798)
Backed out changeset eae7f88660c8 (bug 1551798)
Backed out changeset 2ba747afb3d0 (bug 1551798)
2019-05-30 10:17:01 +03:00
Andrea Marchesini
84e139e50b Bug 1551798 - Store sameSite value as received from the wire in the database - migration 10, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D32482

--HG--
extra : moz-landing-system : lando
2019-05-29 16:34:33 +00:00
Andrea Marchesini
4c6ace6ac6 Bug 1551798 - Rename nsICookie2.SAMESITE_UNSET to nsICookie2.SAMESITE_NONE, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D31214

--HG--
extra : moz-landing-system : lando
2019-05-29 15:55:03 +00:00
arthur.iakab
944263f18a Backed out 5 changesets (bug 1551798) for multiple build bustages on StaticPrefList.h CLOSED TREE
Backed out changeset c89daff34d97 (bug 1551798)
Backed out changeset bbc3f88b8c03 (bug 1551798)
Backed out changeset b87996b8a411 (bug 1551798)
Backed out changeset d88b0002d736 (bug 1551798)
Backed out changeset 0fe740c90e2b (bug 1551798)
2019-05-29 18:07:26 +03:00
Andrea Marchesini
d5fdfc9e8c Bug 1551798 - Store sameSite value as received from the wire in the database - migration 10, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D32482

--HG--
extra : moz-landing-system : lando
2019-05-27 05:11:54 +00:00
Andrea Marchesini
e9bbb85ed1 Bug 1551798 - Rename nsICookie2.SAMESITE_UNSET to nsICookie2.SAMESITE_NONE, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D31214

--HG--
extra : moz-landing-system : lando
2019-05-24 15:18:49 +00:00
Valentin Gosu
124a1062f6 Bug 1536744 - Rename NS_NewURIOnAnyThread to NS_NewURI. r=baku
The only protocol that can't be created off the main thread at the moment is
moz-extension, and that can be handled at a later time.

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

--HG--
extra : moz-landing-system : lando
2019-05-28 14:17:04 +00:00
Valentin Gosu
b8bdfab7c9 Bug 1536744 - Remove nsIProtocolHandler.newURI r=baku
Differential Revision: https://phabricator.services.mozilla.com/D30703

--HG--
extra : moz-landing-system : lando
2019-05-28 13:49:27 +00:00
Honza Bambas
8e33c5a50b Bug 1554953 - Fix test_captive_portal_service.js intermittent timeout at shutdown, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D32814

--HG--
extra : moz-landing-system : lando
2019-05-28 12:31:31 +00:00
Kershaw Chang
5d000eeb62 Bug 1544619 - Ignore response body if method is HEAD or CONNECT r=mayhemer
According to the spec, we should ignore the response body for the HEAD and CONNECT requests.

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

--HG--
extra : moz-landing-system : lando
2019-05-27 09:08:50 +00:00
Sylvestre Ledru
993c03acb1 Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D31769

--HG--
extra : moz-landing-system : lando
2019-05-22 22:37:14 +00:00
Bogdan Tara
fa8d90211a Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-05-23 07:44:57 +03:00
Valentin Gosu
33c73bd3eb Bug 1529911 - Add more tests for cancelling the channel r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D20500

--HG--
extra : moz-landing-system : lando
2019-05-22 13:58:55 +00:00
Valentin Gosu
9f3b339e68 Bug 1529911 - Make the httpcancel unit test run in e10s r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D20501

--HG--
extra : moz-landing-system : lando
2019-05-22 13:48:31 +00:00
Andrea Marchesini
7b8a38ee05 Bug 1551729 - Revert bug 1548432 - Re-introducing the support for cookies without values, r=mayhemer
This patch reverts the second part of bug 1548432.

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

--HG--
extra : moz-landing-system : lando
2019-05-22 06:31:22 +00:00
Mihai Alexandru Michis
68421ffba4 Backed out changeset 754426d70d28 (bug 1551729) for causing wpt failures. CLOSED TREE 2019-05-21 15:17:37 +03:00
Andrea Marchesini
32c1b6bb89 Bug 1551729 - Revert bug 1548432 - Re-introducing the support for cookies without values, r=mayhemer
This patch reverts the second part of bug 1548432.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 08:57:21 +00:00
Dorel Luca
06b2e4e9d2 Backed out changeset 41c511d9528c (bug 1551729) for causing WPT failures in cookies/http-state/mozilla-tests.html. CLOSED TREE 2019-05-20 23:40:10 +03:00
Daniel Varga
9054636e2c Backed out 2 changesets (bug 1487113) for mochitest failure at dom/base/test/test_script_loader_js_cache.html.
Backed out changeset dce59b615568 (bug 1487113)
Backed out changeset e6f579752678 (bug 1487113)
2019-05-20 21:04:40 +03:00
Andrea Marchesini
b2c76acaf1 Bug 1551729 - Revert bug 1548432 - Re-introducing the support for cookies without values, r=mayhemer
This patch reverts the second part of bug 1548432.

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

--HG--
extra : moz-landing-system : lando
2019-05-20 15:16:06 +00:00
Andrea Marchesini
32fb7a2445 Bug 1487113 - nsICacheInfoChannel.alternativeDataInputStream as attribute, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D31791

--HG--
extra : moz-landing-system : lando
2019-05-20 15:22:47 +00:00
Andrea Marchesini
aa9560f5f0 Bug 1487113 - nsICacheInfoChannel.originalInputStream as attribute, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D31790

--HG--
extra : moz-landing-system : lando
2019-05-20 15:18:25 +00:00