Commit Graph
105 Commits
Author SHA1 Message Date
Sylvestre Ledru 9887c45a7e Bug 2036402 - Apply std::move in toolkit where values can be moved instead of copied r=credential-management-reviewers,ai-platform-reviewers,dimi,chutten
Differential Revision: https://phabricator.services.mozilla.com/D298093
2026-05-05 15:20:47 +00:00
James Han c08ba50e21 Bug 2027333 - Add Parameter Range Checks to Rice Delta Decoder r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D291178
2026-04-28 14:48:46 +00:00
Sylvestre Ledru 3baa4071fd Bug 2023419 - Remove remaining Emacs/Vim modelines from the source tree r=emilio,necko-reviewers,geckoview-reviewers,media-playback-reviewers,webidl,webrtc-reviewers,devtools-reviewers,places-reviewers,win-reviewers,firefox-style-system-reviewers,layout-reviewers,mstriemer,dshin,nchevobbe,padenot,ohall,handyman,valentin,mjf
Follow-up to bbcc7547a3 which cleaned up browser/. This strips the
same modelines from the rest of the tree, excluding paths listed in
tools/rewriting/ThirdPartyPaths.txt.

Differential Revision: https://phabricator.services.mozilla.com/D295577
2026-04-21 21:37:56 +00:00
Tim Huang 5917024326 Bug 1975192 - Implement the RiceDeltaDecoder for various lengths. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D268504
2025-10-15 13:40:29 +00:00
agoloman 9af5cb6bfc Revert "Bug 1975192 - Implement the RiceDeltaDecoder for various lengths. r=dimi" for causing build bustages @RiceDeltaDecoder.cpp.
This reverts commit 45bb87a424.
2025-10-15 08:44:43 +00:00
Tim Huang 45bb87a424 Bug 1975192 - Implement the RiceDeltaDecoder for various lengths. r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D268504
2025-10-15 07:57:53 +00:00
Tim Huang c982f96ab8 Bug 1975181 - Part 4: Implement the ProtocolParser for the SafeBrowsing V5 BatchGetHashListsResponse. r=dimi
This patch implements the protocol parser for the
BatchGetHashListsResponse. Currently, we only support parsing the 4
bytes encoded additions in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D260289
2025-09-05 09:00:59 +00:00
serge-sans-paille 6bddb5135b Bug 1924513 - Remove code guarded by MOZ_SAFEBROWSING_DUMP_FAILED_UPDATES r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D225508
2024-10-15 08:37:06 +00:00
serge-sans-paille fe660ddf2c Bug 1825336 - Make toolkit/components/url-classifier/ buildable outside of a unified build environment r=andi
part 2.

Differential Revision: https://phabricator.services.mozilla.com/D174362
2023-04-03 20:39:57 +00:00
Alex Franchuk d76a98ef04 Bug 1342901 - Replace SplitTables by nsTSubstring::Split. r=dimi
This replaces two instances where string splitting was done inline with calls to
nsTSubstring::Split.

Differential Revision: https://phabricator.services.mozilla.com/D166206
2023-01-09 15:50:22 +00:00
Tim Huang f7e2724026 Bug 1801065 - Fix ProtocolParserV2::ProcessHostSubComplete() when handling v2 sub chunk. r=dimi
This patch fixes the incorrect way that we used to handle the v2 sub
chunk in ProtocolParserV2::ProcessHostSubComplete().

Differential Revision: https://phabricator.services.mozilla.com/D164564
2022-12-13 13:01:20 +00:00
Nika Layzell 0e975d0e8d Bug 1741665 - Align nsCString's public size_type better with other C++ APIs, r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D131422
2021-12-13 21:47:56 +00:00
Simon Giesecke a69d79b6db 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 c75f3b56b2 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 99b166167f 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
2020-03-10 08:48:24 +00:00
Se Yeon Kim 03cde63e7f Bug 1594497 - Increase shavar chunk size limit r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D52913
2019-12-27 21:11:45 +00:00
Razvan Maries f96b2fe786 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 738ec302cc Bug 1594497 - Increase shavar chunk size limit r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D52913
2019-12-17 19:41:03 +00:00
Cosmin Sabou 649941a503 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 0caea458af Bug 1594497 - Increase shavar chunk size limit r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D52913
2019-12-17 00:19:21 +00:00
DimiDL 8b9611b260 Bug 1576374 - Use fallible append in ProtocolParser::AppendStream. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D48354
2019-10-07 15:02:39 +00:00
Dimi Lee 0b4d6efd3f 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
2019-03-07 14:40:14 +00:00
Dorel Luca 688429d9d6 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 15191963de 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
2019-02-28 08:12:36 +00:00
Andrea Marchesini 0fd63f6e02 Bug 1528596 - Devirtualize accesses to nsUrlClassifierUtils, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D20086
2019-02-19 14:35:57 +00:00
Kris Maglione 4b169665d2 Bug 1478124: Part 8a - Update toolkit module to use a static component manifest. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D15039
2018-12-16 16:03:00 -08:00
arthur.iakab 127fb281ff 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 3c9b881f84 Bug 1478124: Part 8a - Update toolkit module to use a static component manifest. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D15039
2018-12-16 16:03:00 -08:00
Sylvestre Ledru e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Dimi Lee 16c28822da 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
2018-10-16 10:36:01 +00:00
Francois Marier ef8ea55aca 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
2018-06-01 15:48:48 -07:00
Francois Marier f0a2dbac78 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
2018-05-10 17:58:01 -07:00
Francois Marier 29195ee671 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
2018-04-24 10:08:56 +02:00
Francois Marier 4526f4e395 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
2018-04-12 10:11:30 -07:00
Andreea Pavel bc2ff7d246 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 4974622a06 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
2018-04-19 17:10:45 -07:00
Francois Marier cac0e90920 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
2018-04-12 10:11:30 -07:00
Sebastian Hengst d91e9954eb 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 6095241db8 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Francois Marier 170af9408f 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
2018-04-03 17:11:30 -07:00
Francois Marier 6d04e45e4a 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
2018-02-22 17:37:53 -08:00
Francois Marier 322e21dae7 Bug 1439468 - Improve error reporting in Safe Browsing protocol parser. r=gcp
MozReview-Commit-ID: JeyCZSbdZBd
2018-02-20 13:54:30 -08:00
Francois Marier 5835776265 Bug 1431370 - Make DoRiceDeltaDecode allocation fallible to fix startup OOM crash. r=gcp
MozReview-Commit-ID: 2vf4EU4TVCq
2018-01-30 13:26:43 -08:00
Thomas Nguyen 71a001d62e 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 14424677af 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
2017-07-26 16:03:57 -04:00
Thomas Nguyen 41442f215a Bug 1378680 - Refactor usage fallible alloc in url-classifier r=francois
MozReview-Commit-ID: HHG1ByeIwZv
2017-07-20 16:20:27 +08:00
Nicholas Nethercote 4ce1e9c11f Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString
2017-06-20 19:19:52 +10:00
Tom Tromey e014854967 Bug 1060419 - convert one nsPrintfCString to MOZ_LOG, r=froydnj
MozReview-Commit-ID: IFwMAtAgfRq
2016-12-19 13:15:14 -07:00
Tom Tromey a4b717ab39 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs
2016-12-15 20:16:31 -07:00
Henry 2fabeb988d Bug 1332213 - Store the update stream duplicately in v2 protocol parser. r=francois.
MozReview-Commit-ID: dPbvro5xIa
2017-01-19 17:16:13 +08:00