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

5246 Коммитов

Автор SHA1 Сообщение Дата
Narcis Beleuzu 9279994eae Merge inbound to mozilla-central. a=merge 2018-01-24 23:56:14 +02:00
Valentin Gosu 0ec04b6d9e Bug 1432187 - Add missing SubstitutingURL::Mutator r=mayhemer
* Makes the implementation of nsStandardURL::Mutator into a template called TemplatedMutator<T>
* Makes both nsStandardURL::Mutator and SubstitutingURL::Mutator extend TemplatedMutator<T>

MozReview-Commit-ID: EpxFpBkrdSK

--HG--
extra : rebase_source : 07d568ff84fb199c7549ae5f402e01e4b86c1c37
2018-01-24 20:33:06 +01:00
Valentin Gosu b53812bfed Bug 1432187 - Change code to use nsIStandardURLMutator.{init,setDefaultPort} r=mayhemer
MozReview-Commit-ID: K2Uy9ET3Ay6

--HG--
extra : rebase_source : fb5e19bc7b71a6f0264471bf8f07febf1bc55900
2018-01-24 20:33:02 +01:00
Valentin Gosu 358af2c859 Bug 1432187 - Add nsIStandardURLMutator interface r=mayhemer
MozReview-Commit-ID: 4IbdO2gMwox

--HG--
extra : rebase_source : 4f64f44bc1f8e8ee4538c7624f00ab76cc914fae
2018-01-23 23:13:04 +01:00
Nika Layzell 074c9ae117 Bug 1428922 - Part 0: Add an EXPIRE_POLICY expire type to nsPermissionManager, r=baku
MozReview-Commit-ID: JJm7g2GSIjT
2018-01-24 01:07:10 -02:00
Tom Schuster 37c5443f1e Bug 1283427 - Remove SEC_NORMAL completely. r=ckerschb
--HG--
extra : rebase_source : 09099a01a8812a575e455dbd09a04ebe43309e43
extra : histedit_source : 8e0159f9c25fa86e3519b8e17b8ad9924e0351ad
2018-01-22 16:35:01 +01:00
Tom Schuster 20c26f512e Bug 1283427 - Remove SEC_NORMAL from NetUtil.newChannel. r=ckerschb
--HG--
extra : rebase_source : fb1d82a6a6b3ad0d9d4e9a8ed3bb4da762d55a97
extra : histedit_source : a975038b29b871ffe77ee4353a9bcdee2f73ee5b
2018-01-20 17:32:18 +01:00
Ben Kelly 322046c942 Bug 1231211 P12 Allow the ClientInfo and ServiceWorkerDescriptor to be passed to NS_NewChannel() for principal based loads. r=valentin 2018-01-23 10:38:54 -05:00
Ben Kelly 2dc82400a7 Bug 1231211 P7 Pass the nsIChannel to ShouldPrepareForIntercept(). r=asuth 2018-01-23 10:38:53 -05:00
Ben Kelly 1e076dddea Bug 1231211 P6 Automatically set the controller on the LoadInfo for subresource requests. r=asuth 2018-01-23 10:38:52 -05:00
Ben Kelly 9225189e3a Bug 1231211 P3 Serialize LoadInfo's mClientInfo, mReservedClientInfo, and mReservedClientInfo members across IPC. r=valentin 2018-01-23 10:38:52 -05:00
Ben Kelly 8e535f8460 Bug 1231211 P2 Pass the controller ServiceWorkerDescriptor on the channel LoadInfo and back in PHttpChannel's OnStartRequest message. r=valentin 2018-01-23 10:38:52 -05:00
Ben Kelly 8d4bfc7c66 Bug 1231211 P1 Allow docshell reload state to be set on LoadInfo. r=valentin 2018-01-23 10:38:51 -05:00
Valentin Gosu a48c8f1ada Bug 1431760 - Add NS_MutateURI.Apply that allows calling methods declared in other interfaces implemented by NS_MutateURI::mMutator r=mayhemer
* The method can be chained just as the other methods on NS_MutateURI.
* In case the mutator object does not implement the interface, mStatus will be set to an error code.
* This is useful when you are constructing a new URI and the type of the mutator is known. I expect a future patch will add a MaybeApply method, that does not set mStatus to an error code if the mutator does not implement the interface.
* This patch changes nsHostObjectProtocolHandler::NewURI to use the new method and avoid a static_cast<nsHostObjectURI*>(uri)


MozReview-Commit-ID: 9kvXJX54gUP

--HG--
extra : rebase_source : 2a27778ec583251fac26c74d78125bd7266d6d87
2018-01-22 15:52:37 +01:00
Luke Crouch 111ae8a75d Bug 587523 - rename referer.userControlPolicy to referer.defaultPolicy r=valentin
MozReview-Commit-ID: A2hkYfdTCR9

--HG--
extra : rebase_source : 6d3775da80338b66eee44f13ba177f29933dd114
2018-01-10 16:51:10 -06:00
Luke Crouch 878706a5f8 Bug 587523 - strict-origin-when-cross-origin referer policy in pbmode r=valentin
Adds new network.http.referer.defaultPolicy.pbmode pref which defaults to 2.

When setting referrer from default policy, checks mLoadInfo OriginAttributes
for mPrivateBrowsingId > 0 to detect PBM.

MozReview-Commit-ID: 7SfNk0dO1rW

--HG--
extra : rebase_source : a050a61cad005740edde99f846a69c6a7568dbc6
2018-01-10 16:33:52 -06:00
Gurzau Raul b7e3ec2468 Merge inbound to mozilla-central. a=merge 2018-01-20 11:38:58 +02:00
Andrea Marchesini 7aba2c3fd5 Bug 1430931 - mark nsIArrayBufferInputStream as thread-safe, r=smaug 2018-01-19 13:31:18 +01:00
Dragana Damjanovic dd.mozilla@gmail.com da357cb9bc Bug 1430768 - Refine TFO telemetry. r=mcmanus 2018-01-17 06:47:00 +02:00
Valentin Gosu ea4e6b68ff Bug 1431204 - Make nsIURI.spec readonly r=mayhemer
MozReview-Commit-ID: 1l1CBUotIPh

