Commit Graph

46 Commits

Author SHA1 Message Date
Nicholas Nethercote
c82c609ac3 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
6220f98ec6 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
74e6ffe050 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
Birunthan Mohanathas
c09e07a17c Bug 784739 - Switch from NULL to nullptr in xpcom/ (1/3); r=ehsan 2013-10-10 16:41:00 -04:00
Nicholas Nethercote
1a1328929c Bug 831193 (part 17) - Don't use NS_MEMORY_REPORTER_IMPLEMENT in xpcom/. r=jlebar.
--HG--
extra : rebase_source : 7e2984a99fb7e00aa0ea6bebc23e23e4c99e0b1e
2013-01-17 21:43:21 -08:00
Joshua Cranmer
0a16998703 Bug 884061 - Part 3y: Use NS_DECL_THREADSAFE_ISUPPORTS in xpcom/, r=bsmedberg
--HG--
extra : rebase_source : d54f6973e3ff859207115013e8361781769ffc76
2013-07-18 21:31:26 -05:00
Catalin Iacob
83b78343dc Bug 798914 (part 5) - Use newly introduced mozilla::MallocSizeOf instead of nsMallocSizeOfFun. r=njn.
--HG--
extra : rebase_source : fc472490dd978d165f02f77ed37f07aed6e5bb61
2013-06-23 14:03:39 +02:00
Benjamin Smedberg
01db3d81d1 Bug 684887 part B - make a SafeMutex which should crash if you try to recursively lock it, instead of deadlocking. r=bent
--HG--
extra : rebase_source : 694c5cd571e5802ce5e5af4ea03b9edc7e6fb8d4
2013-03-13 16:39:53 -04:00
Benjamin Smedberg
18d99a509c Bug 684887 part A - Make the XPCOM component manager non-reentrant, and make sure that nsFactoryEntry.mFactory is protected by it, r=cjones
--HG--
extra : rebase_source : f6a458a98c53f8a7490bc621095029e9446d4775
2013-03-13 16:39:28 -04:00
Nicholas Nethercote
a64de6966d Bug 807884 (part 2) - Add memory reporters for nsComponentManager and nsCategoryManager. r=bsmedberg.
--HG--
extra : rebase_source : 6dba2659b6f31aa0e53804f5afdd30f0f0c1d950
2012-10-19 05:07:36 -07:00
Nicholas Nethercote
dfc48724d2 Bug 807884 (part 1) - Remove dead nsComponentManagerImpl::mLoaderData. r=bsmedberg.
--HG--
extra : rebase_source : e332db911c94f4ba6b3fe4b0fef0a545cc08403b
2012-10-19 05:07:34 -07:00
Ehsan Akhgari
8c296bbcd4 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.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 PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Ehsan Akhgari
b5161f97b8 Bug 758992 - Make the classes which use the XPCOM nsISupports implementation macros final, to avoid the warning about deleting using a pointer to a base class with virtual functions and no virtual dtor (XPCOM parts); r=bsmedberg 2012-06-05 19:51:58 -04:00
Geoff Lankow
1214b72681 Bug 749930 - Replace uses of nsILocalFile with nsIFile (compiled code only); r=bsmedberg 2012-06-06 14:08:30 +12:00
Gervase Markham
87620f5676 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Mike Hommey
9b0673934e Bug 695843 part 9 - Use FileLocations in the component manager. r=bsmedberg 2011-11-08 18:10:51 +01:00
Mike Hommey
79cdb6016e Bug 695843 part 6 - Don't separate file and JAR modules in component manager. r=bsmedberg 2011-11-08 18:18:12 +01:00
Mike Hommey
a0666fb311 Bug 695843 part 2 - Avoid code duplication for components manifest registration. r=bsmedberg 2011-12-08 11:03:36 +01:00
Ehsan Akhgari
2a602a5685 Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Michael Wu
d8e503c38b Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Hernan Rodriguez Colmeiro
f919e96062 Bug 564667: Allow bootstrapped add-ons to have chrome URLs. r=dtownsend, sr=bsmedberg 2011-07-29 11:20:47 +02:00
Chris Jones
ed22df8f64 Bug 556214, parts 1 and 1.1: Rename Monitor to ReentrantMonitor and fix existing Monitor users. r=roc
--HG--
rename : xpcom/glue/Monitor.h => xpcom/glue/ReentrantMonitor.h
2011-04-29 14:21:57 -05:00
Chris Jones ext:(%20and%20Kyle%20Huey%20%3Ckhuey%40kylehuey.com%3E)
0bb511a3d7 Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg
Bug 645263, part 0: Count sync primitive ctor/dtors. r=dbaron
Bug 645263, part 1: Migrate content/media to mozilla:: sync primitives. r=doublec
Bug 645263, part 2: Migrate modules/plugin to mozilla:: sync primitives. sr=bsmedberg
Bug 645263, part 3: Migrate nsComponentManagerImpl to mozilla:: sync primitives. sr=bsmedberg
Bug 645263, part 4: Migrate everything else to mozilla:: sync primitives. r=dbaron
Bug 645263, part 5: Remove nsAutoLock.*. sr=bsmedberg
Bug 645263, part 6: Make editor test be nicer to deadlock detector. r=ehsan
Bug 645263, part 7: Disable tracemalloc backtraces for xpcshell tests. r=dbaron
Bug 646259: Fix nsCacheService to use a CondVar for notifying. r=cjones
2011-03-31 23:29:02 -05:00
Chris Jones
a75fb12531 Backed out changeset 4beec31b9ea9 for increasing frequency of intermittent orange bug 618052 2011-03-31 18:57:38 -05:00
Chris Jones ext:(%20and%20Kyle%20Huey%20%3Ckhuey%40kylehuey.com%3E)
cc8b4c9c6c Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg
Bug 645263, part 0: Count sync primitive ctor/dtors. r=dbaron
Bug 645263, part 1: Migrate content/media to mozilla:: sync primitives. r=doublec
Bug 645263, part 2: Migrate modules/plugin to mozilla:: sync primitives. sr=bsmedberg
Bug 645263, part 3: Migrate nsComponentManagerImpl to mozilla:: sync primitives. sr=bsmedberg
Bug 645263, part 4: Migrate everything else to mozilla:: sync primitives. r=dbaron
Bug 645263, part 5: Remove nsAutoLock.*. sr=bsmedberg
Bug 645263, part 6: Make editor test be nicer to deadlock detector. r=ehsan
Bug 645263, part 7: Disable tracemalloc backtraces for xpcshell tests. r=dbaron
Bug 646259: Fix nsCacheService to use a CondVar for notifying. r=cjones
2011-03-31 14:51:19 -05:00
Michael Wu
4eff31a667 Bug 533038 - 1. Generalize manifest reading code and add api for reading manifests from jars, r=bsmedberg a=blocking-beta6 2010-09-08 20:37:11 -07:00
Benjamin Smedberg
a46c0d7aca Fix omnijar from bug 579178 - move the manifest ziploader code into xpcom/components, and don't load the same JAR a bunch of times.
--HG--
rename : modules/libjar/nsManifestZIPLoader.cpp => xpcom/components/nsManifestZIPLoader.cpp
rename : modules/libjar/nsManifestZIPLoader.h => xpcom/components/nsManifestZIPLoader.h
2010-08-04 14:09:21 -04:00
Benjamin Smedberg
1f62db83d4 Bug 579178 part A - Code changes to add a "manifest" directive to read sub-manifests and read only the root chrome.manifest file, instead of enumerating components/*.manifest and chrome/*.manifest. Review comments by Mossop to be addressed in a followup commit. 2010-07-22 10:31:29 -04:00
Benjamin Smedberg
0b4de441c4 Bug 568691 - Fix MOZ_OMNIJAR registration, r=mwu
--HG--
rename : modules/libjar/nsXPTZipLoader.cpp => modules/libjar/nsManifestZIPLoader.cpp
rename : modules/libjar/nsXPTZipLoader.h => modules/libjar/nsManifestZIPLoader.h
rename : xpcom/reflect/xptinfo/public/nsIXPTLoader.idl => xpcom/components/nsIManifestLoader.idl
2010-07-02 09:53:19 -04:00
Benjamin Smedberg
6da9e8c26a Require XPT files to be loaded explicitly: they are never auto-registered when found in a components/ directory. 2010-06-29 18:16:48 -04:00
Benjamin Smedberg
449bc3f36e Fix and test logging of manifest parsing and registration. I discovered that the outer loop doesn't track line numbers correctly when there are multiple newlines in a row, which requires manual looping instead of using nsCRT::strtok. 2010-06-28 13:55:57 -04:00
Benjamin Smedberg
59041fa6cd Bug 568691 - Normalize relative paths on Windows to use back slashes, and add a manifest processing directive for XPT files so that extension chrome.manifest can point to them and we don't have to troll around in extension components/ directories. 2010-06-25 13:55:46 -04:00
Benjamin Smedberg
9d69948fbc Bug 568691, followup to RegisterFactory implementation: make the nsFactoryEntry hold a CIDEntry with the proper CID, because code elsewhere expects that to be present (ContractIDToCID and the pending-CID checks). 2010-06-25 10:44:35 -04:00
Benjamin Smedberg
c072919b32 Remove hard tabs which I accidentally introduced into nsComponentManager.{h,cpp}. 2010-06-23 13:36:53 -04:00
Benjamin Smedberg
785137fec6 Implement RereadChromeManifests for bug 568691. 2010-06-22 16:24:01 -04:00
Benjamin Smedberg
ed3a49c9a2 Address review comments from bug 568691 comment 13/14/17:
* rename mozilla::Module struct entries to be clearer
* change Module documentation so that the last entry is { NULL } in all cases (the compiler will 0-expand the structure)
* remove NS_XPCOM_COMPONENT_REGISTRY_FILE
* add MOZ_MEDIA/MOZ_OGG/MOZ_WAVE/MOZ_WEBM ifdefs to nsHTMLMediaElement.h and nsContentUtils.cpp
2010-06-21 12:46:26 -04:00
Benjamin Smedberg
45af085fff Merge mozilla-central into the "branch" for but 568691. The omnijar XPT/component/chrome registration was removed during this merge, and will be re-added to the component manager shortly.
--HG--
rename : content/base/public/nsIChromeRegistry.idl => chrome/public/nsIChromeRegistry.idl
2010-06-21 11:41:42 -04:00
Benjamin Smedberg
492155b10e Bug 568691 part C - Register all components based on reading .manifest files from the components directories. Binary components auto-register using "binary-component name.dll". JS components register using "component CID file.js" "contract @mozilla.org/contract;1 CID" and "category categoryname keyname value".
This patch has some bugs, specifically we stop looking for .manifest files in chrome/. I will fix that in a followup. It also probably breaks non-libxul builds because of ordering issues.

Another followup will actually fix our in-tree JS components and add build machinery for creating a proper components.manifest file.
2010-06-11 16:13:26 -04:00
Benjamin Smedberg
9045c05660 Bug 568691 part A - register static and binary components using data tables rather than programmatic nsIComponentRegistrar methods. This part contains the important needs-review bits of the change: part B contains the mechanical changes to each module in order to actually get a working build. Part C will contain changes necessary to register JS components from .manifest files 2010-06-10 14:11:11 -04:00
Michael Wu
17f4cad812 Bug 552121 - Load js modules and components from the omnijar [7/7], r=bsmedberg 2010-06-15 12:38:46 -07:00
Benjamin Smedberg
74932b01fe Bug 519357 - Only load known binary components from the app directory by reading a components.list file, r=vlad 2009-11-05 09:08:49 -05:00
Sergey Yanovich
a9bc176a99 Bug 462497. Don't reacquire a monitor in nsComponentManagerImpl::HashContractID that we already hold. r=bsmedberg
--HG--
extra : rebase_source : 5a024be37b8d28025f24b207d9622c1b597daea0
2009-01-08 21:41:55 +13:00
Ben Turner
a436facf6a Bug 449822 - "Service manager can create two instances of a service". r=bsmedberg. 2008-09-04 15:44:41 -07:00
benjamin@smedbergs.us
ca89a98e8c Back out bug 412320 and various followups because the perf impact was minimal and the code is more complicated 2008-02-21 12:39:20 -08:00
benjamin@smedbergs.us
e8c45488e3 Bug 412320 - Try code-generation for QI impls, r=roc+luser 2008-01-25 09:14:48 -08:00
hg@mozilla.com
465265d0d4 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT, 2007-03-22 10:30:00 -07:00