Name Description Size
Base64.cpp state->charsOnStack == 2 22536
Base64.h Converts |aBinary| to an unpadded, Base64 URL-encoded string per RFC 4648. Aims to encode the data in constant time. The caller retains ownership of |aBinary|. 3748
CocoaFileUtils.h 1739
CocoaFileUtils.mm 10017
FileDescriptorFile.cpp 11160
FileDescriptorFile.h A limited implementation of nsIFile that wraps a FileDescriptor object allowing the file to be read from. Added to allow a child process to use an nsIFile object for a file it does not have access to on the filesystem but has been provided a FileDescriptor for from the parent. Many nsIFile methods are not implemented and this is not intended to be a general purpose file implementation. 1485
FilePreferences.cpp 10131
FilePreferences.h 1093
FileUtilsWin.cpp 1999
FileUtilsWin.h 5270
InputStreamLengthHelper.cpp static 7246
InputStreamLengthHelper.h 1671
InputStreamLengthWrapper.cpp static 11201
InputStreamLengthWrapper.h 3349
NonBlockingAsyncInputStream.cpp static 12310
NonBlockingAsyncInputStream.h 3258
SlicedInputStream.cpp 18201
SlicedInputStream.h 3930
SnappyCompressOutputStream.cpp 6802
SnappyCompressOutputStream.h 2325
SnappyFrameUtils.cpp 7713
SnappyFrameUtils.h 2807
SnappyUncompressInputStream.cpp 11535
SnappyUncompressInputStream.h 3363
SpecialSystemDirectory.cpp Return the default save-to location for the Windows Library passed in through aFolderId. 16533
SpecialSystemDirectory.h 1495
components.conf 1672
crc32c.c Based on file found here: https://svnweb.freebsd.org/base/stable/10/sys/libkern/crc32.c?revision=256281 7268
crc32c.h 672
moz.build 3968
nsAnonymousTemporaryFile.cpp 9144
nsAnonymousTemporaryFile.h OpenAnonymousTemporaryFile Creates and opens a temporary file which has a random name. Callers have no control over the file name, and the file is opened in a temporary location which is appropriate for the platform. Upon success, aOutFileDesc contains an opened handle to the temporary file. The caller is responsible for closing the file when they're finished with it. The file will be deleted when the file handle is closed. On non-Windows platforms the file will be unlinked before this function returns. On Windows the OS supplied delete-on-close mechanism is unreliable if the application crashes or the computer power cycles unexpectedly, so unopened temporary files are purged at some time after application startup. 1551
nsAppDirectoryServiceDefs.h 4945
nsAppFileLocationProvider.cpp 13654
nsAppFileLocationProvider.h // class nsAppFileLocationProvider //***************************************************************************** class nsAppFileLocationProvider final : public nsIDirectoryServiceProvider2 { public: nsAppFileLocationProvider(); NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSIDIRECTORYSERVICEPROVIDER NS_DECL_NSIDIRECTORYSERVICEPROVIDER2 private: ~nsAppFileLocationProvider() = default; protected: nsresult CloneMozBinDirectory(nsIFile** aLocalFile); /** Get the product directory. This is a user-specific directory for storing application settings (e.g. the Application Data directory on windows systems). @param aLocal If true, should try to get a directory that is only stored locally (ie not transferred with roaming profiles) 1581
nsBinaryStream.cpp This file contains implementations of the nsIBinaryInputStream and nsIBinaryOutputStream interfaces. Together, these interfaces allows reading and writing of primitive data types (integers, floating-point values, booleans, etc.) to a stream in a binary, untagged, fixed-endianness format. This might be used, for example, to implement network protocols or to produce architecture-neutral binary disk files, i.e. ones that can be read and written by both big-endian and little-endian platforms. Output is written in big-endian order (high-order byte first), as this is traditional network order. @See nsIBinaryInputStream @See nsIBinaryOutputStream 27202
nsBinaryStream.h 86c37b9a-74e7-4672-844e-6e7dd83ba484 3037
nsDirectoryService.cpp 15193
nsDirectoryService.h 1802
nsDirectoryServiceDefs.h Defines the property names for directories available from nsIDirectoryService. These dirs are always available even if no nsIDirectoryServiceProviders have been registered with the service. Application level keys are defined in nsAppDirectoryServiceDefs.h. Keys whose definition ends in "DIR" or "FILE" return a single nsIFile (or subclass). Keys whose definition ends in "LIST" return an nsISimpleEnumerator which enumerates a list of file objects. Defines listed in this file are FROZEN. This list may grow. Each unique string in this file should have a corresponding atom defined in StaticAtoms.py (search for "DirectoryService"), regardless of whether it is defined here due to conditional compilation. 3672
nsDirectoryServiceUtils.h 932
nsEscape.cpp Bit 0 xalpha -- the alphas * Bit 1 xpalpha -- as xalpha but * converts spaces to plus and plus to %2B * Bit 3 ... path -- as xalphas but doesn't escape '/' 19971
nsEscape.h First checked in on 98/12/03 by John R. McMullen, derived from net.h/mkparse.c. 8335
nsIAsyncInputStream.idl If an input stream is non-blocking, it may return NS_BASE_STREAM_WOULD_BLOCK when read. The caller must then wait for the stream to have some data to read. If the stream implements nsIAsyncInputStream, then the caller can use this interface to request an asynchronous notification when the stream becomes readable or closed (via the AsyncWait method). While this interface is almost exclusively used with non-blocking streams, it is not necessary that nsIInputStream::isNonBlocking return true. Nor is it necessary that a non-blocking nsIInputStream implementation also implement nsIAsyncInputStream. 4967
nsIAsyncOutputStream.idl If an output stream is non-blocking, it may return NS_BASE_STREAM_WOULD_BLOCK when written to. The caller must then wait for the stream to become writable. If the stream implements nsIAsyncOutputStream, then the caller can use this interface to request an asynchronous notification when the stream becomes writable or closed (via the AsyncWait method). While this interface is almost exclusively used with non-blocking streams, it is not necessary that nsIOutputStream::isNonBlocking return true. Nor is it necessary that a non-blocking nsIOutputStream implementation also implement nsIAsyncOutputStream. 4909
nsIBinaryInputStream.idl This interface allows consumption of primitive data types from a "binary stream" containing untagged, big-endian binary data, i.e. as produced by an implementation of nsIBinaryOutputStream. This might be used, for example, to implement network protocols or to read from architecture-neutral disk files, i.e. ones that can be read and written by both big-endian and little-endian platforms. @See nsIBinaryOutputStream 3438
nsIBinaryOutputStream.idl This interface allows writing of primitive data types (integers, floating-point values, booleans, etc.) to a stream in a binary, untagged, fixed-endianness format. This might be used, for example, to implement network protocols or to produce architecture-neutral binary disk files, i.e. ones that can be read and written by both big-endian and little-endian platforms. Output is written in big-endian order (high-order byte first), as this is traditional network order. @See nsIBinaryInputStream 3124
nsICloneableInputStream.idl 1459
nsIConverterInputStream.idl A unichar input stream that wraps an input stream. This allows reading unicode strings from a stream, automatically converting the bytes from a selected character encoding. 1753
nsIConverterOutputStream.idl This interface allows writing strings to a stream, doing automatic character encoding conversion. 1120
nsIDirectoryEnumerator.idl This interface provides a means for enumerating the contents of a directory. It is similar to nsISimpleEnumerator except the retrieved entries are QI'ed to nsIFile, and there is a mechanism for closing the directory when the enumeration is complete. 1275
nsIDirectoryService.idl nsIDirectoryServiceProvider Used by Directory Service to get file locations. 2828
nsIFile.idl An nsIFile is an abstract representation of a filename. It manages filename encoding issues, pathname component separators ('/' vs. '\\' vs. ':') and weird stuff like differing volumes with identical names, as on pre-Darwin Macintoshes. This file has long introduced itself to new hackers with this opening paragraph: This is the only correct cross-platform way to specify a file. Strings are not such a way. If you grew up on windows or unix, you may think they are. Welcome to reality. While taking the pose struck here to heart would be uncalled for, one may safely conclude that writing cross-platform code is an embittering experience. All methods with string parameters have two forms. The preferred form operates on UCS-2 encoded characters strings. An alternate form operates on characters strings encoded in the "native" charset. A string containing characters encoded in the native charset cannot be safely passed to javascript via xpconnect. Therefore, the "native methods" are not scriptable. 19755
nsIIOUtil.idl nsIIOUtil provdes various xpcom/io-related utility methods. 1198
nsIInputStream.idl The signature of the writer function passed to ReadSegments. This is the "consumer" of data that gets read from the stream's buffer. @param aInStream stream being read @param aClosure opaque parameter passed to ReadSegments @param aFromSegment pointer to memory owned by the input stream. This is where the writer function should start consuming data. @param aToOffset amount of data already consumed by this writer during this ReadSegments call. This is also the sum of the aWriteCount returns from this writer over the previous invocations of the writer by this ReadSegments call. @param aCount Number of bytes available to be read starting at aFromSegment @param [out] aWriteCount number of bytes read by this writer function call Implementers should return the following: @return NS_OK and (*aWriteCount > 0) if consumed some data @return <any-error> if not interested in consuming any data Errors are never passed to the caller of ReadSegments. NOTE: returning NS_OK and (*aWriteCount = 0) has undefined behavior. 6558
nsIInputStreamLength.idl Note: Instead of using these interfaces directly, consider to use InputStreamLengthHelper class. 3241
nsIInputStreamPriority.idl An input stream implementing this interface will dispatch runnable events with this priority. See nsIRunnablePriority. 637
nsIInputStreamTee.idl A nsIInputStreamTee is a wrapper for an input stream, that when read reads the specified amount of data from its |source| and copies that data to its |sink|. |sink| must be a blocking output stream. 1495
nsILineInputStream.idl Read a single line from the stream, where a line is a possibly zero length sequence of 8bit chars terminated by a CR, LF, CRLF, LFCR, or eof. The line terminator is not returned. @retval false End of file. This line is the last line of the file (aLine is valid). @retval true The file contains further lines. @note Do not mix readLine with other read functions. Doing so can cause various problems and is not supported. 976
nsILocalFileMac.idl initWithCFURL Init this object with a CFURLRef NOTE: Supported only for XP_MACOSX NOTE: If the path of the CFURL is /a/b/c, at least a/b must exist beforehand. @param aCFURL the CoreFoundation URL 5055
nsILocalFileWin.idl initWithCommandLine Initialize this object based on the main app path of a commandline handler. @param aCommandLine the commandline to parse an app path out of. 3626
nsIMultiplexInputStream.idl The multiplex stream concatenates a list of input streams into a single stream. 1192
nsIOUtil.cpp 920
nsIOUtil.h nsIOUtil_h__ 864
nsIObjectInputStream.idl @see nsIObjectOutputStream @see nsIBinaryInputStream 1801
nsIObjectOutputStream.idl @See nsIObjectInputStream @See nsIBinaryOutputStream 3708
nsIOutputStream.idl The signature for the reader function passed to WriteSegments. This is the "provider" of data that gets written into the stream's buffer. @param aOutStream stream being written to @param aClosure opaque parameter passed to WriteSegments @param aToSegment pointer to memory owned by the output stream @param aFromOffset amount already written (since WriteSegments was called) @param aCount length of toSegment @param aReadCount number of bytes written Implementers should return the following: @throws <any-error> if not interested in providing any data Errors are never passed to the caller of WriteSegments. 5986
nsIPipe.idl nsIPipe represents an in-process buffer that can be read using nsIInputStream and written using nsIOutputStream. The reader and writer of a pipe do not have to be on the same thread. As a result, the pipe is an ideal mechanism to bridge data exchange between two threads. For example, a worker thread might write data to a pipe from which the main thread will read. Each end of the pipe can be either blocking or non-blocking. Recall that a non-blocking stream will return NS_BASE_STREAM_WOULD_BLOCK if it cannot be read or written to without blocking the calling thread. For example, if you try to read from an empty pipe that has not yet been closed, then if that pipe's input end is non-blocking, then the read call will fail immediately with NS_BASE_STREAM_WOULD_BLOCK as the error condition. However, if that pipe's input end is blocking, then the read call will not return until the pipe has data or until the pipe is closed. This example presumes that the pipe is being filled asynchronously on some background thread. The pipe supports nsIAsyncInputStream and nsIAsyncOutputStream, which give the user of a non-blocking pipe the ability to wait for the pipe to become ready again. For example, in the case of an empty non-blocking pipe, the user can call AsyncWait on the input end of the pipe to be notified when the pipe has data to read (or when the pipe becomes closed). NS_NewPipe2 and NS_NewPipe provide convenient pipe constructors. In most cases nsIPipe is not actually used. It is usually enough to just get references to the pipe's input and output end. In which case, the pipe is automatically closed when the respective pipe ends are released. 7294
nsISafeOutputStream.idl This interface provides a mechanism to control an output stream that takes care not to overwrite an existing target until it is known that all writes to the destination succeeded. An object that supports this interface is intended to also support nsIOutputStream. For example, a file output stream that supports this interface writes to a temporary file, and moves it over the original file when |finish| is called only if the stream can be successfully closed and all writes succeeded. If |finish| is called but something went wrong during writing, it will delete the temporary file and not touch the original. If the stream is closed by calling |close| directly, or the stream goes away, the original file will not be overwritten, and the temporary file will be deleted. Currently, this interface is implemented only for file output streams. 1824
nsIScriptableBase64Encoder.idl nsIScriptableBase64Encoder efficiently encodes the contents of a nsIInputStream to a Base64 string. This avoids the need to read the entire stream into a buffer, and only then do the Base64 encoding. If you already have a buffer full of data, you should use btoa instead! 1279
nsIScriptableInputStream.idl nsIScriptableInputStream provides scriptable access to an nsIInputStream instance. 2153
nsISeekableStream.idl nsISeekableStream Note that a stream might not implement all methods (e.g., a readonly stream won't implement setEOF) 1974
nsIStorageStream.idl The nsIStorageStream interface maintains an internal data buffer that can be filled using a single output stream. One or more independent input streams can be created to read the data from the buffer non-destructively. 2543
nsIStreamBufferAccess.idl An interface for access to a buffering stream implementation's underlying memory buffer. Stream implementations that QueryInterface to nsIStreamBufferAccess must ensure that all buffers are aligned on the most restrictive type size for the current architecture (e.g., sizeof(double) for RISCy CPUs). malloc(3) satisfies this requirement. 3621
nsIStringStream.idl nsIStringInputStream Provides scriptable and specialized C++-only methods for initializing a nsIInputStream implementation with a simple character array. 2822
nsITellableStream.idl nsITellableStream This class is separate from nsISeekableStream in order to let streams to implement ::Tell() without implementing the whole nsISeekableStream interface. Callers can QI the stream to know what is implemented. This is mainly done for nsPipeInputStream. Implementing this interface, streams are able to expose the current offset via ::tell(). 1044
nsIUnicharInputStream.idl The signature of the writer function passed to ReadSegments. This is the "consumer" of data that gets read from the stream's buffer. @param aInStream stream being read @param aClosure opaque parameter passed to ReadSegments @param aFromSegment pointer to memory owned by the input stream @param aToOffset amount already read (since ReadSegments was called) @param aCount length of fromSegment @param aWriteCount number of bytes read Implementers should return the following: @throws <any-error> if not interested in consuming any data Errors are never passed to the caller of ReadSegments. NOTE: returning NS_OK and (*aWriteCount = 0) has undefined behavior. 3793
nsIUnicharLineInputStream.idl Read a single line from the stream, where a line is a possibly zero length sequence of characters terminated by a CR, LF, CRLF, LFCR, or eof. The line terminator is not returned. @retval false End of file. This line is the last line of the file (aLine is valid). @retval true The file contains further lines. @note Do not mix readLine with other read functions. Doing so can cause various problems and is not supported. 982
nsIUnicharOutputStream.idl An interface that allows writing unicode data. 1403
nsInputStreamTee.cpp 9401
nsLinebreakConverter.cpp ---------------------------------------------------------------------------- GetLinebreakString Could make this inline ---------------------------------------------------------------------------- 13377
nsLinebreakConverter.h ConvertLineBreaks Convert line breaks in the supplied string, allocating and returning a new buffer. Returns nullptr on failure. @param aSrc: the source string. if aSrcLen == kIgnoreLen this string is assumed to be null terminated, otherwise it must be at least aSrcLen long. @param aSrcBreaks: the line breaks in the source. If unknown, pass eLinebreakAny. If known, pass the known value, as this may be more efficient. @param aDestBreaks: the line breaks you want in the output. @param aSrcLen: length of the source. If -1, the source is assumed to be a null-terminated string. @param aOutLen: used to return character length of returned buffer, if not null. 6929
nsLocalFile.h Quota exceeded 4078
nsLocalFileCommon.cpp static 10961
nsLocalFileCommon.h 448
nsLocalFileUnix.cpp Implementation of nsIFile for "unixy" systems. 67612
nsLocalFileUnix.h Implementation of nsIFile for ``Unixy'' systems. 2604
nsLocalFileWin.cpp 95197
nsLocalFileWin.h 3224
nsMultiplexInputStream.cpp The multiplex stream concatenates a list of input streams into a single stream. 40764
nsMultiplexInputStream.h The multiplex stream concatenates a list of input streams into a single stream. 1106
nsNativeCharsetUtils.cpp 2808
nsNativeCharsetUtils.h \ * **** NOTICE **** * * *** THESE ARE NOT GENERAL PURPOSE CONVERTERS *** * * NS_CopyNativeToUnicode / NS_CopyUnicodeToNative should only be used * for converting *FILENAMES* between bytes and UTF-16. They are not * designed or tested for general encoding converter use. * * On Windows, these functions convert to and from the system's legacy * code page, which cannot represent all of Unicode. Elsewhere, these * convert to and from UTF-8. * * \**************************************************************************** 2490
nsPipe.h e4a0ee4e-0775-457b-9118-b3ae97a7c758 857
nsPipe3.cpp 58907
nsScriptableBase64Encoder.cpp 1036
nsScriptableBase64Encoder.h 1053
nsScriptableInputStream.cpp 3068
nsScriptableInputStream.h 1439
nsSegmentedBuffer.cpp 5532
nsSegmentedBuffer.h 3055
nsStorageStream.cpp The storage stream provides an internal buffer that can be filled by a client using a single output stream. One or more independent input streams can be created to read the data out non-destructively. The implementation uses a segmented buffer internally to avoid realloc'ing of large buffers, with the attendant performance loss and heap fragmentation. 18708
nsStorageStream.h The storage stream provides an internal buffer that can be filled by a client using a single output stream. One or more independent input streams can be created to read the data out non-destructively. The implementation uses a segmented buffer internally to avoid realloc'ing of large buffers, with the attendant performance loss and heap fragmentation. 2408
nsStreamUtils.cpp 29434
nsStreamUtils.h A "one-shot" proxy of the OnInputStreamReady callback. The resulting proxy object's OnInputStreamReady function may only be called once! The proxy object ensures that the real notify object will be free'd on the thread corresponding to the given event target regardless of what thread the proxy object is destroyed on. This function is designed to be used to implement AsyncWait when the aTarget parameter is non-null. The optional aPriority parameter allows the input stream runnable events to be dispatched with a different priority than normal. 14236
nsStringStream.cpp Based on original code from nsIStringStream.cpp 15231
nsStringStream.h Implements: nsIStringInputStream nsIInputStream nsISeekableStream nsITellableStream nsISupportsCString 2864
nsUnicharInputStream.cpp 3434
nsUnicharInputStream.h 600
nsWildCard.cpp nsWildCard.cpp: shell-like wildcard match routines See nsIZipReader.findEntries documentation in nsIZipReader.idl for a description of the syntax supported by the routines in this file. Rob McCool 12523
nsWildCard.h nsWildCard.h: Defines and prototypes for shell exp. match routines See nsIZipReader.findEntries docs in nsIZipReader.idl for a description of the supported expression syntax. Note that the syntax documentation explicitly says the results of certain expressions are undefined. This is intentional to require less robustness in the code. Regular expression parsing is hard; the smaller the set of features and interactions this code must support, the easier it is to ensure it works. 1871