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

14887 Коммитов

Автор SHA1 Сообщение Дата
Kershaw Chang 63c003e040 Bug 1343755 - Part 1: Add a helper function in NeckoTargetHolder for dispatching runnable. r=mayhemer, r=jesup 2017-06-20 01:56:00 -04:00
Mats Palmgren b3981c5e09 Bug 1376469 - Use LookupForAdd instead of Get+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: BPEFZeLkNp
2017-06-28 01:03:17 +02:00
Sebastian Hengst 344e75f556 Backed out changeset 976a4789deea (bug 1344751) 2017-06-28 00:00:30 +02:00
Sebastian Hengst 33f5b754de Backed out changeset 040e1c1c53dc (bug 1344751) 2017-06-28 00:00:22 +02:00
Catalin Badea 627e1873d5 Bug 1344751 - nsStandardURL::SetSpec should return error on empty scheme. r=valentin 2017-06-27 14:45:09 -07:00
Catalin Badea 5edb1cc81a Bug 1344751 - Make nsStandardURL and nsIDNService available on worker threads. r=valentin 2017-06-27 14:45:09 -07:00
Michal Novotny 7652415367 Bug 1368887 - Crash in mozilla::net::CacheFile::IsKilled, r=valentin, r=honzab
CacheFile::OnChunkRead and CacheFile::OnChunkWritten now correctly handle discarded chunks. It's now also ensured that the chunk which is going to be discarded isn't references by any input stream.
2017-06-27 22:57:38 +02:00
Carsten "Tomcat" Book 9c5ccdbab2 Merge mozilla-central to autoland 2017-06-27 15:15:58 +02:00
Carsten "Tomcat" Book 4e00eff077 merge mozilla-inbound to mozilla-central a=merge 2017-06-27 10:56:41 +02:00
Haik Aftandilian 676e702f00 Bug 1334550 - Part 2 - Add nsISubstitutionObserver and update test_extensionURL.html; r=jimm
Adds nsISubstitutionObserver so that substitutions set on a
parent nsISubstitutingProtocolHandler which are then propagated
to child processes can be observed in the child.

Updates test_extensionURL.html to set substitutions on the parent
ExtensionProtocolHandler before trying to load moz-extension URI's
using those substitutions.

MozReview-Commit-ID: JaW1A3uZpoO

--HG--
extra : rebase_source : b908a3ef51c2b077809614fd39595c3255dff7ad
2017-06-21 16:13:23 -07:00
Haik Aftandilian c3cf53a7ef Bug 1334550 - Part 1 - Proxy moz-extension protocol requests to the parent process; r=jimm,mayhemer
Changes ExtensionProtocolHandler to use remote streams for
moz-extension loads of file and JAR URI's to allow for
filesystem read-access sandboxing.

Adds messaging to PNecko to allow child processes to
request an input stream or file descriptor for moz-extension
URI's.

Add ExtensionProtocolHandler singleton so that NeckoParent can
call methods directly and ExtensionProtocolHandler::NewFD
can use a new member variable |mFileOpenerThread| to open files.

Adds FileDescriptorFile, a limited implementation of nsIFile
that wraps a file descriptor, to be sideloaded into
nsJARChannels so that extension JAR files can be read
using a file descriptor without accessing the filesystem
directly.

MozReview-Commit-ID: 1pcnIpjz2yR

--HG--
extra : rebase_source : 9d7334778fc81837b11b98d4e32603f7e5eb3a27
2017-06-23 17:10:54 -07:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Masatoshi Kimura b515c9c804 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : fdae0046f882d47fb539a7f882364e5c5caafdcd
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00
Carsten "Tomcat" Book 259377b6ab merge mozilla-inbound to mozilla-central a=merge 2017-06-26 13:25:51 +02:00
Sebastian Hengst 1596393322 Backed out changeset 50673cd78a02 (bug 1369509) for crashing xpcshell test_http2.js with mozilla::net::nsHttpConnectionMgr::nsHalfOpenSocket::OnOutputStreamReady. r=backout 2017-06-24 11:06:13 +02:00
Dragana Damjanovic e72cedbf29 Bug 1369509 - Let nHttpConnectionEntry be a weak reference in HalfOpenSock. r=mcmanus 2017-06-24 06:10:58 +02:00
Kershaw Chang d634338a7c Bug 1375782 - Use |HttpChannelChild::GetODATarget| to get the correct event target. r=mayhemer
--HG--
extra : rebase_source : d00b3d405703638aec026029ad42fdfcd699338c
2017-06-23 00:40:00 -04:00
DimiL 9814af0253 Bug 1335943 - Use the right origin attribute in Safe Browsing completions. r=francois
MozReview-Commit-ID: 8HQHzuwE5Cf

