Commit Graph

1538 Commits

Author SHA1 Message Date
Razvan Maries
1f67d7021a Backed out 2 changesets (bug 1562264) for causing Android perma fails. CLOSED TREE
Backed out changeset b66eec7d2e55 (bug 1562264)
Backed out changeset 445eadfd8ce3 (bug 1562264)
2019-08-17 02:24:40 +03:00
Kashav Madan
a2c45b73c6 Bug 1562264 - Update skip-if annotations, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D41763
2019-08-16 17:31:52 +00:00
dlee
46a1c768ae Bug 1573176 - Fix SafeBrowsing doesn't use correct preference name for social tracking and cryptoming. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D41645
2019-08-13 07:51:50 +00:00
Cosmin Sabou
44fa64cd1f Bug 1571698 - Annotate tests that also crash on opt builds. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D41459
2019-08-10 00:45:51 +00:00
dlee
0a6035c0c3 Bug 1564346 - SafeBrowsing gtest code refactoring. r=gcp
Refactor the gtest code because it confused me while adding new tests.
This patch focus on refining utility function but it also contains other
minor refinements.

Changes includes:
1. Add comments to utility function
2. Move common utility functions to Common.cpp and remove duplicates
3. Header file removal and reorder
4. Unify MPL commnetc
5. Replace anonymouse namespace with static function

Differential Revision: https://phabricator.services.mozilla.com/D37532
2019-08-08 14:29:40 +00:00
Noemi Erli
50ef59c9ee Backed out changeset 6ec4bd94bb51 (bug 1564346) for causing build bustages in TestVariableLengthPrefixSet.cpp CLOSED TREE 2019-08-07 18:57:31 +03:00
dlee
ea550ac41d Bug 1564346 - SafeBrowsing gtest code refactoring. r=gcp
Refactor the gtest code because it confused me while adding new tests.
This patch focus on refining utility function but it also contains other
minor refinements.

Changes includes:
1. Add comments to utility function
2. Move common utility functions to Common.cpp and remove duplicates
3. Header file removal and reorder
4. Unify MPL commnetc
5. Replace anonymouse namespace with static function

Differential Revision: https://phabricator.services.mozilla.com/D37532
2019-08-07 15:17:49 +00:00
Andrea Marchesini
cae07bca6f Bug 1570805 - [stp] Turn on Social Tracking Protection Prefs, r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D40928
2019-08-07 15:02:50 +00:00
Andrea Marchesini
214a46202a Bug 1570971 - Enable all the annotation URL-Classifier features and remove their prefs, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40420
2019-08-05 11:34:24 +00:00
Tom Schuster
0700472892 Bug 1558915 - Use infallible nsIURI::SchemeIs in toolkit/ r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40323
2019-08-02 16:31:54 +00:00
Mihai Alexandru Michis
5a74ddfbef Backed out 2 changesets (bug 1558915) for causing bustages. CLOSED TREE
Backed out changeset e44c9fd81e5b (bug 1558915)
Backed out changeset 3da6e9e86be4 (bug 1558915)
2019-08-02 12:17:42 +03:00
Tom Schuster
b637c03f89 Bug 1558915 - Use infallible nsIURI::SchemeIs in toolkit/ r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40323
2019-08-02 08:54:18 +00:00
Kris Maglione
2ca539ce53 Bug 1569832: Part 0 - Update crash annotations one last time. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D40096
2019-08-01 00:53:25 +00:00
dlee
270a61b3ea Bug 1562875 - Listmanager kiffoffUpdate doesn't need to obtain on-disk data. r=gcp
While listmanager called |kickoffUpdate|, it used to call |GetTables| to
retrieve update information and used the information to distinguish if
a table is a "existing" table or not.

In Bug 1045163, the "existing table" logic was removed, which also means we
don't need to call |GetTabkes| anymore. This patch removes calling
Classifier::TableRequest to reduce unnecessary disk IO during startup.

Differential Revision: https://phabricator.services.mozilla.com/D37037
2019-07-11 12:49:14 +00:00
Nicholas Nethercote
c4aacd8403 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

Differential Revision: https://phabricator.services.mozilla.com/D39138
2019-07-26 01:10:23 +00:00
Kris Maglione
1b5a278b6a Bug 1566952: Part 2 - Update Fission failure annotations after skipping crashes. r=mccr8
When a test crashes, the harness skips all of the remaining tests in the
directory. That means that with crashes skipped, we now try to run a whole lot
more tests than we did before, and a lot of them fail under Fission.

