Commit Graph

1598 Commits

Author SHA1 Message Date
Jeff Walden
9c2bcc0eef Bug 1439659 - Make |MOZ_{LITTLE,BIG}_ENDIAN| into function macros so that invoking them inside |#if| conditions when they haven't been defined yet is a compile error. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D57038
2019-12-13 20:51:04 +00:00
Kris Maglione
8c0d38f33d Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740
2019-12-13 20:36:16 +00:00
Oana Pop Rus
f0de283f03 Backed out 10 changesets (bug 1599043) for build bustages in nsGlobalWindowOuter.cpp on a CLOSED TREE
Backed out changeset 463b815557e4 (bug 1599043)
Backed out changeset 7c3f0a58cc6c (bug 1599043)
Backed out changeset 1eadd9f5b50e (bug 1599043)
Backed out changeset e4ea0d47136b (bug 1599043)
Backed out changeset 6b97581c33b6 (bug 1599043)
Backed out changeset a68bd2acf5d6 (bug 1599043)
Backed out changeset c8ed9c52508c (bug 1599043)
Backed out changeset aaf83f7806b4 (bug 1599043)
Backed out changeset 0ad30634e416 (bug 1599043)
Backed out changeset 68219c132efc (bug 1599043)
2019-12-12 17:14:54 +02:00
Tim Huang
d2603bd4dd Bug 1599043 - Part 7: Update tests to adapt the change of the OnContentBlockingEvent. r=dimi,johannh
There are three major issues that we need to fix for tests if we move the
OnContentBlockingEvent to the parent process. First, we notify the event
in the idle queue in the parent process. For some reasons, the test
script could outrun the callbacks of the OnContentBlockingEvent. So, it
could happen that the UI hasn't got updated while we check its state. To
fix this, we make the test script to wait the UI to be updated
explicitly.

Second, the tracking UI tests would access the ContentblockingLog in the
content in order to get the hosts of different blocking categories. And
the log in the content may not be updated when we open the subview. And
there is no explicit way to know whether the log is updated or not. So,
we use SetTimeout to temporary fix this issue. Once we finish the work
that moving the ContentBlockingLog into the parent (Bug1599046), we can
remove this work-around.

Third, there is one test that it waits OnContentBlockingEvent in the
content. We make it to listen the event in the parent to fix it.

Differential Revision: https://phabricator.services.mozilla.com/D55650
2019-12-11 15:01:22 +00:00
shindli
0aa47af90e Backed out 9 changesets (bug 1596918) for causing mochitest permafailures in toolkit/content/tests/chrome/test_findbar_events.xhtml CLOSED TREE
Backed out changeset 45a1c42118f2 (bug 1596918)
Backed out changeset db09910ffa56 (bug 1596918)
Backed out changeset 5c9d9f141c10 (bug 1596918)
Backed out changeset 6a135670d603 (bug 1596918)
Backed out changeset 3a0184e0df72 (bug 1596918)
Backed out changeset 2f0036486823 (bug 1596918)
Backed out changeset a770c6d08d52 (bug 1596918)
Backed out changeset ef062eb7a6ee (bug 1596918)
Backed out changeset a6ea596e98db (bug 1596918)
2019-12-11 03:09:26 +02:00
Kris Maglione
ad3537fc50 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740
2019-12-10 23:07:13 +00:00
Noemi Erli
21eec8658f Backed out 9 changesets (bug 1596918) for causing multiple browser-chrome failures
Backed out changeset 415007efd8c9 (bug 1596918)
Backed out changeset 011eb5ce927b (bug 1596918)
Backed out changeset e5fd3ee22ea1 (bug 1596918)
Backed out changeset 0bca4de31d40 (bug 1596918)
Backed out changeset 11ec4393f23d (bug 1596918)
Backed out changeset c5404a7c286d (bug 1596918)
Backed out changeset 7e9304405a46 (bug 1596918)
Backed out changeset fa0f0aeabf99 (bug 1596918)
Backed out changeset de196b077000 (bug 1596918)
2019-12-07 22:26:43 +02:00
Kris Maglione
88fbf261f8 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740
2019-12-07 19:11:58 +00:00
Daniel Varga
85f263a4c2 Backed out 17 changesets (bug 1596918) for multiple browser-chrome and dev-tools failures. On a CLOSED TREE
Backed out changeset ab87d2c1afae (bug 1596918)
Backed out changeset 775f3b06a687 (bug 1596918)
Backed out changeset 67cc63ef5d7f (bug 1596918)
Backed out changeset 7d290bcd2067 (bug 1596918)
Backed out changeset 048db9f4db7c (bug 1596918)
Backed out changeset 96a79d2ba614 (bug 1596918)
Backed out changeset be770d112dd8 (bug 1596918)
Backed out changeset 302c8ab8391c (bug 1596918)
Backed out changeset 44ef8f20732e (bug 1596918)
Backed out changeset 38c11ebfb8ff (bug 1596918)
Backed out changeset b586fc081374 (bug 1596918)
Backed out changeset 12283166716f (bug 1596918)
Backed out changeset 99b0421015d8 (bug 1596918)
Backed out changeset 97ec49dbbbf3 (bug 1596918)
Backed out changeset ec79478f58f1 (bug 1596918)
Backed out changeset c6d356833bb8 (bug 1596918)
Backed out changeset 5ef6026806c8 (bug 1596918)
2019-12-07 03:12:07 +02:00
Kris Maglione
e59706f08a Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740
2019-12-06 22:14:14 +00:00
Gabriele Svelto
f03cdb2b2d Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55444
2019-12-06 09:17:57 +00:00
Boris Zbarsky
2df1df0176 Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53067
2019-12-05 04:44:32 +00:00
Dimi Lee
1596310604 Bug 1584931 - P2. Disable flashblock when fission is enabled. r=bytesized
This patch does the following:
  1. Disable flashblock when fission is enabled.
  2. Update flashblock tests to expect "unknown" classification when fission is
     enabled.
  3. Remove skip-if=fission in flashblock mochitests.

