Commit graph

1274 commits

Author SHA1 Message Date
Francois Marier
deb19204a3 Bug 1434206 - Remove unused and undefined functions. r=gcp
mProtocolV2 is still used to skip the caching of misses on V4:

https://searchfox.org/mozilla-central/rev/d4b9e50875ad7e5d20f2fee6a53418315f6dfcc0/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp#1353-1357

MozReview-Commit-ID: 2cHh9JiZuHh

--HG--
extra : rebase_source : 8c571faf246da2666c6ce1e14d4a701e17d88f89
2018-05-28 14:39:32 -07:00
Francois Marier
7f90c6a9cc Bug 1414051 - Move ThreatHit protobuf details to the body. r=gcp
Mark that channel as anonymous in order to prevent any cookies
from being set here and potentially tie these proxied requests
to list updates which will not go through the proxy.

Also fix a return code in the case that httpChannel fails to QI.

MozReview-Commit-ID: BaRyYRlUbsB

--HG--
extra : rebase_source : 9ef4575553a7f4981c394b86e2923b5a5bf646c4
2018-02-19 16:18:37 -08:00
Miko Mynttinen
4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab
7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen
8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

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

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

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

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Kris Maglione
6b12d08f7d Bug 1462937: Update callers to use nsIFile::GetDirectoryEntries as a nsIDirectoryEnumerator. r=froydnj
MozReview-Commit-ID: Iv4T1MVAF5

--HG--
extra : rebase_source : 1c518883d082884db7f9323a5acc20361228c26b
extra : histedit_source : 70a73c23d1199d3bfbb5379c78930401166c094b
2018-05-19 20:17:45 -07:00
Kris Maglione
01c298aca6 Bug 1460092: Add ESLint rule to enforce use of ChromeUtils.generateQI. r=Gijs
Also fixes existing code which fails the rule.

MozReview-Commit-ID: CkLFgsspGMU

--HG--
extra : rebase_source : 86a43837659aa2ad83a87eab53b7aa8d39ccf55b
2018-05-08 18:36:22 -07:00
Francois Marier
2e902f94dd Bug 1452445 - Promote MOZ_LOG calls to NS_WARNING in LookupCacheV4. r=gcp
This should help narrow down which of the code paths is responsible
for the intermittent failures we are seeing.

MozReview-Commit-ID: JHVZzixpOg6

--HG--
extra : rebase_source : c2eefb0bf0f281adf393d2a531db3e5d3ce023d6
2018-04-30 16:44:35 -07:00
Kris Maglione
a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
Francois Marier
777fb5e47f Bug 1434662 - Move initialization code to ProtocolParser::Begin(). r=gcp
Repurpose the previously unused Begin() function to initialize
ProtocolParser objects and also assert that we are not reusing
objects across update since that's not supported.

MozReview-Commit-ID: HIGGgOr388h

--HG--
extra : rebase_source : 53398213bf38e582248f1954bbdb46fd53348e40
2018-04-24 10:08:56 +02:00
Francois Marier
10fe9ddbf2 Bug 1434662 - Remove dead code. r=gcp
This check was added in bug 1296820 to disable V4 updates prior
to their being implemented. It should have been removed once we
landed working support for V4 updates.

MozReview-Commit-ID: 828DIS72LNi

--HG--
extra : rebase_source : df3bf169fb077891d5096d7cbeb68c2bb657f834
2018-04-19 16:06:40 -07:00
Francois Marier
f197f28620 Bug 1434662 - Reset Safe Browsing V4 tables that fail to update. r=gcp
This is a generalization of the reset code that's used in pver2
to reset all tables when a `pleasereset` command is received.

MozReview-Commit-ID: LF4RegQHqoT

--HG--
extra : rebase_source : 5c100f179a23c805fe245a361f4e89c8d5f5ce0a
2018-04-12 10:11:30 -07:00
Andreea Pavel
3cfb05a97a Backed out 3 changesets (bug 1434662) for android and OS X mass failures at /builds/worker/workspace/build/src/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp:512 on a CLOSED TREE
Backed out changeset 983099e546d8 (bug 1434662)
Backed out changeset 39b9f46104ad (bug 1434662)
Backed out changeset 6f652d798a0c (bug 1434662)
2018-04-23 23:09:32 +03:00
Francois Marier
65577c0773 Bug 1434662 - Move initialization code to ProtocolParser::Begin(). r=gcp
Repurpose the previously unused Begin() function to initialize
ProtocolParser objects and also assert that we are not reusing
objects across update since that's not supported.

