Name Description Size Coverage
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)); } 5921 -
ArenaAllocatorExtensions.h Extensions to the ArenaAllocator class. 2476 -
ArrayAlgorithm.h 4394 -
ArrayIterator.h 4847 -
Atom.py 1894 -
AtomArray.h 553 -
components.conf 958 -
CycleCollectedUniquePtr.h 1279 -
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 16597 -
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. 4683 -
moz.build 3638 -
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. 2068 -
nsArrayEnumerator.cpp 5904 -
nsArrayEnumerator.h 1257 -
nsArrayUtils.cpp 719 -
nsArrayUtils.h 1223 -
nsAtom.h aIsStatic = 10531 -
nsAtomHashKeys.h Definitions for nsAtom-related hash keys 1466 -
nsAtomTable.cpp aIsStatic = 26861 -
nsAtomTable.h 806 -
nsBaseHashtable.h 36004 -
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. 8991 -
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. 3798 -
nsClassHashtable.h Helper class that provides methods to wrap and unwrap the UserDataType. 3351 -
nsCOMArray.cpp 6608 -
nsCOMArray.h 14552 -
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 3600 -
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. 15843 -
nsEnumeratorUtils.cpp 6187 -
nsEnumeratorUtils.h nsEnumeratorUtils_h_ 885 -
nsExpirationState.h 1081 -
nsExpirationTracker.h ExpirationTracker classes: - ExpirationTrackerImpl (Thread-safe class) - nsExpirationTracker (Main-thread only class) These classes can track the lifetimes and usage of a large number of objects, and send a notification some window of time after a live object was last used. This is very useful when you manage a large number of objects and want to flush some after they haven't been used for a while. nsExpirationTracker is designed to be very space and time efficient. The type parameter T is the object type that we will track pointers to. T must include an accessible method GetExpirationState() that returns a pointer to an nsExpirationState associated with the object (preferably, stored in a field of the object). The parameter K is the number of generations that will be used. Increasing the number of generations narrows the window within which we promise to fire notifications, at a slight increase in space cost for the tracker. We require 2 <= K <= nsExpirationState::NOT_TRACKED (currently 15). To use this class, you need to inherit from it and override the NotifyExpired() method. The approach is to track objects in K generations. When an object is accessed it moves from its current generation to the newest generation. Generations are stored in a cyclic array; when a timer interrupt fires, we advance the current generation pointer to effectively age all objects very efficiently. By storing information in each object about its generation and index within its generation array, we make removal of objects from a generation very cheap. Future work: -- Add a method to change the timer period? 20514 -
nsGkAtoms.cpp 2276 -
nsGkAtoms.h 6866 -
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 20414 -
nsHashPropertyBag.cpp nsHashPropertyBagBase implementation. 11080 -
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. 2559 -
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 1684 -
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 4026 -
nsINIParserImpl.h 682 -
nsInterfaceHashtable.h 509 -
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_ 546 -
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 1700 -
nsObserverList.cpp 2895 -
nsObserverList.h nsObserverList_h_ 2055 -
nsObserverService.cpp process 11496 -
nsObserverService.h nsObserverService_h_ 1512 -
nsPersistentProperties.cpp 17631 -
nsPersistentProperties.h nsPersistentProperties_h_ 1387 -
nsPointerHashKeys.h Definitions for nsPtrHashKey<T> and nsVoidPtrHashKey. 1382 -
nsProperties.cpp 1647 -
nsProperties.h nsProperties_h_ 785 -
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 454 -
nsSimpleEnumerator.cpp 2180 -
nsSimpleEnumerator.h 675 -
nsStaticAtomUtils.h 1191 -
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. 1621 -
nsStringEnumerator.cpp 8403 -
nsStringEnumerator.h 4045 -
nsSupportsPrimitives.cpp nsSupportsCString *************************************************************************** 13840 -
nsSupportsPrimitives.h / class nsSupportsCString final : public nsISupportsCString { public: NS_DECL_ISUPPORTS NS_DECL_NSISUPPORTSPRIMITIVE NS_DECL_NSISUPPORTSCSTRING nsSupportsCString() = default; private: ~nsSupportsCString() = default; nsCString mData; }; /************************************************************************** 5924 -
nsTArray.cpp 1012 -
nsTArray.h namespace JS 140620 -
nsTArrayForwardDeclare.h 950 -
nsTHashMap.h 2135 -
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. 6040 -
nsTHashtable.h 31341 -
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 20614 -
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 59062 -
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. 7598 -
nsWhitespaceTokenizer.h Checks if any more tokens are available. 3184 -
nsWindowsRegKey.cpp 8346 -
nsWindowsRegKey.h This ContractID may be used to instantiate a windows registry key object via the XPCOM component manager. 1489 -
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 109760 -
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 21114 -
Tokenizer.h The analyzer works with elements in the input cut to a sequence of token where each token has an elementary type 21158 -
tools -