Commit Graph

84 Commits

Author SHA1 Message Date
Andrea Marchesini
3faaf5a84b 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
Brindusan Cristian
1153f2c09e 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
b434804b93 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug 2018-01-24 17:17:31 +01:00
Kris Maglione
60872d7b31 Bug 1404198: Part 2f - Switch to NS_NewTimer* in toolkit. r=njn
MozReview-Commit-ID: 185rZ99R6zV
2017-10-15 23:14:00 -07:00
DimiL
86a5503774 Bug 1384405 - Dump request payload for V2 400 responses. r=francois
Refactor SafeBrowsing code so we can get the payload of gethash/update request when
updates fail.

MozReview-Commit-ID: NB1oacd185
2017-10-05 08:37:29 +08:00
Thomas Nguyen
da894bb42f Bug 1351147 - Support ThreatHit requests in SafeBrowsing V4 r=francois
MozReview-Commit-ID: 3ifQtdOTulE
2017-08-24 11:13:12 +08:00
Francois Marier
d33e0251eb Bug 1386013 - Log an error when Safe Browsing times out. r=hchang
MozReview-Commit-ID: A99ov9T7rtm
2017-07-31 20:29:25 -07:00
Wes Kocher
6b1bdab609 Merge m-c to inbound, a=merge
MozReview-Commit-ID: LhiAcCiFBus
2017-07-26 18:33:18 -07:00
Thomas Nguyen
edc3d1fb65 Bug 1381718 : Dump request when receiving 400 error r=hchang
MozReview-Commit-ID: 1ZFOIRTryiV
2017-07-25 14:43:11 +08: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
Bevis Tseng
59627df038 Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm 2017-07-27 02:18:20 +08:00
DimiL
611d1430b5 Bug 1366965 - Remove telemetry that compare SafeBrowsing V2 & V4. r=francois
MozReview-Commit-ID: 7vudFBK3rdp
2017-06-12 11:27:19 +08:00
Francois Marier
e4dd8ef38f Bug 1366394 - Bump the Safe Browsing update timeout to 15s. r=hchang
Based on the telemetry that landed as part of bug 1336904, Safe Browsing
updates are failing too often: https://mzl.la/2qGkOPS

This should enable browsers on slower networks to reach the update
servers while still putting a reasonable bound on how long the update
thread can be blocked.

MozReview-Commit-ID: 6puVtpMT87K
2017-05-19 14:25:11 -07:00
Thomas Nguyen
1f65cb8c7a Bug 1336904 - Add timeouts for Safe Browsing updates r=francois
These timeouts will ensure that we don't block the Safe Browsing update thread
for too long when we encounter slow or bad network conditions.

MozReview-Commit-ID: AJfR193cTf8
2017-04-24 17:51:06 +08:00
Henry Chang
259a763c10 Bug 1338638 - Fix race condition for DBService APIs to avoid long delayed initial download. r=francois
When starting up, SafeBrowsing.jsm will try to use DBService to add testing entries. Meanwhile,
listmanager will request StreamUpdater to download lists with a random initial delay.

The requests that listmanager issue to StreamUpdater will be queued up
if DBserve is busy and will be retried when StreamUpdater is notified that
the previous update is complete. However, in some edge cases,
the queued requests may not be processed until the next update request from listmanager.
For example, SafeBrowsing.jsm calls DBService.beginUpdate at t0 and the update is
complete at t1. If listmanager sends all requests via StreamUpdate between t0 and t1,
they will all be queued up and no further request can trigger the queued ones.

So in this patch I add a timer to re-trigger FetchNextRequest() in case StreamUpdater is not
notified the previous update is complete.

MozReview-Commit-ID: 3hHsS5N7WRI
2017-04-11 17:13:01 +08:00
Thomas Nguyen
75c7b4139d Bug 1336903 - Add telemetry probes to track Safe Browsing server response time r=francois
The probes keep track of V2 and V4 server response to update and getHash
request. The probes are keyed by provider

