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

93 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Simon Giesecke 4bef2b41e0 Bug 1626570 - Improve handling of copying arrays in toolkit/components/url-classifier/. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D72328
2020-04-30 09:40:24 +00:00
Simon Giesecke 8ad76c7e47 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in toolkit. r=mossop
Depends on D66008

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

--HG--
extra : moz-landing-system : lando
2020-03-10 08:48:24 +00:00
Se Yeon Kim bb56d6e2cb Bug 1594497 - Increase shavar chunk size limit r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D52913

--HG--
extra : moz-landing-system : lando
2019-12-27 21:11:45 +00:00
Razvan Maries 6651e8f30b Backed out 2 changesets (bug 1594497) for breaking Twitter pages.
Backed out changeset dc907aeafad0 (bug 1594497)
Backed out changeset fdef77d6d362 (bug 1594497)
2019-12-22 18:29:25 +02:00
Se Yeon Kim 68e5d2ff11 Bug 1594497 - Increase shavar chunk size limit r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D52913

--HG--
extra : moz-landing-system : lando
2019-12-17 19:41:03 +00:00
Cosmin Sabou ba00e94250 Backed out 2 changesets (bug 1594497) causing firefox-ui test failures on test_initial_download.py. CLOSED TREE
Backed out changeset c817e489fd80 (bug 1594497)
Backed out changeset a97415a7ce80 (bug 1594497)
2019-12-17 21:37:13 +02:00
Se Yeon Kim 8dc91f2dcd Bug 1594497 - Increase shavar chunk size limit r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D52913

--HG--
extra : moz-landing-system : lando
2019-12-17 00:19:21 +00:00
DimiDL dc1ca082ff Bug 1576374 - Use fallible append in ProtocolParser::AppendStream. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D48354

--HG--
extra : moz-landing-system : lando
2019-10-07 15:02:39 +00:00
Dimi Lee 5ad694e4e9 Bug 1353956 - P1. Rename checksum used in SafeBrowsing V4 to SHA256. r=gcp
SafeBrowsing V4 protocol use SHA-256 as the checksum to check integrity
of update data and also the integrity of prefix files.

SafeBrowsing V2 HashStore use MD5 as the checksum to check integrity of
.sbstore

Since we are going to use CRC32 as the integrity check of V4 prefix files,
I think rename V4 "checksum" to SHA256 can improve readability.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 14:40:14 +00:00
Dorel Luca fc78eb74a3 Backed out 6 changesets (bug 1353956) for Linux Build bustage
Backed out changeset 71dafccc22ae (bug 1353956)
Backed out changeset f1f29fe519cf (bug 1353956)
Backed out changeset 4978556a66f6 (bug 1353956)
Backed out changeset bc0b91abce9b (bug 1353956)
Backed out changeset 6b8412db5a05 (bug 1353956)
Backed out changeset 3d326cfcd002 (bug 1353956)
2019-03-07 01:49:03 +02:00
Dimi Lee 1032932288 Bug 1353956 - P1. Rename checksum used in SafeBrowsing V4 to SHA256. r=gcp
SafeBrowsing V4 protocol use SHA-256 as the checksum to check integrity
of update data and also the integrity of prefix files.

SafeBrowsing V2 HashStore use MD5 as the checksum to check integrity of
.sbstore

Since we are going to use CRC32 as the integrity check of V4 prefix files,
I think rename V4 "checksum" to SHA256 can improve readability.

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

--HG--
extra : moz-landing-system : lando
2019-02-28 08:12:36 +00:00
Andrea Marchesini c607e645dc Bug 1528596 - Devirtualize accesses to nsUrlClassifierUtils, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D20086

--HG--
extra : moz-landing-system : lando
2019-02-19 14:35:57 +00:00
Kris Maglione b83df4e952 Bug 1478124: Part 8a - Update toolkit module to use a static component manifest. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D15039