This patch adds annotations to the new failures that show up after part 1.

Differential Revision: https://phabricator.services.mozilla.com/D38726
2019-07-19 12:30:10 -07:00
Kris Maglione
0f4a61c1c2 Bug 1566952: Part 1 - Annotate mochitests that crash with Fission enabled. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D38725
2019-07-17 13:37:48 -07:00
Kris Maglione
9f00b7395d Bug 1566182: Annotate mochitests that fail with Fission enabled. r=mccr8
My preference was to annotate most of the failing tests with `fail-if` so that
if they start passing, the `fail-if` needs to be removed and they need to keep
passing. That doesn't work for tests that timeout, or which trigger failures
from their cleanup functions, however, so those tests need skip-if. And tests
with fail in their cleanup functions likely leave the browser in an
inconsistent state for subsequent tests, anyway, so really should be skipped
regardless.

There are some remaining tests which still fail because of crashes. I chose
not to skip them here, but to fix the crashes in separate bugs instead.

Differential Revision: https://phabricator.services.mozilla.com/D38247
2019-07-15 16:19:32 -07:00
Sylvestre Ledru
3bf4f867df Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D38057
2019-07-16 07:33:44 +00:00
dlee
86a94ce235 Bug 1560597 - Safe Browsing supports downloading social tracking list. r=baku
This patches only allows Safe Browsing to download the list, but the feature
is still default disabled and the lists will not be downloaded.

Turn on social tracking by setting:
"privacy.trackingprotection.socialtracking.enabled"
"privacy.trackingprotection.socialtracking.annotate.enabled"

Differential Revision: https://phabricator.services.mozilla.com/D37410
2019-07-11 08:04:05 +00:00
Jonathan Kingston
32524b62e2 Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35504
2019-07-08 16:37:45 +00:00
Sylvestre Ledru
4c933caedc Bug 1562642 - Part 2 - Add missing MPL2 headers r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D37146
2019-07-08 09:27:47 +00:00
Victor Porof
67876411b7 Bug 1561435 - Fix linting errors for toolkit/, r=standard8
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35955
2019-06-25 23:43:58 +02:00
Victor Porof
5d695e0b7f Bug 1561435 - Format toolkit/components/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36052
2019-07-05 11:14:05 +02:00
Oana Pop Rus
9af0a616ef Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-07-04 06:38:21 +03:00
Jeff Gilbert
1fffe82028 Bug 1560736 - Re-enable tests.
Differential Revision: https://phabricator.services.mozilla.com/D36686
2019-07-02 23:25:40 +00:00
Kris Maglione
1eb6dde4ac Bug 1541557: Part 5 - Update callers of ChromeScript.sendSyncMessage to use sendQuery instead. r=nika
Since JSWindowActors don't have direct access to synchronous messaging,
ChromeScript callers are going to need to migrate to asynchronous messaging
and queries instead.

Since there's no comparable API to sendQuery for frame message managers, this
patch adds a stub that uses synchronous messaging, but makes the API appear
asynchronous, and migrates callers to use it instead of direct synchronous
messaging. This will be replaced with a true synchronous API in the actor
migration.

Fortunately, most of the time, this actually leads to simpler code. The
`sendQuery` API doesn't have the odd return value semantics of
`sendSyncMessage`, and can usually just be used as a drop-in replacement. Many
of the `sendSyncMessage` callers don't actually use the result, and can just
be changed to `sendAsyncMessage`. And many of the existing async messaging
users can be changed to just use `sendQuery` rather than sending messages and
adding response listeners.

However, the APZ code is an exception. It relies on intricate properties of
the event loop, and doesn't have an easy way to slot in promise handlers, so I
migrated it to using sync messaging via process message managers instead.

Differential Revision: https://phabricator.services.mozilla.com/D35055
2019-06-12 12:40:51 -07:00
Kris Maglione
b971320e6c Bug 1541557: Part 4 - Stop relying on synchronous preference getters/setters. r=nika
The SpecialPowers set*Pref/get*Pref APIs currently use synchronous messaging
to set and get preference values from the parent process. Aside from directly
affecting callers of those APIs, it also affects callers of `pushPrefEnv`,
which is meant to be asynchronous, but is in practice usually synchronous due
to the synchronous messaging it uses.

This patch updates the getPref APIs to use the in-process preference service
(which most callers are expecting anyway), and also updates the callers of
the setPref and pushPrefEnv APIs to await the result if they're relying on it
taking effect immediately.

