Name Description Size
AtomList.h 743
BindingDeclarations.h A header for declaring various things that binding implementation headers might need. The idea is to make binding implementation headers safe to include anywhere without running into include hell like we do with BindingUtils.h 14802
Bindings.conf 44788
BindingUtils.cpp 146418
BindingUtils.h Convert a jsval to an XPCOM pointer. Caller must not assume that src will keep the XPCOM pointer rooted. 115901
CallbackFunction.h A common base class for representing WebIDL callback function types in C++. This class implements common functionality like lifetime management, initialization with the callable, and setup of the call environment. Subclasses corresponding to particular callback function types should provide a Call() method that actually does the call. 2264
CallbackInterface.cpp 1175
CallbackInterface.h A common base class for representing WebIDL callback interface types in C++. This class implements common functionality like lifetime management, initialization with the callback object, and setup of the call environment. Subclasses corresponding to particular callback interface types should provide methods that actually do the various necessary calls. 2141
CallbackObject.cpp 16412
CallbackObject.h A common base class for representing WebIDL callback function and callback interface types in C++. This class implements common functionality like lifetime management, initialization with the JS object, and setup of the call environment. Subclasses are responsible for providing methods that do the call into JS as needed. 24247
Codegen.py Converts IDL/Python Boolean (True/False) to C++ Boolean (true/false) 801299
Configuration.py A way of getting descriptors for interface names. Subclasses must have a getDescriptor method callable with the interface name only. Subclasses must also have a getConfig() method that returns a Configuration. 47359
crashtests 14
Date.cpp 1396
Date.h Representation for dates. 1405
docs 1
DOMJSClass.h Returns true if code running in the given JSContext is allowed to access [SecureContext] API on the given JSObject. [SecureContext] API exposure is restricted to use by code in a Secure Contexts: https://w3c.github.io/webappsec-secure-contexts/ Since we want [SecureContext] exposure to depend on the privileges of the running code (rather than the privileges of an object's creator), this function checks to see whether the given JSContext's Realm is flagged as a Secure Context. That allows us to make sure that system principal code (which is marked as a Secure Context) can access Secure Context API on an object in a different realm, regardless of whether the other realm is a Secure Context or not. Checking the JSContext's Realm doesn't work for expanded principal globals accessing a Secure Context web page though (e.g. those used by frame scripts). To handle that we fall back to checking whether the JSObject came from a Secure Context. Note: We'd prefer this function to live in BindingUtils.h, but we need to call it in this header, and BindingUtils.h includes us (i.e. we'd have a circular dependency between headers if it lived there). 20915
DOMJSProxyHandler.cpp 10477
DOMJSProxyHandler.h DOM proxies store the expando object in the private slot. The expando object is a plain JSObject whose properties correspond to "expandos" (custom properties set by the script author). The exact value stored in the proxy's private slot depends on whether the interface is annotated with the [OverrideBuiltins] extended attribute. If it is, the proxy is initialized with a PrivateValue, which contains a pointer to a js::ExpandoAndGeneration object; this contains a pointer to the actual expando object as well as the "generation" of the object. The proxy handler will trace the expando object stored in the js::ExpandoAndGeneration while the proxy itself is alive. If it is not, the proxy is initialized with an UndefinedValue. In EnsureExpandoObject, it is set to an ObjectValue that points to the expando object directly. (It is set back to an UndefinedValue only when the object is about to die.) 9057
DOMString.h A class for representing string return values. This can be either passed to callees that have an nsString or nsAString out param or passed to a callee that actually knows about this class and can work with it. Such a callee may call these setters: SetKnownLiveStringBuffer SetStringBuffer SetKnownLiveString SetKnownLiveAtom SetNull to assign a value to the DOMString without instantiating an actual nsString in the process, or use AsAString() to instantiate an nsString and work with it. These options are mutually exclusive! Don't do more than one of them. It's only OK to call SetKnownLiveStringBuffer/SetKnownLiveString/SetKnownLiveAtom if the caller of the method in question plans to keep holding a strong ref to the stringbuffer involved, whether it's a raw nsStringBuffer, or stored inside the string or atom being passed. In the string/atom cases that means the caller must own the string or atom, and not mutate it (in the string case) for the lifetime of the DOMString. The proper way to extract a value is to check IsNull(). If not null, then check IsEmpty(). If neither of those is true, check HasStringBuffer(). If that's true, call StringBuffer()/StringBufferLength(). If HasStringBuffer() returns false, check HasLiteral, and if that returns true call Literal()/LiteralLength(). If HasLiteral() is false, call AsAString() and get the value from that. 12571
ErrorIPCUtils.h 3173
ErrorResult.h A set of structs for tracking exceptions that need to be thrown to JS: ErrorResult and IgnoredErrorResult. Conceptually, these structs represent either success or an exception in the process of being thrown. This means that a failing ErrorResult _must_ be handled in one of the following ways before coming off the stack: 1) Suppressed via SuppressException(). 2) Converted to a pure nsresult return value via StealNSResult(). 3) Converted to an actual pending exception on a JSContext via MaybeSetPendingException. 4) Converted to an exception JS::Value (probably to then reject a Promise with) via dom::ToJSValue. An IgnoredErrorResult will automatically do the first of those four things. 30042
Errors.msg 7774
Exceptions.cpp 22028
Exceptions.h 2114
FakeString.h 8373
GenerateCSS2PropertiesWebIDL.py 3140
IterableIterator.cpp 1303
IterableIterator.h The IterableIterator class is used for WebIDL interfaces that have a iterable<> member defined with two types (so a pair iterator). It handles the ES6 Iterator-like functions that are generated for the iterable interface. For iterable interfaces with a pair iterator, the implementation class will need to implement these two functions: - size_t GetIterableLength() - Returns the number of elements available to iterate over - [type] GetValueAtIndex(size_t index) - Returns the value at the requested index. - [type] GetKeyAtIndex(size_t index) - Returns the key at the requested index Examples of iterable interface implementations can be found in the bindings test directory. 8384
JSSlots.h This file defines various reserved slot indices used by JavaScript reflections of DOM objects. 1395
mach_commands.py 2070
Makefile.in 1778
moz.build 5132
mozwebidlcodegen 2
NonRefcountedDOMObject.h mozilla_dom_NonRefcountedDOMObject_h__ 1347
nsIScriptError.idl nsIConsoleMessage subclass for representing JavaScript errors and warnings. 11700
nsScriptError.cpp nsIScriptError implementation. 15361
nsScriptError.h mozilla_dom_nsScriptError_h 3577
nsScriptErrorWithStack.cpp nsScriptErrorWithStack implementation. a main-thread-only, cycle-collected subclass of nsScriptErrorBase that can store a SavedFrame stack trace object. 3580
Nullable.h mozilla_dom_Nullable_h 2952
parser A WebIDL parser written in Python to be used in Mozilla. 5
PrimitiveConversions.h Conversions from jsval to primitive values 10448
ReadableStream.h mozilla_dom_ReadableStream_h 794
Record.h Class for representing record arguments. Basically an array under the hood. 2399
RemoteObjectProxy.cpp 6905
RemoteObjectProxy.h Base class for RemoteObjectProxy. Implements the pieces of the handler that don't depend on properties/methods of the specific WebIDL interface that this proxy implements. 7727
RootedDictionary.h mozilla_dom_RootedDictionary_h__ 1534
RootedOwningNonNull.h An implementation of Rooted for OwningNonNull<T>. This works by assuming that T has a Trace() method defined on it which will trace whatever things inside the T instance need tracing. This implementation has one serious drawback: operator= doesn't work right because it's declared on Rooted directly and expects the type Rooted is templated over. 2067
RootedRefPtr.h An implementation of Rooted for RefPtr<T>. This works by assuming that T has a Trace() method defined on it which will trace whatever things inside the T instance need tracing. This implementation has one serious drawback: operator= doesn't work right because it's declared on Rooted directly and expects the type Rooted is templated over. 1451
SimpleGlobalObject.cpp 5585
SimpleGlobalObject.h A simplere nsIGlobalObject implementation that can be used to set up a new global without anything interesting in it other than the JS builtins. This is safe to use on both mainthread and worker threads. 3492
SpiderMonkeyInterface.h Class that just handles the JSObject storage and tracing for spidermonkey interfaces 3995
test 108
ToJSValue.cpp aTransplantTo = 3073
ToJSValue.h 13076
TypedArray.h Various typed array classes for argument conversion. We have a base class that has a way of initializing a TypedArray from an existing typed array, and a subclass of the base class that supports creation of a relevant typed array or array buffer object. 10391
UnionMember.h A class for holding the members of a union. 1565
WebIDLGlobalNameHash.cpp aDefineOnGlobal = 10175
WebIDLGlobalNameHash.h 3644
XrayExpandoClass.h This file declares a macro for defining Xray expando classes and declares the default Xray expando class. The actual definition of that default class lives elsewhere. 1488