--HG--
extra : rebase_source : 1683d6ced9a6c10e6fa19425debbb51950b9b629
extra : source : d94039b199437180309264cb4c206ae7ebb7d21d
2018-12-16 16:03:00 -08:00
arthur.iakab c1fae83952 Backed out 16 changesets (bug 1478124) for failing android geckoview-junit CLOSED TREE
Backed out changeset fce62c77a56b (bug 1478124)
Backed out changeset eb2fa3b5edf7 (bug 1478124)
Backed out changeset 8dacce59fcc0 (bug 1478124)
Backed out changeset 012fd0107204 (bug 1478124)
Backed out changeset 496aaf774697 (bug 1478124)
Backed out changeset 21f4fda03159 (bug 1478124)
Backed out changeset b0444e0bc801 (bug 1478124)
Backed out changeset d94039b19943 (bug 1478124)
Backed out changeset 5d85deac61c2 (bug 1478124)
Backed out changeset 929fd654c9df (bug 1478124)
Backed out changeset 1ddd80d9e91a (bug 1478124)
Backed out changeset b8d2dfdfc324 (bug 1478124)
Backed out changeset f500020a273a (bug 1478124)
Backed out changeset dd00365ebb55 (bug 1478124)
Backed out changeset 538e40c5ee13 (bug 1478124)
Backed out changeset bedaa9c437ad (bug 1478124)
2019-01-29 10:03:06 +02:00
Kris Maglione d20f7f8e72 Bug 1478124: Part 8a - Update toolkit module to use a static component manifest. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D15039

--HG--
extra : rebase_source : 55c387662960d82986a2a0205d3b8e451304db4b
extra : absorb_source : bd201f3bcf08f70480f19a22bfb7a8bd9cb015a1
extra : histedit_source : ec13a9b248801ab36baa275e566765734e6f3717
2018-12-16 16:03:00 -08:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Dimi Lee 86eec944ad Bug 1439450 - Ignore has_first_value() check in ProtocolParser. r=francois
Sometimes the protocol buffer data (RiceEncodingData) sent by Google's Safe Browsing server has the following properties:

1. |has_first_value| is false
2. |num_entries| > 0

In this case, we can still parse the data and apply partial update correctly by assuming that the first value is equal to 0.

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

--HG--
extra : moz-landing-system : lando
2018-10-16 10:36:01 +00:00
Francois Marier 214074e8d4 Bug 1434206 - Keep TableUpdate objects in smart pointers. r=gcp
Manually keeping tabs on the lifetime of these objects is a pain
and is the likely source of some of our crashes. I suspect we might
also be leaking memory.

This change creates an explicit copy of the main array into the
update thread to avoid using a non-thread-safe shared data
structure. This is a shallow copy. Only the pointers to the
TableUpdates are copied, which means one pointer per list (e.g. 5
in total for google4 in a new profile).

MozReview-Commit-ID: 221d6GkKt0M

--HG--
extra : rebase_source : e1b81f11bb9b41e465571a95845079f455b5868e
2018-06-01 15:48:48 -07:00
Francois Marier 2a98feb53f Bug 1434206 - Clear the current table when protocol parser is done. r=gcp
Add assertions in the functions that don't already test for
mTableUpdate just to be extra-safe.

MozReview-Commit-ID: 8R67SLSgj23

--HG--
extra : rebase_source : 78283eec163d7bf26598d6a7c979878ed0813d32
2018-05-10 17:58:01 -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 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 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 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 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
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
Thomas Nguyen e70d76485c Bug 1394031 - Remove mCryptoHash members of nsUrlClassifierDBServiceWorker and ProtocolParser
The usage of cryptoHash consists of a complete set of Init, Update, and Finish, there's
no reason to keep it around

MozReview-Commit-ID: 7bT9IsWEM5m
2017-09-14 10:51:55 +08:00
Kartikaya Gupta ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Thomas Nguyen 7e59091f92 Bug 1378680 - Refactor usage fallible alloc in url-classifier r=francois
MozReview-Commit-ID: HHG1ByeIwZv

--HG--
extra : rebase_source : 1b025edaac49ee202b9a10cd2f2589acb587649b
2017-07-20 16:20:27 +08: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
Tom Tromey 38a0f29d29 Bug 1060419 - convert one nsPrintfCString to MOZ_LOG, r=froydnj
MozReview-Commit-ID: IFwMAtAgfRq

--HG--
extra : rebase_source : 9f125c20fd72c0fcb517738a4de6ffdcd758fdbc
2016-12-19 13:15:14 -07:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Henry 4f731551c1 Bug 1332213 - Store the update stream duplicately in v2 protocol parser. r=francois.
MozReview-Commit-ID: dPbvro5xIa

--HG--
extra : rebase_source : 911291a89531bbe55490f38b094015fcd6664562
2017-01-19 17:16:13 +08:00
Thomas Nguyen 493ff90f5c Bug 1315386 - Make Safe Browsing code more shutdown-aware. r=francois,gcp.
MozReview-Commit-ID: ATCVfh5YLZl