--HG--
extra : rebase_source : d6c57eb6b4d16898ca0f067052d8e9064c24c3a5
2017-06-21 17:27:22 +08:00
Sebastian Hengst dfc1ad2562 Backed out changeset 7235d05662b0 (bug 1373984) for Android bustage. r=backout on a CLOSED TREE 2017-06-25 18:30:13 +02:00
Masatoshi Kimura 2e04751921 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : a84ab644f52e68676b45f112ff69f868d89f6177
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00
Wes Kocher e02435a31e Backed out changeset 77af189b5c49 (bug 1373984) for build bustage in nsHtml5Parser.cpp a=backout CLOSED TREE
MozReview-Commit-ID: 6kBmU71j2To
2017-06-25 05:10:14 -07:00
Masatoshi Kimura 241039fd97 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : 09da1685795583513bf019d61c58230c2c4d298d
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00
Carsten "Tomcat" Book 7af37a52bd Merge mozilla-central to mozilla-inbound 2017-06-23 11:44:21 +02:00
Carsten "Tomcat" Book 5f51e5596e merge mozilla-inbound to mozilla-central a=merge 2017-06-23 11:28:19 +02:00
Florian Quèze 2924991bf6 Bug 1368456 - remove Promise.jsm imports in tests, r=mconley. 2017-06-23 11:25:52 +02:00
Florian Quèze 721c3ada5e Bug 1368456 - Remove imports of Promise.jsm from Firefox, r=mconley. 2017-06-23 11:25:18 +02:00
Michal Novotny 873439772c Bug 1325336 - Generate statistics for cache performance on the given HW, r=valentin, r=honzab
CachePerfStats gathers performance data for single open, read and write operations as well as the whole cache entry opening. It maintains long term and short term average. The long term average filters out excessive values and it represents and average time for a given operation when the cache is not busy. The short term average represents the current cache speed. By comparing these two stats we know pretty quickly that the cache is getting slower and then we race the cache with network immediately without a delay. Otherwise the delay is based on the average cache entry open time.
2017-06-23 10:24:45 +02:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Phil Ringnalda 21f33fe35a Backed out 3 changesets (bug 1334550) for Windows timeouts in test-oop-extensions/test_ext_unlimitedStorage.html
Backed out changeset 17c74c7634a2 (bug 1334550)
Backed out changeset d3b0db4e50c5 (bug 1334550)
Backed out changeset 4319f15e2496 (bug 1334550)

MozReview-Commit-ID: 2vmxPAMJZW
2017-06-22 22:32:58 -07:00
Nicholas Nethercote f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Nicholas Nethercote fe9268c4cd Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString

--HG--
extra : rebase_source : b37350642c58a85a08363df2e7c610873faa6e41
2017-06-20 19:19:05 +10:00
Nicholas Nethercote 1572f96f5d Bug 1374580 (part 1) - Remove nsASingleFragment{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsASingleFragmentString  --> nsAString
- nsASingleFragmentCString --> nsACString

--HG--
extra : rebase_source : e6a1ddc8938fecd9a735b15e872c054edf4c7910
2017-06-20 19:18:17 +10:00
Dragana Damjanovic da6f218076 Bug 1365519 - Make nsUnknownDecoder nsIThreadRetargetableStreamListener. r=mayhemer 2017-06-22 10:49:00 -04:00
Sebastian Hengst e1f8387dab Backed out changeset e44f1f746017 (bug 1325336) for crashing e.g. in browser-chrome's browser_flashblock_on_with_ask_to_activate.js with [@ mozilla::net::CacheFileUtils::CachePerfStats::MMA::GetStdDev]. r=backout 2017-06-22 18:29:06 +02:00
Michal Novotny 51fdc64d9e Bug 1325336 - Generate statistics for cache performance on the given HW, r=valentin, r=honzab
CachePerfStats gathers performance data for single open, read and write operations as well as the whole cache entry opening. It maintains long term and short term average. The long term average filters out excessive values and it represents and average time for a given operation when the cache is not busy. The short term average represents the current cache speed. By comparing these two stats we know pretty quickly that the cache is getting slower and then we race the cache with network immediately without a delay. Otherwise the delay is based on the average cache entry open time.
2017-06-22 17:22:13 +02:00
Carsten "Tomcat" Book f4d1338e49 Backed out changeset 29c843d51c4b (bug 1325336) for bustage 2017-06-22 16:16:51 +02:00
Michal Novotny 7f22d3a3e9 Bug 1325336 - Generate statistics for cache performance on the given HW, r=valentin, r=honzab
CachePerfStats gathers performance data for single open, read and write operations as well as the whole cache entry opening. It maintains long term and short term average. The long term average filters out excessive values and it represents and average time for a given operation when the cache is not busy. The short term average represents the current cache speed. By comparing these two stats we know pretty quickly that the cache is getting slower and then we race the cache with network immediately without a delay. Otherwise the delay is based on the average cache entry open time.
2017-06-22 15:44:00 +02:00
Junior Hsu f74e69f0bc Bug 1373656 - Move |ReportRcwnStats| before we set mTransactionPump to nullptr. r=michal 2017-06-22 03:42:00 -04:00
Kershaw Chang aebf20ee04 Bug 1360580 - Add Throttleable flag to the channel marked as tracking. r=mayhemer
--HG--
extra : rebase_source : c2500a534cafbc4e000f6c3af9c2cf0792a3893c
2017-06-21 19:55:00 -04:00
Wes Kocher b17932664d Merge m-c to autoland, a=merge
MozReview-Commit-ID: 1dQBCh5pBY6
2017-06-22 14:21:39 -07:00
Haik Aftandilian 10c9b9af41 Bug 1334550 - Part 2 - Add nsISubstitutionObserver and update test_extensionURL.html; r=jimm
Adds nsISubstitutionObserver so that substitutions set on a
parent nsISubstitutingProtocolHandler which are then propagated
to child processes can be observed in the child.

Updates test_extensionURL.html to set substitutions on the parent
ExtensionProtocolHandler before trying to load moz-extension URI's
using those substitutions.

MozReview-Commit-ID: JaW1A3uZpoO

--HG--
extra : rebase_source : ca1b89b9a6ea29ea464979c26c8c48c61d9d7e00
2017-06-21 16:13:23 -07:00
Haik Aftandilian 008a6c80f9 Bug 1334550 - Part 1 - Proxy moz-extension protocol requests to the parent process; r=jimm,mayhemer
Changes ExtensionProtocolHandler to use remote streams for
moz-extension loads of file and JAR URI's to allow for
filesystem read-access sandboxing.

Adds messaging to PNecko to allow child processes to
request an input stream or file descriptor for moz-extension
URI's.

Add ExtensionProtocolHandler singleton so that NeckoParent can
call methods directly and ExtensionProtocolHandler::NewFD
can use a new member variable |mFileOpenerThread| to open files.

Adds FileDescriptorFile, a limited implementation of nsIFile
that wraps a file descriptor, to be sideloaded into
nsJARChannels so that extension JAR files can be read
using a file descriptor without accessing the filesystem
directly.

MozReview-Commit-ID: 1pcnIpjz2yR

--HG--
extra : rebase_source : c3f2ede3dbfb29d98af6b194dbe58669d93d4197
2017-06-22 11:53:06 -07:00
Andrew McCreight 31e39883db Bug 1375262 - Add the ability to pass sandbox options to SpecialPowers.loadChromeScript(). r=jmaher
SpecialPowers.loadChromeScript() sends a script to the child process,
then creates a sandbox, and runs the script in that sandbox. There are
various sandboxOptions that can be passed when creating a sandbox, and
it would be nice to have that functionality for loadChromeScript.

I just need this for wantGlobalProperties, but I might as well make it
as general as possible. I'm not sure all of the types it can take can
actually be serialized across processes, but I guess that's okay.

MozReview-Commit-ID: GoJjXdjizFk

--HG--
extra : rebase_source : 9c2bc190dbf5a080978953cffd64205e8b816367
2017-06-20 15:50:20 -07:00
Florian Quèze 673abbab34 Bug 1375459 - disable netwerk/test/unit/test_backgroundfilesaver.js on Android 4.3 API15+ debug due to crashes, rs+a=Tomcat 2017-06-22 13:33:43 +02:00
Florian Quèze 5b8f8b884c Bug 1374282 - script generated patch to remove Promise.defer calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Valentin Gosu 8f0bfff41b Bug 1374818 - Prevent nsCookieService::AddCookieToList from adding null cookies to the list. r=jdm
MozReview-Commit-ID: IG8aXlzFMgQ

--HG--
extra : rebase_source : e95083595aa4b9741c96ea9a7e222839373db894
2017-06-21 20:31:39 +02:00
Kate McKinley 9108666ee6 Bug 1374443 - Decrease HSTS priming timeout to 2s r=ckerschb
MozReview-Commit-ID: 7brYAUXwHvE

--HG--
extra : rebase_source : 4ef6f27cc855b828ac742f2990dc12668bd910aa
2017-06-19 14:35:27 -07:00
Shih-Chiang Chien 6560630bfa Bug 1374238 - add null check for nsIOService::SpeculativeConnectInternal. r=dragana
MozReview-Commit-ID: 8avSx50euMF

--HG--
extra : rebase_source : 0939e80d7ff4649d74f8db25c8ff446563861925
2017-06-19 18:55:41 +08:00
Liang-Heng Chen 553bf6ba4d Bug 1177909 - Part 2: add test cases when WebSockets use system proxy; r=bagder
MozReview-Commit-ID: BzHbieN2W4y

--HG--
extra : rebase_source : 657f746da022a49a8c4317e02161dff5af125fac
2017-06-12 14:56:16 +08:00
Liang-Heng Chen a3cc60dae5 Bug 1177909 - Part 1: support perferred proxy type while using system proxy setting; r=bagder
MozReview-Commit-ID: 7C5pSxO1d2j

--HG--
extra : rebase_source : b22b533fd83ad377128781f44fe1fc0c66f5adc1
2017-06-12 11:41:14 +08:00
Wes Kocher bad95c3b8d Merge m-c to autoland, a=merge
MozReview-Commit-ID: 22m0q698kw2
2017-06-20 18:33:41 -07:00
Wes Kocher c0e1236f1a Merge autoland to m-c a=merge
MozReview-Commit-ID: LFtpTAueYrF
2017-06-20 18:24:29 -07:00
Rob Wu 1a873852ce Bug 1354229 - use private cookie DB in nsICookieManager depending on OriginAttributes r=jdm
Evaluated every method exposed via nsICookieManager and
nsICookieManager2, and ensured that every method uses the right cookie
database depending on whether the mPrivateBrowsingId flag is set in
OriginAttributes.

The usePrivateMode method has been removed since it was introduced in
bugzil.la/777620 and not used anywhere else.

This should be covered by
toolkit/components/extensions/test/mochitest/test_ext_cookies.html,
but due to bugzil.la/1309637, the relevant private browsing tests
have been disabled. These tests will be enabled in one of the next
commits.

MozReview-Commit-ID: DMhE42LGu9S

--HG--
extra : rebase_source : 7882ed7610ff4c7c6f81a7852660d2b36a5c0a92
2017-06-09 18:00:06 +02:00
Kershaw Chang c402e676f3 Bug 1370583 - Get URIClassifier service eariler. r=francois
Move the initialization of nsUrlClassifierDBService to prior of calling ShouldEnableTrackingProtection(), so the nsUrlClassifierDBService will be initialized before staring HTTP connection. If not doing so, there is a 3.x% peformance regression on android platforam.
2017-06-19 22:59:00 -04:00
Paolo Amadini 10ee6a5c4e Bug 1362970 - Part 2 - Script-generated patch to convert .then(null, ...) to .catch(...). r=florian
Changes to Promise tests designed to test .then(null) have been reverted, and the browser/extensions directory was excluded because the projects it contains have a separate process for accepting changes.

MozReview-Commit-ID: 1buqgX1EP4P

--HG--
extra : rebase_source : 3a9ea310d3e4a8642aabbc10636c04bfe2e77070
2017-06-19 11:32:37 +01:00
Carsten "Tomcat" Book de892834ed Merge mozilla-central to mozilla-inbound 2017-06-20 11:31:34 +02:00
Carsten "Tomcat" Book 013fb0680e merge mozilla-inbound to mozilla-central a=merge 2017-06-20 11:26:40 +02:00
Wes Kocher 17a16ffd2f Merge m-c to inbound, a=merge
MozReview-Commit-ID: Gf5xDaCWnPi
2017-06-19 17:34:36 -07:00
Wes Kocher 57da9036bb Merge inbound to central, a=merge
MozReview-Commit-ID: KZoJHLFuTwT
2017-06-19 17:30:02 -07:00
Wes Kocher 976d5437f9 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 6A96Fe0GPjw
2017-06-19 17:37:53 -07:00
Valentin Gosu 02c01f493a Bug 1373970 - Avoid null pointer deref. r=bagder
MozReview-Commit-ID: BmcolZSrpIL
2017-06-18 21:17:56 +02:00
Carsten "Tomcat" Book d14a5a593a merge mozilla-inbound to mozilla-central a=merge 2017-06-19 13:37:20 +02:00
Dragana Damjanovic e80186dffd Bug 1372897 - Test only the necko part of TFO, i.e. disable the nspr part. r=mcmanus 2017-06-19 09:16:38 +02:00
Sebastian Hengst efd723cdad merge mozilla-central to autoland. r=merge 2017-06-18 00:21:41 +02:00
Masatoshi Kimura 838ccc4108 Bug 1369025 - Remove mozilla::dom::EncodingUtils. r=hsivonen
MozReview-Commit-ID: 5O5WtxbmATQ

--HG--
rename : dom/encoding/encodingsgroups.properties => intl/locale/encodingsgroups.properties
extra : rebase_source : 13143b43ee745b618e05ed1b6991d69781c2767d
2017-06-17 11:54:40 +09:00
Ben f113b4e562 Bug 277367. Trying to open a file in MODE_CREATE via an XPCOM file stream in a directory that does not exist should crete the directory too, not just the file. r=bzbarsky 2017-06-19 14:50:16 -04:00
Honza Bambas 9e38f7b8fc Bug 1319111 - Expose 'result principal URI' on LoadInfo as a source for NS_GetFinalChannelURI (removes some use of LOAD_REPLACE flag). r=bz, r=mikedeboer
--HG--
extra : rebase_source : c9690f4b8decd39a10da676bd50ec09cb2ad8892
2017-05-30 18:07:59 +02:00
Valentin Gosu 5a85d67472 Bug 1322610 - MOZ_DIAGNOSTIC_ASSERT that serialized load context is not null in HttpChannelChild r=mcmanus
As part of network security, we currently crash the main process in NeckoParent::GetValidatedOriginAttributes if the SerializedLoadContext is null. This makes it difficult to find out who created the channel that has a null SLC. Adding this assertion to the child allows us to get a nice stack trace and maybe identify the root cause.

MozReview-Commit-ID: 7rz91oEaiRi

--HG--
extra : rebase_source : b411e1e9494623bacb506a2f820902a3f7aa7c2a
2017-06-14 17:17:10 +03:00
Kate McKinley 396962011a Bug 1363546 - Store and report HSTS upgrade source r=francois,keeler,mayhemer p=francois
Add a field to the HSTS cache which indicates the source of the HSTS
entry if known, from the preload list, organically seen header, or HSTS
priming, or unknown otherwise. Also adds telemetry to collect the source
when upgrading in NS_ShouldSecureUpgrade.

MozReview-Commit-ID: 3IwyYe3Cn73

--HG--
extra : rebase_source : 9b8daac3aa02bd7a1b4285fb1e5731a817a76b7f
2017-05-23 15:31:37 -07:00
Jan Keromnes 57720f1ea5 Bug 1372853 - Use nullptr in /netwerk (clang-tidy: modernize-use-nullptr). r=valentin 2017-06-16 01:35:00 -04:00
Bill McCloskey 0767e31489 Bug 1372736 - Avoid using AbstractThread for non-media MozPromises (r=bkelly)
MozReview-Commit-ID: BBi0pK4DXxf
2017-06-15 20:16:25 -07:00
Yoshi Huang 5dcdd16255 Bug 1267075 - Part 1: call SetBlockedRequest when CSP check failed. r=bz
As a follow-up from bug 1206961, we will remove calling CanLoadImage in
this bug. Also in the case of CSP check failed, we will call
SetBlockedRequest in those cases.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1267075#c30 for the
analysis between the old and new setup.
2017-06-16 10:12:08 +08:00
Valentin Gosu 7a1ca14038 Bug 1367810 - Don't race cache with network when CORS preflight is required for a channel r=michal
MozReview-Commit-ID: CPyafHsMYoy
2017-06-16 00:32:00 +03:00
Honza Bambas 5faa1a752e Bug 1373064 - Add null-check for a connection entry to nsHttpConnectionMgr::IsConnEntryUnderPressure. r=mcmanus 2017-06-15 07:55:00 -04:00
Ben Kelly 48263c68de Bug 1363848 P4 Only set LOAD_BYPASS_SERVICE_WORKER when resetting the child channel if we're not in "manual" redirect mode. r=dragana 2017-06-15 07:52:42 -07:00
Ben Kelly b3523ebd61 Bug 1363848 P3 Don't set LOAD_BYPASS_SERVICE_WORKER flag on internal redirects in nsHttpChannel. r=dragana 2017-06-15 07:52:42 -07:00
Ben Kelly 45b30214c3 Bug 1363848 P2 Do not intercept internal redirects regardless of LOAD_BYPASS_SERVICE_WORKER flag. r=dragana 2017-06-15 07:52:41 -07:00
Ben Kelly 92ebf95b57 Bug 1363848 P1 Record the last redirect flags on the http channel. r=dragana 2017-06-15 07:52:41 -07:00
Michal Novotny 17a6f52d45 Bug 1367742 - Crash in mozilla::net::nsHttpChannel::ContinueProcessRedirection, r=valentin, r=honzab
Setting mFirstResponseSource in nsHttpChannel::OnStartRequest when cache wins is too late, because the channel might already started redirecting in nsHttpChannel::ReadFromCache. In this case nsHttpChannel::OnStartRequest is not call at all for the cache pump and we would proceed the network response which should be ignored.
2017-06-15 13:47:33 +02:00
Bill McCloskey d7df561295 Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm)
MozReview-Commit-ID: 6beE0eMCxg7
2017-06-14 14:44:04 -07:00
Mats Palmgren d40a0ac6c8 Bug 1372431 - Use RemoveEntry(EntryType*) instead of RemoveEntry(KeyType) to avoid another hashtable lookup. r=michal
MozReview-Commit-ID: 7zOWbhd8MnN
2017-06-14 17:27:25 +02:00
Mats Palmgren c7e9bf0310 Bug 1372429 - Use RemoveEntry(EntryType*) instead of RemoveEntry(KeyType) to avoid another hashtable lookup. r=michal
MozReview-Commit-ID: IAupx4Eu75h
2017-06-14 17:27:25 +02:00
Carsten "Tomcat" Book 4f44c026f2 Merge mozilla-central to mozilla-inbound 2017-06-14 14:50:11 +02:00
Carsten "Tomcat" Book 5e8c1546ec merge mozilla-inbound to mozilla-central a=merge 2017-06-14 14:45:26 +02:00
Kershaw Chang 14ca5d5894 Bug 1360581 - Part3: Add setTopWindowURIIfUnknown in nsIHttpChannelInternal, r=mayhemer
Since the uri classifier needs topWindowURI to decide whether or not to enable channel annotation, we have to allow to change this attribute in js for passing the test.

