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

89 Коммитов

Автор 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
Reuben Morais 8884c73c7e Bug 1285378 - Remove dom.global-constructor.disable pref check from script namespace manager. r=jst 2016-07-30 10:42:12 -03:00
Peter Van der Beken 5c9bb43e9d Bug 1267186 - Split lookup of WebIDL DOM class names from lookup of DOMCI DOM class names. r=bz.
--HG--
extra : rebase_source : 073ec0857b63df3e2ecef43ef3b982f2e1be2d24
2016-05-09 17:08:31 +02:00
Carsten "Tomcat" Book 98f0a3271a Backed out changeset d385df62c0e7 (bug 1267186) for hazard failures 2016-05-09 13:40:01 +02:00
Peter Van der Beken b6c1e074c2 Bug 1267186 - Split lookup of WebIDL DOM class names from lookup of DOMCI DOM class names. r=bz.
--HG--
extra : rebase_source : 324cf124544c0ffe2ad2ceccbed397d5069d1435
2016-03-09 15:48:12 +01:00
Sebastian Hengst faffe478f6 Backed out changeset f9d3ea58c195 (bug 1267186) for static bustage in WebIDLGlobalNameHash.cpp. r=backout 2016-05-06 18:11:03 +02:00
Peter Van der Beken 827ee394ba Bug 1267186 - Split lookup of WebIDL DOM class names from lookup of DOMCI DOM class names. r=bz.
--HG--
extra : rebase_source : 5578057666186f58e434767af84fbfeac0cbdc3c
2016-03-09 15:48:12 +01:00
Peter Van der Beken f781f02ccd Bug 1245650 - remove JavaScript-navigator-property category support. r=bz.
Generate normal properties with getters for things marked as NavigatorProperty,
instead of defining these from a resolve hook.
2016-02-05 20:20:08 +01:00
Nicholas Nethercote a2f068b2ad Bug 1253085 - Remove the |PLDHashTable*| argument from PLDHash{HashKey,MatchEntry}. r=froydnj.
This is easy because it's never needed.

--HG--
extra : rebase_source : 78830dab41c40a1544fa55fc69ca9c1c6709d767
2016-03-16 15:33:44 +11:00
Peter Van der Beken 946ac27409 Bug 1251655 - Remove support for JavaScript-DOM-class and JavaScript-DOM-interface. r=bz.
--HG--
extra : rebase_source : 88c93e93905e20d2f6755d67d86902fdfc923eb4
2016-02-14 15:59:48 +01:00
Peter Van der Beken 5564e12f54 Bug 1251655 - Remove support for JavaScript-global-constructor-prototype-alias. r=bz.
--HG--
extra : rebase_source : b77f4ad6d582b863bf6462177ce816aa360c64ed
2016-02-13 14:59:46 +01:00
Birunthan Mohanathas b568910a25 Bug 1217307 - Remove some unnecessary null checks in dom/base/. r=njn 2015-11-19 09:13:49 +02:00
Nicholas Nethercote 2ee4fd783b Bug 1121760 (part 6) - Move all remaining PL_DHash*() functions into PLDHashTable. r=poiru.
--HG--
extra : rebase_source : 3cdc975507170d783b02d70f7c7d95c6bf2e1bcd
2015-09-14 14:23:47 -07:00
Nicholas Nethercote 59683492e5 Bug 1121760 (part 3) - Remove PL_DHashTableRemove(). r=poiru.
--HG--
extra : rebase_source : c34d693de4aca45f2ea05c2767c8b1007c89df29
2015-09-14 14:23:24 -07:00
Nicholas Nethercote 479244f7c9 Bug 1121760 (part 2) - Remove PL_DHashTableAdd(). r=poiru.
--HG--
extra : rebase_source : 41eb939bfb5c925cba58b1af57abce9a4e5fdb30
2015-09-14 14:23:12 -07:00
Nicholas Nethercote fcfdd8f54b Bug 1121760 (part 1) - Remove PL_DHashTableSearch(). r=poiru.
--HG--
extra : rebase_source : 770e1f49a451ecbadd778e071b204611e27cf701
2015-05-21 00:34:25 -07:00
Nicholas Nethercote 2d56c1f52e Bug 1189156 (part 1) - Don't use enumeration style for PLDHashTable::SizeOf{In,Ex}cludingThis(). r=froydnj.
After this change, we have PLDHashTable::ShallowSizeOf{In,Ex}cludingThis(),
which don't do anything to measure children. (They can be combined with
iteration to measure children.)