--HG--
extra : rebase_source : d87cfae3838f1a26dc67d2546264e47768011a63
2016-11-25 16:02:37 +08:00
Henry Chang 45d5eda33b Bug 1312323 - Consider the "single encoded value" case and bubble the decoding error up. r=francois.
MozReview-Commit-ID: 1GNFkMQ1JoD
2016-10-26 10:03:49 +08:00
Henry 36fa608182 Bug 1307541 - ProtocolParserProtobuf to init and return update time properly. r=francois.
MozReview-Commit-ID: CmVWVKUeunJ

--HG--
extra : rebase_source : e8cd28a805b892fd26ca9bede3523a04f1bb5686
2016-10-18 14:45:21 +08:00
Henry Chang dc3bbda5bd Bug 1305484 - Save/load state and checksum to/from disk rather than prefs. r=dimi,francois
MozReview-Commit-ID: 4gmmrI9wY4c

--HG--
extra : rebase_source : f7f4462b7325bce9a92f747c54b448e2693e40ac
2016-10-13 15:22:08 +08:00
Henry Chang b468335de9 Bug 1285848 - Part 2: Request and parse RICE encoded prefix by default. r=francois
MozReview-Commit-ID: Cd0lT5VTM7t

--HG--
extra : rebase_source : 08724d3c8039039b8c73f58230b1cdad94ccd786
extra : source : 3abd3bc8a0119433ef66864c8c7fd1394fb0cc14
2016-10-05 14:59:53 +08:00
Dimi Lee 3ef7d52f53 Bug 1305801 - Part 4: Store variable-length prefix to disk. r=francois, r=gcp
MozReview-Commit-ID: BMTGtgMuQdg

--HG--
extra : rebase_source : dc4975d9ac8d14ecfabf6fc1229fdb8e863cde46
2016-09-19 11:51:01 +08:00
Phil Ringnalda 35869db574 Backed out 5 changesets (bug 1305801) for ASan gtest bustage
Backed out changeset 0c95d5dec6d9 (bug 1305801)
Backed out changeset bca0e706dbc5 (bug 1305801)
Backed out changeset def8da367beb (bug 1305801)
Backed out changeset 56ceae52d847 (bug 1305801)
Backed out changeset 14457cc4c325 (bug 1305801)
2016-10-03 22:14:49 -07:00
Dimi Lee f0aab4a2ce Bug 1305801 - Part 4: Store variable-length prefix to disk. r=francois, r=gcp
MozReview-Commit-ID: BMTGtgMuQdg

--HG--
extra : rebase_source : 6f613883071de209f53596060b637e928f458978
2016-09-19 11:51:01 +08:00
Nicholas Nethercote 34dcc7b852 Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm.
This change avoids lots of false positives for Coverity's CHECKED_RETURN
warning, caused by NS_WARN_IF's current use in both statement-style and
expression-style.

In the case where the code within the NS_WARN_IF has side-effects, I made the
following change.

> NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));
> -->
> Unused << NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));

In the case where the code within the NS_WARN_IF lacks side-effects, I made the
following change.

> NS_WARN_IF(!condWithoutSideEffects);
> -->
> NS_WARNING_ASSERTION(condWithoutSideEffects, "msg");

This has two improvements.
- The condition is not evaluated in non-debug builds.
- The sense of the condition is inverted to the familiar "this condition should
  be true" sense used in assertions.

A common variation on the side-effect-free case is the following.

> nsresult rv = Fn();
> NS_WARN_IF_(NS_FAILED(rv));
> -->
> DebugOnly<nsresult rv> = Fn();
> NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Fn failed");

--HG--
extra : rebase_source : 58788245021096efa8372a9dc1d597a611d45611
2016-09-02 17:12:24 +10:00
Henry Chang f67032cc11 Bug 1287059 - Part 2: Save/get the list states to/from prefs temporarily. r=francois.
MozReview-Commit-ID: GaDExi2d0YX

--HG--
extra : rebase_source : 0b1ccc96dc4acffbb404b00747430cc462d047fa
2016-08-12 17:29:42 +08:00
Henry db1a9a2ec6 Bug 1287059 - Part 1: Return all possible list names while converting from threat type. r=francois.
MozReview-Commit-ID: KgT4CrBzvu0

--HG--
extra : rebase_source : 6067f296fd820c6948bb418bf67371b56326338a
2016-08-16 17:30:11 +08:00
Henry Chang 4c1f039d17 Bug 1284204 - Parse SafeBrowsing V4 updates to TableUpdateV4. r=francois.
MozReview-Commit-ID: 88AEIbosxKl

--HG--
extra : rebase_source : 0cf1c60713a938a72c87d140869a63b2afa12e3f
extra : source : 13292c9abdce368d506d5c4ff79b4b14781e64ad
2016-08-12 11:55:48 +08:00