MozReview-Commit-ID: HIGGgOr388h

--HG--
extra : rebase_source : f9f83b1c7bd79faa40fc1d7cb594dcb14a66fe09
2018-04-19 17:10:45 -07:00
Francois Marier
dcbfde282e Bug 1434662 - Remove dead code. r=gcp
This check was added in bug 1296820 to disable V4 updates prior
to their being implemented. It should have been removed once we
landed working support for V4 updates.

MozReview-Commit-ID: 828DIS72LNi

--HG--
extra : rebase_source : df3bf169fb077891d5096d7cbeb68c2bb657f834
2018-04-19 16:06:40 -07:00
Francois Marier
84d43505cb Bug 1434662 - Reset Safe Browsing V4 tables that fail to update. r=gcp
This is a generalization of the reset code that's used in pver2
to reset all tables when a `pleasereset` command is received.

MozReview-Commit-ID: LF4RegQHqoT

--HG--
extra : rebase_source : 5c100f179a23c805fe245a361f4e89c8d5f5ce0a
2018-04-12 10:11:30 -07:00
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Francois Marier
6ceeccf211 Bug 1438671 - Remove the std::string wrapper in TableUpdateV4. r=gcp
Given we're no longer using dependent strings in
LookupCacheV4::PrefixString(), we will end up make a copy of the
prefixes at some point. Let's do it early and remove a bunch of
complicated code.

Make the string copies fallible so that we return an error and
fail the update instead of crashing.

MozReview-Commit-ID: 5cZHSDIJSlD

--HG--
extra : rebase_source : 0ad130c2be9caf528bb764296836e91fa8a30916
2018-04-03 17:11:30 -07:00
Francois Marier
9ed88c3e97 Bug 1438671 - Add assertions to enforce the size of prefix strings. r=gcp
Also document the meaning of mPrimed in LookupCache.h.

MozReview-Commit-ID: 63GAHwU3Rx3

--HG--
extra : rebase_source : 11307604f957efbd6879db83f916a9cb369f93ff
2018-03-29 15:40:13 -07:00
Francois Marier
bac71f643b Bug 1438671 - Remove some inappropriate uses of dependent strings. r=gcp
Dependent strings are recommended only when dealing with a character
buffer (i.e. char*). Using it here makes it more likely that we'll
hang on to a string buffer that will be deallocated.

nsCString will by default share the underlying string buffers when
it can (i.e. when copying entire strings on the heap) so it should
be able to avoid unnecessary copies.

MozReview-Commit-ID: 3rTUYmouzcT

--HG--
extra : rebase_source : 8563bc242bf41cf8e12aa0b4ccba32c6a38d952a
2018-03-29 16:31:39 -07:00
Francois Marier
9b74d3b226 Bug 1438671 - Terminate tests early when updates fail. r=gcp
Some of the tests don't handle update errors very well and rely on timeouts to
fire after several minutes. Since these tests are not actually testing update
failure modes, it's safe to fail quicly and terminate the test with an
exception.

MozReview-Commit-ID: EJgaWke6kl2

--HG--
extra : rebase_source : 486797e1a3c23c5a65ae7c5134fd4db7e663a3aa
2018-03-27 16:29:02 -07:00
Francois Marier
e9564048ae Bug 1441211 - Use common prefix for all URL Classifier gtests. r=gcp
With a common prefix, all of the URL Classifier gtests can be run
like this:

  ./mach gtest UrlClassifier*

MozReview-Commit-ID: IqQznsldFOD

--HG--
extra : rebase_source : 5da7496e9607083b452c915608a0ab9adae818ff
2018-04-05 15:09:03 -07:00
Boris Zbarsky
1151dd21cc Bug 1448398. Stop returning unwrapped Components.interfaces from SpecialPowers.Ci. r=kmag 2018-03-26 13:35:04 -04:00
Boris Zbarsky
dc4481c38d Bug 1448235. List the right support-files for the url-classifier chrome tests. r=francois 2018-03-25 22:17:21 -04:00
Tooru Fujisawa
1adba8c1fc Bug 1442465 - Part 4.2: Stop unnecessarily awaiting on BrowserTestUtils.removeTab (simple part). r=dao 2018-03-19 11:16:45 +09:00
Francois Marier
7d4feeefa4 Bug 1442486 - Mark LookupCacheV4 as primed after creating it. r=gcp
RegenActiveTables() relies on mPrimed being set correctly and so
the V4 lookup cache should behave the same way as the V2 one.

