Commit Graph

1078 Commits

Author SHA1 Message Date
Dimi Lee
2c0f37dc9a Bug 1305801 - Part 2: Add telemetry for variable-length prefix set. r=francois
MozReview-Commit-ID: 8SebDJ8ZeKn
2016-09-27 14:26:09 -07:00
Dimi Lee
62bb662f25 Bug 1305801 - Part 1: Implement variable length PrefixSet class for Safe Browsing v4. r=francois, r=gcp
MozReview-Commit-ID: FahurMd1KGe
2016-10-04 21:43:08 +08:00
Henry
6fd66a6613 Bug 1305567 - Use base64url encoding and avoid cutting the state. r=francois 2016-09-30 10:36:40 -07:00
Sebastian Hengst
4ad6c96678 Backed out changeset d46155cc719e (bug 1305567) for various failures in browser-chrome, devtools, and xpcshell (e.g. test_streamupdater.js) tests. r=backout on a CLOSED TREE 2016-09-29 20:54:50 +02:00
Henry
285154b77e Bug 1305567 - Use base64url encoding, avoid cutting the state and dump download error message. r=francois.
MozReview-Commit-ID: 1umDhxY5eKl
2016-09-27 11:48:11 -07:00
Henry Chang
13ce085b08 Bug 1302044 - Init tableArray with only enabled tables. r=francois.
MozReview-Commit-ID: KMp8oLkBXwb
2016-09-12 17:30:06 +08:00
Francois Marier
42d01a3778 Bug 1297865 - Remove unused URLCLASSIFIER_PS_FAILURE probe. r=bsmedberg,gcp
MozReview-Commit-ID: Gl4o8gllqcs
2016-08-25 16:34:07 -07:00
Henry Chang
889e160c68 Bug 1301008 - Pass safebrowsing v4 list state in base64 format to avoid truncation. r=francois
MozReview-Commit-ID: 6oVdQvEoMm2
2016-09-07 17:45:15 +08:00
Wes Kocher
acd22e8efa Merge inbound to m-c a=merge 2016-09-07 17:54:24 -07:00
Carsten "Tomcat" Book
b95ddfd9ff Merge mozilla-central to autoland 2016-09-07 17:26:11 +02:00
Michael Layzell
419868d357 Bug 1018486 - Part 9: Changes to account for modifications to clang plugin, r=ehsan
MozReview-Commit-ID: EPQMbfHYxUK
2016-09-07 10:50:47 -04:00
dimi
b64e697a4d Bug 1297518 - Increase gethash timeout for testcases. r=gcp
MozReview-Commit-ID: BmX6UzGhfhf
2016-09-06 12:21:19 +08:00
Thomas Nguyen
b0c8c47bd2 Bug 999484 - Test FindInReadable calls in safebrowsing code. r=gcp
MozReview-Commit-ID: C27J4dh9s6T
2016-09-01 10:48:17 +08:00
Henry Chang
8844a50a30 Bug 1254763 - Part 2: Test cases. r=gcp
MozReview-Commit-ID: JDjV3WUfgWW
2016-09-02 12:02:40 +08:00
Henry Chang
176430c017 Bug 1254763 - Part 1: Use per-provider directory for V4 databases. r=dimi,gcp
MozReview-Commit-ID: KZGWIcKAQyW
2016-09-02 12:00:00 +08:00
Thomas Nguyen
95d0b2d935 Bug 1299036 - Fix Intermittent toolkit/components/url-classifier/tests/mochitest/test_classifier_worker.html. r=dimi,gcp.
MozReview-Commit-ID: 3YgxgjpV7Ay
2016-09-02 15:01:48 +08:00
Nicholas Nethercote
b5810a1eb4 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");
2016-09-02 17:12:24 +10:00
Nicholas Nethercote
887efe04d5 Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.
2016-09-01 15:01:16 +10:00
Nicholas Nethercote
62b6b0fce6 Bug 1297961 (part 1) - Introduce nsURI::GetSpecOrDefault(). r=hurley.
This function is an infallible alternative to nsIURI::GetSpec(). It's useful
when it's appropriate to handle a GetSpec() failure with a failure string, e.g.
for log/warning/error messages. It allows code like this:

  nsAutoCString spec;
  uri->GetSpec(spec);
  printf("uri: %s", spec.get());

to be changed to this:

  printf("uri: %s", uri->GetSpecOrDefault().get());

This introduces a slight behavioural change. Previously, if GetSpec() failed,
an empty string would be used here. Now, "[nsIURI::GetSpec failed]" will be
produced instead. In most cases this failure string will make for a clearer
log/warning/error message than the empty string.
* * *
Bug 1297961 (part 1b) - More GetSpecOrDefault() additions. r=hurley.

