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

66 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote c2306345d5 Bug 1297658 - Avoid unnecessary checking in memory reporters. r=erahm.
This patch removes checking of all the callback calls in memory reporter
CollectReport() functions, because it's not useful.

The patch also does some associated clean-up.

- Replaces some uses of nsIMemoryReporterCallback with the preferred
  nsIHandleReportCallback typedef.

- Replaces aCallback/aCb/aClosure with aHandleRepor/aData for CollectReports()
  parameter names, for consistency.

- Adds MOZ_MUST_USE/[must_use] in a few places in nsIMemoryReporter.idl.

- Uses the MOZ_COLLECT_REPORT macro in all suitable places.

Overall the patch reduces code size by ~300 lines and reduces the size of
libxul by about 37 KiB on my Linux64 builds.

--HG--
extra : rebase_source : e94323614bd10463a0c5134a7276238a7ca1cf23
2016-08-24 15:23:45 +10:00
Seth Fowler 1f92f3a7b9 Bug 1293472 (Part 3) - Store animated images in the surface cache as a sequence of frames, rather than each frame getting its own cache entry. r=dholbert,edwin,njn 2016-08-18 15:42:48 -07:00
Jonathan Hao ea61afe035 Bug 1270680 - Part 1: Double-key the image cache by origin attribute. r=jdm 2016-08-04 20:22:00 +02:00
Yoshi Huang a520e75a4d Bug 1264231 - Part 3: remove loadInfo work-around. r=sicking 2016-08-05 19:44:57 +08:00
Chris Peterson b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Daniel Holbert 3996555d1a Bug 1282670, part 3: Make several imagelib .cpp files #inclue their corresponding .h file as their very first #include, per Gecko convention. r=seth
(In some cases, I've left "ImageLogging.h" being included before the corresponding .h file, because I ran across a warning comment saying that it needs to be included before any IPDL-generated files & anything that includes prlog.h; and it seems possible that Foo.cpp's corresponding Foo.h file could include such headers now or in the future.)

MozReview-Commit-ID: HPvUVj8YuKc
2016-06-30 10:27:03 -07:00
Daniel Holbert 17deb8bb7c Bug 1282670, part 2: Remove unnecessary/redundant string-related #include & "using" declarations in imagelib. r=seth
MozReview-Commit-ID: 1hgnUosiOFU
2016-06-30 10:25:35 -07:00
Christoph Kerschbaumer 19ac7d31c1 Bug 1274170 - Remove unnecessary includes of nsCorsListenerProxy. r=jkingston
--HG--
extra : rebase_source : 488864e497a7e6c127a98e05efd17d1d0580e000
2016-06-21 12:54:03 +02:00
Thomas Nguyen 4b7ad0e2c5 Bug 1223838 - Fix wrong policy associated with empty string. r=fkiefer,hsivonen
MozReview-Commit-ID: 7kFH39cegmH
2016-05-30 15:17:45 +08:00
Jonathan Hao a1a0a9bd7d Bug 1280006 - Backout "Bug 1270680 - Part 1: Double-key the image cache by origin attribute." r=tanvi
This reverts commit bb0482fe09fbfad9be89384ec5cb8b6518187379.
2016-06-14 12:43:21 +01:00
Jonathan Hao e255200c24 Bug 1280006 - Backout "Bug 1270680 - Part 3 - Get origin attributes from loadInfo in LoadImageWithChannel()." r=tanvi
This reverts commit 8ef7edb6a790df9128558e6eb520701f4fc600a0.
2016-06-14 12:43:14 +01:00
Blake Kaplan e6e116bff5 Bug 1274516 - Add a helper to iterate over all ContentParents and use it to clear the image cache in both the parent and child processes. r=billm r=seth 2016-06-10 16:00:22 -07:00
Jonathan Hao 61e05c234f Bug 1270680 - Part 3 - Get origin attributes from loadInfo in LoadImageWithChannel(). r=tanvi 2016-06-02 20:50:00 +02:00
Jonathan Hao b7c57a3da1 Bug 1270680 - Part 1: Double-key the image cache by origin attribute. r=jdm,seth 2016-06-01 23:07:00 +02:00
Jonathan Watt de83a13903 Bug 1275266 - Rename imgLoader::Singleton and imgLoader::PBSingleton to something less misleading, and document them. r=tnikkel 2016-05-19 13:31:15 +01:00
Jonathan Watt 887122b9b7 Bug 1275229 - Stop using do_CreateInstance("@mozilla.org/image/loader;1") to create gecko internal imgLoader instances. r=tikkel 2016-05-19 13:31:15 +01:00
Jonathan Watt e1ac9527d2 Bug 1274881 - Get rid of imgLoader::GetInstance. r=tnikkel 2016-05-18 10:19:19 +01:00
Christoph Kerschbaumer 0e1d963860 Bug 1206961 - Use channel->AsyncOpen2() in image/imgLoader.cpp; removing security checks from the callsite reveals that we have to pass the accurate contentPolicyType to ValidateEntry (r=seth,bz) 2016-04-27 19:40:56 +02:00
Kris Maglione 9788ff57c1 Bug 1261231: Fix shutdown leak in imgLoader::GetInstance. r=gabor
MozReview-Commit-ID: K3kQrva1mG7