The V2 lookup cache on the other hand was unnecessarily setting
mPrimed to true twice.

MozReview-Commit-ID: LwNdI9DTqZ7

--HG--
extra : rebase_source : ff7d7a051f28867be5c35c1079407bb2bfd3a490
2018-03-01 18:09:58 -08:00
Francois Marier
b401105973 Bug 1439455 - Display error names instead of codes in about:url-classifier. r=gcp
This also changes a few MOZ_LOG() messages to use the error name
instead of the raw numerical nsresult value.

MozReview-Commit-ID: Jcngd0S9j2z

--HG--
extra : rebase_source : f6e974569d8845211e0b25dabef2c41dda2ca1b6
2018-02-22 17:37:53 -08:00
Francois Marier
ef563d5e49 Bug 1439455 - Round timestamps up to nearest minute in log messages. r=gcp
MozReview-Commit-ID: DDv8smOelPQ

--HG--
extra : rebase_source : 883f230b90c27eb4dcfd1149ac7e4c1295b47d26
2018-02-22 14:21:41 -08:00
Florian Quèze
c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Valentin Gosu
84b854ce2c Bug 1433958 - Change code that sets nsIURI.userPass to use nsIURIMutator r=mayhemer
* Code in XMLHttpRequestMainThread is converted to set the username and password individually. This is because when the parameters are empty, it ended up calling SetUserPass(":") which always returns an error.

MozReview-Commit-ID: 3cK5HeyzjFE

--HG--
extra : rebase_source : f34400c11245d88648b0ae9c196637628afa9517
2018-02-26 20:43:46 +01:00
Francois Marier
12e894132e Bug 1362761 - Improve logging in PrefixSet. r=gcp
In addition to including the name of the prefix set in all of the
LOG messages, the VariablePrefixSet class now initializes its
dependent fixed-size prefix set correctly.

MozReview-Commit-ID: C7c78HLcXY3

--HG--
extra : rebase_source : 286ff92e42b960479522746fab62eae76fe3afb3
2018-02-21 17:55:12 -08:00
Francois Marier
42aba66c3c Bug 1362761 - Add checksum to nsUrlClassifierPrefixSet::mIndexDeltas array. r=gcp
Adding a checksum to an array in the URL classifier to test our
theory that the crashes are due to memory corruption.

This patch also restores the Compact() calls that were #ifdef'd
out in bug 1362761 to test a different theory.

MozReview-Commit-ID: IkLduLO3IXb

--HG--
extra : rebase_source : 3e628618aacddfc19c154e6e5c7bf78d8b4b5aa3
2018-02-15 16:59:14 -08:00
Florian Quèze
682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Dorel Luca
6ad641c5c4 Merge mozilla-inboud to mozilla-central. a=merge 2018-02-22 11:59:54 +02:00
Jason Orendorff
a48654929c Bug 1439665 - Part 1: #include some headers directly in files that use them. r=sfink.
"Include what you use."

--HG--
extra : rebase_source : 2239a380029e0efbc9dd3042459222a67c38d70f
extra : amend_source : 4453c32cc469caa592049167205666997f1a1e7b
extra : histedit_source : a533edd4a4d3d0642b08989e93674661d27baa6a%2C37d27eeef9580381ccc0de8507f60166dabf1730
2018-02-20 11:28:12 -06:00
Masatoshi Kimura
92e41502a6 Bug 1428258 - Stop using GetNativePath in url-classifier. r=mossop
MozReview-Commit-ID: 1pDfFN3NxrF

--HG--
extra : rebase_source : 35ebc6338c0a0501158a15f5db44f50472788890
extra : intermediate-source : 083e8b69855d9e4376fe10ee456eb38b7bdf5911
extra : source : 48214d0419573b861d72db1aebebebe18d860bd3
2017-12-16 22:48:29 +09:00
Francois Marier
79391b9eea Bug 1439468 - Improve error reporting in Safe Browsing protocol parser. r=gcp
MozReview-Commit-ID: JeyCZSbdZBd