--HG--
extra : rebase_source : c5effa05fecef0d32600e4c9c926dbfa77c2ca6f
2017-06-13 01:21:00 +02:00
Kershaw Chang c0c44ffb82 Bug 1360581 - Part2: Do channel annotation a bit earlier and only for third-party uri, r=francois
This patch includes two changes:
1. The current channel annotation is happened at nsChannelClassifier::OnClassifyComplete and this is too late because this channel might be already hit the network.
This patch adds a new API CheckIsTrackerWithLocalTable in nsChannelClassifier to check if the URI is in local blacklist and whitelist before calling BeginConnectActual.
Please note that whitelist will be checked only when TP is disabled.
2. Skip channel annotation for first-party and top-level load http channels

--HG--
extra : rebase_source : 78f98f8200d3dbb1cb96cd0a33901b2a82227974
2017-06-13 01:16:00 +02:00
Wes Kocher 09a205279b Merge m-c to inbound, a=merge
MozReview-Commit-ID: 7AS5EEH6buZ
2017-06-13 18:36:04 -07:00
Wes Kocher 1af6d5cf57 Merge inbound to central, a=merge
UPGRADE_NSS_RELEASE
MozReview-Commit-ID: CBIFPwA5aNp

--HG--
extra : amend_source : 035a5be59d0046a643d0f836a95195e8c4ade4a6
2017-06-13 18:27:10 -07:00
Wes Kocher 6c1a0ae549 Backed out 6 changesets (bug 1371699) for various failures including frequent img-blobURI-2.html failures and leaks a=backout
Backed out changeset 67a27cf0ab80 (bug 1371699)
Backed out changeset 7e494fa90087 (bug 1371699)
Backed out changeset 30405ec37e1e (bug 1371699)
Backed out changeset 2d67624a01dc (bug 1371699)
Backed out changeset 503c9d22e6bb (bug 1371699)
Backed out changeset eedcb67a9fb6 (bug 1371699)