--HG--
extra : rebase_source : 846b62a772ce7f1adbad1e834a3f8a98496d8f77
2016-03-31 16:26:38 -07:00
Dragana Damjanovic 645513565f Bug 1125916 - Fix code that miss proper flags and originAttributes in LoadInfo. Also fix some tests. r=sicking, r=jduell
--HG--
extra : rebase_source : 2a08f0208496671439ce62a576b5f8a728bbdf3c
extra : amend_source : 30412ab68cc0ee4469a88e41b6ce81c908a26535
extra : histedit_source : 1faae352f7fbf7c4c7a9e1e571ca395c853a1334
2016-04-13 15:34:36 +02:00
Christoph Kerschbaumer 563d5a0864 Bug 1256999 - Use nsIDocument for ImageCacheKey. r=bz r=seth 2016-04-11 11:00:03 +02:00
Christoph Kerschbaumer 52a7f283b3 Bug 1256999 - Pass the right context to new channels for image loads. r=bz r=seth 2016-04-11 10:58:03 +02:00
Timothy Nikkel 6aeb6d5d05 Bug 1260247. In chaos mode randomly decide to start a new image load even if the image is in the image cache when allowed by spec. r=seth
If the image load is from the same document that cached the image we are required to use the cached version. Otherwise we should be free to ignore the cached version.
2016-04-02 13:53:12 -05:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
sajitk 32ccc4c2b0 Bug 1219474 - Replace PRLogModuleInfo w/ LazyLogModule in the 'image/' directory. r=seth
--HG--
extra : rebase_source : 1ce8c7a9d4ff2610506584e9f58ab9d9a6e92e06
2015-11-16 18:21:00 +01:00
Nathan Froyd 2d8bae8e40 Bug 1217571 - fix the imagelib cache to work in e10s; r=seth
nsICachingChannel isn't available in the child process; we have to use
nsICacheInfoChannel instead.
2015-11-12 15:09:52 -05:00
Sotaro Ikeda a835d4a1cf Bug 1186796 - Replace nsBaseHashtable::EnumerateRead() calls in image/ with iterators r=njn 2015-11-10 23:07:09 -08:00
Sotaro Ikeda 7246d92be6 Bug 1187149 - Replace nsBaseHashtable::Enumerate() calls in image/ with iterators r=njn 2015-11-10 21:30:02 -08:00
Ehsan Akhgari e5b08c2286 Bug 1202085 - Part 6: Clear the entries in the image cache belonging to a controlled document when it gets destroyed; r=seth 2015-10-30 16:03:13 -04:00
Ehsan Akhgari 3c9fd0e9e1 Bug 1202085 - Part 4: Add an ID for controlled document to the image cache key; r=seth
This ID will be null for non-controlled documents and also for image cache
entries for which a document is not available, and it will be the numerical
value of the document pointer for controlled documents.

This effectively makes sure that a controlled document doesn't share its
image cache entries with anything else.
2015-10-30 16:03:11 -04:00
Ehsan Akhgari 91329749b1 Bug 1202085 - Part 2: Add an optional document argument to imgICache::FindEntryProperties(); r=seth 2015-10-30 16:03:09 -04:00
Ehsan Akhgari 01fcc28c38 Bug 1202085 - Part 1: Remove imgICache::RemoveEntry(); r=seth 2015-10-30 16:03:08 -04:00
Seth Fowler 6598853366 Bug 1207355 (Part 8) - Remove imgIContainer::RequestDecode() and imgIRequest::RequestDecode(). r=tn 2015-10-29 16:37:42 -07:00
Phil Ringnalda a727c1fe68 Back out 8 changesets (bug 1207355) for OS X 10.10 reftest failures in generated-content/
CLOSED TREE