Depends on D51098

Differential Revision: https://phabricator.services.mozilla.com/D55091
2019-12-04 09:00:28 +00:00
Dimi Lee
3aafff844d Bug 1584931 - P1. Fix flashblock testcase failures when fission is enabled. r=bytesized,mccr8
Although we decided to disable flashblock when fission is enabled, we
still need to update testcases so they can run normally in the fission mode.

Differential Revision: https://phabricator.services.mozilla.com/D51098
2019-12-04 09:00:21 +00:00
Dimi Lee
2f65764a31 Bug 1599379 - Create a DBService instance in GetWorker API when it doesn't exist. r=baku
There are two places using DBService during a page load at startup:
1. nsChannelClassifier::Start, used by Phishing Protection
2. AsyncChannelClassifier::CheckChannel, used by Tracking Protection

Tracking protection checks happen before establishing a network connection, so it happens
prior to phishing protection checkes. When we load a page at
startup, ::CheckChannel API is called, but DBService is not yet created.

This patch fixes this issue by creating a DBService instance when
::GetWorker API is called without a DBService instance.

Differential Revision: https://phabricator.services.mozilla.com/D55248
2019-12-02 14:37:25 +00:00
Ciure Andrei
344901b56e Backed out changeset ecc4010a247c (bug 1599379) for causing bustages CLOSED TREE 2019-12-02 13:14:41 +02:00
Dimi Lee
57708f7408 Bug 1599379 - Create a DBService instance in GetWorker API when it doesn't exist. r=baku
There are two places using DBService during a page load at startup:
1. nsChannelClassifier::Start, used by Phishing Protection
2. AsyncChannelClassifier::CheckChannel, used by Tracking Protection

Tracking protection checks happen before establishing a network connection, so it happens
prior to phishing protection checkes. When we load a page at
startup, ::CheckChannel API is called, but DBService is not yet created.

This patch fixes this issue by creating a DBService instance when
::GetWorker API is called without a DBService instance.

Differential Revision: https://phabricator.services.mozilla.com/D55248
2019-12-02 08:51:12 +00:00
Sylvestre Ledru
0f8c6db00f Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D54686
2019-11-26 14:35:02 +00:00
Andrew McCreight
ad6252f5a4 Bug 1599180 - Fix some trivial "browing" typos. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D54570
2019-11-25 18:32:35 +00:00
DimiDL
05e0d3530a Bug 1591112 - Do not release Classifier in the Safe Browsing update thread. r=gcp
In AsyncApplyUpdate, the Safe Browsing update thread holds a reference
to 'Classifier'. In some scenarios(See Bug 1591112), the update
thread may be the last one holding the reference; hence the update
thread releases the 'Classifier' when the task is ended.

Classifier has to be created and destroyed in the same thread
because of the constrain of LazyIdelThread, in the current
implementation, it should be released by the worker thread.

This patch transfers the ownership of the reference of 'Classifier 'from the
update thread to the worker thread before its task is finished to make
sure we release 'Classifier' in the right thread.