MozReview-Commit-ID: 4HydLjK7Ond
2017-06-13 17:50:11 -07:00
Wes Kocher e883883e7c Backed out changeset 45b5cadadc22 (bug 1372426) because it's blocking a backout a=backout
MozReview-Commit-ID: Jl0zxef8R9k
2017-06-13 17:48:38 -07:00
Bill McCloskey 1b366c9ec9 Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm)
MozReview-Commit-ID: 6beE0eMCxg7
2017-06-13 15:24:08 -07:00
Wes Kocher fdca69feeb Backed out changeset e8a63038d787 (bug 1372426) for build failures in nsStringStream.cpp a=backout
MozReview-Commit-ID: 8ci8nKoiLhz
2017-06-13 15:20:12 -07:00
Bill McCloskey 7efe80ba16 Bug 1372426 - More detailed names for nsInputStreamReadyEvent (r=erahm)
MozReview-Commit-ID: 6beE0eMCxg7
2017-06-13 14:53:26 -07:00
Bill McCloskey c85ab6308c Bug 1366072 - Change promises to take nsISerialEventTarget instead of AbstractThread (r=jwwang)
MozReview-Commit-ID: 4azUhSB6whu
2017-06-13 14:51:01 -07:00
Boris Zbarsky 5193353a61 Bug 1371699 part 4. Make nsIMultiplexInputStream not inherit from nsIInputStream. r=bkelly
This is a preexisting issue that makes nsMultiplexInputStream multiple-inherit
from nsIInputStream: once via nsIMultipartInputStream and once via
nsIAsyncInputStream.  This causes problems once we end up with more multiplex
streams that are async streams, because then some assingments to
nsCOMPtr<nsIInputStream> start asserting.  This patch just removes the footgun
by getting rid of the multiple inheritance.
2017-06-13 16:16:39 -04:00
Boris Zbarsky 3d884086c3 Bug 1371699 part 3. Make nsIStringInputStream not inherit from nsIInputStream anymore. r=bkelly
This will prevent ambiguous nsIInputStream inheritance once we also inherit from nsIAsyncInputStream.
2017-06-13 16:16:23 -04:00
Kershaw Chang 683a1fc058 Bug 1360581 - Part1: Avoid nsChannelClassifier being created twice, r=mayhemer
The original code creates nsChannelClassifier and calls ShouldEnableTrackingProtection twice when TP is enabled. To avoid redundancy, this patch makes channel classifier as a data member in nsHttpChannel. Note that the data member is a weak ptr to prevent ref count cycle.