--HG--
extra : rebase_source : 84007af04f9dea05503eb44203e40079e6c7252d
2018-02-20 13:54:30 -08:00
DimiL
6b0977cc01 Bug 1254323 - Reduce identical gethash requests done by the URL Classifier. r=gcp
MozReview-Commit-ID: KNNL1dBqXx0

--HG--
extra : rebase_source : fd18c3dac2a9fc331f78d492154283472ec2957d
2018-02-14 16:12:29 -08:00
Francois Marier
6d970e2d08 Bug 1435859 - Fix OOM crash on filenames without extensions. r=gcp
Passing a value of -1 to nsCString::Truncate() converts that
value to a large integer and leads to an unnecessary 4GB
memory allocation.

MozReview-Commit-ID: Icm5iUsEgA6

--HG--
extra : rebase_source : 7c7a52762ba86b1daadf60b0f362c5740d335781
2018-02-15 12:30:40 -08:00
Francois Marier
8462db41d1 Bug 1433636 - Put a limit on the length of Safe Browsing metadata values. r=gcp
Disk corruption can lead to the stored length of a value to be
unreasonably large and trigger an OOM.

Since values are all currently <= 32 bytes, we can safely enforce
a 256-byte upper bound.

MozReview-Commit-ID: XygReOpEK3

--HG--
extra : rebase_source : cd2bc880d43612b04d43fb4132bba32bdc3d0f3e
2018-01-30 14:21:33 -08:00
Jeremy Lempereur
97a98031cd Bug 1432791 - Remove the Microsecond AutoTimer resolution. r=Dexter
Telemetry's AutoTimer Microsecond resolution was not used. I removed it with the TimerResolution enum, which allowed me to remove a couple of templates as well.

MozReview-Commit-ID: 76qHgmYEsE3

--HG--
extra : rebase_source : 1f5826f1be990d4814de15875cd0a726213712d4
2018-02-07 21:11:22 +01:00
Francois Marier
8c3d3e2350 Bug 1436213 - Make test_bug1274685_unowned_list.js work on pver2 and pver4. r=gcp
This test is supposed to verify that Safe Browsing providers can
be initialized correctly even when a table is not configured
properly.

By removing a table from both google and google4, we ensure that
the test will be meaningful regardless of the stack in use.

Also filter out the console noise triggered by looking for the
update and gethash URLs of the "test" dummy provider.

MozReview-Commit-ID: KjWqSqA4FxJ

--HG--
extra : rebase_source : c68ab76201f200de5b5f4ab329bfe00a50603db2
2018-02-06 15:36:48 -08:00
Francois Marier
09c6a2d004 Bug 1435098 - Gate flashinfobar list on the plugins.show_infobar. r=bytesized,gcp
The list of sites to suppress flash infobars on should not be
downloaded from shavar unless the infobar feature is enabled.

MozReview-Commit-ID: BjkS5vWiilg

--HG--
extra : rebase_source : ba7c104b758fc04994b8438222dda0c7feadc787
2018-02-02 13:30:28 -08:00
Andrew McCreight
5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Narcis Beleuzu
b78f4e424e Backed out changeset 3884f0f9f316 (bug 1435098) for xpcshell failures on /test_bug1274685_unowned_list.js. CLOSED TREE 2018-02-06 19:52:30 +02:00
Francois Marier
0e1e355ce9 Bug 1435098 - Gate flashinfobar list on the plugins.show_infobar. r=bytesized,gcp
The list of sites to suppress flash infobars on should not be
downloaded from shavar unless the infobar feature is enabled.

MozReview-Commit-ID: BjkS5vWiilg

--HG--
extra : rebase_source : 3696960f06bf5c256dec7988d410de8208620b1b
2018-02-02 13:30:28 -08:00
Florian Quèze
2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Francois Marier
e6be1157ca Bug 1431192 - Only fetch download protection lists when Safe Browsing is enabled. r=gcp
Download protection requires both the malware list as well as its
own special lists. The code therefore checks that both Safe
Browsing and download protection are enabled before checking
downloaded files.

The list manager should check the same prefs before downloading
any of the download protection lists in order to avoid connecting
to the Safe Browsing server when Safe Browsing is fully disabled.

MozReview-Commit-ID: 66vMA56T4pJ

--HG--
extra : rebase_source : cef14cf5a03290bd10d8d02367709e1ffd5e9030
2018-01-29 15:16:54 -08:00
Francois Marier
21fb2aec25 Bug 1431370 - Make DoRiceDeltaDecode allocation fallible to fix startup OOM crash. r=gcp
MozReview-Commit-ID: 2vf4EU4TVCq

