Граф коммитов

1269 Коммитов

Автор SHA1 Сообщение Дата
Jean-Yves Avenard 87438519f0 Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj
Before P1, GetCurrentThreadSerialEventTarget would have always returned the same data as NS_GetCurrentThread, making the comment incorrect Now it will properly return the running TaskQueue if any.

This change of name more clearly exposes what they are doing, as we aren't always dealing with threads directly; but a nsISerialEventTarget

Differential Revision: https://phabricator.services.mozilla.com/D80354
2020-06-23 05:05:36 +00:00
Chris Fronk 0752132932 Bug 1620369 Convert Cache Deleter to use background thread pool r=necko-reviewers,michal
Differential Revision: https://phabricator.services.mozilla.com/D74577
2020-05-27 00:05:58 +00:00
Cameron McCormack 1b811cea21 Bug 1629754 - Silence some nsCacheService warnings. r=michal
This silences two warnings that I see in debug builds.

The first is from nsCacheProfilePrefObserver::ReadPrefs, where the
nsresult from the NS_APP_CACHE_PARENT_DIR directory getting will be
returned even if we successfully get the profile directory.  (While
we're here, factor out some common functionality in this function.)

The second is from dealing with the result of
nsCacheService::CreateCustomOfflineDevice.  Failing to create an offline
device is a normal condition, if the cache size is set to 0 or we have
explicitly disabled the offline cache.  So don't warn in those cases.

Differential Revision: https://phabricator.services.mozilla.com/D70793

--HG--
extra : moz-landing-system : lando
2020-04-14 22:36:53 +00:00
Andrea Marchesini d7badaf4fb Bug 1623593 - Get rid of NECKO_COOKIES compilation flag, r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D67451

--HG--
extra : moz-landing-system : lando
2020-03-24 16:30:03 +00:00
anjali1903 4018161e48 Bug 1621251 Replace NS_ADDREF(*var = other) with *var = do_AddRef(other).take() in /netwerk r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D66818

--HG--
extra : moz-landing-system : lando
2020-03-17 15:05:26 +00:00
Cosmin Sabou 9ec8941cd4 Backed out 2 changesets (bug 1603703) for xpc failures on test_storage_aggregates.js. CLOSED TREE
Backed out changeset 05dbbf7c379f (bug 1603703)
Backed out changeset a1e723439116 (bug 1603703)

--HG--
extra : rebase_source : 65d834f15b63fdd0ce5c90d2efd080e4841777aa
2020-03-05 19:37:32 +02:00
Simon Giesecke 9e296ae57f Bug 1603703 - Part 2: Rename CreateFunction/RemoveFunction to RegisterFunction/UnregisterFunction. r=mak
Depends on D57089

Differential Revision: https://phabricator.services.mozilla.com/D65504

--HG--
extra : moz-landing-system : lando
2020-03-05 15:14:56 +00:00
Simon Giesecke e6cae211c4 Bug 1603703 - Part 1: Change mozIStorageAsyncConnection::CreateFunction to accept a nsCOMPtr rather than a raw pointer. r=asuth,mak
Differential Revision: https://phabricator.services.mozilla.com/D57089

--HG--
extra : moz-landing-system : lando
2020-03-05 16:51:14 +00:00
Simon Giesecke aaf6cb4e75 Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63899

--HG--
extra : moz-landing-system : lando
2020-02-25 17:03:36 +00:00
Simon Giesecke 9350e6b741 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

Differential Revision: https://phabricator.services.mozilla.com/D62604

--HG--
extra : moz-landing-system : lando
2020-02-20 11:40:14 +00:00
Dorel Luca d5f9df8ee1 Backed out 2 changesets (bug 1613985) for Build bustage on Windows2012. CLOSED TREE
Backed out changeset fd177b40b561 (bug 1613985)
Backed out changeset fb6d62b7f28d (bug 1613985)
2020-02-19 22:22:41 +02:00
Simon Giesecke 59b23375c0 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

Differential Revision: https://phabricator.services.mozilla.com/D62604

--HG--
extra : moz-landing-system : lando
2020-02-19 18:05:38 +00:00
Eric Rahm 2c08316c5d Bug 1610070 - Part 3: Convert the rest of netwerk/ to use UniquePtr. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D60341

--HG--
extra : moz-landing-system : lando
2020-02-11 16:20:08 +00:00
Honza Bambas b759ab8abf Bug 1545909 - Part 2 of 2: Silently fail when appcache is disabled so that we have a cache entry, r=michal
Depends on D61842

Differential Revision: https://phabricator.services.mozilla.com/D61843

--HG--
extra : moz-landing-system : lando
2020-02-10 09:12:33 +00:00
Tom Tung 83eb41d14a Bug 1474608 - P1 - Clear origin attributes directly for deleteDataFromOriginAttributesPattern if it's possible; r=asuth,baku
The idea of this patch is to try to not use oberver mechanism as possible. To
achieve that, it introduces deleteByOriginAttributes() to cleaners. Different
from other methods, it would only be executed if it's implemented from a
cleaner.

It doesn't remove oberver mechanism entirely since some cleaners are still using
that for other deleteByXXX() functions. So, it only applies removing stuff to
PushService, QuotaManagerService, ServiceWorkerManager, nsPermissionManager,
nsApplicationCacheService, and nsCookieService.

Since the original issue is related to QuotaManagerService, it adds xpcshell
test under the dom/quota/test/unit/ to ensure the behavior won't be changed
accidentally in the future.

Differential Revision: https://phabricator.services.mozilla.com/D33758

--HG--
extra : moz-landing-system : lando
2019-12-02 19:47:13 +00:00
Gabriele Svelto 5dc21d568c 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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Jonathan Kingston c25b106076 Bug 1585582 - Remove all pref observers in CacheService r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D47960

--HG--
extra : moz-landing-system : lando
2019-10-21 09:35:19 +00:00
Razvan Maries 44d59a93a5 Backed out 3 changesets (bug 1585582) for perma fails on appcache.tentative.https.sub.html.
Backed out changeset a55fbe377803 (bug 1585582)
Backed out changeset 0bd7ff0df367 (bug 1585582)
Backed out changeset 78a947a05f08 (bug 1585582)
2019-10-20 21:15:17 +03:00
Jonathan Kingston b42861195e Bug 1585582 - Remove all pref observers in CacheService r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D47960

--HG--
extra : moz-landing-system : lando
2019-10-18 16:05:28 +00:00
Oana Pop Rus 617a761d10 Backed out 3 changesets (bug 1585582) for bc failures browser/base/content/test/sanitize/browser.ini on a CLOSED TREE
Backed out changeset 98d7a4f4388f (bug 1585582)
Backed out changeset c13ec2bbc0a7 (bug 1585582)
Backed out changeset 8015660b170f (bug 1585582)
2019-10-18 18:42:49 +03:00
Jonathan Kingston 42b0253a67 Bug 1585582 - Remove all pref observers in CacheService r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D47960

--HG--
extra : moz-landing-system : lando
2019-10-16 15:36:51 +00:00
Jonathan Kingston d6d3522a16 Bug 1237782 - Remove http override and add appcache pref r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44472

--HG--
extra : moz-landing-system : lando
2019-09-30 00:55:02 +00:00
Coroiu Cristina 3b27110d58 Backed out changeset f3c1becf9396 (bug 1237782) for browser-chrome failures at dom/tests/mochitest/ajax/offline/browser_disableAppcache.js on a CLOSED TREE 2019-09-26 23:05:07 +03:00
Jonathan Kingston 495916342a Bug 1237782 - Remove http override and add appcache pref r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44472

--HG--
extra : moz-landing-system : lando
2019-09-26 19:03:04 +00:00
Brindusan Cristian c2ee78aa6f Backed out changeset 3af4309ffce7 (bug 1237782) for wpt assertions/leaks. CLOSED TREE 2019-09-17 01:03:46 +03:00
Jonathan Kingston bd229a5c73 Bug 1237782 - Remove http override and add appcache pref r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44472

--HG--
extra : moz-landing-system : lando
2019-09-16 17:24:39 +00:00
Gurzau Raul 812644ff5f Backed out changeset 8c25acd6a557 (bug 1237782) for wpt failures at controller-on-disconnect.https.html 2019-09-07 14:32:37 +03:00
Jonathan Kingston 64f59b042f Bug 1237782 - Remove http override and add appcache pref r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44472

--HG--
extra : moz-landing-system : lando
2019-09-07 07:45:30 +00:00
Cosmin Sabou 732b97195a Backed out changeset 7dc9a45ef7d6 (bug 1237782) for causing browser chrome failures on browser_disableAppcache.js CLOSED TREE 2019-09-06 19:10:20 +03:00
Jonathan Kingston a8f4386427 Bug 1237782 - Remove http override and add appcache pref r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44472

--HG--
extra : moz-landing-system : lando
2019-09-06 15:02:34 +00:00
arthur.iakab 4ea120b5cb Backed out changeset e3f06f11de62 (bug 1237782) for causing browser-chrome failure on automation.py CLOSED TREE 2019-09-03 21:04:49 +03:00
Jonathan Kingston dbfd29b586 Bug 1237782 - Remove http override and add appcache pref r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44472

--HG--
extra : moz-landing-system : lando
2019-09-03 16:44:13 +00:00
Boris Zbarsky ec33fbcdf2 Bug 1557904. Stop using [array] in appcache interfaces. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D34308

--HG--
extra : moz-landing-system : lando
2019-06-12 12:02:37 +00:00
Sylvestre Ledru 993c03acb1 Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D31769

--HG--
extra : moz-landing-system : lando
2019-05-22 22:37:14 +00:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

Differential Revision: https://phabricator.services.mozilla.com/D28956

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Valentin Gosu 49ba8dc323 Bug 1532324 - Remove manual NS_RELEASE from netwerk/* r=JuniorHsu
Differential Revision: https://phabricator.services.mozilla.com/D22005

--HG--
extra : moz-landing-system : lando
2019-03-05 18:43:02 +00:00
Michal Novotny 8412fac97f Bug 1525900 - Remove unused code from old cache. r=mayhemer 2019-02-07 05:49:00 +02:00
Sylvestre Ledru 14486004b6 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D18488

--HG--
extra : moz-landing-system : lando
2019-02-04 19:10:18 +00:00
Michal Novotny fcbc8b9cd2 Bug 1455723 - Firefox59 does not properly honor cache size set in autoconfig files, r=mayhemer
We keep old cache code in the tree only because of offline cache. We no longer allow using old disk or memory cache. This patch removes all preferences manipulation from old cache code that isn't used by offline cache. It removes also some related code (e.g. everything smart size related, unused defines etc.), but the goal wasn't to remove all unused code from the old cache.
2019-01-14 06:47:00 +02:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Ehsan Akhgari 490e611801 Bug 1508472 - Part 5: Fifth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal. I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

Differential Revision: https://phabricator.services.mozilla.com/D13371

--HG--
extra : moz-landing-system : lando
2018-11-29 10:30:46 +00:00
Honza Bambas a102a4969c Bug 1358043 - Produce only warning when appcache/old cache backend I/O thread can't be created for lack of resources, r=michal 2018-11-15 08:44:00 +02:00
Gabriele Svelto 266ef73c96 Bug 1503207 - Remove nsWeakPtr.h and cleanup all files including weak reference-related headers r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D10251

--HG--
extra : moz-landing-system : lando
2018-10-31 20:39:03 +00:00
Sylvestre Ledru dd5741407b Bug 1498586 - Add clang-format off to avoid the reformatting of the data structures r=Ehsan
Too hard/impossible for the tool to format correctly these structs

Differential Revision: https://phabricator.services.mozilla.com/D8569

--HG--
extra : moz-landing-system : lando
2018-10-12 20:48:24 +00:00
Andrew McCreight ea6021b769 Bug 1494127 - Fix trivial calls to do_QueryInterface that return an nsresult r=smaug
Calls to do_QueryInterface to a base class can be replaced by a static
cast, which is faster.

Differential Revision: https://phabricator.services.mozilla.com/D7224

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:43 +00:00
Andrew McCreight 837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

Differential Revision: https://phabricator.services.mozilla.com/D6861

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00:00
Nathan Froyd e7b3b3140d Bug 1415980 - make hash keys movable and not copyable; r=erahm
Everything that goes in a PLDHashtable (and its derivatives, like
nsTHashtable) needs to inherit from PLDHashEntryHdr. But through a lack
of enforcement, copy constructors for these derived classes didn't
explicitly invoke the copy constructor for PLDHashEntryHdr (and the
compiler didn't invoke the copy constructor for us). Instead,
PLDHashTable explicitly copied around the bits that the copy constructor
would have.

The current setup has two problems:

1) Derived classes should be using move construction, not copy
   construction, since anything that's shuffling hash table keys/entries
   around will be using move construction.

2) Derived classes should take responsibility for transferring bits of
   superclass state around, and not rely on something else to handle that.

The second point is not a huge problem for PLDHashTable (PLDHashTable
only has to copy PLDHashEntryHdr's bits in a single place), but future
hash table implementations that might move entries around more
aggressively would have to insert compensation code all over the
place. Additionally, if moving entries is implemented via memcpy (which
is quite common), PLDHashTable copying around bits *again* is
inefficient.

Let's fix all these problems in one go, by:

1) Explicitly declaring the set of constructors that PLDHashEntryHdr
   implements (and does not implement). In particular, the copy
   constructor is deleted, so any derived classes that attempt to make
   themselves copyable will be detected at compile time: the compiler
   will complain that the superclass type is not copyable.

This change on its own will result in many compiler errors, so...

2) Change any derived classes to implement move constructors instead of
   copy constructors. Note that some of these move constructors are,
   strictly speaking, unnecessary, since the relevant classes are moved
   via memcpy in nsTHashtable and its derivatives.
2018-09-20 11:20:36 -04:00