--HG--
extra : rebase_source : 11d2e17c2b45b70e3cd407d882ddf0c57ad51755
2017-06-06 02:35:00 +02:00
Kershaw Chang b59d3c86ec Bug 1343747 - Part 2: Label runnables in WebSocketEventListenerChild. r=mayhemer
Use inner window id to get the window's event target and use it to label runnables.
2017-06-13 20:15:00 -04:00
Kershaw Chang b4232a0b60 Bug 1343747 - Part 1: Label runnables in WebSocketChannelChild. r=mayhemer
Use nsContentUtils::GetEventTargetByLoadInfo to get a labeled event target and use it to dispatch runnables.
2017-06-13 20:14:00 -04:00
Wes Kocher ebf35623cd Merge mozilla-central to autoland a=merge
UPGRADE_NSS_RELEASE
2017-06-13 18:57:32 -07:00
Jan de Mooij 83f290de99 Bug 1370608 part 1 - Move newEnumerate hook from ObjectOps to ClassOps. r=evilpie,bz 2017-06-14 10:37:44 +02:00
Tom Ritter cc0c6b4d05 Bug 1368416 Include 'windows.h' instead of 'Windows.h' for MinGW support r=mcmanus
MozReview-Commit-ID: AmuNxWpQgKC

--HG--
extra : rebase_source : 3ea0ed75058b757d59bc6f7dda6f0e54ae0499ae
2017-05-29 00:49:29 -05:00
Bill McCloskey 7cb6a23814 Bug 1365101 - Convert NS_GetCurrentThread uses in netwerk/ (r=meyhemer)
MozReview-Commit-ID: IHBt6XAG8em
2017-06-12 20:21:43 -07:00
Bill McCloskey 5ddda3bb77 Bug 1361164 - Add infallible IsOnCurrentThread to nsIEventTarget (r=froydnj)
MozReview-Commit-ID: 12bk9hQ7Wnv
2017-06-12 20:20:08 -07:00
Wes Kocher f8412cddff Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: 4j8ngmg8FAD
2017-06-12 17:02:56 -07:00
Ryan VanderMeulen 1421659aba Backed out changeset b2fe8f4df701 (bug 1158387) for making Win64 xpcshell nearly permafail. 2017-06-12 16:45:34 -04:00
Ben Kelly 93851fe7bb Bug 1370617 Set Authorization header using eVarietyRequestDefault to avoid exposing it to service workers. r=dragana 2017-06-12 06:52:44 -07:00
Kershaw Chang f903c2a340 Bug 1343743 - Part5: Label PAltDataOutputStreamChild, r=mayhemer
Use neckoTarget in HttpChannelChild to label PAltDataOutputStreamChild actor.
2017-06-12 00:24:00 +02:00
Kershaw Chang 56e1084587 Bug 1343743 - Part3: Set event target for TCPSocketChild and TCPServerSocketChild, r=jdm
Add an event target parameter in constructor, so we can call gNeckoChild->SetEventTargetForActor before sending constructor message to parent.
2017-06-12 00:22:00 +02:00
Kershaw Chang e592661572 Bug 1343743 - Part2: Set event target for WyciwygChannelChild, r=mayhemer
We should not directly use MainThreadChannelEvent in WyciwygChannelChild, instead, using NeckoTargetChannelEvent.
2017-06-12 00:21:00 +02:00
Kershaw Chang 7f73aa6ef7 Bug 1343743 - Part1: Refactoring for mNeckoTarget and ChannelEvent, r=mayhemer
This patch contains two parts below:
1. mNeckoTarget
Since almost all child channels in necko need mNeckoTarget to dispatch runnables to main thread, it seems worth to have a holder class of mNeckoTarget and ask child channels to inherit it.

