Commit graph

1112 commits

Author SHA1 Message Date
Andrew McCreight
bfd580fb71 Bug 1186409 - Use Cu.getGlobalForObject when importing properties off a JSM global. r=kmag
With JSM global sharing, the object returned by Cu.import() is a
NonSyntacticVariablesObject, rather than a global. Various code tries
to use properties from a JSM global via an import.

Cu.importGlobalProperties can also be used in some places.

MozReview-Commit-ID: HudCXO2GKN0

--HG--
extra : rebase_source : 6b5fa6f5509397504cb461a761f6cc2399f18c40
2017-06-23 13:51:14 -07:00
Thomas Nguyen
a8c2c418b0 Bug 1397231 - Skip new URLClassifierLocalChild when ContentChild is shutting down r=Ehsan
MozReview-Commit-ID: HRv5DpiPwmB

--HG--
extra : rebase_source : d5ffe6d1f9520a9031e9c5112e1bc424cf366407
2017-09-07 16:16:43 +08:00
Thomas Nguyen
dd42019824 Bug 1385609 - Fix backoff issue that makes SB lists no longer update r=francois
The issue occurs when nsITimer is fired earlier than the backoff time. In that
case, the update doesn't proceed and we never make another attempt because the
backoff update timer was oneshot.

We fix the issue in two ways:

- Add a tolerance of 1 second in case the timer fires too early.
- Set another oneshot timer whenever we are prevented from updating due to
backoff.

MozReview-Commit-ID: E2ogNRsHJVK

--HG--
extra : rebase_source : c81fa77934f6c39e1c5d07b19785a01546e02542
2017-08-30 18:04:10 +08:00
Sebastian Hengst
34e6bbd998 Backed out changeset 14b4af261515 (bug 1385609) for eslint failures in nsUrlClassifierLib.js. r=backout 2017-09-05 19:04:43 +02:00
Thomas Nguyen
9088e7a39b Bug 1395411 - Unregister tables when they're removed from urlclassifier.*Table. r=francois
MozReview-Commit-ID: Ex1ZxMcJLep

--HG--
extra : rebase_source : a200c02b536874a5a4255087b42d7074f5de3b43
2017-08-31 18:46:23 +08:00
Thomas Nguyen
a26ed706a3 Bug 1385609 - Fix backoff issue that makes SB lists no longer update r=francois
The issue occurs when nsITimer is fired earlier than the backoff time. In that
case, the update doesn't proceed and we never make another attempt because the
backoff update timer was oneshot.

We fix the issue in two ways:

- Add a tolerance of 1 second in case the timer fires too early.
- Set another oneshot timer whenever we are prevented from updating due to
backoff.

MozReview-Commit-ID: E2ogNRsHJVK

--HG--
extra : rebase_source : 17aa70d8583cc84e28e57410de66eaac63bd18bb
2017-08-30 18:04:10 +08:00
Sebastian Hengst
2283a8f642 Backed out changeset 7bb00f5e0120 (bug 1395411) for eslint failures in test_classifier_changetablepref_bug1395411.html: 'classifierHelper' is not defined. r=backout 2017-09-04 16:45:35 +02:00
Thomas Nguyen
d46c8b2c9d Bug 1395411 - Unregister tables when they're removed from urlclassifier.*Table. r=francois
MozReview-Commit-ID: Ex1ZxMcJLep

--HG--
extra : rebase_source : ceb099b7132ef0167c75b111bf3105714ae8ee92
2017-08-31 18:46:23 +08:00
Thomas Nguyen
1f57fdb85d Bug 1345058 - Asynchronously decide if a flash document should be blocked. r=baku
MozReview-Commit-ID: K91cSvIdOrb

--HG--
extra : rebase_source : 4d91ab3499c0124129e74a054c5cc78882ff351e
2017-08-14 14:05:23 +08:00
Steve Armand
c94baecadb Bug 1343843 - Remove unused chrome://global/content/url-classifier/unittests.xul. r=standard8
MozReview-Commit-ID: IMiDbyPu5n9