This patch also removes the PL_DHashTableSizeOf{In,Ex}cludingThis() functions.
They're not necessary because the methods can be used instead.

Finally, the patch deliberately converts some SizeOfExcludingThis() calls to
SizeOfIncludingThis(). These are all done on heap pointers so this change is
valid.

--HG--
extra : rebase_source : b1d51096a8e7dcac29d7efd92e28938836ff5481
2015-07-29 22:28:20 -07:00
Nicholas Nethercote f4e22e441e Bug 1175810 (part 1) - Remove PL_DHashTableEnumerator() use from nsScriptNameSpaceManager. r=bz.
PLDHashTable::Iterator is so much better. Lots of plumbing removed here.

--HG--
extra : rebase_source : f103eb07792545731ff0bfae824f076e973d134d
2015-06-17 20:30:15 -07:00
Nicholas Nethercote 2d6942191e Bug 1166598 (part 1) - Use PLDHashTable2 in nsScriptNameSpaceManager. r=froydnj.
--HG--
extra : rebase_source : 210c5fe6722060beaf24226651d28f7a5a87b41e
2015-05-05 16:11:43 -07:00
Nicholas Nethercote c8ff2d51c8 Bug 1159972 - Remove the fallible version of PL_DHashTableInit(). r=froydnj.
It's no longer needed now that entry storage isn't allocated there. (The other
possible causes of failures in that function are less interesting and simply
crashing is a reasonable thing to do for them.)

This also makes PL_DNewHashTable() infallible, so I removed some
now-unnecessary checks of its result.

--HG--
extra : rebase_source : 4c6ab0c449bc18e8bace8bf036b5bd78d3a2f1c4
2015-04-29 16:38:29 -07:00
Mike Hommey b077d9624d Bug 1134920 - Use moz_xmalloc/moz_xrealloc/free instead of nsMemory::Alloc/Realloc/Free. r=nfroyd 2015-04-01 13:51:45 +09:00
Nicholas Nethercote 3a7b0a9f57 Bug 1131901 (part 1) - Make PL_DHashTableAdd() infallible by default, and add a fallible alternative. r=froydnj.
I kept all the existing PL_DHashTableAdd() calls fallible, in order to be
conservative, except for the ones in nsAtomTable.cpp which already were
followed immediately by an abort on failure.

--HG--
extra : rebase_source : 526d96ab65e4d7d71197b90d086d19fbdd79b7b5
2015-02-02 14:48:58 -08:00
Andrew McCreight 31ba9aaed9 Bug 1131199, part 2 - Make PLDHashtInitEntry infallible. r=froydnj
Also, drop the unused table argument.
2015-02-11 09:46:40 -08:00
Nicholas Nethercote 63e3218e4c Back out changesets 2fcef6b54be7, 2be07829fefc, 66dfe37b8532, df3fcd2be8fd, 0a436bce77a6 (bug 1050035) for causing intermittent crashes and assertion failures.
--HG--
extra : rebase_source : eb30be83c3143c6c203585a80a18f180025efaba
2015-02-10 14:39:49 -08:00
Nicholas Nethercote b5913e0b3d Bug 1050035 (part 4) - Make PL_DHashTableAdd() infallible by default, and add a fallible alternative. r=froydnj.
I kept all the existing PL_DHashTableAdd() calls fallible, in order to be
conservative, except for the ones in nsAtomTable.cpp which already were
followed immediately by an abort on failure.