Unfortunately, there are some corner cases in tests that appear to only work
because of the quirks of the current sync messaging approach. The synchronous
setPref APIs, for instance, trigger preference changes in the parent
instantly, but don't update the values in the child until we've returned to
the event loop and had a chance to process the notifications from the parent.
The differnce in timing leads some tests to fail in strange ways, which this
patch works around by just adding timeouts.

There should be follow-ups for test owners to fix the flakiness.

Differential Revision: https://phabricator.services.mozilla.com/D35054
2019-06-13 09:34:39 -07:00
Kris Maglione
4753549aee Bug 1541557: Part 3 - Update callers of sync SpecialPowers functions to await the return value. r=nika
When we migrate SpecialPowers to a JSWindowActor, it will no longer be able to
use synchronous IPC messaging, which means that its current synchronous APIs
will have to become asynchronous.

This patch doesn't change the behavior of those functions, but it does change
their callers to `await` their return values rather than using them directly.
This pattern will work the same whether the functions return a promise or a
plain value, which simplifies the migration.

Differential Revision: https://phabricator.services.mozilla.com/D35053
2019-06-12 11:41:32 -07:00
dlee
6efea46955 Bug 1553951 - Safe Browsing doesn't call the lookup callback when an error occurs in DoLocalLookup. r=baku
Firefox cannot open any URL when Safe Browsing database is corrupted.
This is because when Necko asks URL Classifier to classify an URL, it
first suspends the channel, and then wait for a callback to see if the
channel should be canceled or resumed.

In this bug, DoLocalLookup returns an error because Safe Browsing is not
able to read its database(database is corrupted), but we don't call the
callback to resume loading channel, so users cannot load any website.

This patch adds a scope exit handler to make sure the callback will
always be invoked.

Differential Revision: https://phabricator.services.mozilla.com/D36456
2019-07-01 13:26:44 +00:00
shindli
1ca14e50c0 Backed out changeset b308a5b128aa (bug 1553951) for causing bustages in builds/worker/workspace/build/src/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp CLOSED TREE 2019-07-01 14:45:59 +03:00
dlee
98dc7e8300 Bug 1553951 - Safe Browsing doesn't call the lookup callback when an error occurs in DoLocalLookup. r=baku
Firefox cannot open any URL when Safe Browsing database is corrupted.
This is because when Necko asks URL Classifier to classify an URL, it
first suspends the channel, and then wait for a callback to see if the
channel should be canceled or resumed.

In this bug, DoLocalLookup returns an error because Safe Browsing is not
able to read its database(database is corrupted), but we don't call the
callback to resume loading channel, so users cannot load any website.

This patch adds a scope exit handler to make sure the callback will
always be invoked.

Differential Revision: https://phabricator.services.mozilla.com/D36456
2019-07-01 11:26:11 +00:00
Cosmin Sabou
232f9839d7 Bug 1560736 - Disable test_socialtracking.html for frequent failures. a=testonly 2019-07-01 02:44:31 +03:00
dlee
6ee4703f17 Bug 1531354 - P6. Remove unused testing files and load old version of prefixes data. r=gcp
This patch does the following:
1. Remove testing files from disk because they are no longer required.
2. Load completions from previous version of HashStore until an update
   is applied.
3. Older version of HashStore(.sbstore) & PrefixSet(.vlpset) will be
   removed during an update

Differential Revision: https://phabricator.services.mozilla.com/D36002
2019-06-29 19:24:14 +00:00
dlee
f59bb40e5d Bug 1531354 - P5. Safe Browsing test entries are directly stored in LookupCache. r=gcp
Create test entries via update introduces performance overhead.
We can store them directly in LookupCache and do not save test entries
to disk.

Differential Revision: https://phabricator.services.mozilla.com/D34576
2019-06-29 19:05:41 +00:00
dlee
7a8ac63eb7 Bug 1531354 - P4. Skip reading hashstore in RegenActiveTables. r=gcp
For Safe Browsing V2, Data for lookup(LookupCache) and data for update(HashStore)
are now separated. |RegenActiveTables| doesn't need to check the chunk
number in HashStore.

Differential Revision: https://phabricator.services.mozilla.com/D34575
2019-06-21 23:11:06 +00:00
dlee
0864125fd4 Bug 1531354 - P3. Do not store completion in HashStore. r=gcp
Completions are now stored in .vlpset, we can remove it from .sbstore
Functions related to optimize reading completions from .sbstore can also
be removed because it is no longer HashStore's responsibility