--HG--
extra : rebase_source : 69c6a17e95a9582d7541b1c25993ec418bdc9d63
2017-09-01 23:31:57 -04:00
Francois Marier
530db90579 Bug 1395733 - Ensure the default value of urlclassifier.malwareTable is always sorted. r=gcp
MozReview-Commit-ID: 10M2ZpDyAI9

--HG--
extra : rebase_source : 4523a0a1fd3adbdc8f0c13676548409ee9536f06
2017-08-31 14:54:11 -07:00
Francois Marier
99cb2b5a18 Bug 1394601 - Log an error when the Google API key is missing during Safe Browsing initialization. r=gcp
MozReview-Commit-ID: DNwa9lR0J6K

--HG--
extra : rebase_source : 0a547c0cf88e1ed09268cbb810abaaca09e98531
2017-08-28 17:06:00 -07:00
Eric Rahm
9398bd6f43 Bug 1393235 - Fix improper usages of string functions. r=njn
This fixes usages of `Find`, `RFind` and the equality operator that kind of
work right now but will break with the proper type checking of a templatized
version of the string classes.

For `Find` and `RFind` it appears that `nsCString::(R)Find("foo", 0)` calls
were being coerced to the `Find(char*, bool, int, int)` versions. The intent was
probably to just start searching from position zero.

For the equality operator, the type of nullptr is nullptr_t rather than
char(16_t)* so we'd need to add an operator overload that takes nullptr_t. In
this case just using `IsVoid` is probably more appropriate.

--HG--
extra : rebase_source : 50f78519084012ca669da0a211c489520c11d6b6
2017-08-22 19:30:46 -07:00
Francois Marier
a014fe4f74 Bug 1388574 - Use the correct pref to gate the Application Reputation lists. r=hchang
MozReview-Commit-ID: 1ZuxnbgsOMX

--HG--
extra : rebase_source : 4984101882f1cfc16d07df78752c1a5aa18fadb4
2017-08-23 13:40:50 -07:00
Thomas Nguyen
9d1887c28c Bug 1363038 - Remove synchronous dispatch when worker is racing against shutdown r=hchang
MozReview-Commit-ID: JOkOukz1fov

--HG--
extra : rebase_source : 9e4204cebcd4615078019a51818250ff8125efe1
2017-08-22 14:51:44 +08:00
Henry Chang
ed11934666 Bug 1392204 - Disable goog-badbinurl-proto and goog-downloadwhite-proto on Fennec. r=francois
Version 4 of the Google Safe Browsing server will return a 404 if any of the
application reputation lists are requested on Android. As a result, we should
avoid these threat types from being sent along with ANDROID_PLATFORM.

MozReview-Commit-ID: 6TUBVxe455y

--HG--
extra : rebase_source : dee095c008f4d328f359c66d20f0cc2dfcd109f3
extra : source : 5d6338807c6b21b7672236cac01b13bd75155225
2017-08-22 12:20:57 +08:00
Francois Marier
adc9339128 Bug 1385484 - Add the login reputation whitelist behind a pref. r=hchang
MozReview-Commit-ID: Dbtl3WL5tMJ

--HG--
extra : rebase_source : d56e3db985865d0b513184d8ad41e2b750e7733e
2017-08-08 16:23:10 -07:00
Francois Marier
6fcbb94e82 Bug 1385484 - Cleanup Safe Browsing prefs and sync the download protection setting. r=hchang
MozReview-Commit-ID: B42p2Gw8y9i

--HG--
extra : rebase_source : ecc00c8251814783bbe5e9ea911ad034a9a3a9b0
2017-08-08 15:52:29 -07:00
Wes Kocher
207dd28c61 Backed out 4 changesets (bug 1385484) for build failures a=backout
Backed out changeset 401c2744f16b (bug 1385484)
Backed out changeset 2ff443a0c744 (bug 1385484)
Backed out changeset 1a1c476a9aaa (bug 1385484)
Backed out changeset 87ec064a3681 (bug 1385484)

MozReview-Commit-ID: D9WGXiXaNoZ

--HG--
extra : rebase_source : ebab6135905e972abf7eeab9af8db41454687373
2017-08-22 17:22:41 -07:00
Francois Marier
542d943dc4 Bug 1385484 - Add the login reputation whitelist behind a pref. r=hchang
MozReview-Commit-ID: Dbtl3WL5tMJ