2. ChannelEvent
A lot of classes in FTPChannelChild and HttpChannelChild inheriting ChannelEvent and override GetEventTarget. It should be worth to extract the same code and put it in the same space.
2017-06-12 00:21:00 +02:00
Junior Hsu 6f04204c36 Bug 1158387 - Remove "PRAGMA synchronous = OFF" to avoid corruption in cookie service. r=mak 2017-05-21 18:48:00 -04:00
Honza Bambas a3533ddf2a Bug 1370340 - Carry TopLevelOuterContentWindowId to redirected HTTP channels. r=mcmanus
--HG--
extra : rebase_source : dc78c705f0c738b07352b4a7d6d80eac7e65b5b4
2017-06-10 03:47:00 -04:00
Shih-Chiang Chien c87b54c086 Bug 1371203 - Ensure channel object lives longer than the owned ChannelEventQueue. r=mayhemer
MozReview-Commit-ID: BPNJuMsocrf

--HG--
extra : rebase_source : 760f74a6e3d42afb64c215ca51bfa6bcf05a9898
2017-06-09 19:59:41 +08:00
Liang-Heng Chen c7eec4fbc7 Bug 1371550 - create worker thread before it is required; r=bagder
MozReview-Commit-ID: 9DydRQwOHyT

--HG--
extra : rebase_source : 89b89f9139cc00176cdb29f23f172dab70f5ca44
2017-06-09 15:11:24 +08:00
Wes Kocher 07d7985523 Merge inbound to central, a=merge
MozReview-Commit-ID: IrZXJHbiqpa
2017-06-09 15:28:10 -07:00
Nicolas B. Pierron dbebd16202 Bug 1371260 - Allow fetchCount/lastFetched to be read when either cache or alt-data cache entry is available. r=valentin 2017-06-09 13:52:52 +00:00
Junior Hsu 96ffc639e8 Bug 1370454 - Part2: Expose runInTransaction in nsICookieService.idl, r=jduell 2017-06-06 05:36:00 +02:00
Junior Hsu 72cc7bd8e6 Bug 867798 - avoid blocking main thread when we closes nsCookieService syncConn db, r=mak
--HG--
extra : rebase_source : 04a75c1914209c14d946fbb72f8089cfb722e6c9
2017-06-08 20:06:00 +02:00
Junior Hsu 515d0e58e1 Bug 1370456 - Batch operations for nsCookieService, r=jduell
--HG--
extra : rebase_source : 0a2788a1d6d8d650f1ccdcdc4c7e875e6c5aabac
2017-06-08 20:05:00 +02:00
Carsten "Tomcat" Book 42c6d32a23 Merge mozilla-central to autoland 2017-06-09 16:12:32 +02:00
Tom Tromey 818e335541 Bug 1369830 - fix "telementry" typo in netwerk; r=michal
MozReview-Commit-ID: KPsXmJ6UYyZ

--HG--
extra : rebase_source : 02eb2f0d095edee45e92eb650055a2cc81e57ebe
2017-06-02 12:49:22 -06:00
Kate McKinley 37a7ace256 Bug 1359987 - Update HSTS priming telemetry r=ckerschb,francois,mayhemer p=francois
Collect telemetry for all requests to get an exact percentage of
requests that are subject to HSTS priming, and how many result in an
HSTS Priming request being sent. Clean up telemetry to remove instances
of double counting requests if a priming request was sent.

HSTSPrimingListener::ReportTiming was using mCallback to calculate
timing telemetry, but we were calling swap() on the nsCOMPtr. Give it an
explicit argument for the callback.

Add tests for telemetry values to all of the HSTS priming tests. This
tests for the minimum as telemetry may be gathered on background or
other requests.

MozReview-Commit-ID: 5V2Nf0Ugc3r

--HG--
extra : rebase_source : daa357219a77d912a78b95a703430f39d884c6ab
2017-05-09 15:36:07 -07:00
Andreas Farre a288a87eba Bug 1373675 - Add hasListenerFor to nsIWebSocketEventService. r=mcmanus
This makes it possible to check if a Window has 'active' WebSockets.
2017-06-16 07:58:00 -04:00
Honza Bambas 73da6dadb9 Bug 1369496 - linux build fix, r=me 2017-06-08 19:42:42 +02:00
Honza Bambas e9c7254a37 Bug 1369496 - HTTP transaction read throttling algorithm improvements. r=mcmanus 2017-06-08 09:45:00 -04:00
Ryan VanderMeulen 9b7a73b65a Merge m-c to autoland. a=merge
UPGRADE_NSPR_RELEASE UPGRADE_NSS_RELEASE

--HG--
extra : amend_source : a59e53ba2f8db608f613f21ad6da2b5be8814aa4
2017-06-07 22:55:56 -04:00
Ben Kelly 362a5e853d Bug 1369862 P1 Expose LoadInfo::SynthesizeServiceWorkerTainting(). r=ckerschb 2017-06-07 08:34:51 -07:00
Ben Kelly 88167e3b71 Backout 78533a4ef62e to 4fe11fc40572 (bug 1369862) for incorrect bug number on P1 r=me 2017-06-07 08:32:23 -07:00
Ben Kelly c405b96cf8 Bug 1368962 P1 Expose LoadInfo::SynthesizeServiceWorkerTainting(). r=ckerschb 2017-06-07 08:14:57 -07:00
Yoshi Huang cefd88cc40 Bug 1367581 - don't bail out if the channel doesn't have loadInfo. r=valentin 2017-06-07 14:14:00 +08:00
Wes Kocher 6ccfb3e58f Backed out 2 changesets (bug 1360581) for failures in test_workerupdatefoundevent.html a=backout CLOSED TREE
Backed out changeset d1c5998858a3 (bug 1360581)
Backed out changeset 4d81e7dfd020 (bug 1360581)

