Name Description Size
ArenaAllocator.h A very simple arena allocator based on NSPR's PLArena. The arena allocator only provides for allocation, all memory is retained until the allocator is destroyed. It's useful for situations where a large amount of small transient allocations are expected. Example usage: // Define an allocator that is page sized and returns allocations that are // 8-byte aligned. ArenaAllocator<4096, 8> a; for (int i = 0; i < 1000; i++) { DoSomething(a.Allocate(i)); } 5963
ArenaAllocatorExtensions.h Extensions to the ArenaAllocator class. 2476
ArrayAlgorithm.h 4400
ArrayIterator.h 4847
Atom.py 1894
AtomArray.h 553
components.conf 958
Dafsa.cpp 5247
Dafsa.h A deterministic acyclic finite state automaton suitable for storing static dictionaries of tagged ascii strings. Consider using this if you have a very large set of strings that need an associated enum value. Currently the string tag is limited by `make_dafsa.py` to a value of [0-4]. In theory [0-15] can easily be supported. See `make_dafsa.py` for more details. 1445
HTMLAtoms.py 16327
IncrementalTokenizer.cpp 4938
IncrementalTokenizer.h The consumer callback. The function is called for every single token as found in the input. Failure result returned by this callback stops the tokenization immediately and bubbles to result of Feed/FinishInput. Fragment()s of consumed tokens are ensured to remain valid until next call to Feed/FinishInput and are pointing to a single linear buffer. Hence, those can be safely used to accumulate the data for processing after Feed/FinishInput returned. 4685
moz.build 3600
nsArray.cpp 4149
nsArray.h Both of these factory functions create a cycle-collectable array on the main thread and a non-cycle-collectable array on other threads. 2271
nsArrayEnumerator.cpp 5937
nsArrayEnumerator.h 1259
nsArrayUtils.cpp 719
nsArrayUtils.h 1226
nsAtom.h aIsStatic = 10259
nsAtomHashKeys.h Definitions for nsAtom-related hash keys 1466
nsAtomTable.cpp aIsStatic = 26270
nsAtomTable.h 809
nsBaseHashtable.h 32848
nsCharSeparatedTokenizer.cpp 456
nsCharSeparatedTokenizer.h This parses a SeparatorChar-separated string into tokens. Whitespace surrounding tokens is not treated as part of tokens, however whitespace inside a token is. If the final token is the empty string, it is not returned by default. Some examples, with SeparatorChar = ',': "foo, bar, baz" -> "foo" "bar" "baz" "foo,bar,baz" -> "foo" "bar" "baz" "foo , bar hi , baz" -> "foo" "bar hi" "baz" "foo, ,bar,baz" -> "foo" "" "bar" "baz" "foo,,bar,baz" -> "foo" "" "bar" "baz" "foo,bar,baz," -> "foo" "bar" "baz" The function used for whitespace detection is a template argument. By default, it is NS_IsAsciiWhitespace. 8994
nsCheapSets.h A set that takes up minimal size when there are 0 or 1 entries in the set. Use for cases where sizes of 0 and 1 are even slightly common. 3802
nsClassHashtable.h Helper class that provides methods to wrap and unwrap the UserDataType. 3282
nsCOMArray.cpp 6645
nsCOMArray.h 14586
nsCRT.cpp MODULE NOTES: @update gess7/30/98 Much as I hate to do it, we were using string compares wrong. Often, programmers call functions like strcmp(s1,s2), and pass one or more null strings. Rather than blow up on these, I've added quick checks to ensure that cases like this don't cause us to fail. In general, if you pass a null into any of these string compare routines, we simply return 0. 3169
nsCRT.h XP_UNIX 3606
nsDeque.cpp Standard constructor @param deallocator, called by Erase and ~nsDequeBase 6748
nsDeque.h MODULE NOTES: The Deque is a very small, very efficient container object than can hold items of type T*, offering the following features: - Its interface supports pushing, popping, and peeking of items at the back or front, and retrieval from any position. - It can iterate over items via a ForEach method, range-for, or an iterator class. - When full, it can efficiently resize dynamically. NOTE: The only bit of trickery here is that this deque is built upon a ring-buffer. Like all ring buffers, the first item may not be at index[0]. The mOrigin member determines where the first child is. This point is quietly hidden from customers of this class. 15845
nsEnumeratorUtils.cpp 6220
nsEnumeratorUtils.h nsEnumeratorUtils_h__ 888
nsExpirationTracker.h Data used to track the expiration state of an object. We promise that this is 32 bits so that objects that includes this as a field can pad and align efficiently. 21166
nsGkAtoms.cpp 2276
nsGkAtoms.h 6872
nsHashKeys.h @file nsHashKeys.h standard HashKey classes for nsBaseHashtable and relatives. Each of these classes follows the nsTHashtable::EntryType specification Lightweight keytypes provided here: nsStringHashKey nsCStringHashKey nsUint32HashKey nsUint64HashKey nsFloatHashKey IntPtrHashKey nsPtrHashKey nsVoidPtrHashKey nsISupportsHashKey nsIDHashKey nsDepCharHashKey nsCharPtrHashKey nsUnicharPtrHashKey nsGenericHashKey 17723
nsHashPropertyBag.cpp nsHashPropertyBagBase implementation. 11173
nsHashPropertyBag.h Off Main Thread variant of nsHashPropertyBag. Instances of this class should not be created on a main thread, nor should it contain main thread only objects, such as XPCVariants. The purpose of this class is to provide a way to use the property bag off main thread. Note: this class needs to be created and destroyed on the same thread and should be used single threaded. 2575
nsHashtablesFwd.h templated hashtable class maps keys to interface pointers. See nsBaseHashtable for complete declaration. @deprecated This is going to be removed. Use nsTHashMap instead. @param KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h for a complete specification. @param Interface the interface-type being wrapped @see nsClassHashtable, nsTHashMap 3188
nsIArray.idl nsIArray An indexed collection of elements. Provides basic functionality for retrieving elements at a specific position, searching for elements. Indexes are zero-based, such that the last element in the array is stored at the index length-1. For an array which can be modified, see nsIMutableArray below. Neither interface makes any attempt to protect the individual elements from modification. The convention is that the elements of the array should not be modified. Documentation within a specific interface should describe variations from this convention. It is also convention that if an interface provides access to an nsIArray, that the array should not be QueryInterfaced to an nsIMutableArray for modification. If the interface in question had intended the array to be modified, it would have returned an nsIMutableArray! null is a valid entry in the array, and as such any nsISupports parameters may be null, except where noted. 3763
nsIArrayExtensions.idl Helper interface for allowing scripts to treat nsIArray instances as if they were nsISupportsArray instances while iterating. nsISupportsArray is convenient to iterate over in JavaScript: for (let i = 0; i < array.Count(); ++i) { let elem = array.GetElementAt(i); ... } but doing the same with nsIArray is somewhat less convenient, since queryElementAt is not nearly so nice to use from JavaScript. So we provide this extension interface so interfaces that currently return nsISupportsArray can start returning nsIArrayExtensions and all JavaScript should Just Work. Eventually we'll roll this interface into nsIArray itself, possibly getting rid of the Count() method, as it duplicates nsIArray functionality. 1773
nsIINIParser.idl Initializes an INI file from string data 1553
nsIMutableArray.idl nsIMutableArray A separate set of methods that will act on the array. Consumers of nsIArray should not QueryInterface to nsIMutableArray unless they own the array. As above, it is legal to add null elements to the array. Note also that null elements can be created as a side effect of insertElementAt(). Conversely, if insertElementAt() is never used, and null elements are never explicitly added to the array, then it is guaranteed that queryElementAt() will never return a null value. Any of these methods may throw NS_ERROR_OUT_OF_MEMORY when the array must grow to complete the call, but the allocation fails. 3515
nsINIParserImpl.cpp 3840
nsINIParserImpl.h 717
nsInterfaceHashtable.h 512
nsIObserver.idl This interface is implemented by an object that wants to observe an event corresponding to a topic. 1353
nsIObserverService.idl nsIObserverService Service allows a client listener (nsIObserver) to register and unregister for notifications of specific string referenced topic. Service also provides a way to notify registered listeners and a way to enumerate registered client listeners. 3739
nsIPersistentProperties.h __gen_nsIPersistentProperties_h__ 552
nsIPersistentProperties2.idl load a set of name/value pairs from the input stream names and values should be in UTF8 1809
nsIProperties.idl Simple mapping service interface. 1300
nsIProperty.idl nsIVariant based Property support. 666
nsIPropertyBag.idl nsIVariant based Property Bag support. 852
nsIPropertyBag2.idl nsIVariant based Property Bag support. 2765
nsISerializable.idl Initialize the object implementing nsISerializable, which must have been freshly constructed via CreateInstance. All data members that can't be set to default values must have been serialized by write, and should be read from aInputStream in the same order by this method. 1337
nsISimpleEnumerator.idl Used to enumerate over elements defined by its implementor. Although hasMoreElements() can be called independently of getNext(), getNext() must be pre-ceeded by a call to hasMoreElements(). There is no way to "reset" an enumerator, once you obtain one. @version 1.0 2734
nsIStringEnumerator.idl Used to enumerate over an ordered list of strings. 1034
nsISupportsIterators.idl nsISupportsIterators.idl --- IDL defining general purpose iterators 12437
nsISupportsPrimitives.idl nsISupports wrappers for single primitive pieces of data. 5426
nsIVariant.idl The long avoided variant support for xpcom. 6257
nsIWindowsRegKey.idl This interface is designed to provide scriptable access to the Windows registry system ("With Great Power Comes Great Responsibility"). The interface represents a single key in the registry. This interface is highly Win32 specific. 10243
nsIWritablePropertyBag.idl nsIVariant based writable Property Bag support. 894
nsIWritablePropertyBag2.idl nsIVariant based Property Bag support. 1168
nsMathUtils.h round 3542
nsObserverList.cpp 2933
nsObserverList.h nsObserverList_h___ 2093
nsObserverService.cpp process 11571
nsObserverService.h nsObserverService_h___ 1790
nsPersistentProperties.cpp 18362
nsPersistentProperties.h nsPersistentProperties_h___ 1425
nsPointerHashKeys.h Definitions for nsPtrHashKey<T> and nsVoidPtrHashKey. 1382
nsProperties.cpp 1647
nsProperties.h nsProperties_h___ 823
nsRefCountedHashtable.h templated hashtable class maps keys to reference pointers. See nsBaseHashtable for complete declaration. @param KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h for a complete specification. @param PtrType the reference-type being wrapped @see nsClassHashtable, nsTHashMap 7585
nsRefPtrHashtable.h 457
nsSimpleEnumerator.cpp 2218
nsSimpleEnumerator.h 675
nsStaticAtomUtils.h 1223
nsStaticNameTable.cpp Class to manage lookup of static names in a table. 5927
nsStaticNameTable.h Classes to manage lookup of static names in a table. 1627
nsStringEnumerator.cpp 8473
nsStringEnumerator.h 4045
nsSupportsPrimitives.cpp nsSupportsCString *************************************************************************** 13893
nsSupportsPrimitives.h / class nsSupportsCString final : public nsISupportsCString { public: NS_DECL_ISUPPORTS NS_DECL_NSISUPPORTSPRIMITIVE NS_DECL_NSISUPPORTSCSTRING nsSupportsCString() = default; private: ~nsSupportsCString() = default; nsCString mData; }; /************************************************************************** 5960
nsTArray-inl.h 26550
nsTArray.cpp 1124
nsTArray.h namespace JS 127378
nsTArrayForwardDeclare.h 952
nsTHashMap.h 2198
nsTHashSet.h Templated hash set. Don't use this directly, but use nsTHashSet instead (defined as a type alias in nsHashtablesFwd.h). @param KeyClass a wrapper-class for the hashtable key, see nsHashKeys.h for a complete specification. 6030
nsTHashtable.h 30579
nsTObserverArray.cpp 886
nsTObserverArray.h An array of observers. Like a normal array, but supports iterators that are stable even if the array is modified during iteration. The template parameter T is the observer type the array will hold; N is the number of built-in storage slots that come with the array. NOTE: You probably want to use nsTObserverArray, unless you specifically want built-in storage. See below. @see nsTObserverArray, nsTArray 20559
nsTPriorityQueue.h A templatized priority queue data structure that uses an nsTArray to serve as a binary heap. The default comparator causes this to act like a min-heap. Only the LessThan method of the comparator is used. 4360
nsVariant.cpp 59097
nsVariant.h Map the nsAUTF8String, nsUTF8String classes to the nsACString and nsCString classes respectively for now. These defines need to be removed once Jag lands his nsUTF8String implementation. 7574
nsWhitespaceTokenizer.h Checks if any more tokens are available. 3187
nsWindowsRegKey.cpp 8346
nsWindowsRegKey.h This ContractID may be used to instantiate a windows registry key object via the XPCOM component manager. 1596
Observer.h Observer<T> provides a way for a class to observe something. When an event has to be broadcasted to all Observer<T>, Notify() method is called. T represents the type of the object passed in argument to Notify(). @see ObserverList. 2003
PerfectHash.h Helper routines for perfecthash.py. Not to be used directly. 1654
PLDHashTable.cpp static 27107
PLDHashTable.h 30014
SimpleEnumerator.h A wrapper class around nsISimpleEnumerator to support ranged iteration. This requires every element in the enumeration to implement the same interface, T. If any element does not implement this interface, the enumeration ends at that element, and triggers an assertion in debug builds. Typical usage looks something like: for (auto& docShell : SimpleEnumerator<nsIDocShell>(docShellEnum)) { docShell.LoadURI(...); } 1962
StaticAtoms.py 106964
StickyTimeDuration.h A ValueCalculator class that performs additional checks before performing arithmetic operations such that if either operand is Forever (or the negative equivalent) the result remains Forever (or the negative equivalent as appropriate). Currently this only checks if either argument to each operation is Forever/-Forever. However, it is possible that, for example, aA + aB > INT64_MAX (or < INT64_MIN). We currently don't check for that case since we don't expect that to happen often except under test conditions in which case the wrapping behavior is probably acceptable. 8186
test
Tokenizer.cpp 21113
Tokenizer.h The analyzer works with elements in the input cut to a sequence of token where each token has an elementary type 19220
tools