--HG--
extra : rebase_source : 92af70ad412719d93222551b658f313cefd85e75
2018-01-19 15:26:07 +01:00
Valentin Gosu da90b10e9f Bug 1431204 - Change calls to nsIURI.spec setter to use nsIURIMutator instead r=mayhemer
* changes call to use nsIURIMutator.setSpec()
* Add new NS_MutateURI constructor that takes new Mutator object
* Make nsSimpleNestedURI::Mutate() and nsNestedAboutURI::Mutate() return mutable URIs
* Make the finalizers for nsSimpleNestedURI and nsNestedAboutURI make the returned URIs immutable

MozReview-Commit-ID: 1kcv6zMxnv7

--HG--
extra : rebase_source : 99b13e9dbc8eaaa9615843b05e1539e19b527504
2018-01-19 15:19:42 +01:00
Prathiksha 29c497c760 Bug 1376235 - Change PermissionAvaliable to PermissionAvailable. r=johannh
MozReview-Commit-ID: JDrybb3WDlP

--HG--
extra : rebase_source : 260e5bb4d1400aff68f7bc6c30d7bcab8e0b0307
2018-01-17 15:57:48 +05:30
Dragana Damjanovic ef300e6ca6 Bug 1426408 - Remove some code for the TCP fast open for Windows 10 that is not neede any more. r=mayhemer
--HG--
extra : rebase_source : 8ab4fbe254eaaca0595cfbcd6ba527810ecc5102
2017-12-20 08:39:00 +02:00
Gijs Kruitbosch da58d0a580 Bug 1430237 - remove newSimpleNestedURI from nsINetUtil, r=mayhemer
MozReview-Commit-ID: 74RsNo60Kfh

--HG--
extra : rebase_source : ba3288d4bf71c5c1643cf19993fa6cbcd8f72e8f
2018-01-15 11:51:24 +00:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Kris Maglione a75561bd62 Bug 1412726: Clean up XPCOM singleton constructor refcount handling. r=froydnj
This is a follow-up to bug 1409249. There are a lot of places where our
factory singleton constructors either don't correctly handle their returned
references being released by the component manager, or do handle it, but in
ways that are not obvious.

This patch handles a few places where we can sometimes wind up with dangling
singleton pointers, adds some explanatory comments and sanity check
assertions, and replaces some uses of manual refcounting with StaticRefPtr and
ClearOnShutdown.

There are still some places where we may wind up with odd behavior if the
first QI for a getService call fails. In those cases, we wind up destroying
the first instance of a service that we create, and re-creating a new one
later.

MozReview-Commit-ID: ANYndvd7aZx

--HG--
extra : rebase_source : acfb0611a028fef6b9387eb5d1d9e285782fbc7c
2017-10-29 16:02:40 -07:00
Andrew Sutherland 6684613c61 Bug 1416879 - Part 2: Allow for diversion cancellation and trigger for intercepted channels. r=bkelly, r=mayhemer
The diversion mechanism never expected to be dealing with data sourced
from the content process, but that's exactly what happens with
ServiceWorker-intercepted channels with the current child-intercept
situation (which is being fixed).

In order to allow timely cancellation of diverted intercepted
channels, there needs to be a way to relay to the HttpChannelChild
that it needs to be canceled so that the synthesized pump can be
canceled and diversion can be marked as complete.  This patch adds
such a mechanism to ADivertableParentChannel and PHttpChannel for the
exclusive use of InterceptedHttpChannel and then uses it.

--HG--
extra : rebase_source : db71e927bd1837c6a67f6d56df52cfbb7294df73
extra : source : d156f6b687e1cd8717bf813ab1b944e87b67ed5d
2018-01-04 18:38:07 -05:00
Ciure Andrei f7400ad72e Merge inbound to mozilla-central r=merge a=merge 2018-01-11 11:54:56 +02:00
Kate McKinley e97980a95e Bug 1424917 - Remove support for HSTS Priming. r=mayhemer, r=ckerschb
This patch removes support and tests for HSTS priming from the tree.
2018-01-10 11:07:00 -05:00
Andrew Swan 63c732760f Bug 1396399 - Clarify rules for applying activeTab permission to content scripts. r=kmag, r=bz
MozReview-Commit-ID: 9xPDX8Qk2iR
2017-11-04 21:06:20 -07:00
Dragana Damjanovic 205fa0bf38 Bug 1429106 - Fix TFO telemetry. r=nwgh 2018-01-10 12:39:55 +01:00
Bogdan Tara cd1c3cc5dd Merge mozilla-central to autoland, r=merge a=merge on a CLOSED TREE 2018-01-09 00:16:46 +02:00
Honza Bambas d53e911aed Bug 1425301 - Progressively decrease the 6 seconds maximum quantum delay of tracker script tailing, r=dragana 2018-01-08 06:01:00 +02:00
Brindusan Cristian f42618c99d Backed out 6 changesets (bug 1416879) for bc permafailures on windows on browser_multie10s_update.js r=backout a=backout
Backed out changeset 840a6e04bcea (bug 1416879)
Backed out changeset 994dc643a2ab (bug 1416879)
Backed out changeset 8e4fd74e7f5e (bug 1416879)
Backed out changeset 5453b8a58f0c (bug 1416879)
Backed out changeset d156f6b687e1 (bug 1416879)
Backed out changeset 714d3942fb10 (bug 1416879)
2018-01-07 11:55:44 +02:00
Andrew Sutherland 5272d9c40a Bug 1416879 - Part 2: Allow for diversion cancellation and trigger for intercepted channels. r=bkelly, r=mayhemer
The diversion mechanism never expected to be dealing with data sourced
from the content process, but that's exactly what happens with
ServiceWorker-intercepted channels with the current child-intercept
situation (which is being fixed).

