Name Description Size
AtomList.h 741
BindingCallContext.h A struct that encapsulates a JSContex and information about which binding method was called. The idea is to automatically annotate exceptions thrown via the BindingCallContext with the method name. 2526
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 17853
BindingIPCUtils.h 1048
Bindings.conf 52567
BindingUtils.cpp 151035
BindingUtils.h Convert a jsval to an XPCOM pointer. Caller must not assume that src will keep the XPCOM pointer rooted. 125739
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. 2208
CallbackInterface.cpp 1321
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. 2124
CallbackObject.cpp 15624
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. 24111
Codegen.py Converts IDL/Python Boolean (True/False) to C++ Boolean (true/false) 906441
Configuration.py Converts IDL/Python Boolean (True/False) to C++ Boolean (true/false) 60259
crashtests
docs
DOMExceptionNames.h 3173
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). 25684
DOMJSProxyHandler.cpp 10890
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.) 6839
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 mozilla::StringBuffer, 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. 11115
ErrorIPCUtils.h 3364
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. 36171
Errors.msg 8925
Exceptions.cpp 22219
Exceptions.h 2348
FakeString.h 9700
GenerateCSSPropListWebIDL.py /* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT */ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ [Exposed=Window 5272
IterableIterator.cpp 13319
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. 15218
JSSlots.h This file defines various reserved slot indices used by JavaScript reflections of DOM objects. 2339
mach_commands.py 1929
Makefile.in 1509
moz.build 6411
mozwebidlcodegen
NonRefcountedDOMObject.h mozilla_dom_NonRefcountedDOMObject_h__ 1272
nsIScriptError.idl nsIConsoleMessage subclass for representing JavaScript errors and warnings. 11188
nsScriptError.cpp nsIScriptError implementation. 15030
nsScriptError.h mozilla_dom_nsScriptError_h 4323
nsScriptErrorWithStack.cpp nsScriptErrorWithStack implementation. a main-thread-only, cycle-collected subclass of nsScriptErrorBase that can store a SavedFrame stack trace object. 5777
Nullable.h mozilla_dom_Nullable_h 2919
ObservableArrayProxyHandler.cpp 12203
ObservableArrayProxyHandler.h Proxy handler for observable array exotic object. The indexed properties are stored in the backing list object in reserved slot of the proxy object with special treatment intact. The additional properties are stored in the proxy target object. 4706
parser
PinnedStringId.h Holds a jsid that is initialized to a pinned string, with automatic conversion to Handle<jsid>, as it is held live forever by pinning. 1313
PrimitiveConversions.h Conversions from jsval to primitive values 10899
ProxyHandlerUtils.h mozilla_dom_ProxyHandlerUtils_h 2050
Record.h Class for representing record arguments. Basically an array under the hood. 2383
RemoteObjectProxy.cpp 7238
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. 8002
RootedDictionary.h mozilla_dom_RootedDictionary_h__ 1297
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. 2066
RootedRecord.h mozilla_dom_RootedRecord_h__ 921
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. 1450
RootedSequence.h mozilla_dom_RootedSequence_h__ 988
SimpleGlobalObject.cpp 5983
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. 4009
SpiderMonkeyInterface.h Class that just handles the JSObject storage and tracing for spidermonkey interfaces 3509
test
ToJSValue.cpp aTransplantTo = 4200
ToJSValue.h 17440
TypedArray.h 42804
UnionMember.h A class for holding the members of a union. 1409
WebIDLGlobalNameHash.cpp static 10890
WebIDLGlobalNameHash.h 3370
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. 1462