I will fold this into part 1 before landing.
2016-08-26 16:02:31 +10:00
Thomas Nguyen
29f9371e3b Bug 1201716 - Missing status check in SafeBrowsing::Merge causes SafeBrowsing malfunction. r=francois
MozReview-Commit-ID: CtF4Gczkoa1
2016-08-24 17:15:13 +08:00
Thomas Nguyen
7392cef04e Bug 1296751 - Skip observe browser.safebrowsing.provider.*.(nextupdatetime|lastupdatetime). r=francois
MozReview-Commit-ID: 6yNWVJ3LYBE
2016-08-24 17:06:48 +08:00
Henry Chang
156c792bf3 Bug 1296820 - Skip applying TableUpdateV4 to avoid premature update codes being run. r=dimi,francois
MozReview-Commit-ID: IqjpAVgISLJ
2016-08-26 14:35:53 +08:00
Wes Kocher
e079662c3f Merge inbound to central, a=merge 2016-08-26 16:20:50 -07:00
Yoshi Huang
a470396744 Bug 1244340 - Part 1: Use origin attributes as cstor arg for LoadContext r=sicking 2016-08-26 18:59:00 +08:00
Henry Chang
74f5ad2c8b Bug 1179301 - Restrict the SafeBrowsingHash size and make toUint32/fromUint32 more robust. r=gcp
MozReview-Commit-ID: EPQLeuab42W
2016-08-18 14:42:13 +08:00
Wes Kocher
00c5aee754 Merge inbound to central, a=merge 2016-08-25 16:59:00 -07:00
Ryan VanderMeulen
dbf61a2219 Merge m-c to autoland. a=merge 2016-08-25 08:14:36 -04:00
Ryan VanderMeulen
79935a96ec Merge inbound to m-c. a=merge 2016-08-25 08:10:52 -04:00
dimi
909ab12b52 Bug 1291024 - Avoid caching safebrowsing testcase resources. r=francois
MozReview-Commit-ID: 9SB5diTrr5F
2016-08-23 15:51:29 +08:00
dimi
42f87b344b Bug 1296201 - Wait for SafeBrowsing,jsm to be initialized before running testcase. r=francois
MozReview-Commit-ID: 8o3cszqJK36
2016-08-24 17:00:08 +08:00
Ryan VanderMeulen
7049259c8a Merge m-c to inbound. a=merge 2016-08-25 08:27:17 -04:00
Nicholas Nethercote
1009bf0056 Bug 1297658 - Avoid unnecessary checking in memory reporters. r=erahm.
This patch removes checking of all the callback calls in memory reporter
CollectReport() functions, because it's not useful.

The patch also does some associated clean-up.

- Replaces some uses of nsIMemoryReporterCallback with the preferred
  nsIHandleReportCallback typedef.

- Replaces aCallback/aCb/aClosure with aHandleRepor/aData for CollectReports()
  parameter names, for consistency.

- Adds MOZ_MUST_USE/[must_use] in a few places in nsIMemoryReporter.idl.

- Uses the MOZ_COLLECT_REPORT macro in all suitable places.

Overall the patch reduces code size by ~300 lines and reduces the size of
libxul by about 37 KiB on my Linux64 builds.
2016-08-24 15:23:45 +10:00
dimi
6e5f13764a Bug 1037560 - P2. Modify testcase to test pleasereset should not reset all tables. r=francois,gcp
MozReview-Commit-ID: Hq9iRa9M4sf
2016-08-23 08:25:03 +08:00
dimi
32c27de82f Bug 1037560 - P1. Safebrowsing pleasereset resets all tables. r=gcp
MozReview-Commit-ID: C5GkBBDAhn3
2016-08-23 08:24:07 +08:00
Henry Chang
17738ad198 Bug 1287059 - Part 2: Save/get the list states to/from prefs temporarily. r=francois.
MozReview-Commit-ID: GaDExi2d0YX
2016-08-12 17:29:42 +08:00
Henry
dab0bfeabc Bug 1287059 - Part 1: Return all possible list names while converting from threat type. r=francois.
MozReview-Commit-ID: KgT4CrBzvu0
2016-08-16 17:30:11 +08:00
Kan-Ru Chen
a9b19d0584 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES
2016-08-24 14:47:04 +08:00
Henry Chang
a677ac7afb Bug 1284204 - Parse SafeBrowsing V4 updates to TableUpdateV4. r=francois.
MozReview-Commit-ID: 88AEIbosxKl
2016-08-12 11:55:48 +08:00
Wes Kocher
2372beb95e Merge m-c to fx-team a=merge CLOSED TREE 2016-08-15 15:04:43 -07:00
Wes Kocher
924bec4dbe Merge inbound to central, a=merge 2016-08-15 14:20:38 -07:00
Igor
9c81c3c1ee Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor
972b8460e2 Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
Thomas Nguyen
392138b38d Bug 1120728 - remove nsIUrlClassifierDBServiceWorker. r=francois,gcp
MozReview-Commit-ID: G3HeQ5pecrE
2016-08-11 11:15:24 +08:00
dimi
ac0dea5510 Bug 1254766 - Stop caching Safe Browsing completions to disk. r=gcp
MozReview-Commit-ID: 8Qnc8yymgDL
2016-08-11 08:17:39 +08:00
Henry Chang
f8d8d27fdb Bug 1274112 - Part 2: Use protobuf API to parse v4 update response. r=francois
MozReview-Commit-ID: 3sjR3Feq4ua
2016-08-04 18:10:12 +08:00
Henry Chang
9708a23b7f Bug 1274112 - Part 1: Make update request v4. r=francois
MozReview-Commit-ID: NgV4QYbDll
2016-08-04 18:10:06 +08:00
Igor
27c926c49e Bug 1197331 - remove PR_snprintf calls in miscellaneous directories. r=nfroyd 2016-08-04 16:41:00 +02:00
Carsten "Tomcat" Book
bc6615c2f9 Merge mozilla-central to autoland 2016-07-30 16:49:41 +02:00
Carsten "Tomcat" Book
23747ec523 merge mozilla-inbound to mozilla-central a=merge 2016-07-30 16:20:57 +02:00
Dimi Lee
7ed05ebc31 Bug 1289028 - Retry when url-classifier test_gethash.html hits an exception. r=francois
MozReview-Commit-ID: 9BR7RfAthcU
2016-07-29 08:21:01 +08:00