In order to allow timely cancellation of diverted intercepted
channels, there needs to be a way to relay to the HttpChannelChild
that it needs to be canceled so that the synthesized pump can be
canceled and diversion can be marked as complete.  This patch adds
such a mechanism to ADivertableParentChannel and PHttpChannel for the
exclusive use of InterceptedHttpChannel and then uses it.

--HG--
extra : rebase_source : 59d3aa5e541d2a404c6320ae9fce03e7c9cd8b81
2018-01-04 18:38:07 -05:00
Valentin Gosu 0203cc4abd Bug 1426501 - Change C++ code to use NS_MutateURI when changing URI r=mayhemer
MozReview-Commit-ID: 4VzZlhWrtSJ

--HG--
extra : rebase_source : 9c872dc14c8e5f03e6354ab76c8bf750a7e10260
2018-01-08 15:20:35 +01:00
Valentin Gosu 7b63575817 Bug 1426501 - Change nsIURIMutator to call set spec on cloned URI if available r=mayhemer
Calling SetSpec on an nsIURI object doesn't reinitialize the object, meaning
it's not equivalent with creating a new URI with the same spec. While this
might be counter-intuitive we want to preserve existing behaviour for
the moment.
This change makes BaseURIMutator::InitFromSpec call SetSpec on the existing
cloned URI if available. Otherwise it creates a new one.

MozReview-Commit-ID: LuHVRhBItiP

--HG--
extra : rebase_source : fc7b64d01adcb7f2ac5bbd9cfc16dadb3c4939c9
2018-01-08 11:23:59 +01:00
Valentin Gosu b2e06a6d9b Bug 1426501 - Add nsINetUtil.notImplemented() method that always throws r=mayhemer
MozReview-Commit-ID: Ij3M5Ydtlac

--HG--
extra : rebase_source : f95ea333bad7eeacf7fd753028ac4ead18e70eef
2018-01-08 11:23:53 +01:00
Kershaw Chang 73d9823e67 Bug 1413999 Part2: Take http trailers from chunk decoder and add serverTiming attribute in nsITimedChannel r=dragana
This patch includes:
1. Save http trailers in the header array in chunk decoder.
2. Take trailers from chunk decoder in OnStopRequest().
3. Add serverTiming attribute in nsITimedChannel.
4. Parse server timing header when GetServerTiming() is called.

--HG--
extra : rebase_source : 77c92b8a31d3d7eebb33aea266888f944af33327
2018-01-03 02:04:00 +02:00
Andrea Marchesini a5bdaa8cf2 Bug 1421678 - Get rid of nsFileInputStream::Tell warning message when nsFileInputStream is destroyed, r=qdot 2018-01-03 14:02:43 +01:00
Masatoshi Kimura 8b05ff3704 Bug 1427023 - Remove nsCRT::strncmp. r=erahm 2018-01-09 23:49:37 +09:00
Eden Chuang 3fd3115e94 Bug 1423623 - Add telemetry for alternate data stream on service worker synthesized channels. r=bkelly, data-r=francois
1. Create a new telemetry scalar SW_ALTERNATIVE_BODY_USED_COUNT to count the
       number of the alternative body used in service worker synthesized channels.

    2. To report values of fetching related time of InterceptChannel according to
       the detail subresource type. Now subresource/script, subresource/other,
       subresource/image and subresource/stylesheet are provided, and keep using
       subresource for other types.
2017-12-15 14:35:44 +08:00
Ben Kelly 7c2e00408e Bug 1426253 P2 Use nsIDocument::GetClientInfo() where possible. r=asuth 2017-12-20 10:53:18 -05:00
Dragana Damjanovic 266c2b2aea Bug 1402879 - Make small changes to TFO: telemetry and use of backup socket that already has started. r-mcmanus 2017-12-20 15:40:07 +01:00
Michal Novotny 32a0630b56 Bug 1418752 - Firefox instahang on start after landing patch from bug #1392841.vr=honzab
Initialize in advance all security services whose initialization on background thread could cause a deadlock.

--HG--
extra : rebase_source : 399f9acf736f9a06665d45a71b354076c1b85fa6
2017-12-19 21:08:15 -05:00
Valentin Gosu 95aa8cfbb3 Bug 1425318 - Add MOZ_MUST_USE to methods in nsIURIMutator.idl r=mayhemer
* adds MOZ_MUST_USE to C++ methods and [must_use] to idl interfaces
* Rearranges the code so it's more readable, and it fits within 80 chars
* Fixes indentation in BaseURIMutator

MozReview-Commit-ID: 3vG5eVaOC9U

--HG--
extra : rebase_source : df3b1120ba71a83adb41852e9003ef08af98b662
2017-12-19 02:16:36 +01:00
Valentin Gosu 7ec2fb5907 Bug 1425318 - The second call to NS_MutateURI.Finalize should fail r=mayhemer
MozReview-Commit-ID: 4U2XsftU2sy

--HG--
extra : rebase_source : c63e014b862e7c2726c940934b06de33c6d45a2c
2017-12-19 02:06:45 +01:00
Valentin Gosu ad95b9773a Bug 1425318 - Allow calling NS_MutateURI.Finalize(nsIURI**) r=mayhemer
MozReview-Commit-ID: Hz4CfDDS1FI

--HG--
extra : rebase_source : 2e67a8763cd286b81f903490f959d491d2e3010b
2017-12-19 02:04:40 +01:00
Ben Kelly 909001ec5a Bug 1424754 Fix some corner cases in PartiallySeekableInputStream cloning and serialization. r=baku 2017-12-13 09:56:31 -05:00
Andrea Marchesini 5f1be317f0 Bug 1421094 - nsIUploadChannel2.cloneUploadStream returns the length of the stream, r=smaug 2017-12-12 18:38:19 -06:00
Andrea Marchesini da0a8f053e Bug 1421094 - Make nsBufferedStream cloneable, r=smaug 2017-12-12 18:38:19 -06:00
Andrea Marchesini b32bea6044 Bug 1424809 - Get rid of NS_NewPostDataStream, r=valentin 2017-12-12 06:01:17 -06:00
Valentin Gosu d9e085b9ec Bug 1423961 - Improve NS_MutateURI.Finalize by passing reference to nsCOMPtr instead nsIURI** r=mayhemer
MozReview-Commit-ID: 6VRhNJF3f0U