MozReview-Commit-ID: L0a89WRiv2R
2017-06-06 13:04:39 -07:00
Ehsan Akhgari 394af562be Bug 1370448 - Start poll watchdog timer off of a runnable from the main thread in order to avoid a false positive detected deadlock; r=dragana 2017-06-06 12:37:26 -04:00
Kershaw Chang 30314bebe8 Bug 1360581 - Part 2: Do channel annotation a bit earlier. r=francois
The current channel annotation is happened at nsChannelClassifier::OnClassifyComplete and this is too late because this channel might be already hit the network.
This patch adds a new API CheckIsTrackerWithLocalTable in nsChannelClassifier to check if the URI is in local blacklist and whitelist before calling BeginConnectActual.
Please note that whitelist will be checked only when TP is disabled.

--HG--
extra : rebase_source : 0761f6c7631bc934691c8d018be88514568a3aa1
2017-06-06 02:30:00 -04:00
Kershaw Chang b87b6ea582 Bug 1360581 - Part 1: Avoid nsChannelClassifier being created twice. r=mayhemer
The original code creates nsChannelClassifier and calls ShouldEnableTrackingProtection twice when TP is enabled. To avoid redundancy, this patch makes channel classifier as a data member in nsHttpChannel. Note that the data member is a weak ptr to prevent ref count cycle.

--HG--
extra : rebase_source : 4a77f1e51b38e27a065162cc702091aca2db51de
2017-06-06 02:35:00 -04:00
Nicolas B. Pierron aa07911158 Bug 1368675 - Expose nsICacheEntry fetchCount and lastFetched time as read-only on the nsICacheInfoChannel. r=valentin 2017-06-05 12:06:19 +00:00
Kris Maglione 0cd3e0a862 Bug 1368189: Move more code out of ExtensionUtils.jsm. r=mixedpuppy
Also removes some dead code.

A lot of the code in ExtensionUtils.jsm is not needed in all processes, and a
lot of the rest isn't needed until extension code runs. Most of it winds up
being loaded into all processes way earlier than necessary.

MozReview-Commit-ID: CMRjCPOjRF2

--HG--
extra : rebase_source : 37718eaf05a22b8ccb95f633cf7454bd7975cdce
2017-05-26 15:44:41 -07:00
Kris Maglione 6d24c4b91a Bug 1322235: Part 7 - DeCOMtaminate moz-extension protocol handler. r=billm
This removes unnecessary COM overhead from the extension protocol service,
particularly from the flag lookup code, which is called often, and from hot
paths. The devirtualized lookups should have virtually no overhead for
extensions without web-accessible resources, and very little overhead except
when resources are specified as non-prefix globs.

MozReview-Commit-ID: 4hQ7GuQSjvW

--HG--
extra : rebase_source : 61897a204abd915ad61852fa475cde2de51753f3
2017-05-23 14:40:38 -07:00
Sebastian Hengst 4607d210e9 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 8W8H7Bg9Tq6
2017-06-04 20:09:18 +02:00
Sebastian Hengst 92499bc6cf merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-06-03 20:18:26 +02:00
Sebastian Hengst 5e4755df68 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: IdRgoZ9hiXq
2017-06-03 20:15:27 +02:00
Jan de Mooij d2c775856a Bug 1358135 part 1 - Fix some browser tests to trigger a shrinking GC instead of a normal GC. r=jonco 2017-06-03 17:29:17 +02:00
Wes Kocher 269f7e9f5c Merge m-c to inbound, a=merge
MozReview-Commit-ID: 9wTctDOsPpO
2017-06-02 17:31:31 -07:00
Randell Jesup 16390d923a Bug 1367578: Don't use PR_LogPrint() for logging now that we use LazyLog r=drno
MozReview-Commit-ID: K1KVCtpEPTZ
2017-06-02 15:50:05 -04:00
Sebastian Hengst b3c51a3e2d merge mozilla-central to autoland. r=merge a=merge 2017-06-03 20:16:49 +02:00
Nils Ohlmeier [:drno] f8f118d912 Bug 1335262: read and emit datachannel max-message-size. r=jesup
MozReview-Commit-ID: HwaoshovZIS

--HG--
extra : rebase_source : c1c171c53e5433607083dcd88fc9de0820e3382f
2017-05-31 20:58:53 -07:00
Ehsan Akhgari 322546b85a Bug 1368233 - Initialize all of the fields of AvailableEvent; r=mcmanus 2017-06-02 00:20:49 -04:00
Randall Barker 394db2d75e Bug 1367798 - Fix Fennec build on some environments by moving AppCacheStorage.cpp and CacheStorage.cpp from UNIFIED_SOURCES to SOURCES r=froydnj
MozReview-Commit-ID: ECO4KnQdJhh
2017-06-01 20:31:16 -07:00
Liang-Heng Chen 117950c731 Bug 1341266 - create http/2 stream for urgent-start; r=mcmanus
MozReview-Commit-ID: GIZuAmigK9n

--HG--
extra : rebase_source : 59c9ac3428943de90b2044f44d4632b084786d6b
2017-05-19 00:50:15 +08:00