Backed out changeset aafd6db2fbb4 (bug 1207355)
Backed out changeset 9dd950b837fb (bug 1207355)
Backed out changeset e941e0e106a1 (bug 1207355)
Backed out changeset ecebca101fcb (bug 1207355)
Backed out changeset 08f2017137e1 (bug 1207355)
Backed out changeset 3dc69e37c9b4 (bug 1207355)
Backed out changeset bcdf51edb121 (bug 1207355)
Backed out changeset 1d4c00dbf49a (bug 1207355)
2015-10-28 22:57:43 -07:00
Seth Fowler 0fa74a123c Bug 1207355 (Part 8) - Remove imgIContainer::RequestDecode() and imgIRequest::RequestDecode(). r=tn 2015-10-28 16:40:43 -07:00
Birunthan Mohanathas 44936aabb2 Bug 1217320 - Remove more XPIDL signature comments in .cpp files. r=froydnj
Comment-only, DONTBUILD.
2015-10-27 06:54:25 +02:00
Nathan Froyd 0e77a32c87 Bug 1215763 - part 2 - s/nsAutoPtr/UniquePtr/ in image/; r=seth
These conversions should be straightforward, but we have to add a .get
for nsExpirationTracker::Iterator.
2015-10-17 06:53:28 -04:00
Oliver Henshaw d4317501c5 Bug 1180715 (1/4) - Track image LoadTime to compare with file mtime. review=seth
mTouchedTime is not appropriate for this as it is updated when an image
load re-uses the same imgRequest, especially as it has one second
granularity. A timestamp that is updated every time the backing file is
re-read should work better.

A millisecond granularity timestamp would be preferable, and would be
achievable on most or all supported platforms. But some older
filesystems have timestamp granularity of a second or worse, notably
ext3 and FAT32 (and even ext4 filesytems created with inode_size < 256
bytes, e.g. with 'mke2fs -t small' - see
https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#Inode_Timestamps
for details.)
2015-10-20 10:45:25 +05:30
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
Christoph Kerschbaumer 9f1e9e2eaa Bug 1048048 - add preload content policy types for images (r=seth)
--HG--
extra : source : 88c2333ff7455b6988eb8d6ccc5e92b414a7ccf8
2015-09-20 14:55:59 -07:00
Wes Kocher cd079d2bf9 Backed out 7 changesets (bug 1048048) for android crashes in various chunks CLOSED TREE
Backed out changeset b5abe23a4ea5 (bug 1048048)
Backed out changeset 4f91b10e8be0 (bug 1048048)
Backed out changeset 450d4a13c90e (bug 1048048)
Backed out changeset 6a727c40eb68 (bug 1048048)
Backed out changeset 88c2333ff745 (bug 1048048)
Backed out changeset 740ab1ecd079 (bug 1048048)
Backed out changeset 02c6d6aef163 (bug 1048048)
2015-09-21 09:08:34 -07:00
Christoph Kerschbaumer 19dc79ddbb Bug 1048048 - add preload content policy types for images (r=seth) 2015-09-20 14:55:59 -07:00
Nicholas Nethercote 6f036921dc Bug 1203427 (part 1) - Add nsExpirationTracker::mName. r=froydnj.
There are many sub-classes of nsExpirationTracker. In order to distinguish them
nicely in the logging of timer firings, it's necessary to manually name each
one. (This wouldn't be necessary if there was a way to stringify template
parameters, but there isn't.)

--HG--
extra : rebase_source : 89b99e9dbb2a806bd21145d04a5e023794643b61
2015-09-09 21:07:07 -07:00
Seth Fowler f89ca1d90f Bug 1185800 - Add DecoderFlags and SurfaceFlags enum classes and use them instead of imgIContainer flags in all decoder-related code. r=tn 2015-08-14 17:56:44 -07:00
Birunthan Mohanathas 7315345693 Bug 1191100 - Remove XPIDL signature comments in .cpp files. r=ehsan
Comment-only so DONTBUILD.
2015-08-04 16:17:36 -07:00
Christoph Kerschbaumer ccd1961c44 Bug 1127534 - Remove assertion before creating a channel (r=sicking) 2015-08-02 10:42:22 -07:00
Seth Fowler f0851b622a Bug 1184996 (Part 1) - Create decoders with a DecoderFactory. r=tn 2015-07-22 22:39:48 -07:00
Nicholas Nethercote 0872b25c17 Bug 1182958 - Use nsTHashTable::Iterator in image/. r=seth.
--HG--
extra : rebase_source : 1196a5d0aaefaee43d53d480ed5a27d536e6c84f
2015-07-14 06:37:57 -07:00