Differential Revision: https://phabricator.services.mozilla.com/D53156
2019-11-20 08:34:53 +00:00
JaStenson
18e6188897 Bug 1597214 - Remove useless return; declaration, r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D53401
2019-11-18 12:03:01 +00:00
Kashav Madan
454f2505dd Bug 1588193 - Fix broken tests, r=mccr8
Most of these tests relied on assumptions that were broken by the updated
content event helpers (timing, being in a ContentTask, etc).

Depends on D51441

Differential Revision: https://phabricator.services.mozilla.com/D51442
2019-11-07 21:33:10 +00:00
Cosmin Sabou
cd92f0ff8a Bug 1591112 - Disable tests that are frequently asserting on LazyIdleThread. r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D51799
2019-11-06 12:08:33 +00:00
DimiDL
32eca9fba9 Bug 1522054 - Assert when nsUrlClassifierDBService::Lookup is called with SystemPrinciap. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D49887
2019-11-07 08:11:33 +00:00
Dorel Luca
e1b89415f1 Backed out 4 changesets (bug 1588193) for Broswer-chrome failures on browser/base/content/test/favicons/browser_favicon_change_not_in_document.js. CLOSED TREE
Backed out changeset df4c4004abc5 (bug 1588193)
Backed out changeset 1beab20978b2 (bug 1588193)
Backed out changeset 1ada54e7ba7c (bug 1588193)
Backed out changeset a0d9537d24c6 (bug 1588193)
2019-11-06 21:30:29 +02:00
Kashav Madan
e95be80bdb Bug 1588193 - Fix broken tests, r=mccr8
Most of these tests relied on assumptions that were broken by the new content
event utils (timing, being in a ContentTask, etc).

Differential Revision: https://phabricator.services.mozilla.com/D51442
2019-11-06 15:35:19 +00:00
Brindusan Cristian
b64f009576 Backed out 4 changesets (bug 1588193) for bc failures at browser_mixedcontent_aboutblocked.js. CLOSED TREE
Backed out changeset 0bbb1f92bb47 (bug 1588193)
Backed out changeset 074bb8a6fd68 (bug 1588193)
Backed out changeset b10ec4058ec3 (bug 1588193)
Backed out changeset c90bab12f4cb (bug 1588193)
2019-11-06 02:39:32 +02:00
Kashav Madan
25c37638ba Bug 1588193 - Fix broken tests, r=mccr8
Most of these tests relied on assumptions that were broken by the new content
event utils (timing, being in a ContentTask, etc).

Differential Revision: https://phabricator.services.mozilla.com/D51442
2019-11-05 21:52:43 +00:00
Brindusan Cristian
5e10916d81 Backed out changeset 1548ffd8f48c (bug 1522054) for mochitest failures at test_lookup_system_principal.html. CLOSED TREE 2019-11-06 01:11:51 +02:00
DimiDL
78c0738f7d Bug 1522054 - Assert when nsUrlClassifierDBService::Lookup is called with SystemPrinciap. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D49887
2019-10-31 12:55:58 +00:00
Nihanth Subramanya
502b80b17b Bug 1584479 - Part 2: Update socialtracking test. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D51444
2019-11-02 09:53:51 +00:00
Dorel Luca
2060c2bf48 Backed out 4 changesets (bug 1584479) for Browser-chrome failures in toolkit/components/antitracking/test/browser/browser_socialtracking.js
Backed out changeset b0d9877bd8b0 (bug 1584479)
Backed out changeset d2c56bd61b08 (bug 1584479)
Backed out changeset 0edb22786545 (bug 1584479)
Backed out changeset 7e03b392edb3 (bug 1584479)
2019-11-02 01:18:42 +02:00
Nihanth Subramanya
c49b864217 Bug 1584479 - Part 2: Update socialtracking test. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D51444
2019-11-01 22:02:12 +00:00
Ehsan Akhgari
ecff46f411 Bug 1591738 - Fix a few leaks in VariableLengthPrefixSet under OOM conditions; r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D50709
2019-10-28 08:12:23 +00:00
DimiDL
631e17994a Bug 1512937 - P2. Do not generate an extra framgment for URLs without a path. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D49881
2019-10-28 08:27:52 +00:00
DimiDL
2a0522cf1d Bug 1512937 - P1. Change the #include order in the Safe Browsing gtest. r=gcp
There were compiler errors while I added a gtest testcase.
This patch updates the Test* files to include a common header, remove redundant headers,
and include missing headers.