--HG--
extra : rebase_source : 01bf82ace5cfbf81fdf095cd76c5d98a2ce03245
2017-12-08 17:37:41 +01:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Eric Rahm 07c97a5afe Bug 1423773 - Part 1: Remove usage of nsStringGlue.h. r=glandium
This removes an unnecessary level of indirection by replacing all
nsStringGlue.h instances with just nsString.h.

--HG--
extra : rebase_source : 340989240af4018f3ebfd92826ae11b0cb46d019
2017-12-06 16:52:51 -08:00
Michal Novotny f9dafdd5cd Bug 1418854 - Race condition in AutoClose. r=honzab
--HG--
extra : amend_source : dc474202125cfd2f00c769d0266cc0fc76b9ac94
2017-12-06 20:48:06 -05:00
Dorel Luca 1208bc03a7 Merge mozilla-central to autoland r=merge on a CLOSED TREE
--HG--
extra : rebase_source : 5f22b0e83fd5f1b28e0c1ebbcc429c332835eb36
2017-12-07 00:27:29 +02:00
Tarek Ziadé 8d44fcec74 Bug 1415536 - Extend NotifyNetworkActivity to get sent/received bytes r=baku,valentin
MozReview-Commit-ID: Afdvz0lktY8

--HG--
extra : rebase_source : 050a3d3322397a581a2ada507f011424e066311f
2017-11-23 09:37:54 +01:00
Gurzau Raul f5f1c3f294 Merge inbound to mozilla-central r=merge a=merge 2017-12-06 11:53:55 +02:00
Ben Kelly dc20c8c537 Bug 1423412 P2 Copy the service worker controller across redirects by default and clear it explicitly for non-subresource redirects. r=baku 2017-12-05 20:45:23 -05:00
Valentin Gosu efadeeed26 Bug 1420954 - Add NS_MutateURI helper function to chain nsIURIMutator setters in C++ r=bagder
MozReview-Commit-ID: 79NlOm08ebz

--HG--
extra : rebase_source : ba9b5cde71ce851762db2704b0142552ef75e9d3
2017-12-05 17:17:02 +01:00
Valentin Gosu 5a83d2bc0b Bug 1420954 - Make nsIURIMutator setters return nsIURIMutator so we can chain setters r=bagder
MozReview-Commit-ID: 53BD91hB2yi

--HG--
extra : rebase_source : 3c4f5b9ad8820353ae108b982026048dbf599d95
2017-12-05 02:35:21 +01:00
Eden Chuang 2f08862cf1 Bug 1350359 - Part 3: Place the alternative data to the InterceptedChannel. r=bkelly 2017-12-04 14:39:21 +08:00
Eden Chuang 7211e8c25c Bug 1350359 - Part 1: Set alternative data type from InterceptedChannel to InternalRequest. r=bkelly 2017-12-04 14:39:10 +08:00
Tiberius Oros be4fc858c5 Merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-12-06 12:35:04 +02:00
Jonathan Watt b02fcd6df0 Bug 1180145, part 1 - Add a 'reportResourceTiming' member to the nsITimedChannel interface. r=mayhemer
MozReview-Commit-ID: 3poTmHWKs4K
2017-11-07 15:58:31 +00:00
Francois Marier 1e487450bd Bug 1421803 - Send ThreatHit requests and telemetry at the right time. r=dimi
The ThreatHit requests were never being sent because SetMatchedInfo() was
called on the channel _after_ calling SendThreatHitReport().

Additionally, the telemetry was sent in OnStartRequest() and so errors
returned in OnStopRequest() would not be caught.

This patch also includes some improvements to the logging of these
requests which can be toggled using:

    MOZ_LOG="UrlClassifierDbService:5,nsChannelClassifier:5"

MozReview-Commit-ID: 9dtRgEPVS3g

--HG--
extra : rebase_source : 6d0e4b745e203a54489ddd479935d008ab9a82d7
2017-11-28 12:10:37 -08:00
Bharat Raghunathan 6c19d68c0e Bug 1422648 - Removed instances of nsSocketTransport::mNetAddrPreResolved r=valentin
MozReview-Commit-ID: 2qJ1l7KJKK2

--HG--
extra : rebase_source : 829aad4ada7abe27b3656bf1a90c507e8e31fa9d
2017-12-04 10:35:38 +05:30
Liang-Heng Chen a2b5ec45e8 Bug 1421793 - nsPACMan needs to be shutdown before dtor; r=schien
MozReview-Commit-ID: D2aKTC8s9MQ

--HG--
extra : rebase_source : e1442aebd9bd5f6e155ba4e33a9b30a97b3427e3
2017-12-01 15:10:36 +08:00
shindli 7ba06ee564 Backed out 2 changesets (bug 1420954) for build failure in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsIURIMutator.h:340:3: r=backout on a CLOSED TREE
Backed out changeset 8ce0a0d49d9e (bug 1420954)
Backed out changeset 480c6e1721e9 (bug 1420954)
2017-12-03 01:10:14 +02:00
Valentin Gosu 936a9adfc0 Bug 1420954 - Add NS_MutateURI helper function to chain nsIURIMutator setters in C++ r=bagder
MozReview-Commit-ID: 79NlOm08ebz

--HG--
extra : rebase_source : 2cb95ec86bd9dadbbaf233e6289bcb9d3087cd65
2017-12-02 23:15:55 +01:00
Valentin Gosu f903a38639 Bug 1420954 - Make nsIURIMutator setters return nsIURIMutator so we can chain setters r=bagder
MozReview-Commit-ID: 53BD91hB2yi