--HG--
extra : rebase_source : eeba14d732077ef2e412f4caca852de6b6b85f55
2015-02-02 14:48:58 -08:00
Nicholas Nethercote 9a36fdbde4 Bug 1050035 (part 2) - Remove the fallible version of PL_DHashTableInit(). r=froydnj,mrbkap.
Because it's no longer needed now that entry storage isn't allocated there.
(The other possible causes of failures are much less interesting and simply
crashing is a reasonable thing to do for them.)

This also makes PL_DNewHashTable() infallible.

--HG--
extra : rebase_source : 848cc9bbdfe434525857183b8370d309f3acbf49
2015-02-01 20:19:08 -08:00
Mike Hommey a35dbaeebf Bug 1126593 - Add a global fallible instance, so that using fallible works directly, everywhere. r=njn
--HG--
rename : memory/mozalloc/fallible.h => memory/fallible/fallible.h
2015-02-02 09:56:13 +09:00
Nicholas Nethercote 3163cfc2c1 Bug 1124973 (part 2) - Introduce PL_DHashTableSearch(), and replace most PL_DHashTableLookup() calls with it. r=froydnj.
It feels safer to use a function with a new name, rather than just changing the
behaviour of the existing function.

For most of these cases the PL_DHashTableLookup() result was checked with
PL_DHASH_ENTRY_IS_{FREE,BUSY} so the conversion was easy. A few of them
preceded that check with a useless null check, but the intent of these was
still easy to determine.

I'll do the trickier ones in subsequent patches.

--HG--
extra : rebase_source : ab37a7a30be563861ded8631771181aacf054fd4
2015-01-22 21:06:55 -08:00
Nicholas Nethercote 69fe655b04 Bug 1121304 (part 2, attempt 2) - Remove PLDHashTableOps::{alloc,free}Table. r=froydnj.
--HG--
extra : rebase_source : bc119bd0d3b6944e8c5a000950e0c4052cb70aef
2015-01-14 14:35:56 -08:00
Phil Ringnalda e39f0adeca Backed out 2 changesets (bug 1121304) for consistent b2g hangs in webgl-color-test.html?frame=1&__&preserve&premult&_____
Backed out changeset 20651ac19549 (bug 1121304)
Backed out changeset 758afec77c95 (bug 1121304)
2015-01-14 22:02:23 -08:00
Nicholas Nethercote e9735966fa Bug 1121304 (part 2) - Remove PLDHashTableOps::{alloc,free}Table. r=froydnj. 2015-01-14 14:35:56 -08:00
Nicholas Nethercote 47221bc7f9 Bug 1120476 (part 4) - Remove PLDHashTableOps::finalize. r=froydnj.
--HG--
extra : rebase_source : b14dda8cdd5cd896d1e32950e38b2a9f7da4d99e
2015-01-13 19:02:35 -08:00
Nicholas Nethercote c7538c9776 Bug 1120476 (part 3) - Remove PLDHashTable::data. r=froydnj.
--HG--
extra : rebase_source : 24d10af3dbce3ada5252503bc80bb1a4e31bc1c9
2015-01-13 16:42:13 -08:00
Michael Pruett 411a94b05a Bug 1118024 - Use new PL_DHashTable{Add,Lookup,Remove} functions. r=nfroyd 2015-01-05 20:27:28 -06:00
Nicholas Nethercote a7cf4142b4 Bug 1050009 - Initialize pldhash tables with a length, not a capacity. r=roc.
* * *
imported patch rm-dummy-params

