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

41 Коммитов

Автор SHA1 Сообщение Дата
Blake Kaplan a64ff6d116 Bug 1417279 - Remove an odd second case from nsArray::IndexOf. r=froydnj
Now that nsArray uses nsCOMArray under the hood, we don't have to do weird
ForwardEnumeration hacks to start IndexOf at a non-zero index.

MozReview-Commit-ID: 3ReDV0BT0hn

--HG--
extra : rebase_source : 399a988d00fabaa314eb7592b2aacf277a2ca477
2017-11-14 16:34:42 -08:00
Masatoshi Kimura dbd92543c6 Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj
MozReview-Commit-ID: 7JoD4VYzZp3

--HG--
extra : rebase_source : 5db437f1c34608aa223916874d62b48c59baeae8
2017-10-21 23:53:02 +09:00
Eric Rahm ea799cdb96 Bug 1311191 - Part 1: Add nsISupportsArray-like iteration to nsArray. r=froydnj
This adds an intermediate interface, nsIArrayExtensions, that inherits from
nsIArray. This is necessary as nsISupportsArray implements nsIArray as well
so the methods could not just be addded to nsIArray. nsIMutableArray inherits
from nsIArrayExtensions and so any interface that works with an nsIMutableArray
can be updated to return an nsIArrayExtensions.

This will allow interfaces that currently return an nsISupportsArray to instead
return an nsIArrayExtensions and internally work with an nsIMutableArray.
Consumers of these functions will continue to be able to use
nsISupportsArray-like iteration even though they're now working with an
nsIArray.