--HG--
extra : rebase_source : 45594a92e1a9f18f2f4b5bb2824b5f8ced584eab
2017-12-02 23:09:34 +01:00
Valentin Gosu d093ecbe77 Bug 1422277 - Add an observer notification for when the captive portal detection is "done" r=bagder
MozReview-Commit-ID: D9Qr0CuUJiQ

--HG--
extra : rebase_source : 74ecc449bee263d27af83fa101e6ef59166fecab
2017-12-01 13:20:29 +01:00
Tom Tung c24bbe2dc8 Bug 1222008 - P7: Freeze the tainting if a service worker responds with a synthesize response. r=bkelly
--HG--
extra : rebase_source : ef1d3b00654e57ae7b173eb39e4a574af566c769
2017-11-03 15:37:35 +08:00
Tom Tung afa535333a Bug 1222008 - P1: Propagate the URLs from respondWith() if the response's URL is different from the request's. r=bkelly
--HG--
extra : rebase_source : 97bc74f18e734673ab598925410c8b284c4aaba8
2017-11-01 15:45:35 +08:00
Andrea Marchesini 4ce4e2950f Bug 1421772 - Updating comments for nsInputStreamPump::OnStateStop, r=valentin
This patch removes also the assertion that makes OnStateStop to be executed on
main-thread only.
2017-11-30 09:28:13 +01:00
Brindusan Cristian 9f3bd430c2 Merge inbound to mozilla-central a=merge r=merge 2017-11-28 11:50:57 +02:00
Dragana Damjanovic 3de66b952d Bug 1404069 - Revert bug 1363372. r=mayhemer 2017-11-27 21:12:31 +01:00
Valentin Gosu e6c466fb06 Bug 1418810 - Use fallible assign to prevent OOM. r=mayhemer
MozReview-Commit-ID: LU1RbkUIBZz
2017-11-21 20:36:01 +01:00
Kris Maglione 7cdbab4b1e Bug 1415352: Part 5b - Use the last component principal as principal to inherit for data: URLs. r=bz,krizsa
The logic for choosing the principal here was originally written before
loadInfo had a separate principalToInherit field, and we needed to specify it
via the triggeringPrincipal instead. At that point, we had to choose a
component principal with permission to load the URI at the start of the
request.

However, now that we have a separate field for the principal to inherit, it's
only needed after access checks have passed and we know that we have a URI
which inherits a principal. In that case, the current logic causes us to
always inherit the first principal in the whitelist (which is the page
principal) for URIs (such as data: URIs) that always inherit, where we really
want to inherit the last (which is the extension principal).

MozReview-Commit-ID: EPoUNuOCwrH

--HG--
extra : rebase_source : 535083e3dd4598ac4e8ea187d27d61ac2ac48476
2017-11-22 14:20:26 -08:00
Andrea Marchesini 442a9cd5f0 Bug 1419382 - Moving ownership of nsIInputStream when using netUtil functions - part 4 - Get rid of NS_NewAsyncStreamCopier, r=smaug 2017-11-22 11:19:25 +01:00
Andrea Marchesini 1fd1731f81 Bug 1419382 - Moving ownership of nsIInputStream when using netUtil functions - part 3 - NS_NewInputStreamPump, r=smaug 2017-11-22 11:18:57 +01:00
Andrea Marchesini ad64933e5a Bug 1419382 - Moving ownership of nsIInputStream when using netUtil functions - part 2 - NS_NewInputStreamChannel, r=smaug 2017-11-22 11:18:36 +01:00
Andrea Marchesini 8a7dedba69 Bug 1419382 - Moving ownership of nsIInputStream when using netUtil functions - part 1 - NS_NewInputStreamChannelInternal, r=smaug 2017-11-22 11:18:18 +01:00
Coroiu Cristina 9eb4f34b0a Merge mozilla-central to inbound. r=merge a=merge on a CLOSED TREE 2017-11-22 01:50:20 +02:00
Valentin Gosu d2d8524673 Bug 1415205 - Add nsIURIMutator impls for all objects implementing nsIURI r=bagder
This also changes URIUtils.cpp:DeserializeURI() to use the mutator to instantiate new URIs, instead of using their default constructor.

MozReview-Commit-ID: JQOvIquuQAP

--HG--
extra : rebase_source : e146624c5ae423f7f69a738aaaafaa55dd0940d9
2017-11-20 17:11:30 +01:00
Valentin Gosu d935b3968a Bug 1415205 - Add nsIURIMutator interface and nsIURI.mutate() r=bagder
MozReview-Commit-ID: 8TYtcLUGRPc

--HG--
extra : rebase_source : 7deeb367424056f3e86bf42e77326bf1414a809a
2017-11-20 16:10:03 +01:00
Ben Kelly 64bf82ebd8 Bug 1419536 P5 Set ClientInfo on the LoadInfo for document owned network requests. r=baku 2017-11-21 15:13:05 -05:00
Andrea Marchesini 03a9493409 Bug 1417448 - Better use of monitors in NS_ReadInputStreamToBuffer, r=smaug 2017-11-20 15:18:26 +01:00
Jan de Mooij 7f30bf48a7 Bug 1417844 part 2 - Remove JSVersion from CompileOptions, CompartmentBehaviors, scripts. r=evilpie 2017-11-17 12:12:39 +01:00
Florian Quèze b44b6a963a Bug 1405670 - remove support for NS_APP_SEARCH_DIR_LIST and NS_APP_SEARCH_DIR from the directory service, r=adw. 2017-11-17 12:05:20 +01:00
Ben Kelly 156cd8dec2 Bug 1418007 P1 Allow the reserved/initial/source client data and service worker to be marked on LoadInfo. r=baku r=valentin 2017-11-16 13:15:09 -05:00
Brindusan Cristian d0a4ab96a0 Merge inbound to mozilla-central r=merge a=merge 2017-11-16 00:24:15 +02:00
Valentin Gosu a77a5282f4 Bug 1416343 - Mark URI interfaces as [builtinclass] r=bagder
MozReview-Commit-ID: 4T0uCkHP1a6