MozReview-Commit-ID: 3Uxjm6H77lE
2017-03-24 15:41:23 +08:00
dimi
2039871388 Bug 1346196 - URLCLASSIFIER_UPDATE_REMOTE_STATUS2 records values using empty keys. r=francois
mTelemetryProvider might be empty if |CancelUpdate| is called during update.
In that scenario, the call flow will look like:
CancelUpdate -> UpdateError -> DownloadDone -> set mTelemetryProvider to empty ->
OnStartRequest -> record telemetry with empty key.

So in this patch, move mTelemetryProvider.Truncate() to OnStopRequest.

MozReview-Commit-ID: JDgNUqR4SKa
2017-03-16 14:42:46 +08:00
Henry Chang
c3c42fecfb Bug 1347657 - Use array entry as value instead of reference to avoid being invalidated by realloc. r=francois
nsTArray::AppendElement may cause memory reallocation if out of capacity.
In nsUrlClassifierStreamUpdater::FetchNextRequest(), we take the reference of
the first element of mPendingRequests and pass its member as reference to
DownloadUpdate(), where mPendingRequests.AppendElement will be called.
If the AppendElement in DownloadUpdate() causes realloc, the reference
becomes dangling.

The most efficient fix is to "move" the reference's (i.e. request)
member variables to DownloadUpdate() but I think in this case we can just
take the value from the array and pass it around with no given that the
array element contains simply a couple of strings and pointers.

MozReview-Commit-ID: KEZ5d3l3HoI
2017-03-16 15:19:45 +08:00
Henry Chang
b1b06f3fe9 Bug 1346757 - Change the downloadError callback timing. r=francois
MozReview-Commit-ID: JleLPltEBOw
2017-03-13 21:16:07 +08:00
Dimi Lee
9792f44648 Bug 1332780 - Add telemetry to record network error while SafeBrowsing update. r=francois
MozReview-Commit-ID: 7Yqxs0XHmNP
2017-02-24 09:54:49 +08:00
Tom Tromey
e90d95a3f9 Bug 1060419 - make AppendPrintf and nsPrintfCString use Printf.h, r=froydnj
MozReview-Commit-ID: 2E8FoiNxU8L
2016-12-14 09:32:21 -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
Tim Huang
b3fb2c8458 Bug 1336802 - Part 2: Updating the whole code base to make sure nsILoadInfo get null check. r=smaug 2017-02-07 11:49:34 +08:00
Dimi Lee
1859178ca5 Bug 1332770 - Fix the google4 provider is showing up as other in some telemetry pings. r=francois
MozReview-Commit-ID: KbpYAnf6qxd
2017-01-27 18:02:36 +08:00
Andrea Marchesini
46a9207d60 Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
dimi
d2fb140df2 Bug 1320402 - Move url-classifier off of using appIds. r=ehsan, gcp
MozReview-Commit-ID: IqnAVrv2c9W
2017-01-03 14:21:58 +08:00
DimiL
3cb66c6aee Bug 1311910 - Add telemetry to measure update error and update timeout rate for V2 and V4. r=francois,henry
MozReview-Commit-ID: JL4aZrUOGH7
2016-12-19 09:43:02 +08: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
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
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
9708a23b7f Bug 1274112 - Part 1: Make update request v4. r=francois
MozReview-Commit-ID: NgV4QYbDll
2016-08-04 18:10:06 +08:00
Henry Chang
b0239e3cb7 Bug 1110891 - Replace comment to clarify the different purposes of the two timers. r=francois 2016-05-09 07:02:00 +02:00
Ralph Giles
3d546266d0 Bug 1275744 - Reference MOZ_LOG in toolkit comments. r=erahm
NSPR_LOG_MODULES is deprecated.