--HG--
extra : rebase_source : c25987eb11bae197218d5fc53b77def19afa36ac
2014-08-06 06:31:21 -07:00
Nicholas Nethercote aaf6fb2124 Bug 1010064 - Allow memory reports to be anonymized. r=bsmedberg.
--HG--
extra : rebase_source : 5eb756b17a97e751deb0f47e909fdb35533cb23b
2014-05-20 23:06:54 -07:00
Ms2ger 6558df9772 Bug 1018103 - Remove support for the "JavaScript-global-static-nameset" category; r=bholley
The only in-tree consumer was removed in bug 1012320; the addons MXR and a web
search suggest that it is unused outside the tree as well.
2014-06-06 10:06:26 +02:00
Birunthan Mohanathas 5f1fde8824 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Peter Van der Beken a5a294c6c5 Bug 993710 - Don't return names when enumerating Navigator/Window if they wouldn't be resolved. r=bz.
--HG--
extra : rebase_source : e7fe3b2da1c2e1a00c02828d220545c83dedd554
2014-02-15 22:12:34 +01:00
Andrew McCreight 0353960345 Bug 962608 - Make PL_DHashTableInit infallible by default. r=briansmith,bsmedberg,ehsan,froydnj,jduell,jfkthame,roc,smaug 2014-02-27 10:04:09 -08:00
Boris Zbarsky fdd4a7a9e4 Bug 962290. Remove support for the JavaScript-global-dynamic-nameset category as a way to install lazy properties on the global. r=peterv 2014-01-29 22:33:10 -08:00
Ehsan Akhgari 1b83407ce9 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Nicholas Nethercote 91175eb896 Bug 955942 (part 2) - Remove MemoryUniReporter. r=mccr8.
--HG--
extra : rebase_source : 9d70016cb19637ffece6409a184bf41d574cc6b4
2013-12-07 22:09:10 -08:00
Nicholas Nethercote 39004db706 Bug 936964 (part 7, attempt 2) - Make lots of classes report their own memory consumption, instead of using a separate reporter class. r=mccr8,sr=bz.
* * *
Bug 936964 (part 7b) - Fix a use-after-free found by ASan.

--HG--
extra : rebase_source : d38ab6b63e9d576773baf8e55fa4f7182c33915e
2013-11-07 16:35:30 +11:00
Ehsan Akhgari a903aefdc0 Backed out 9 changesets (bug 943660, bug 936964) because of ASAN use-after-free crashes on browser-chrome and mochitest-other
Backed out changeset 85486c4aa3d8 (bug 936964)
Backed out changeset 25312eb71998 (bug 936964)
Backed out changeset 6dbb8333960c (bug 936964)
Backed out changeset da6465ad476f (bug 936964)
Backed out changeset a87ffc992f38 (bug 936964)
Backed out changeset 4ae3a61182db (bug 936964)
Backed out changeset 34e9c3137804 (bug 936964)
Backed out changeset fd1459e71585 (bug 936964)
Backed out changeset 3e8a701d8bdc (bug 943660)

Landed on a CLOSED TREE

--HG--
rename : content/canvas/src/WebGLMemoryTracker.h => content/canvas/src/WebGLMemoryReporterWrapper.h
2013-11-27 20:05:00 -05:00
Nicholas Nethercote bc475c75df Bug 936964 (part 7) - Make lots of classes report their own memory consumption, instead of using a separate reporter class. r=mccr8,sr=bz.
--HG--
rename : content/canvas/src/WebGLMemoryReporterWrapper.h => content/canvas/src/WebGLMemoryTracker.h
extra : rebase_source : 611e8d35907959b163aeced1c4ffe1d265048fe6
2013-11-07 16:35:30 +11:00
Nathan Froyd 08e317a625 Bug 940170 - part 3 - constify PLDHashTableOps in dom/; r=bz 2013-11-18 21:53:12 -05:00
Ehsan Akhgari c8d51e9ce2 Bug 919341 - Minimize the #includes in xpcom/ IDL files; r=bsmedberg 2013-09-23 13:29:27 -04:00
Nicholas Nethercote 7983bb2a7f Bug 910517 (3rd attempt) - Remove nsIMemoryReporter, and rename nsIMemoryMultiReporter as nsIMemoryReporter. r=mmcr8.
--HG--
rename : content/canvas/src/WebGLMemoryMultiReporterWrapper.h => content/canvas/src/WebGLMemoryReporterWrapper.h
extra : rebase_source : 2b2a1b2667d6562fcf803ec48b4a8c10fdd519a3
2013-08-27 16:24:51 -07:00
Masatoshi Kimura 37640717b2 Bug 600460 - Implement category entry removal for nsScriptNamespaceManager. r=bholley 2013-08-22 22:44:19 +09:00