--HG--
extra : rebase_source : fa720f35df16985bcd929a98aeeaf9fbc759c1e6
2017-11-15 13:34:23 +01:00
Margareta Eliza Balazs 3edf7872fb Backed out changeset cfe4b1e6be9b (bug 1416343) for ESlint failing in modules/test/browser/browser_SitePermissions_tab_urls.js:38:14 r=backout on a CLOSED TREE 2017-11-15 13:46:07 +02:00
Valentin Gosu ba207f8c8c Bug 1416343 - Mark URI interfaces as [builtinclass] r=bagder
MozReview-Commit-ID: 4T0uCkHP1a6

--HG--
extra : rebase_source : 89c283360bc0b30aad34641b4cdce8f5c49615b3
2017-11-13 20:18:46 +01:00
Andrea Marchesini ed78be27fa Bug 1416724 - part 4 - AbstractThread::Dispatch return value check in netwerk/base, r=smaug 2017-11-15 07:58:03 +01:00
shindli 385fb3428c Backed out 4 changesets (bug 1416724) for failing /builds/worker/workspace/build/src/dom/media/hls/HLSDemuxer.cpp:89:5 r=backout on a CLOSED TREE
Backed out changeset 45352aa4319d (bug 1416724)
Backed out changeset 01d1e5263bcd (bug 1416724)
Backed out changeset bc854c315ec8 (bug 1416724)
Backed out changeset 35a50167485d (bug 1416724)
2017-11-15 09:49:04 +02:00
Andrea Marchesini 4432192149 Bug 1416724 - part 4 - AbstractThread::Dispatch return value check in netwerk/base, r=smaug 2017-11-15 07:58:03 +01:00
Chris Peterson feb58d9d37 Bug 1416164 - Replace NS_NOTYETIMPLEMENTED with MOZ_ASSERT_UNREACHABLE. r=froydnj
MozReview-Commit-ID: B5TZB3v52wY

--HG--
extra : rebase_source : 56bef4eead24901191f190e31d2841710097cdcf
2017-10-25 00:37:02 -07:00
Geoff Brown cbb956e0c3 Bug 1407679 - Merge nsIIOService and nsIIOService2; r=nwgh 2017-11-10 07:03:36 -07:00
Noemi Erli 6ec796c190 Backed out changeset e8f2d18830de (bug 1415536) for failing xpcshell netwerk/test/unit/test_network_activity.js at least on Android r=backout on a CLOSED TREE 2017-12-05 12:18:33 +02:00
Tarek Ziadé 8ecfc87eb1 Bug 1415536 - Extend NotifyNetworkActivity to get sent/received bytes r=baku,valentin
MozReview-Commit-ID: Afdvz0lktY8

--HG--
extra : rebase_source : 900d807ec9a9f5305c07947ced00a6f68192ed9d
2017-11-23 09:37:54 +01:00
Andrea Marchesini b71cdc9eb5 Bug 1415081 - part 0 - NS_ReadInputStreamToString must support nsIAsyncInputStream, r=smaug 2017-11-09 11:18:08 +01:00
Johann Hofmann d28b4dd837 Bug 1374574 - Remove the FlyWeb service and DOM interfaces. r=bz,djvj
MozReview-Commit-ID: 4hp9pLbMh4R

--HG--
extra : rebase_source : 82f417640211ede4fd7aa290c1f2609b07f38025
2017-11-22 15:00:10 +01:00
Sebastian Hengst e3806002a1 merge mozilla-central to mozilla-inbound. r=merge a=merge on a CLOSED TREE 2017-11-09 00:32:30 +02:00
Christoph Kerschbaumer 6584da597b Bug 1407891: Allow view-image to open a data: URI by setting a flag on the loadinfo. r=bz 2017-11-08 20:01:41 +01:00
Valentin Gosu 132162d150 Bug 1415206 - Remove RustURL from Gecko r=bagder
This class isn't being used right now, and MozURL is a much better alternative if interaction with rust URLs is required.

MozReview-Commit-ID: ADdYRrrTnr6

--HG--
extra : rebase_source : b36aa26c20e7daaadab1f3360bab0ed4681eb7f8
2017-11-07 17:11:08 +01:00
Kris Maglione 27c96362b9 Bug 1412345: Downgrade expanded principals before inheriting. r=bz,krizsa
There are several ways that expanded principals can be used as triggering
principals for requests. While that works fine for security checks, it also
sometimes causes them to be inherited, and used as result principals in
contexts where expanded principals aren't allowed.

This patch changes our inheritance behavior so that expanded principals are
downgraded to the most appropriate constituent principal when they would
otherwise be inherited.

The logic for choosing the most appropriate principal is a bit suspect, and
may eventually need to be changed to always select the last whitelist
principal, but I chose it to preserve the current principal downgrade behavior
used by XMLHttpRequest for the time being.

MozReview-Commit-ID: 9fvAKr2e2fa

--HG--
extra : rebase_source : c30df1b3851c11fed5a1d6a7fb158cec14933182
2017-11-02 19:56:27 -07:00
Christoph Kerschbaumer 3d0a1f002e Bug 1403814 - Block toplevel data: URI navigations only if openend in the browser. r=smaug 2017-11-03 13:23:11 +01:00
Andrea Marchesini eb54ec6bb0 Bug 1413901 - Move rust-url-capi.h include in the MozURL.cpp, r=valentin 2017-11-02 19:14:41 +01:00
Andrea Marchesini cb5eb53200 Bug 1412497 - nsBufferedInputStream should call the nsIInputStreamCallback when closed, r=smaug 2017-11-02 11:26:35 +01:00
Nicholas Nethercote 9252435548 Bug 1410794 (attempt 2) - Change some |string| occurrences in nsIPrefBranch.idl to |ACString|. r=erahm.
This makes the code nicer. In particular, it removes many getter_Copies()
calls. The patch also converts a lot of nsCStrings to nsAutoCString, which will
avoid heap allocation in the common case.