--HG--
extra : rebase_source : 2db85c786beb35cf2f203fcec7d0825e7b2b9a52
2018-01-30 13:26:43 -08:00
Kris Maglione
918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou
9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian
af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Andrea Marchesini
c6da271117 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug
* * *
Bug 1425458 - Resource timing entries Workers - part 10 - Correct parameters in NS_NewChannel in nsDataObj.cpp, r=me
2018-01-24 17:17:31 +01:00
Kris Maglione
aec63e140c Backed out 3 changesets (bug 1431533) for Android mochitest bustage. CLOSED TREE
MozReview-Commit-ID: 5ubE9EMQpZ9

--HG--
extra : histedit_source : df68d7595925c07d9d6e8bacc2c46e69556f479a%2C72b768b9825e20ede6603ead75f871c50dc041f7
2018-01-24 22:04:59 -08:00
Kris Maglione
30b3a49bfd Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
MozReview-Commit-ID: 8V1ZT53ReiP

--HG--
extra : rebase_source : 12b5f8c3e125111db7382eb3d7d20a99fb2c35b3
extra : absorb_source : e99fa7f6eee02e7e6cadeb898c7fcf6dac9c902a
extra : histedit_source : d0dfc31fadc2b81d341c9d0cd1efec02923c003b
2018-01-24 15:48:47 -08:00
Brindusan Cristian
368c3d5b6b Backed out 12 changesets (bug 1425458) for mochitest failures on WorkerPrivate.cpp on a CLOSED TREE
Backed out changeset 11997de13778 (bug 1425458)
Backed out changeset 100b9d4f36bc (bug 1425458)
Backed out changeset a29e9dbb8c42 (bug 1425458)
Backed out changeset b96d58fd945c (bug 1425458)
Backed out changeset f140da44ba68 (bug 1425458)
Backed out changeset af56400233d9 (bug 1425458)
Backed out changeset 7034af4332e4 (bug 1425458)
Backed out changeset f70500179140 (bug 1425458)
Backed out changeset 793bbfc23257 (bug 1425458)
Backed out changeset 2efb375a8ffc (bug 1425458)
Backed out changeset 07e781e37451 (bug 1425458)
Backed out changeset e875f3702a5f (bug 1425458)
2018-01-24 20:47:48 +02:00
Andrea Marchesini
6480b95ba3 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug 2018-01-24 17:17:31 +01:00
Dustin J. Mitchell
26d48b3202 Bug 1403519 - only build docs when necessary r=gps
This marks **/docs/** as exclusively docs, and code that is autodoc'd as
inclusively docs.

That means that a change that purely modifies documentation files will *only*
run `docs` tasks, while a change that modifies autodoc'd source code will
*additionaly* run `docs` tasks.  The tasks do not run by default.

MozReview-Commit-ID: G9tOK0AwtrI

--HG--
extra : rebase_source : 8dd971e5c9b0eb5f47895664a4ea49442f303ecb
extra : source : 0881de9b2b5e36ec37cc866f1d4af109da57a919
2017-10-02 18:22:56 +00:00
Noemi Erli
1c9bbfbebc Backed out 2 changesets (bug 1403519) for bustage on \python\mozbuild\mozbuild\test\frontend\test_reader.py on a CLOSED TREE
Backed out changeset f53f8adcd578 (bug 1403519)
Backed out changeset 5b293bcd3fc7 (bug 1403519)
2018-01-17 07:23:40 +02:00
Dustin J. Mitchell
00f03c413e Bug 1403519 - only build docs when necessary r=gps
This marks **/docs/** as exclusively docs, and code that is autodoc'd as
inclusively docs.

That means that a change that purely modifies documentation files will *only*
run `docs` tasks, while a change that modifies autodoc'd source code will
*additionaly* run `docs` tasks.  The tasks do not run by default.

MozReview-Commit-ID: G9tOK0AwtrI

--HG--
extra : rebase_source : 8dd971e5c9b0eb5f47895664a4ea49442f303ecb
extra : source : 0881de9b2b5e36ec37cc866f1d4af109da57a919
2017-10-02 18:22:56 +00:00
Margareta Eliza Balazs
a331a849a4 Backed out changeset 6d539e4a02bd (bug 1403519) for lint failures on a CLOSED TREE 2018-01-11 22:32:27 +02:00
Dustin J. Mitchell
522245f2f2 Bug 1403519 - only build docs when necessary r=gps
This marks **/docs/** as exclusively docs, and code that is autodoc'd as
inclusively docs.

That means that a change that purely modifies documentation files will *only*
run `docs` tasks, while a change that modifies autodoc'd source code will
*additionaly* run `docs` tasks.  The tasks do not run by default.

MozReview-Commit-ID: G9tOK0AwtrI

--HG--
extra : rebase_source : 8dd971e5c9b0eb5f47895664a4ea49442f303ecb
extra : source : 0881de9b2b5e36ec37cc866f1d4af109da57a919
2017-10-02 18:22:56 +00:00
DimiL
316d8a2562 Bug 1407879 - Add testcase for login reputation service. r=francois
MozReview-Commit-ID: HhvPqTTz7pg

--HG--
extra : rebase_source : 67b87e0e6265cce47902ea586e40b32780b2319f
2018-01-04 09:14:15 +08:00
Florian Quèze
0f55cd45be Bug 1421992 - script-generated patch to replace do_execute_soon, do_print and do_register_cleanup with executeSoon, info and registerCleanupFunction, rs=Gijs. 2017-12-21 11:10:23 +01:00
Florian Quèze
032c961e0a Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
Jonathan Kingston
d592ba8cc6 Bug 1419007 - ensure errors FireOnLocationChange after documentURI has changed in docshell. r=sawang r=francois
MozReview-Commit-ID: AaZEIOI4sW1
2017-11-21 11:40:01 +00:00
DimiL
fc50fe21a9 Bug 1421500 - Disable back-off for SafeBrowsing testcases not testing back-off. r=francois
After this patch landed, we will have 3 cases:
1. For providers are not "test", for example, google, google4, mozilla ... etc
   backoff CANNOT be disabled.
2. For "test" provider, if preference "browser.safebrowsing.provider.test.disableBackoff" is ON
   backoff is disabled.
3. For "test" provider, if preference "browser.safebrowsing.provider.test.disableBackoff" is Off
   backoff is NOT disabled.

So if your testcase will use listmanager or hashcompleter, you should try to use "test" provider
if possible, otherwise testcase may encounter intermittent failure due to backoff.

MozReview-Commit-ID: 3BDxs0ARyQM

--HG--
extra : rebase_source : 1736abe307849089d68f0f2b1a0127b9b465abed
2017-12-08 12:18:34 +08:00
Csoregi Natalia
3257faa639 Backed out changeset 2467ce87767e (bug 1421500) for ESLint failure /toolkit/components/url-classifier/nsUrlClassifierLib.js:108. r=backout on a CLOSED TREE 2017-12-14 04:38:07 +02:00
DimiL
9e0fa6963a Bug 1421500 - Disable back-off for SafeBrowsing testcases not testing back-off. r=francois
After this patch landed, we will have 3 cases:
1. For providers are not "test", for example, google, google4, mozilla ... etc
   backoff CANNOT be disabled.
2. For "test" provider, if preference "browser.safebrowsing.provider.test.disableBackoff" is ON
   backoff is disabled.
3. For "test" provider, if preference "browser.safebrowsing.provider.test.disableBackoff" is Off
   backoff is NOT disabled.

So if your testcase will use listmanager or hashcompleter, you should try to use "test" provider
if possible, otherwise testcase may encounter intermittent failure due to backoff.

MozReview-Commit-ID: 3BDxs0ARyQM

--HG--
extra : rebase_source : 84250bc7aab28a896afb2d47f98435139139c1f3
2017-12-08 12:18:34 +08:00
Sylvestre Ledru
e68f74a508 Bug 1424867 - Fix some ignored-qualifiers warnings in url-classifier & reputationservice r=francois
MozReview-Commit-ID: 9lLifMbNlnO

--HG--
extra : rebase_source : a69a76f97a9b4912b1de3f556114bf0804f28266
2017-12-12 08:10:59 -06: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
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
DimiL
b0c17b073d Bug 1416987 - Force an update when safebrowsing tables are changed in preference. r=francois,johannh
This patch adds a |ForceUpdates| API in listmanager so when we change Safe Browsing tables,
we can use this API to force an update to ensure new tables are downloaded immediately.

If the update fails for any reason (Server is down for example), then the new tables will have
to wait until next update time.

MozReview-Commit-ID: 3Zh1pU8XaYo

--HG--
extra : rebase_source : 215cd2f4484b07663566024bfa5e182ee3807d4e
2017-11-29 10:33:26 +08:00
arthur.iakab
0471643394 Backed out changeset e0aaadf66179 (bug 1416987) Backing out eslint failures from file toolkit/components/url-classifier/nsUrlClassifierListManager.js:366:2 r=backout on a CLOSED TREE
--HG--
extra : amend_source : de7303717fc1968487cc24581cef5c8c8a86c814
2017-11-29 11:53:36 +02:00
DimiL
0781f47b0a Bug 1416987 - Force an update when safebrowsing tables are changed in preference. r=francois,johannh
This patch adds a |ForceUpdates| API in listmanager so when we change Safe Browsing tables,
we can use this API to force an update to ensure new tables are downloaded immediately.

If the update fails for any reason (Server is down for example), then the new tables will have
to wait until next update time.

MozReview-Commit-ID: 3Zh1pU8XaYo

--HG--
extra : rebase_source : 65ff9de561e21cfb0b80be0f62335351e612cc01
2017-11-29 10:33:26 +08:00
Mark Banner
aef9c37979 Bug 1412893 - Change instances of using getService to Services.jsm where possible in toolkit/components/url-classifier r=francois
MozReview-Commit-ID: 7ejzcckcwQ1

--HG--
extra : rebase_source : 72eca0da3d8a0c125958c6272fb15edfbb122549
2017-10-31 20:22:58 +00:00
DimiL
fb631be6ce Bug 1325888 - Clear cached completion result when close safebrowsing database. r=francois
Safebrowsing testcase will close and then re-open database to simulate firefox restart.
This bug happened when DB service already has a previously cached completion result and then
re-open database. In this scenario, if testcase triggers another the same completion request,
we won't cache it because we thought we have it already (See nsUrlClassifierDBServiceWorker::CacheCompletion).

This causes a testcase assertion when testcase expects the completion
result should be stored in LookupCache.

MozReview-Commit-ID: 8o57jHv92OH

--HG--
extra : rebase_source : 90861060437d6cef860b85dd669d76e74ceec660
2017-11-01 08:40:00 +08: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
Mark Banner
4de6bf22b1 Bug 1411368 - Automatically fix no-multi-spaces issues raised when using ESLint 4. r=mossop
MozReview-Commit-ID: H5YVp3rnzGo

--HG--
extra : rebase_source : 5b45b6c0df834131812d094e975047eaad374e06
2017-10-26 11:47:01 +01: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
DimiL
0327430fc7 Bug 1362761 : Remove Compact from NIGHTLY build for debug purpose. r=francois
We suspect nsTArray Compact may cause a crash issue during SafeBrowsing
update. Temporarily remove it from NIGHTLY build, if crash still shows
at NIGHTLY build, we will restore it back.

MozReview-Commit-ID: 2wjbMykEbJ8

--HG--
extra : rebase_source : 1be0d12e9d1de7f249c509cfa016bb26242cbdc7
2017-10-11 16:56:06 +08:00
Francois Marier
7f48d0bdd3 Bug 1385461 - Upgrade to the latest version of the protobuf library. r=dimi,fitzgen,glandium,mattwoodrow,mossop
The tarball that was imported is the 3.4.1 release:

  https://github.com/google/protobuf/releases/tag/v3.4.1
  https://github.com/google/protobuf/releases/download/v3.4.1/protobuf-cpp-3.4.1.tar.gz

This drops all of the customizations that are no longer needed,
which includes a few issues that were fixed upstream:

- r512.patch from bug 892856:

    https://searchfox.org/mozilla-central/rev/bab9dbe9c4ef71f71fb07e53b701fb2dfde277d9/toolkit/components/protobuf/r512.patch
    b04e5cba35/src/google/protobuf/io/zero_copy_stream_impl.cc (L43)

- vs2013.patch, also from bug 892856:

    https://searchfox.org/mozilla-central/rev/bab9dbe9c4ef71f71fb07e53b701fb2dfde277d9/toolkit/components/protobuf/vs2013.patch
    b04e5cba35/src/google/protobuf/wire_format_lite_inl.h (L39)

- sparc64 fixes in m-c-changes.patch from bug 1275204:

    https://hg.mozilla.org/integration/mozilla-inbound/rev/21d692e82582
    b04e5cba35/src/google/protobuf/stubs/platform_macros.h (L68)

The LOGLEVEL_ERROR hack in m-c-changes.patch from bug 1024774 and
bug 1320179 was replaced by a NOGDI define in moz.build as suggested
by upstream:

    https://github.com/google/protobuf/pull/3745/files#r144915445

The other customizations that were dropped came from bug 1024774.

The patch for OpenBSD/32-bit will likely be fixed upstream in a
future release:

    https://github.com/google/protobuf/pull/3747#issuecomment-336581244

Upgrading the protobuf library also required re-generating all
of the existing .pb.h and pb.cc files (they are neither forward
nor backward-compatible) and making adjustments to the build
config to make it compile (and silence warnings).

text_format.cc can now be compiled as part of UNIFIED_SOURCES.

MozReview-Commit-ID: 7F2IqFmwQnN

--HG--
extra : rebase_source : b907a28a8063ecd82bb38530d309faafc7b83175
2017-10-18 15:02:05 -07:00
Francois Marier
a6fa4cc3ef Bug 1385461 - Move URL Classifier protobuf files to match other components. r=dimi
MozReview-Commit-ID: 5N1iOpocVd8

--HG--
rename : toolkit/components/url-classifier/protobuf/safebrowsing.pb.cc => toolkit/components/url-classifier/chromium/safebrowsing.pb.cc
rename : toolkit/components/url-classifier/protobuf/safebrowsing.pb.h => toolkit/components/url-classifier/chromium/safebrowsing.pb.h
extra : rebase_source : c000be268c5747ae38c0db8704cf3009bd4756d8
2017-10-12 17:27:36 -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
dimi
48a63f5601 Bug 1408631 - Release SafeBrowsing lookupcache in worker thread while shutdown. r=francois
MozReview-Commit-ID: HuPUyIDFLPX

--HG--
extra : rebase_source : d6e4f5bbcf96c97541792e23447f0810150c5ac9
2017-10-20 10:18:59 +08: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
Sebastian Hengst
ffcd2ce160 merge mozilla-central to autoland. r=merge a=merge on a CLOSED TREE
--HG--
extra : amend_source : ef359be373a97cad5a91f0150a46add4c3d8ab7c
2017-10-18 15:54:23 +02:00
Sebastian Hengst
b1cdb2af00 Backed out changeset 03e4f9175b16 (bug 1409329) 2017-10-17 22:03:39 +02:00
Sebastian Hengst
66e04dcde6 Backed out changeset 4666cde20909 (bug 1409327) 2017-10-17 22:03:33 +02:00
Boris Zbarsky
fb684cc726 Bug 1409152. Add an nsTArray::ContainsSorted method. r=froydnj 2017-10-17 15:39:59 -04:00
Andrea Marchesini
d526801916 Bug 1409327 - NS_NewBufferedInputStream should take the ownership of the inputStream, r=smaug 2017-10-17 20:38:05 +02:00
Andrea Marchesini
fe04c2050c Bug 1409329 - NS_NewBufferedOutputStream should take the ownership of the outputStream, r=smaug 2017-10-17 20:38:05 +02:00
DimiL
e18e651af1 Bug 1408396 - Fix a deadlock issue when about:url-classifier accesses GetCacheInfo API. r=francois
When about:url-classifier ask cache information by using |GetCacheInfo| API, this API
will send a SYNC request to off-main thread. If NSS module is not initialized then off-main thread
will send init request to main thread, and this causes a deadlock.

This patch change |GetCacheInfo| API to asynchronous so main thread will not be
blocked.

MozReview-Commit-ID: 3y2hOjCoRUj

--HG--
extra : rebase_source : 4d1ec1b7fd960cdf90bca577879b41fbbc2a4e17
2017-10-18 09:11:26 +08:00
Kris Maglione
6eccf17f33 Bug 1404198: Part 2f - Switch to NS_NewTimer* in toolkit. r=njn
MozReview-Commit-ID: 185rZ99R6zV

--HG--
extra : rebase_source : 5af93b6f4b115be6b970563aedc94ec8a65f527d
2017-10-15 23:14:00 -07:00
Dan Banner
7caa92d5d8 Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8
MozReview-Commit-ID: Jm8BRgt6mIv
2017-10-15 20:50:39 +01:00