Differential Revision: https://phabricator.services.mozilla.com/D49880
2019-10-28 08:27:49 +00:00
DimiDL
0efc0af4f1 Bug 1553855 - P2. Fix Safe Browsing testcase errors after introducing LazyIdle thread. r=gcp
A LazyIdle thread should be created and removed by the same thread. This
patch fixes testcases that trigger the assertion.

Depends on D49874

Differential Revision: https://phabricator.services.mozilla.com/D49875
2019-10-24 14:03:25 +00:00
DimiDL
5b587dad7e Bug 1553855 - P1. Make the Classifier Update thread a LazyIdle thread. r=gcp
Safe Browsing update thread wakes up every 30 mins to update tables from google
and 60 mins to update tables from mozilla.

Since the update thread doesn't have always to be alive, we change the
update thread to be a LazyIdle thread instead.

Differential Revision: https://phabricator.services.mozilla.com/D49874
2019-10-24 14:02:27 +00:00
Geoff Brown
708ce0c097 Bug 1585119 - Re-enable yet more mochitests on android; r=geckoview-reviewers,snorp
Most of these tests have been disabled for a long time; they run well
in the current test environment.
This completes my review of skipped Android tests.

Differential Revision: https://phabricator.services.mozilla.com/D49954
2019-10-22 20:10:27 +00:00
Jean-Yves Avenard
ddeb965a06 Bug 1588899 - P1. Move classification flags related method to nsIClassifiedChannel. r=Ehsan,baku
This is where it should have been in the first place. Those attributes belong there.

Differential Revision: https://phabricator.services.mozilla.com/D49577
2019-10-19 04:30:24 +00:00
DimiDL
234dabb67d Bug 1584931 - Replace ContentTask.spawn with SpecialPowers.spawn for flash blocking testcases. r=gcp
To make us pass flash blocking testcases when fission is enabled, we should use
SpecialPowers.spawn instead of ContentTask.spawn because the iframes in the testcases
may be cross-origin iframes.

Differential Revision: https://phabricator.services.mozilla.com/D49388
2019-10-16 07:38:34 +00:00
Tom Ritter
7fcaff0e75 Bug 1585366 - Remove a gcc mangling workaround for Windows r=dmajor
Bug 1329593 introduced this for the mingw-gcc build; but we no longer support this
build and mingw-clang does not need it.

Differential Revision: https://phabricator.services.mozilla.com/D48606
2019-10-08 21:00:08 +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
Sylvestre Ledru
49802d0a8e Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D47737
2019-10-06 18:29:55 +00:00
dimi
9d1acd1efc Bug 1585443 - Remove IsCanonicalizedIP assertion. r=Ehsan
Top-level URL and third-party URL can be an IP address, remove
IsCanonicalizedIP assertion and do not fragment a domain when the domain is an IP address

Differential Revision: https://phabricator.services.mozilla.com/D47916
2019-10-04 23:26:11 +00:00
dimi
0cf2b0722a Bug 1580416 - P2. Add a testcase to test a match can be found when whitelisted URI is eTLD. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D47213
2019-09-27 08:50:44 +00:00
DimiL
c33830dad9 Bug 1580416 - P1. Use a different fragment method when the URI is a pairwiseWhitelistedURI. r=Ehsan
This patch does the following to support matching a whitelisted URI when
its domain is eTLD+1:

1. add an URIType to indicate whether a URI is generated by
   UrlClassifierCommoon::CreatePairwiseWhiteListURI(), which crafts a
   whitelist URL like "toplevel.page/?resource=third.party.domain"

2. call LookupCache::GetLookupWhitelistFragments() if URIType is
   nsIUrlClassifierFeature::pairwiseWhitelistedURI before initiating
   a lookup.

3. implement LookupCache::GetLookupWhitelistFragments() which creates
   an additional fragment by removing the leading component of
   third.party.domain

Differential Revision: https://phabricator.services.mozilla.com/D47212
2019-09-27 13:22:18 +00:00
Anny Gakhokidze
9dd233aa38 Bug 1582531 - Update fission annotations for skipped tests that are now passing succesfully, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D47347
2019-09-27 14:25:10 +00:00
monikamaheshwari
edb30ffaec Bug 1578683 Turn on ESLint rule prefer-boolean-length-check for toolkit and browser r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D45629
2019-09-14 09:39:26 +00:00
Bogdan Tara
bc8754084e Bug 1580565 - Disable test_classify_by_default.html if fission r=mccr8,egao
Differential Revision: https://phabricator.services.mozilla.com/D45824
2019-09-13 11:09:53 +00:00