MozReview-Commit-ID: 9uRjsJbg9Jp
2016-10-24 13:24:26 -07:00
Igor 4878f6bf37 Bug 1289890 - Change nsCOMArray::ReplaceObjectAt() return type from "bool" to "void", since it always succeeds. r=froyndnj 2016-08-02 16:20:00 +02:00
Andrew McCreight 1e0f87e27d Bug 1151541, part 2 - Fix mode lines in xpcom/. r=froydnj 2015-04-09 10:25:05 -07:00
Ehsan Akhgari f555db9bc7 Bug 1122991 - Mark findIndexOfClosure as stack class, and make its targetElement member a void*; r=froydnj 2015-01-19 10:00:32 -05:00
Birunthan Mohanathas 68ba4f3767 Bug 1022456 - Convert xpcom/ds/ to Gecko style. r=froydnj 2014-07-09 08:15:21 -07:00
Andrew McCreight a95191e7f0 Bug 1008420, part 2 - Split out a refcountless nsArray base class. r=bsmedberg 2014-05-15 09:52:58 -07:00
Andrew McCreight 57f3f97385 Bug 1008420, part 1 - Delete trailing whitespace from nsArray. r=bsmedberg 2014-05-15 09:52:58 -07:00
Ehsan Akhgari 08772d21ac Bug 918105 - Minimize the #includes in xpcom/ds; r=bsmedberg 2013-09-19 15:31:21 -04:00
Mike Hommey 2e729aa83d Bug 881323 - Re-implement CycleCollectorParticipant with actual vtables, with constexpr to avoid static initializers. r=mccr8 2013-08-02 10:29:05 +09:00
Trevor Saunders 83bcbe0d6b bug 822289 - remove NS_IMPL_CYCLE_COLLECTION_CLASS and friends r=mccr8 2013-01-12 07:40:33 -05:00
Benoit Jacob 986ee1a065 Bug 807437 - Eliminate redundant Traverse/Unlink CC macros - part 1: automatic changes - r=mccr8 2012-11-15 02:32:40 -05:00
Mounir Lamouri 30cf3fce2c Bug 795703 - Do not assert when calling do_GetWeakReference() on a nsISupport not capable of that. r=smaug,dougt 2012-10-03 10:38:46 +01:00
Isaac Aggrey 481e7dfb0b Bug 791906: Replace NSPR integer limit constants with stdint ones; r=ehsan 2012-09-28 01:57:33 -05:00
Nathan Froyd 54c3f613a8 Bug 792169 - introduce better, safer constructors for nsArray; r=bsmedberg 2012-09-21 12:12:32 -04:00
Ehsan Akhgari e368dc9c85 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
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Ehsan Akhgari 92064e6d3f 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 d2b70213ac 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
Benjamin Smedberg c611ebcd81 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
timeless@mozdev.org 266462dbca Bug 471296 nsArray (NS_ARRAY_CONTRACTID) can't be used on a single thread of its creator's choice, r=bsmedberg 2009-01-15 20:02:22 -08:00
Benjamin Smedberg 470d4ccbfb Bug 469072 - Annotations in XPCOM, and a couple related code fixups, to make outparams spit out useful warnings, r=bent 2008-12-11 15:13:52 -05:00
Arpad Borsos c72ef7d248 Bug 456388 - Remove PR_STATIC_CALLBACK and PR_CALLBACK(_DECL) from the tree; r+sr=brendan 2008-10-10 17:04:34 +02:00
benjamin@smedbergs.us 1141ded71b 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
peterv@propagandism.org ab07d4da83 Part 2 of the fix for bug 413281 (Firefox leaks when Yahoo Toolbar is installed). r/sr=sicking. 2008-02-07 03:37:18 -08:00
benjamin@smedbergs.us adac3963d9 Bug 412320 - Try code-generation for QI impls, r=roc+luser 2008-01-25 09:14:48 -08:00
jwalden@mit.edu 6d7584839a Bug 348748 - Replace all instances of NS_STATIC_CAST and friends with C++ casts (and simultaneously bitrot nearly every patch in existence). r=bsmedberg on the script that did this. Tune in next time for Macro Wars: Episode II: Attack on the LL_* Macros. 2007-07-08 00:08:04 -07:00
cbiesinger%web.de 189a0004b8 bug 275116 use the safe version of ObjectAt as required by the documentation
patch by Andreas Lange <mozilla@lange.cx> r=darin sr=biesi
2006-12-17 21:59:26 +00:00
benjamin%smedbergs.us 70a0f2207b Freeze nsIArray (requires separating nsIMutableArray into another .idl file); also removes NS_NewArray and moves do_QueryElementAt into the glue, r=darin 2006-04-12 15:43:32 +00:00
neil%parkwaycc.co.uk 3aa229256f Bug 255593 Add ReplaceElementAt to nsIMutableArray plus comment fixes p=eyalroz@technion.ac.il r=darin sr=bienvenu 2005-01-01 17:57:00 +00:00
darin%meer.net 3eb2f75165 fixes bug 263957 "Convert nsProperties to nsTHashtable, implement GetKeys" r=bsmedberg sr=shaver 2004-10-25 19:52:48 +00:00
seawood%netscape.com f0b77e04cc Callback functions must be declared as such.
Fixing OS/2 tinderbox bustage.
2002-10-08 01:04:09 +00:00
alecf%netscape.com 1a6ddca712 fix for bug 162115 - add nsCOMArray<T> and nsIArray to the build
r=dougt, sr=darin, lots of comments from brendan, kai, bugmail@sicking.cc, frank.schoenheit@gmx.de, and even a little license help from timeless
2002-10-07 19:03:41 +00:00
alecf%netscape.com 4772a38bc6 add do_QueryElementAt, and make NS_NewArray() give you an nsIMutableArray instead of nsIArray
not part of build, for bug 162115
2002-10-03 20:20:13 +00:00
alecf%netscape.com 82a267d76a more work for bug 162115 - add support for weak references in nsIArray
not part of build
2002-10-02 21:00:42 +00:00
alecf%netscape.com 1bae8680e1 more work on bug 162115 - use "friend" to allow nsCOMArray<T>'s copy constructor to be protected, but still usable from nsArray
not part of build
2002-10-02 18:54:12 +00:00
alecf%netscape.com 101b6c67d1 add support for a nsISimpleEnumerator implementation for nsCOMArray<T> and nsIArray, and update existing interfaces to support that:
- move nsCOMArray_base's ObjectAt/[]/Count() methods into the public so that nsCOMArrayEnumerator can get to it
- tweak NS_NewArray() to match the existing enumerator NS_New* API
- hook up NS_NewArrayEnumerator to nsArray::Enumerate
Not part of the build, for bug 162115
2002-10-01 17:34:25 +00:00
alecf%netscape.com 950bb44445 not part of build, more for bug 162115:
- fix some spelling, add documentation
- add NS_NewArray(), including one that takes an existing nsCOMArray<T>
- implement copy constructor for nsCOMArray_base, so that NS_NewArray can work
not part of build
2002-09-30 23:02:31 +00:00
alecf%netscape.com 4b31552c74 match up some reviewers comments:
- tri-license with MPL, not NPL
- be consistent with policy on null in the array (it is allowed)
- move Clear() into implementation file, and hide static callback there too
- make sure to AddRef() on the way out of nsArray::IndexOf()
- handle failure of ReplaceElementAt more gracefully
bug 162115, not part of build yet
2002-09-30 22:01:46 +00:00
alecf%netscape.com 5274331b83 continue work-in-progress with freezable array.
Also introduce nsCOMArray<nsIFoo>
not part of build
2002-09-27 06:08:49 +00:00