--HG--
extra : rebase_source : 8f163e6871559a36e02b2c576970b4f1624da3b4
2017-08-08 16:23:10 -07:00
Francois Marier
7a9673e542 Bug 1385484 - Cleanup Safe Browsing prefs and sync the download protection setting. r=hchang
MozReview-Commit-ID: B42p2Gw8y9i

--HG--
extra : rebase_source : ecc00c8251814783bbe5e9ea911ad034a9a3a9b0
2017-08-08 15:52:29 -07:00
Nicholas Nethercote
8a72cf2251 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm.
--HG--
extra : rebase_source : 69d58b0cfb56efc6b03d8e2d7be2ce3c3e6cd843
2017-08-21 20:01:27 +10:00
Henry Chang
4950f839d2 Bug 1388582 - Skip unsupported threat types on current platform while making v4 request. r=francois
MozReview-Commit-ID: FTmOMQ339ZL

--HG--
extra : rebase_source : ea41ae42dc2faa9bab040018b4ee3a1ade49ed69
2017-08-16 15:30:20 +08:00
Thomas Nguyen
da4b88ee61 Bug 1376410 - Handle OOM when appending prefix to map r=francois,hchang
MozReview-Commit-ID: 7MOHHAgEI1I

--HG--
extra : rebase_source : a46bbac722e331ad43e18aad4ee446676fddbfa1
2017-08-11 17:28:40 +08:00
Nicholas Nethercote
025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Dan Banner
42c8241ce0 Bug 1386684 - Enable ESLint for toolkit/components/url-classifier (manual fixes). r=hchang
MozReview-Commit-ID: JH1XDFMVd43

--HG--
extra : rebase_source : 41c83027c09e3071d3ddb929a01b5dd689109115
2017-08-02 20:09:14 +01:00
Dan Banner
436f06fda4 Bug 1386684 - Enable ESLint for toolkit/components/url-classifier (automatic fixes). r=hchang
MozReview-Commit-ID: F0Z8dRaYOku

--HG--
extra : rebase_source : 3ebc9ab6ea9f1741d8a986c9217575644411e2a1
2017-08-02 16:12:07 +01:00
Henry Chang
4a3106b91e Bug 1375277 - Test case for new error code NS_ERROR_HARMFUL_URI. r=francois
The test is based on "test-harmful-simple" so we can add testing entries
in a human-readable way.

MozReview-Commit-ID: IJcYrp04uFs

--HG--
extra : rebase_source : afc4329af4cd5fc31a783a8f0f2e3a4bdcb2a432
extra : source : 55a2e275514d2154a23a656e48f685cc6032e5c3
2017-07-28 17:38:01 +08:00
Henry Chang
a93f3d2ba4 Bug 1375277 - Move Safe Browsing UI events to a separate telemetry probe. r=francois
MozReview-Commit-ID: KDAklsznekw

--HG--
extra : rebase_source : 20d81369b18b12d9b5f6670d92bf3c7215c8c9a9
extra : intermediate-source : a2d99a6b07bb015f0bdc5c1687e250086ed09a5c
extra : source : 5460dbfebee4f99580b306a9b0ec754b890f5959
2017-08-02 14:01:44 +08:00
Henry Chang
af3b11c151 Bug 1375277 - New safebrowsing threat type "POTENTIALLY_HARMFUL_APPLICATION" introduced by v4. r=francois
As our threattype-listname conversion design, "goog-harmful-proto" is allocated
for this new threat type. This threat type is mainly for mobile.

MozReview-Commit-ID: G9GbgmHHHfp

--HG--
extra : rebase_source : 0681fcd9322b94451a86eafe57bf1ccc4b89db30
extra : intermediate-source : 28b0502d9add81beeae58a2c33f9fd5839d4d544
extra : source : 646f02f15131aa98ad37015b0a641304a3271796
2017-07-27 15:37:57 +08:00
Masatoshi Kimura
06311d2e3a Bug 1375125 - Remove nsILocalFile. r=froydnj
MozReview-Commit-ID: 6oU6Ya5UXtC