MozReview-Commit-ID: 2iZFe60Uxvi
2016-05-26 11:14:47 -07:00
Henry Chang
3d3c24ccb2 Bug 1264517 - Replace sensitive info from debugging message. r=gcp. 2016-04-29 13:53:31 +08:00
dimi
e561637d9a Bug 1212600 - No upper limit on digest256 list file size. r=francois
MozReview-Commit-ID: b1aQbF92as
2016-03-28 15:10:03 +08:00
sajitk
39f5ab0cca Bug 1219482: Replace PRLogModuleInfo with LazyLogModule in toolkit subdirectory.r=erahm 2016-01-28 10:37:00 -08:00
Gian-Carlo Pascutto
8864796fb9 Bug 1150921 - Add telemetry for response codes to SafeBrowsing requests. r=francois f=bsmedberg 2016-02-10 17:59:40 +01:00
Wes Kocher
3c9e45e1fb Backed out changeset 24af6caa9bba (bug 1219482) to hopefully fix the intermittent hazard failures CLOSED TREE 2016-01-29 10:15:30 -08:00
sajitk
b916ed88a5 Bug 1219482 - Replace PRLogModuleInfo with LazyLogModule in toolkit subdirectory. r=erahm 2016-01-28 10:37:00 -05:00
Yoshi Huang
47c69d1edb Bug 1209162 - Create OriginAttributes subtypes. IGNORE IDL r=sicking. 2015-11-03 09:50:54 +08:00
Dragana Damjanovic
fbc0161034 Bug 1175685 - Add special appId for SAFEBROWSING_APP_ID. r=ckerschb 2015-10-21 13:43:00 +02:00
Francois Marier
769b2df062 Bug 1197000 - Better debugging output for Safe Browsing list updates. r=gcp 2015-08-21 13:53:53 -07:00
Christoph Kerschbaumer
25b4ac2786 Bug 1195504 - Use channel->ascynOpen2 toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp (r=sicking) 2015-08-18 09:53:15 -07:00
Dragana Damjanovic
f5e3e71a6d Bug 905127 - Part 2 - remove unnecessary nsNetUtil.h includes r=jduell 2015-07-06 07:55:00 +02:00
Eric Rahm
900b3ebc4d Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-03 15:25:57 -07:00
Carsten "Tomcat" Book
89becff57d Backed out 14 changesets (bug 1165515) for linux x64 e10s m2 test failures
Backed out changeset d68dcf2ef372 (bug 1165515)
Backed out changeset 7c3b45a47811 (bug 1165515)
Backed out changeset b668b617bef2 (bug 1165515)
Backed out changeset d0916e1283a2 (bug 1165515)
Backed out changeset ac4dc7489942 (bug 1165515)
Backed out changeset e9632ce8bc65 (bug 1165515)
Backed out changeset c16d215cc7e4 (bug 1165515)
Backed out changeset e4d474f3c51a (bug 1165515)
Backed out changeset d87680bf9f7c (bug 1165515)
Backed out changeset b3c0a45ba99e (bug 1165515)
Backed out changeset 9370fa197674 (bug 1165515)
Backed out changeset 50970d668ca1 (bug 1165515)
Backed out changeset ffa4eb6d24b9 (bug 1165515)
Backed out changeset 5fcf1203cc1d (bug 1165515)
2015-06-02 13:05:56 +02:00
Eric Rahm
f5003d5120 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 22:17:33 -07:00
Wes Kocher
2a7ed059f1 Backed out 14 changesets (bug 1165515) for b2g mochitest-6 permafail CLOSED TREE
Backed out changeset 9b97e2aa2ed9 (bug 1165515)
Backed out changeset 150606c022a2 (bug 1165515)
Backed out changeset 4e875a488349 (bug 1165515)
Backed out changeset 467e7feeb546 (bug 1165515)
Backed out changeset d6b6cc373197 (bug 1165515)
Backed out changeset 0615265b593c (bug 1165515)
Backed out changeset fafd1dce9f08 (bug 1165515)
Backed out changeset d1df869245f9 (bug 1165515)
Backed out changeset 6876a7c63611 (bug 1165515)
Backed out changeset b7841c94a9a3 (bug 1165515)
Backed out changeset e5e3617f7c73 (bug 1165515)
Backed out changeset 39be3db95978 (bug 1165515)
Backed out changeset 0ec74176f8de (bug 1165515)
Backed out changeset 5b928dd10d71 (bug 1165515)
2015-06-01 17:57:58 -07:00
Eric Rahm
0baf91e33f Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 14:31:01 -07:00