Differential Revision: https://phabricator.services.mozilla.com/D34574
2019-06-26 19:45:08 +00:00
dlee
bbf7fa8756 Bug 1531354 - P2. Use variable-length prefix set in LookupCacheV2. r=gcp
1. VariableLengthPrefixSet supports getting/setting prefixes with
AddPrefixArray and AddCompletesArray

2. VariableLengthPrefixSet supports passing prefix as an integer in
Match API. This is because how V2 and V4 see prefixes as an integer
works differently.

Differential Revision: https://phabricator.services.mozilla.com/D34547
2019-06-26 19:40:45 +00:00
dlee
9aaaafdee3 Bug 1531354 - P1. Remove mPrefixSet and mUpdateCompletions from LookupCacheV2 and use mVLPresetSet. r=gcp
The goal of the series of patches is to improve Safe Browsing performance by
skipping uncessary file IO.

The first two patches is to remove the dependency between LookupCache and HashStore, so HashStore is only
responsible for udpates.

Before this patch, LookupCacheV2 treats prefixes and completions
differently. It uses two data structures to maintain
prefixes:
1. mPrefixSet to store prefixes from .pset
2. mUpdateCompletions to store completions from .sbstore

After this patch
1. LookupCacheV2 & LookupCacheV4 both use variable-length
prefix set. mUpdateCompletions and mPrefixSet are removed and
mVLPrefixSet is used to store all prefixes data.
2. Move common function to base class.

Note that in this patch, conversion between 4/32 bytes prefixes and
mVLPrefixSet is not yet included, it will be handled in next patch.
This patch tries not to deal with any logic changes, only focus on refining
LookupCacheV2 & LookupCacheV4 class structure to use variable-length
prefixset for both classes.

Differential Revision: https://phabricator.services.mozilla.com/D34546
2019-06-21 23:07:52 +00:00
Andreea Pavel
583dd126a7 Bug 1560736 - delete extra skip-if condition 2019-06-28 07:22:13 +03:00
Andreea Pavel
d5461605f0 Bug 1560736 - correct skip-if condition
Differential Revision: https://phabricator.services.mozilla.com/D36281
2019-06-28 03:03:45 +00:00
Andreea Pavel
f236b7b24d Bug 1560736 - disabled test_socialtracking_annotate.html on android debug r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D36267
2019-06-28 00:33:32 +00:00
Andrea Marchesini
d89749c697 Bug 1560040 - Introduce 2 new URL-Classifier features to annotate and block social trackers - tests, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D35422
2019-06-22 16:54:04 +00:00
Gijs Kruitbosch
91c33838c9 Bug 1519434 - only allow perma-enabling non-flash plugins, r=jmathies,aswan
Differential Revision: https://phabricator.services.mozilla.com/D34213
2019-06-13 08:41:28 +00:00
Gijs Kruitbosch
572dbf7379 Bug 1519434 - remove plugin click to play pref as running without it won't make sense anymore, r=aswan
Differential Revision: https://phabricator.services.mozilla.com/D34212
2019-06-13 08:40:59 +00:00
Andreea Pavel
cc37a3c8a9 Backed out 7 changesets (bug 1519434) for mochiest failures e.g test_bug1165981.html on a CLOSED TREE
Backed out changeset 1314623831ad (bug 1519434)
Backed out changeset 6dd4fa67e209 (bug 1519434)
Backed out changeset b241c580b293 (bug 1519434)
Backed out changeset b48dca2f487f (bug 1519434)
Backed out changeset 49c64ed2e67b (bug 1519434)
Backed out changeset dd009a001c6c (bug 1519434)
Backed out changeset 5b6ec4d2f0ab (bug 1519434)
2019-06-12 23:31:16 +03:00
Gijs Kruitbosch
ec5127afdc Bug 1519434 - only allow perma-enabling non-flash plugins, r=jmathies,aswan
Differential Revision: https://phabricator.services.mozilla.com/D34213
2019-06-12 18:49:42 +00:00
Gijs Kruitbosch
74e20f32e6 Bug 1519434 - remove plugin click to play pref as running without it won't make sense anymore, r=aswan
Differential Revision: https://phabricator.services.mozilla.com/D34212
2019-06-12 18:49:30 +00:00
Boris Zbarsky
cae135dd3f Bug 1557501. Stop using [array] in nsIPrefBranch. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D34032
2019-06-07 01:01:12 +00:00
Zibi Braniecki
45dab10e39 Bug 1552714 - Fix two tests which were caught not waiting for l10n but checking for l10n values. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D33741
2019-06-06 16:33:18 +00:00