The major changes are as follows:
1) The new algorithm no longer adjusts "argcount" based on the
interaction of trailing undefined and [TreatUndefinedAs=Missing]
arguments. We never implemented this; just asserted that we didn't
have to deal with this situation.
2) If the distinguishing argument is undefined and there is an
overload that has an optional argument at the distinguishing
argument index, that overload is selected.
The major changes are as follows:
1) The new algorithm no longer adjusts "argcount" based on the
interaction of trailing undefined and [TreatUndefinedAs=Missing]
arguments. We never implemented this; just asserted that we didn't
have to deal with this situation.
2) If the distinguishing argument is undefined and there is an
overload that has an optional argument at the distinguishing
argument index, that overload is selected.
Adds RootedUnion and NullableRootedUnion structs that are used on the
stack for union return values when the union needs rooting. It also
adds a TraceUnion method on union return values, which is called by
(Nullable)RootedUnion or by dictionary tracing. TraceUnion traces
typed array and object members of unions (the only things unions can
contain so far that might need tracing). Union return values are
changed to store raw JSObject* or typed array structs instead of
Rooted versions of both; the tracing is now handled via TraceUnion.
The wrapping code for dictionary arguments to constructors is fixed to
actually work. This required adding GetAs* methods to union return
values that return references to the internal data.
The SetToObject method is adjusted to actually work for union return
value structs and not assume it's being generated for a
union-conversion struct, and we now generate SetToObject methods as
needed for union return values.
This patch adds a jsonifier declaration to WebIDL's. The declaration adds an autogenerated method toJSON() on the given webidl. This patch also adds jsonifier and toJSON() to PerformanceTiming.webidl, and performance.timing, respectively.
This does not add support for [TreatUndefinedAs=Missing] in overloaded
methods, since it's not clear what that should really look like.
This also does not require that [TreatUndefinedAs=Missing] on an
argument force it on all later arguments, since it's not clear that we
want that long-term.
There are several changes here:
1) Adds some MutableThis methods to Optional, Nullable, and dictionaries to
effectively allow doing a const_cast without knowing the actual type being
templated over. I needed this because I do not in fact know that type in
the relevant code. I'm open to suggestions for a better name for this
method.
2) Adds some operator& to RootedJSValue to make it look more like a JS::Value,
and in particular so I can JS_WrapValue the thing in it.
3) Adds a Slot() method to NonNullLazyRootedObject, just like NonNull has.
4) Adds an operator& to LazyRootedObject to make it look more like JSObject* so
I can JS_WrapObject the thing in it.
5) Implements the actual rewrapping of the arguments into the content compartment.
6) Fixes a small preexisting bug in which we didn't look at named constructors
in getTypesFromDescriptor (this was causing my tests to not compile).
7) Changes Xrays to not enter the content compartment when calling a WebIDL
constructor.
8) Adds some friend API to report things as not being functions.