The patch also renames PREF_CopyCharPref() as PREF_GetCStringPref(), because
it's actually getting a string, not a char, and that matches the existing
GetCString() and GetDefaultCString() methods. Correspondingly, it also renames
PREF_SetCharPref() as PREF_SetCStringPref().

The |aPrefName| arguments in nsIPrefBranch.idl remain as |string| because they
almost always involve passing in C string literals, and passing "foo" is much
nicer than passing NS_LITERAL_CSTRING("foo").

It's worth noting that early versions of this patch used |AUTF8String| instead
of |ACString|. But it turns out that libpref stores prefs internally as Latin1.
And |ACString| is compatible with Latin1 but |AUTF8String| isn't, because
non-ASCII Latin1 strings are not valid UTF-8!

MozReview-Commit-ID: D3f7a1Vl1oE

--HG--
extra : rebase_source : e6e4b15d6d210cfd93686f96400281f02bd1d06b
2017-10-27 10:30:33 +11:00
Jorg K e4e37ae9d0 Bug 1412497 - fix test for buffered input stream. r=baku 2017-10-29 08:59:26 +01:00
Andrea Marchesini 49ab2e14c3 Bug 1411939 - nsInputStreamPump should avoid the use of nsIAsyncInputStream and nsIBufferedInputStream at the same time, r=smaug 2017-10-27 09:05:48 +02:00
Sebastian Hengst b181c484ad merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: LcCWQzgwIBi
2017-10-26 23:57:40 +02:00
Kris Maglione 257d9118dc Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj
Right now, NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR expects singleton
constructors to return already-addrefed raw pointers, and while it accepts
constructors that return already_AddRefed, most existing don't do so.

Meanwhile, the convention elsewhere is that a raw pointer return value is
owned by the callee, and that the caller needs to addref it if it wants to
keep its own reference to it.

The difference in convention makes it easy to leak (I've definitely caused
more than one shutdown leak this way), so it would be better if we required
the singleton getters to return an explicit already_AddRefed, which would
behave the same for all callers.


This also cleans up several singleton constructors that left a dangling
pointer to their singletons when their initialization methods failed, when
they released their references without clearing their global raw pointers.

MozReview-Commit-ID: 9peyG4pRYcr

--HG--
extra : rebase_source : 2f5bd89c17cb554541be38444672a827c1392f3f
2017-10-16 21:08:42 -07:00
Valentin Gosu 1f08f89c63 Bug 1411932 - rusturl_get_path should not depend on cannot-be-a-base r=baku
MozReview-Commit-ID: 7iwBooZWNxW

--HG--
extra : rebase_source : b6622e1c4270629f44f0d263847c47bc06ffb60f
2017-10-26 14:46:25 +02:00
Sebastian Hengst 443416f881 Merge mozilla-central to autoland. r=merge a=merge 2017-10-26 00:39:55 +02:00
Valentin Gosu 6814810f38 Bug 1409405 - Implement MozURL::GetOrigin r=mayhemer
MozReview-Commit-ID: H1X0dAOyij1

--HG--
extra : rebase_source : f47595f7a3beed55f68c6a6a27f5a78d1ab3da5b
2017-10-25 18:03:05 +02:00
Valentin Gosu cd4a91befe Bug 1410063 - Implement MozURL::GetHostPort/SetHostPort r=mayhemer
MozReview-Commit-ID: 2wXsvmHf60

--HG--
extra : rebase_source : bdadc78db1cb135a65cfae0ae39b6073c962b85e
2017-10-25 17:35:47 +02:00
Sebastian Hengst 24b7b2eb7c merge mozilla-central to autoland. r=merge a=merge 2017-10-24 23:59:14 +02:00
Alex Gaynor 4374c58da3 Bug 1411255 - Fixed unnecessary mut warning; r=valentin
MozReview-Commit-ID: 9MDk0LlA6uR

--HG--
extra : rebase_source : bc5dac8e99d26dbec2385ad781026df75992206e
2017-10-24 09:42:28 -04:00
Sebastian Hengst ec34b16044 Backed out changeset 6c4818576443 (bug 870460) for failing many xpcshell tests, e.g. extensions/cookie/test/unit/test_cookies_async_failure.js. r=backout
--HG--
extra : amend_source : e5bb4ef1b68ae382c6457f77077f33174518efd1
2017-10-24 16:48:17 +02:00
Nicholas Hurley 846734c853 Bug 1409542 part 2 - telemetry on why a resource marked prefetchable is not prefetched. r=francois,valentin
MozReview-Commit-ID: AFJnbTjU5Ju

--HG--
extra : rebase_source : 6207e04a5b3ea932ddc87ad9c0830ea1633ac39a
2017-10-20 12:58:30 -07:00
Nicholas Hurley 1790ba950b Bug 1409542 part 1 - telemetry on why a resource is marked prefetchable or not. r=francois,valentin
MozReview-Commit-ID: IdSyFv8RSbY

--HG--
extra : rebase_source : cdcf6456ff5ed8f895942e3a7bf92b6c04b63cf4
2017-10-17 14:46:56 -07:00
Sebastian Hengst 1ead0a96a9 Backed out changeset dab1c5badddb (bug 1407679) for failing server startup in mochitests on Android. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 3dc4cb2bbaf55f3f6329687ce64d4e862fc3800b
2017-10-24 21:18:26 +02:00
Valentin Gosu 9dd47ebf50 Bug 1407679 - Merge nsIIOService and nsIIOService2 r=nwgh
Removes deprecated nsIIOService2.newChannelFromURIWithProxyFlags

MozReview-Commit-ID: Gr3nA25kcre

--HG--
extra : rebase_source : 3407b5ed0f8f7067523abee28c137db3cac86b14
2017-10-20 16:41:07 +02:00
Gregory Szorc 42583ae0bc Bug 1403213 - Update another reference to nsstring; r=mystor
MozReview-Commit-ID: 4iVvbKi0LlL

--HG--
extra : histedit_source : bc561b24e4b5bfdf1100680f59d3d046ec434cb5
2017-10-24 10:52:55 -07:00
Nika Layzell 1b1ba4879a Bug 1403213 - Move nsstring into servo/support/gecko/nsstring, r=froydnj
MozReview-Commit-ID: 8ucStGkxmj7

