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

310 Коммитов

Автор SHA1 Сообщение Дата
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Honza Bambas 4bd41740d0 Bug 1165269 - Use OriginAttributes in nsILoadContextInfo, r=michal+allstars 2015-10-11 18:13:09 +02:00
Nicholas Nethercote 3c75804211 Bug 1209351 (part 4) - Optimize nsTHashTable::RemoveEntry() usage in netwerk/. r=michal.novotny.
--HG--
extra : rebase_source : f8016c5411f428b60c7bee892eceee33b8951149
2015-09-24 19:10:37 -07:00
Nathan Froyd 8a9abcdd4d Bug 1156974 - mark CacheFileHandle::mIsDoomed as a release/acquire Atomic variable; r=michal 2015-08-04 00:32:36 -04:00
Nikhil Marathe 8dbf443150 Bug 1167809 - Add skip size check flag to cache for use with ServiceWorkers. r=mayhemer
For non-e10s Service Worker, we use Cache entries to achieve interception.
While this is a temporary measure, the fact that cache enforces size limits on
cache entries (which make sense for the purpose it was designed) prevents large
files from being served via a Service Worker. This patch adds a skip size check
flag to CacheStorage that is relayed to CacheEntry and CacheFile. It is set to
false by default leading to normal cache behaviour.
The patch also adds nsICacheStorageService.synthesizedCacheStorage() that
retrieves a cache storage with this flag set to true, which is used by
nsHttpChannel in case of possible interception.
2015-09-03 16:05:42 -07:00
Nicholas Nethercote f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Honza Bambas 5ae69d4a1a Bug 1082735 - Don't use InsertElementSorted in HTTP cache, r=michal 2015-08-17 15:18:59 -07:00
Arnaud Bienner 2755fa9a57 Bug 1190086 - Use new String::Contains(char) method more widely r=froydnj
--HG--
extra : rebase_source : 81df1495200d3734ea1c4c13818ae764a445f4b3
2015-08-14 00:49:15 +02:00
Kyle Huey 76e3009ab8 Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -07:00
Nicholas Nethercote fd1fcf1481 Bug 1182961 (part 2, attempt 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : f1e111eee99e570c4766a55aefb2906dd12362d6
2015-07-26 20:15:36 -07:00
Nicholas Nethercote bf4d4d1817 Bug 1182961 (part 1, attempt 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal. 2015-07-28 21:14:39 -07:00
Nicholas Nethercote cf3a9d61c8 Bug 1182961 (part 3, attempt 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : 2cb02728091d14c08092325eb7c6da031676e1d7
2015-07-26 20:35:31 -07:00
Nicholas Nethercote 6eb030ce06 Bug 1182961 (part 4, attempt 2) - Use nsTHashtable::Iterator in CacheFileHandles. r=michal. 2015-07-26 23:31:22 -07:00
Nicholas Nethercote daab3fdaf7 Backout bff74cecc67c, ffe0edb2aae7, b60b7c267cef, 6da154b43265, bcf6fd3ab9bb (bug 1182961 parts 1--5) for possible intermittent failures and performance problems.
--HG--
extra : rebase_source : 97ab1452e462b1ff24cc77bdadf2a6e82800690d
2015-08-06 16:30:47 -07:00
Nicholas Nethercote 72530c51ab Bug 1182961 (part 4) - Use nsTHashtable::Iterator in CacheFileHandles. r=michal.
--HG--
extra : rebase_source : 35c5892e4fa4c754fade81846d2d1fcb75ced93d
2015-07-26 23:31:22 -07:00
Nicholas Nethercote c9f9c763d3 Bug 1182961 (part 3) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : b0011c4c261846bf314c867790b1315b6c2ca6d7
2015-07-26 20:35:31 -07:00
Nicholas Nethercote 68e8f70a14 Bug 1182961 (part 2) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : d3f035201da0c526da3003f30f8719a2635a9a09
2015-07-26 20:15:36 -07:00
Nicholas Nethercote 4535e7d710 Bug 1182961 (part 1) - Use nsTHashtable::Iterator in CacheIndex. r=michal.
--HG--
extra : rebase_source : cc650176cc87916c6683705ca9aa1954d30d1c0d
2015-07-28 21:14:39 -07:00
Nicholas Nethercote d98d14fa1e Bug 1189156 (part 4) - Don't use enumeration style for nsBaseHashtable::SizeOf{In,Ex}cludingThis(). r=erahm,jfkthame.
After this change, we have ShallowSizeOf{In,Ex}cludingThis(), which don't do
anything to measure children. (They can be combined with iteration to measure
children.)

--HG--
extra : rebase_source : f98420176f50990bbc5a25e35788328154cfeb00
2015-07-30 21:19:57 -07:00
Carsten "Tomcat" Book 9fcb673926 Backed out changeset fb2a27db76bc (bug 1032254) for OS X Static Build Bustage on a CLOSED TREE
--HG--
rename : netwerk/test/unit/test_cache2-29a-concurrent_read_resumable_entry_size_zero.js => netwerk/test/unit/test_cache2-28-concurrent_read_resumable_entry_size_zero.js
rename : netwerk/test/unit/test_cache2-29b-concurrent_read_non-resumable_entry_size_zero.js => netwerk/test/unit/test_cache2-29-concurrent_read_non-resumable_entry_size_zero.js
2015-07-31 07:57:50 +02:00
Valentin Gosu 30be843b5b Bug 1032254 - Provide a way to pin resources in the http cache r=honzab
--HG--
rename : netwerk/test/unit/test_cache2-28-concurrent_read_resumable_entry_size_zero.js => netwerk/test/unit/test_cache2-29a-concurrent_read_resumable_entry_size_zero.js
rename : netwerk/test/unit/test_cache2-29-concurrent_read_non-resumable_entry_size_zero.js => netwerk/test/unit/test_cache2-29b-concurrent_read_non-resumable_entry_size_zero.js
2015-07-30 11:40:00 +02:00
Nicholas Nethercote 87b80f8c66 Bug 1188745 - Rename nsTArray::SizeOfExcludingThis() as ShallowSizeOfExcludingThis(). r=froydnj.
This makes it clearer that, unlike how SizeOf*() functions usually work, this
doesn't measure any children hanging off the array.

And do likewise for nsTObserverArray.

--HG--
extra : rebase_source : 6a8c8d8ffb53ad51b5773afea77126cdd767f149
2015-07-28 23:24:24 -07:00
Michal Novotny cb267138f2 Bug 1177278 - Large OOMs in CacheFileMetadata::WriteMetadata, r=honzab 2015-07-22 15:23:16 +02:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Michael Layzell dbe075d5b8 Bug 1180993 - Part 3: Correct use sites of functions which return already_AddRefed. r=ehsan 2015-07-10 08:36:00 -04:00
Michal Novotny 3ce10dc57a Bug 1171724 - Large OOMs in CacheFileMetadata, r=honzab 2015-06-24 06:33:37 +02:00
David Major 40bbd6a80c Bug 1173860: Null check on sGlobalEntryTables. r=mcmanus 2015-06-17 11:23:43 -04:00
Michal Novotny 075c39f3b9 Bug 1151812 - Add telemetry to find optimal cache entry hash size, r=honzab 2015-06-14 14:13:18 +02:00
Eric Rahm 518166f0c8 Bug 1165515 - Part 14: Undef PR_LOG macros when using mozilla/Logging.h. r=froydnj
Make it harder for users to accidentally reintroduce usage of the PR_LOG macros
when using 'mozilla/Logging.h'. This can still be worked around by directly
including 'prlog.h' (and not 'mozilla/Logging.h') if absolutely necessary.
2015-06-03 15:26:07 -07:00
Eric Rahm 75c4bebb79 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
Eric Rahm f50b813989 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-03 15:22:28 -07:00
Honza Bambas 326b2476af Bug 1170534 - Remove Visual Event Tracer. r=dougt 2015-06-02 11:44:00 -04:00
Carsten "Tomcat" Book 5471309381 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)

--HG--
extra : rebase_source : 6fb850d063cbabe738f97f0380302153e3eae97a
2015-06-02 13:05:56 +02:00
Eric Rahm 38901afce4 Bug 1165515 - Part 14: Undef PR_LOG macros when using mozilla/Logging.h. r=froydnj
Make it harder for users to accidentally reintroduce usage of the PR_LOG macros
when using 'mozilla/Logging.h'. This can still be worked around by directly
including 'prlog.h' (and not 'mozilla/Logging.h') if absolutely necessary.
2015-06-01 22:17:34 -07:00
Eric Rahm a9afd68cef 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
Eric Rahm 141e0ff4a2 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-01 22:17:19 -07:00
Wes Kocher 4e9f80ed2e 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 e8a5eb8d6e Bug 1165515 - Part 14: Undef PR_LOG macros when using mozilla/Logging.h. r=froydnj
Make it harder for users to accidentally reintroduce usage of the PR_LOG macros
when using 'mozilla/Logging.h'. This can still be worked around by directly
including 'prlog.h' (and not 'mozilla/Logging.h') if absolutely necessary.
2015-06-01 14:31:01 -07:00
Eric Rahm f82c0e7caf 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
Eric Rahm dc090e3fe5 Bug 1165515 - Part 3: Convert PR_LOG_TEST to MOZ_LOG_TEST. r=froydnj 2015-06-01 14:31:00 -07:00
Michal Novotny 594c5d9881 Bug 1157322 - TSan: data race netwerk/cache2/CacheIOThread.cpp:315 OnDispatchedEvent, r=honzab 2015-06-01 15:59:17 +02:00
Michal Novotny 30fb016392 Bug 1122070 - TSan: data race netwerk/cache2/CacheIOThread.cpp:97 DispatchInternal, r=honzab 2015-06-01 15:36:44 +02:00
Honza Bambas adddf68b3c Bug 1122420 - Improve after-shutdown dispatch assertion on CacheIOThread. r=michal
--HG--
extra : rebase_source : f4e438e004b4e18e81ce35db5659a6c9cef18ce1
2015-04-13 16:58:00 +02:00
Michal Novotny f60380e914 Bug 1159500 - crash in mozilla::net::CacheIndexIterator::GetNextHash(unsigned char (*)[20]), r=honzab 2015-05-23 09:12:43 +02:00
Eric Rahm 3925a960aa Bug 1165515 - Part 1: Convert PR_LOG to MOZ_LOG. r=froydnj 2015-05-21 13:22:04 -07:00
Eric Rahm 4879ae86f4 Bug 1165518 - Part 2: Replace prlog.h with Logging.h. rs=froydnj 2015-05-19 11:15:34 -07:00
Neil Rashbrook cf42e317ab Bug 1155963 Only allow NS_LITERAL_CSTRING to be used on compile-time literals r=froydnj,ehsan 2015-05-16 09:07:10 +01:00
Wes Kocher 3c714c42eb Backed out changeset 17cfad44e12b (bug 1155963) for breaking b2g builds 2015-05-14 16:35:18 -07:00
Neil Rashbrook ae441fafa2 Bug 1155963 Only allow NS_LITERAL_CSTRING to be used on compile-time literals r=froydnj,ehsan 2015-05-15 00:00:33 +01:00
Eric Rahm 25a263c237 Bug 1162336 - Part 2: Wrap expensive calls in PR_LOG_TEST. r=froydnj
Check that logging is enabled before performing potentially expensive
operations.
2015-05-07 12:52:45 -07:00