--HG--
extra : rebase_source : 55b6e30aa348c1b939326698b0da7d72c26b479c
2017-08-05 09:43:49 +09:00
Masatoshi Kimura
8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Masatoshi Kimura
f143125cc2 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G

--HG--
extra : rebase_source : e8c9eb03468c075b79013b6e0bd8b367229c24cd
2017-07-29 20:50:21 +09:00
Francois Marier
2286e70d51 Bug 1386013 - Log an error when Safe Browsing times out. r=hchang
MozReview-Commit-ID: A99ov9T7rtm

--HG--
extra : rebase_source : d7fd2e8a1ebdc3f9b1c9d1ecd7bec33c6deb27d3
2017-07-31 20:29:25 -07:00
Nicholas Nethercote
581214bd8b Bug 1384835 (part 1, attempt 2) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
--HG--
extra : rebase_source : fe566945a55c281d8290634a5b55bed19415c839
2017-07-31 10:52:51 +10:00
Thomas Nguyen
fe3447a3c5 Bug 1366384 - Add Advisory test on Safe Browsing warning page r=francois
MozReview-Commit-ID: C0c7GRj1qJo

--HG--
extra : rebase_source : 5d110f5a9a9a8de70862a0722da57b7e894299b6
2017-07-27 15:11:00 +08:00
Carsten "Tomcat" Book
d360d49d2a merge mozilla-inbound to mozilla-central a=merge 2017-07-27 10:57:25 +02:00
Wes Kocher
ad35031103 Merge m-c to inbound, a=merge
MozReview-Commit-ID: LhiAcCiFBus
2017-07-26 18:33:18 -07:00
Thomas Nguyen
0ed363ec89 Bug 1381718 : Dump request when receiving 400 error r=hchang
MozReview-Commit-ID: 1ZFOIRTryiV

--HG--
extra : rebase_source : b0377d006b1b190c4a77ca4b26ce9d12efc0c464
2017-07-25 14:43:11 +08: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
Bevis Tseng
95b18d794e Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm
--HG--
extra : rebase_source : 84de1abfcc30a6964144c2e6718a508c71027b65
2017-07-27 02:18:20 +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
Marco Castelluccio
7d7e1aa6a3 Bug 1384040 - Stop using preprocessor in nsUrlClassifierLib.js and nsUrlClassifierListManager.js, by directly copying the contents of the files they were including. r=francois
--HG--
extra : rebase_source : 8a725b6cce04594eb570e65804b320890d160f91
2017-07-26 01:24:09 +02:00
Sylvestre Ledru
7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
Andrea Marchesini
50f9ea47a3 Bug 1350958 - Finish labeling ProxyReleaseEvent, r=billm 2017-07-14 08:49:22 +02:00
Thomas Nguyen
32b3145839 Bug 1377559 - Should store value of preference browser.safebrowsing.debug to reuse r=francois
MozReview-Commit-ID: 1yWe7wB0ARl

--HG--
extra : rebase_source : eed70f5a7c1ad38e8ec24a86c8f606d9a5ba3e2a
2017-07-04 16:36:31 +08:00
Wes Kocher
19d135c982 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 4R4GFHPiij
2017-07-06 16:19:38 -07:00
Wes Kocher
bbb26fe90e Merge inbound to central, a=merge
MozReview-Commit-ID: 2nFzji7su8C
2017-07-06 16:10:49 -07:00
Nathan Froyd
a7e99ae521 Bug 1378387 - use dependent strings in the url-classifier where possible; r=gcp
Doing this makes various operations more efficient, as we don't have to
allocate, copy strings, and deallocate needlessly.  The remaining
instances of nsCString temporaries are in logging code, which didn't
seem worthwhile to deal with here.
2017-07-06 15:26:12 -04:00
Thomas Nguyen
4909ab1a70 Bug 1363882 - Remove casting address of inactive member union result.hash r=francois
MozReview-Commit-ID: 3pVaVJ1EJZu

--HG--
extra : rebase_source : 6549a5f1d303363cfb472753c3fe256c3d1dd740
2017-07-05 17:21:01 +08:00