--HG--
rename : xpcom/rust/nsstring/gtest/Test.cpp => xpcom/rust/gtest/nsstring/Test.cpp
rename : xpcom/rust/nsstring/gtest/test.rs => xpcom/rust/gtest/nsstring/test.rs
extra : rebase_source : 509a2ab1aa569e8f3ef0955dcdfa36b53ce5e234
2017-10-23 15:37:25 -04:00
Sebastian Hengst af53b8aad8 merge mozilla-central to autoland. r=merge a=merge 2017-10-23 23:52:54 +02:00
Sebastian Hengst 364d36fab2 merge mozilla-inbound. r=merge a=merge
MozReview-Commit-ID: B09kHrHK42C
2017-10-23 23:50:37 +02:00
Jeff Hemphill e74e880a6c Bug 1403802: Port nsHttpHandler::PrepareAcceptLanguages over to Rust; r=valentin,froydnj 2017-10-22 11:27:59 -07:00
Sylvestre Ledru 0b4c0acb99 Bug 1410617 - Fix a tiny typo r=andi
MozReview-Commit-ID: CGgerr8S8aR

--HG--
extra : rebase_source : 98a36e18a0bde8fdfa867767cff9e5c1fd6a87d9
2017-10-21 14:07:49 +02:00
Sylvestre Ledru 57797d9b17 Bug 1410617 - compare uint64_t with size_t only on 32bit platforms. r=valentin
MozReview-Commit-ID: GR4lQhyDUJe

--HG--
extra : rebase_source : 66246fe57df38e99402efe5a7cbc9a40150524af
2017-10-21 14:07:08 +02:00
Sebastian Hengst 5d671ee296 Backed out changeset 74c58b336d30 (bug 1403213) for referencing non-existing xpcom/rust/gtest/moz.build in xpcom/moz.build. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 7c25d872785312b81c4a94ef32de025b38642f54
2017-10-20 21:30:36 +02:00
Nika Layzell a4927e2417 Bug 1403213 - Move nsstring into servo/support/gecko/nsstring, r=froydnj
MozReview-Commit-ID: FmKtJxSCdYc
2017-10-20 12:04:30 -07:00
Masatoshi Kimura dbd92543c6 Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj
MozReview-Commit-ID: 7JoD4VYzZp3

--HG--
extra : rebase_source : 5db437f1c34608aa223916874d62b48c59baeae8
2017-10-21 23:53:02 +09:00
Valentin Gosu dfab8e64b8 Bug 1403522 - 'No Proxy For' does not work right if it contains '<local>' only r=bagder
MozReview-Commit-ID: KRW15BxzcN3

--HG--
extra : rebase_source : 47a1b7860c83bc482c7b1e5d4a92401339f19ac5
2017-10-18 16:00:04 +02:00
Andi-Bogdan Postelnicu c9decadfc3 Bug 1410379 - compare uint64_t with size_t only on 32bit platforms. r=valentin
MozReview-Commit-ID: 1exUwUwaY3B

--HG--
extra : rebase_source : 83f199c92e641baa5c44fd65095a87af0528863e
2017-10-20 15:46:28 +03:00
Junior Hsu 51ac771e2d Bug 870460 - Part 1: Let cookie db startup-read off-main-thread. r=nwgh, r=jdm, data-r=francois
--HG--
extra : source : 6c48185764430d35558cf6a0174bc447674e8d58
2017-08-29 18:16:27 +08:00
Junior Hsu 725658c3ff Bug 870460 - Part 1: Let cookie db startup-read off-main-thread. r=nwgh, r=jdm, data-r=francois
--HG--
extra : rebase_source : 9892af8b907e67c8f4e6ee6cbe124b21ee10cc58
2017-08-29 18:16:27 +08:00
Andrea Marchesini ec610d5b7e Bug 1409329 - NS_NewBufferedOutputStream should take the ownership of the outputStream, r=smaug 2017-10-24 14:38:23 +02:00
Andrea Marchesini 6626e900f9 Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug 2017-10-19 11:39:30 +02:00
Nicholas Nethercote 78030c0e7b Bug 1409598 - Change nsIXPCScriptable::className and nsIClassInfo::{contractID,classDescription} from string to AUTF8String. r=froydnj.
This lets us replace moz_xstrdup() of string literals with AssignLiteral(),
among other improvements.

--HG--
extra : rebase_source : 9994d8ccb4f196cf63564b0dac2ae6c4370defb4
2017-10-18 13:17:26 +11:00
Nicholas Hurley 27e579b139 Bug 1409210 - Don't prefetch resources with a Vary header. r=valentin
Conceivably, we could allow a few more prefetches than this would (based
on the headers in the original request matching up to a header listed in
the Vary response header), but this is safer in case (for example)
future requests of this resource end up sending a cookie that wasn't set
on the original request. In practice, the difference is likely to be
small enough that this broader stroke won't make a huge impact on the
number of things we do or don't prefetch.

MozReview-Commit-ID: GhD9mZR6aOX

--HG--
extra : rebase_source : 13a2edb99485c73db902d2ec8b0f2b5b1d437abe
2017-10-16 16:55:46 -07:00
Sebastian Hengst f9b5b9b40c merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 790IXj5MZ4f
2017-10-18 11:48:34 +02:00
Ben Kelly fe79c4da06 Bug 1204254 P12 Remove nsIInterceptedChannel.responseBody and backing nsPipe code. r=asuth 2017-10-17 13:38:55 -07:00
Ben Kelly 827e1b543b Bug 1204254 P7 Allow the body nsIInputStream to be passed in StartSynthesizeResponse(). r=asuth 2017-10-17 13:38:55 -07:00
Ben Kelly 262c2cb4f2 Bug 1204254 P2 Move StartSynthesizedResponse() out from FinishSynthesizedResponse(). r=asuth 2017-10-17 13:38:54 -07:00