LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/dom/bindings - SVGPathSegBinding.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 2831 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 314 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* THIS FILE IS AUTOGENERATED FROM SVGPathSeg.webidl BY Codegen.py - DO NOT EDIT */
       2             : 
       3             : #include "DOMSVGPathSeg.h"
       4             : #include "SVGPathSegBinding.h"
       5             : #include "WrapperFactory.h"
       6             : #include "mozilla/FloatingPoint.h"
       7             : #include "mozilla/OwningNonNull.h"
       8             : #include "mozilla/dom/BindingUtils.h"
       9             : #include "mozilla/dom/DOMJSClass.h"
      10             : #include "mozilla/dom/NonRefcountedDOMObject.h"
      11             : #include "mozilla/dom/PrimitiveConversions.h"
      12             : #include "mozilla/dom/XrayExpandoClass.h"
      13             : 
      14             : namespace mozilla {
      15             : namespace dom {
      16             : 
      17             : namespace SVGPathSegBinding {
      18             : 
      19             : static bool
      20           0 : get_pathSegType(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSeg* self, JSJitGetterCallArgs args)
      21             : {
      22           0 :   uint16_t result(self->PathSegType());
      23           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
      24           0 :   args.rval().setInt32(int32_t(result));
      25           0 :   return true;
      26             : }
      27             : 
      28             : static const JSJitInfo pathSegType_getterinfo = {
      29             :   { (JSJitGetterOp)get_pathSegType },
      30             :   { prototypes::id::SVGPathSeg },
      31             :   { PrototypeTraits<prototypes::id::SVGPathSeg>::Depth },
      32             :   JSJitInfo::Getter,
      33             :   JSJitInfo::AliasDOMSets, /* aliasSet.  Not relevant for setters. */
      34             :   JSVAL_TYPE_INT32,  /* returnType.  Not relevant for setters. */
      35             :   true,  /* isInfallible. False in setters. */
      36             :   true,  /* isMovable.  Not relevant for setters. */
      37             :   true, /* isEliminatable.  Not relevant for setters. */
      38             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
      39             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
      40             :   false,  /* isTypedMethod.  Only relevant for methods. */
      41             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
      42             : };
      43             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
      44             : static_assert(0 < 1, "There is no slot for us");
      45             : 
      46             : static bool
      47           0 : get_pathSegTypeAsLetter(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSeg* self, JSJitGetterCallArgs args)
      48             : {
      49           0 :   DOMString result;
      50           0 :   self->GetPathSegTypeAsLetter(result);
      51           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
      52           0 :   if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
      53           0 :     return false;
      54             :   }
      55           0 :   return true;
      56             : }
      57             : 
      58             : static const JSJitInfo pathSegTypeAsLetter_getterinfo = {
      59             :   { (JSJitGetterOp)get_pathSegTypeAsLetter },
      60             :   { prototypes::id::SVGPathSeg },
      61             :   { PrototypeTraits<prototypes::id::SVGPathSeg>::Depth },
      62             :   JSJitInfo::Getter,
      63             :   JSJitInfo::AliasDOMSets, /* aliasSet.  Not relevant for setters. */
      64             :   JSVAL_TYPE_STRING,  /* returnType.  Not relevant for setters. */
      65             :   false,  /* isInfallible. False in setters. */
      66             :   true,  /* isMovable.  Not relevant for setters. */
      67             :   true, /* isEliminatable.  Not relevant for setters. */
      68             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
      69             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
      70             :   false,  /* isTypedMethod.  Only relevant for methods. */
      71             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
      72             : };
      73             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
      74             : static_assert(0 < 1, "There is no slot for us");
      75             : 
      76             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
      77             : #if defined(__clang__)
      78             : #pragma clang diagnostic push
      79             : #pragma clang diagnostic ignored "-Wmissing-braces"
      80             : #endif
      81             : static const JSPropertySpec sAttributes_specs[] = {
      82             :   { "pathSegType", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &pathSegType_getterinfo, nullptr, nullptr },
      83             :   { "pathSegTypeAsLetter", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &pathSegTypeAsLetter_getterinfo, nullptr, nullptr },
      84             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
      85             : };
      86             : #if defined(__clang__)
      87             : #pragma clang diagnostic pop
      88             : #endif
      89             : 
      90             : 
      91             : // Can't be const because the pref-enabled boolean needs to be writable
      92             : static Prefable<const JSPropertySpec> sAttributes[] = {
      93             :   { nullptr, &sAttributes_specs[0] },
      94             :   { nullptr, nullptr }
      95             : };
      96             : 
      97             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
      98             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
      99             : static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
     100             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
     101             : 
     102             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
     103             : #if defined(__clang__)
     104             : #pragma clang diagnostic push
     105             : #pragma clang diagnostic ignored "-Wmissing-braces"
     106             : #endif
     107             : static const ConstantSpec sConstants_specs[] = {
     108             :   { "PATHSEG_UNKNOWN", JS::Int32Value(0) },
     109             :   { "PATHSEG_CLOSEPATH", JS::Int32Value(1) },
     110             :   { "PATHSEG_MOVETO_ABS", JS::Int32Value(2) },
     111             :   { "PATHSEG_MOVETO_REL", JS::Int32Value(3) },
     112             :   { "PATHSEG_LINETO_ABS", JS::Int32Value(4) },
     113             :   { "PATHSEG_LINETO_REL", JS::Int32Value(5) },
     114             :   { "PATHSEG_CURVETO_CUBIC_ABS", JS::Int32Value(6) },
     115             :   { "PATHSEG_CURVETO_CUBIC_REL", JS::Int32Value(7) },
     116             :   { "PATHSEG_CURVETO_QUADRATIC_ABS", JS::Int32Value(8) },
     117             :   { "PATHSEG_CURVETO_QUADRATIC_REL", JS::Int32Value(9) },
     118             :   { "PATHSEG_ARC_ABS", JS::Int32Value(10) },
     119             :   { "PATHSEG_ARC_REL", JS::Int32Value(11) },
     120             :   { "PATHSEG_LINETO_HORIZONTAL_ABS", JS::Int32Value(12) },
     121             :   { "PATHSEG_LINETO_HORIZONTAL_REL", JS::Int32Value(13) },
     122             :   { "PATHSEG_LINETO_VERTICAL_ABS", JS::Int32Value(14) },
     123             :   { "PATHSEG_LINETO_VERTICAL_REL", JS::Int32Value(15) },
     124             :   { "PATHSEG_CURVETO_CUBIC_SMOOTH_ABS", JS::Int32Value(16) },
     125             :   { "PATHSEG_CURVETO_CUBIC_SMOOTH_REL", JS::Int32Value(17) },
     126             :   { "PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS", JS::Int32Value(18) },
     127             :   { "PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL", JS::Int32Value(19) },
     128             :   { 0, JS::UndefinedValue() }
     129             : };
     130             : #if defined(__clang__)
     131             : #pragma clang diagnostic pop
     132             : #endif
     133             : 
     134             : 
     135             : // Can't be const because the pref-enabled boolean needs to be writable
     136             : static Prefable<const ConstantSpec> sConstants[] = {
     137             :   { nullptr, &sConstants_specs[0] },
     138             :   { nullptr, nullptr }
     139             : };
     140             : 
     141             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
     142             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
     143             : static_assert(20 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
     144             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
     145             : 
     146             : 
     147             : static uint16_t sNativeProperties_sortedPropertyIndices[22];
     148             : static PropertyInfo sNativeProperties_propertyInfos[22];
     149             : 
     150             : static const NativePropertiesN<2> sNativeProperties = {
     151             :   false, 0,
     152             :   false, 0,
     153             :   false, 0,
     154             :   true,  0 /* sAttributes */,
     155             :   false, 0,
     156             :   false, 0,
     157             :   true,  1 /* sConstants */,
     158             :   -1,
     159             :   22,
     160             :   sNativeProperties_sortedPropertyIndices,
     161             :   {
     162             :     { sAttributes, &sNativeProperties_propertyInfos[0] },
     163             :     { sConstants, &sNativeProperties_propertyInfos[2] }
     164             :   }
     165             : };
     166             : static_assert(22 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
     167             :     "We have a property info count that is oversized");
     168             : 
     169             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
     170             :   {
     171             :     "Function",
     172             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
     173             :     &sBoringInterfaceObjectClassClassOps,
     174             :     JS_NULL_CLASS_SPEC,
     175             :     JS_NULL_CLASS_EXT,
     176             :     &sInterfaceObjectClassObjectOps
     177             :   },
     178             :   eInterface,
     179             :   true,
     180             :   prototypes::id::SVGPathSeg,
     181             :   PrototypeTraits<prototypes::id::SVGPathSeg>::Depth,
     182             :   sNativePropertyHooks,
     183             :   "function SVGPathSeg() {\n    [native code]\n}",
     184             :   JS::GetRealmFunctionPrototype
     185             : };
     186             : 
     187             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
     188             :   {
     189             :     "SVGPathSegPrototype",
     190             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
     191             :     JS_NULL_CLASS_OPS,
     192             :     JS_NULL_CLASS_SPEC,
     193             :     JS_NULL_CLASS_EXT,
     194             :     JS_NULL_OBJECT_OPS
     195             :   },
     196             :   eInterfacePrototype,
     197             :   false,
     198             :   prototypes::id::SVGPathSeg,
     199             :   PrototypeTraits<prototypes::id::SVGPathSeg>::Depth,
     200             :   sNativePropertyHooks,
     201             :   "[object SVGPathSegPrototype]",
     202             :   JS::GetRealmObjectPrototype
     203             : };
     204             : 
     205             : JSObject*
     206           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
     207             : {
     208           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
     209             : }
     210             : 
     211             : const NativePropertyHooks sNativePropertyHooks[] = { {
     212             :   nullptr,
     213             :   nullptr,
     214             :   nullptr,
     215             :   { sNativeProperties.Upcast(), nullptr },
     216             :   prototypes::id::SVGPathSeg,
     217             :   constructors::id::SVGPathSeg,
     218             :   nullptr,
     219             :   &DefaultXrayExpandoObjectClass
     220             : } };
     221             : 
     222             : void
     223           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
     224             : {
     225           0 :   JS::Rooted<JSObject*> parentProto(aCx, JS::GetRealmObjectPrototype(aCx));
     226           0 :   if (!parentProto) {
     227           0 :     return;
     228             :   }
     229             : 
     230           0 :   JS::Rooted<JSObject*> constructorProto(aCx, JS::GetRealmFunctionPrototype(aCx));
     231           0 :   if (!constructorProto) {
     232           0 :     return;
     233             :   }
     234             : 
     235             :   static bool sIdsInited = false;
     236           0 :   if (!sIdsInited && NS_IsMainThread()) {
     237           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
     238           0 :       return;
     239             :     }
     240           0 :     sIdsInited = true;
     241             :   }
     242             : 
     243           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSeg);
     244           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSeg);
     245           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
     246             :                               &sPrototypeClass.mBase, protoCache,
     247             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
     248             :                               interfaceCache,
     249             :                               sNativeProperties.Upcast(),
     250             :                               nullptr,
     251             :                               "SVGPathSeg", aDefineOnGlobal,
     252             :                               nullptr,
     253           0 :                               false);
     254             : }
     255             : 
     256             : JS::Handle<JSObject*>
     257           0 : GetProtoObjectHandle(JSContext* aCx)
     258             : {
     259             :   /* Get the interface prototype object for this class.  This will create the
     260             :      object as needed. */
     261           0 :   bool aDefineOnGlobal = true;
     262             : 
     263             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
     264           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
     265           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
     266           0 :     return nullptr;
     267             :   }
     268             : 
     269             :   /* Check to see whether the interface objects are already installed */
     270           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
     271           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSeg)) {
     272           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
     273           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
     274             :   }
     275             : 
     276             :   /*
     277             :    * The object might _still_ be null, but that's OK.
     278             :    *
     279             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
     280             :    * traced by TraceProtoAndIfaceCache() and its contents are never
     281             :    * changed after they have been set.
     282             :    *
     283             :    * Calling address() avoids the read read barrier that does gray
     284             :    * unmarking, but it's not possible for the object to be gray here.
     285             :    */
     286             : 
     287           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSeg);
     288           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
     289           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
     290             : }
     291             : 
     292             : JSObject*
     293           0 : GetProtoObject(JSContext* aCx)
     294             : {
     295           0 :   return GetProtoObjectHandle(aCx);
     296             : }
     297             : 
     298             : JS::Handle<JSObject*>
     299           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
     300             : {
     301             :   /* Get the interface object for this class.  This will create the object as
     302             :      needed. */
     303             : 
     304             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
     305           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
     306           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
     307           0 :     return nullptr;
     308             :   }
     309             : 
     310             :   /* Check to see whether the interface objects are already installed */
     311           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
     312           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSeg)) {
     313           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
     314           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
     315             :   }
     316             : 
     317             :   /*
     318             :    * The object might _still_ be null, but that's OK.
     319             :    *
     320             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
     321             :    * traced by TraceProtoAndIfaceCache() and its contents are never
     322             :    * changed after they have been set.
     323             :    *
     324             :    * Calling address() avoids the read read barrier that does gray
     325             :    * unmarking, but it's not possible for the object to be gray here.
     326             :    */
     327             : 
     328           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSeg);
     329           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
     330           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
     331             : }
     332             : 
     333             : JSObject*
     334           0 : GetConstructorObject(JSContext* aCx)
     335             : {
     336           0 :   return GetConstructorObjectHandle(aCx);
     337             : }
     338             : 
     339             : } // namespace SVGPathSegBinding
     340             : 
     341             : 
     342             : 
     343             : namespace SVGPathSegArcAbsBinding {
     344             : 
     345             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
     346             :               "Can't inherit from an interface with a different ownership model.");
     347             : 
     348             : static bool
     349           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcAbs* self, JSJitGetterCallArgs args)
     350             : {
     351           0 :   float result(self->X());
     352           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     353           0 :   args.rval().set(JS_NumberValue(double(result)));
     354           0 :   return true;
     355             : }
     356             : 
     357             : static bool
     358           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcAbs* self, JSJitSetterCallArgs args)
     359             : {
     360             :   float arg0;
     361           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
     362           0 :     return false;
     363           0 :   } else if (!mozilla::IsFinite(arg0)) {
     364           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegArcAbs.x");
     365           0 :     return false;
     366             :   }
     367           0 :   binding_detail::FastErrorResult rv;
     368           0 :   self->SetX(arg0, rv);
     369           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     370           0 :     return false;
     371             :   }
     372           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     373             : 
     374           0 :   return true;
     375             : }
     376             : 
     377             : static const JSJitInfo x_getterinfo = {
     378             :   { (JSJitGetterOp)get_x },
     379             :   { prototypes::id::SVGPathSegArcAbs },
     380             :   { PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth },
     381             :   JSJitInfo::Getter,
     382             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     383             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
     384             :   true,  /* isInfallible. False in setters. */
     385             :   false,  /* isMovable.  Not relevant for setters. */
     386             :   false, /* isEliminatable.  Not relevant for setters. */
     387             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     388             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     389             :   false,  /* isTypedMethod.  Only relevant for methods. */
     390             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     391             : };
     392             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     393             : static_assert(0 < 1, "There is no slot for us");
     394             : static const JSJitInfo x_setterinfo = {
     395             :   { (JSJitGetterOp)set_x },
     396             :   { prototypes::id::SVGPathSegArcAbs },
     397             :   { PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth },
     398             :   JSJitInfo::Setter,
     399             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     400             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
     401             :   false,  /* isInfallible. False in setters. */
     402             :   false,  /* isMovable.  Not relevant for setters. */
     403             :   false, /* isEliminatable.  Not relevant for setters. */
     404             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     405             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     406             :   false,  /* isTypedMethod.  Only relevant for methods. */
     407             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     408             : };
     409             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     410             : static_assert(0 < 1, "There is no slot for us");
     411             : 
     412             : static bool
     413           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcAbs* self, JSJitGetterCallArgs args)
     414             : {
     415           0 :   float result(self->Y());
     416           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     417           0 :   args.rval().set(JS_NumberValue(double(result)));
     418           0 :   return true;
     419             : }
     420             : 
     421             : static bool
     422           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcAbs* self, JSJitSetterCallArgs args)
     423             : {
     424             :   float arg0;
     425           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
     426           0 :     return false;
     427           0 :   } else if (!mozilla::IsFinite(arg0)) {
     428           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegArcAbs.y");
     429           0 :     return false;
     430             :   }
     431           0 :   binding_detail::FastErrorResult rv;
     432           0 :   self->SetY(arg0, rv);
     433           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     434           0 :     return false;
     435             :   }
     436           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     437             : 
     438           0 :   return true;
     439             : }
     440             : 
     441             : static const JSJitInfo y_getterinfo = {
     442             :   { (JSJitGetterOp)get_y },
     443             :   { prototypes::id::SVGPathSegArcAbs },
     444             :   { PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth },
     445             :   JSJitInfo::Getter,
     446             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     447             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
     448             :   true,  /* isInfallible. False in setters. */
     449             :   false,  /* isMovable.  Not relevant for setters. */
     450             :   false, /* isEliminatable.  Not relevant for setters. */
     451             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     452             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     453             :   false,  /* isTypedMethod.  Only relevant for methods. */
     454             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     455             : };
     456             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     457             : static_assert(0 < 1, "There is no slot for us");
     458             : static const JSJitInfo y_setterinfo = {
     459             :   { (JSJitGetterOp)set_y },
     460             :   { prototypes::id::SVGPathSegArcAbs },
     461             :   { PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth },
     462             :   JSJitInfo::Setter,
     463             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     464             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
     465             :   false,  /* isInfallible. False in setters. */
     466             :   false,  /* isMovable.  Not relevant for setters. */
     467             :   false, /* isEliminatable.  Not relevant for setters. */
     468             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     469             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     470             :   false,  /* isTypedMethod.  Only relevant for methods. */
     471             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     472             : };
     473             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     474             : static_assert(0 < 1, "There is no slot for us");
     475             : 
     476             : static bool
     477           0 : get_r1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcAbs* self, JSJitGetterCallArgs args)
     478             : {
     479           0 :   float result(self->R1());
     480           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     481           0 :   args.rval().set(JS_NumberValue(double(result)));
     482           0 :   return true;
     483             : }
     484             : 
     485             : static bool
     486           0 : set_r1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcAbs* self, JSJitSetterCallArgs args)
     487             : {
     488             :   float arg0;
     489           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
     490           0 :     return false;
     491           0 :   } else if (!mozilla::IsFinite(arg0)) {
     492           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegArcAbs.r1");
     493           0 :     return false;
     494             :   }
     495           0 :   binding_detail::FastErrorResult rv;
     496           0 :   self->SetR1(arg0, rv);
     497           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     498           0 :     return false;
     499             :   }
     500           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     501             : 
     502           0 :   return true;
     503             : }
     504             : 
     505             : static const JSJitInfo r1_getterinfo = {
     506             :   { (JSJitGetterOp)get_r1 },
     507             :   { prototypes::id::SVGPathSegArcAbs },
     508             :   { PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth },
     509             :   JSJitInfo::Getter,
     510             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     511             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
     512             :   true,  /* isInfallible. False in setters. */
     513             :   false,  /* isMovable.  Not relevant for setters. */
     514             :   false, /* isEliminatable.  Not relevant for setters. */
     515             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     516             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     517             :   false,  /* isTypedMethod.  Only relevant for methods. */
     518             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     519             : };
     520             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     521             : static_assert(0 < 1, "There is no slot for us");
     522             : static const JSJitInfo r1_setterinfo = {
     523             :   { (JSJitGetterOp)set_r1 },
     524             :   { prototypes::id::SVGPathSegArcAbs },
     525             :   { PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth },
     526             :   JSJitInfo::Setter,
     527             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     528             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
     529             :   false,  /* isInfallible. False in setters. */
     530             :   false,  /* isMovable.  Not relevant for setters. */
     531             :   false, /* isEliminatable.  Not relevant for setters. */
     532             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     533             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     534             :   false,  /* isTypedMethod.  Only relevant for methods. */
     535             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     536             : };
     537             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     538             : static_assert(0 < 1, "There is no slot for us");
     539             : 
     540             : static bool
     541           0 : get_r2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcAbs* self, JSJitGetterCallArgs args)
     542             : {
     543           0 :   float result(self->R2());
     544           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     545           0 :   args.rval().set(JS_NumberValue(double(result)));
     546           0 :   return true;
     547             : }
     548             : 
     549             : static bool
     550           0 : set_r2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcAbs* self, JSJitSetterCallArgs args)
     551             : {
     552             :   float arg0;
     553           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
     554           0 :     return false;
     555           0 :   } else if (!mozilla::IsFinite(arg0)) {
     556           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegArcAbs.r2");
     557           0 :     return false;
     558             :   }
     559           0 :   binding_detail::FastErrorResult rv;
     560           0 :   self->SetR2(arg0, rv);
     561           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     562           0 :     return false;
     563             :   }
     564           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     565             : 
     566           0 :   return true;
     567             : }
     568             : 
     569             : static const JSJitInfo r2_getterinfo = {
     570             :   { (JSJitGetterOp)get_r2 },
     571             :   { prototypes::id::SVGPathSegArcAbs },
     572             :   { PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth },
     573             :   JSJitInfo::Getter,
     574             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     575             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
     576             :   true,  /* isInfallible. False in setters. */
     577             :   false,  /* isMovable.  Not relevant for setters. */
     578             :   false, /* isEliminatable.  Not relevant for setters. */
     579             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     580             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     581             :   false,  /* isTypedMethod.  Only relevant for methods. */
     582             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     583             : };
     584             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     585             : static_assert(0 < 1, "There is no slot for us");
     586             : static const JSJitInfo r2_setterinfo = {
     587             :   { (JSJitGetterOp)set_r2 },
     588             :   { prototypes::id::SVGPathSegArcAbs },
     589             :   { PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth },
     590             :   JSJitInfo::Setter,
     591             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     592             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
     593             :   false,  /* isInfallible. False in setters. */
     594             :   false,  /* isMovable.  Not relevant for setters. */
     595             :   false, /* isEliminatable.  Not relevant for setters. */
     596             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     597             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     598             :   false,  /* isTypedMethod.  Only relevant for methods. */
     599             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     600             : };
     601             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     602             : static_assert(0 < 1, "There is no slot for us");
     603             : 
     604             : static bool
     605           0 : get_angle(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcAbs* self, JSJitGetterCallArgs args)
     606             : {
     607           0 :   float result(self->Angle());
     608           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     609           0 :   args.rval().set(JS_NumberValue(double(result)));
     610           0 :   return true;
     611             : }
     612             : 
     613             : static bool
     614           0 : set_angle(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcAbs* self, JSJitSetterCallArgs args)
     615             : {
     616             :   float arg0;
     617           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
     618           0 :     return false;
     619           0 :   } else if (!mozilla::IsFinite(arg0)) {
     620           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegArcAbs.angle");
     621           0 :     return false;
     622             :   }
     623           0 :   binding_detail::FastErrorResult rv;
     624           0 :   self->SetAngle(arg0, rv);
     625           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     626           0 :     return false;
     627             :   }
     628           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     629             : 
     630           0 :   return true;
     631             : }
     632             : 
     633             : static const JSJitInfo angle_getterinfo = {
     634             :   { (JSJitGetterOp)get_angle },
     635             :   { prototypes::id::SVGPathSegArcAbs },
     636             :   { PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth },
     637             :   JSJitInfo::Getter,
     638             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     639             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
     640             :   true,  /* isInfallible. False in setters. */
     641             :   false,  /* isMovable.  Not relevant for setters. */
     642             :   false, /* isEliminatable.  Not relevant for setters. */
     643             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     644             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     645             :   false,  /* isTypedMethod.  Only relevant for methods. */
     646             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     647             : };
     648             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     649             : static_assert(0 < 1, "There is no slot for us");
     650             : static const JSJitInfo angle_setterinfo = {
     651             :   { (JSJitGetterOp)set_angle },
     652             :   { prototypes::id::SVGPathSegArcAbs },
     653             :   { PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth },
     654             :   JSJitInfo::Setter,
     655             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     656             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
     657             :   false,  /* isInfallible. False in setters. */
     658             :   false,  /* isMovable.  Not relevant for setters. */
     659             :   false, /* isEliminatable.  Not relevant for setters. */
     660             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     661             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     662             :   false,  /* isTypedMethod.  Only relevant for methods. */
     663             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     664             : };
     665             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     666             : static_assert(0 < 1, "There is no slot for us");
     667             : 
     668             : static bool
     669           0 : get_largeArcFlag(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcAbs* self, JSJitGetterCallArgs args)
     670             : {
     671           0 :   bool result(self->LargeArcFlag());
     672           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     673           0 :   args.rval().setBoolean(result);
     674           0 :   return true;
     675             : }
     676             : 
     677             : static bool
     678           0 : set_largeArcFlag(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcAbs* self, JSJitSetterCallArgs args)
     679             : {
     680             :   bool arg0;
     681           0 :   if (!ValueToPrimitive<bool, eDefault>(cx, args[0], &arg0)) {
     682           0 :     return false;
     683             :   }
     684           0 :   binding_detail::FastErrorResult rv;
     685           0 :   self->SetLargeArcFlag(arg0, rv);
     686           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     687           0 :     return false;
     688             :   }
     689           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     690             : 
     691           0 :   return true;
     692             : }
     693             : 
     694             : static const JSJitInfo largeArcFlag_getterinfo = {
     695             :   { (JSJitGetterOp)get_largeArcFlag },
     696             :   { prototypes::id::SVGPathSegArcAbs },
     697             :   { PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth },
     698             :   JSJitInfo::Getter,
     699             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     700             :   JSVAL_TYPE_BOOLEAN,  /* returnType.  Not relevant for setters. */
     701             :   true,  /* isInfallible. False in setters. */
     702             :   false,  /* isMovable.  Not relevant for setters. */
     703             :   false, /* isEliminatable.  Not relevant for setters. */
     704             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     705             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     706             :   false,  /* isTypedMethod.  Only relevant for methods. */
     707             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     708             : };
     709             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     710             : static_assert(0 < 1, "There is no slot for us");
     711             : static const JSJitInfo largeArcFlag_setterinfo = {
     712             :   { (JSJitGetterOp)set_largeArcFlag },
     713             :   { prototypes::id::SVGPathSegArcAbs },
     714             :   { PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth },
     715             :   JSJitInfo::Setter,
     716             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     717             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
     718             :   false,  /* isInfallible. False in setters. */
     719             :   false,  /* isMovable.  Not relevant for setters. */
     720             :   false, /* isEliminatable.  Not relevant for setters. */
     721             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     722             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     723             :   false,  /* isTypedMethod.  Only relevant for methods. */
     724             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     725             : };
     726             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     727             : static_assert(0 < 1, "There is no slot for us");
     728             : 
     729             : static bool
     730           0 : get_sweepFlag(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcAbs* self, JSJitGetterCallArgs args)
     731             : {
     732           0 :   bool result(self->SweepFlag());
     733           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     734           0 :   args.rval().setBoolean(result);
     735           0 :   return true;
     736             : }
     737             : 
     738             : static bool
     739           0 : set_sweepFlag(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcAbs* self, JSJitSetterCallArgs args)
     740             : {
     741             :   bool arg0;
     742           0 :   if (!ValueToPrimitive<bool, eDefault>(cx, args[0], &arg0)) {
     743           0 :     return false;
     744             :   }
     745           0 :   binding_detail::FastErrorResult rv;
     746           0 :   self->SetSweepFlag(arg0, rv);
     747           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     748           0 :     return false;
     749             :   }
     750           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     751             : 
     752           0 :   return true;
     753             : }
     754             : 
     755             : static const JSJitInfo sweepFlag_getterinfo = {
     756             :   { (JSJitGetterOp)get_sweepFlag },
     757             :   { prototypes::id::SVGPathSegArcAbs },
     758             :   { PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth },
     759             :   JSJitInfo::Getter,
     760             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     761             :   JSVAL_TYPE_BOOLEAN,  /* returnType.  Not relevant for setters. */
     762             :   true,  /* isInfallible. False in setters. */
     763             :   false,  /* isMovable.  Not relevant for setters. */
     764             :   false, /* isEliminatable.  Not relevant for setters. */
     765             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     766             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     767             :   false,  /* isTypedMethod.  Only relevant for methods. */
     768             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     769             : };
     770             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     771             : static_assert(0 < 1, "There is no slot for us");
     772             : static const JSJitInfo sweepFlag_setterinfo = {
     773             :   { (JSJitGetterOp)set_sweepFlag },
     774             :   { prototypes::id::SVGPathSegArcAbs },
     775             :   { PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth },
     776             :   JSJitInfo::Setter,
     777             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     778             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
     779             :   false,  /* isInfallible. False in setters. */
     780             :   false,  /* isMovable.  Not relevant for setters. */
     781             :   false, /* isEliminatable.  Not relevant for setters. */
     782             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     783             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     784             :   false,  /* isTypedMethod.  Only relevant for methods. */
     785             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     786             : };
     787             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     788             : static_assert(0 < 1, "There is no slot for us");
     789             : 
     790             : static bool
     791           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
     792             : {
     793           0 :   mozilla::DOMSVGPathSegArcAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegArcAbs>(obj);
     794             :   // We don't want to preserve if we don't have a wrapper, and we
     795             :   // obviously can't preserve if we're not initialized.
     796           0 :   if (self && self->GetWrapperPreserveColor()) {
     797           0 :     PreserveWrapper(self);
     798             :   }
     799           0 :   return true;
     800             : }
     801             : 
     802             : static void
     803           0 : _finalize(js::FreeOp* fop, JSObject* obj)
     804             : {
     805           0 :   mozilla::DOMSVGPathSegArcAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegArcAbs>(obj);
     806           0 :   if (self) {
     807           0 :     ClearWrapper(self, self, obj);
     808           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegArcAbs>(self);
     809             :   }
     810           0 : }
     811             : 
     812             : static void
     813           0 : _objectMoved(JSObject* obj, const JSObject* old)
     814             : {
     815           0 :   mozilla::DOMSVGPathSegArcAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegArcAbs>(obj);
     816           0 :   if (self) {
     817           0 :     UpdateWrapper(self, self, obj, old);
     818             :   }
     819           0 : }
     820             : 
     821             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
     822             : #if defined(__clang__)
     823             : #pragma clang diagnostic push
     824             : #pragma clang diagnostic ignored "-Wmissing-braces"
     825             : #endif
     826             : static const JSPropertySpec sAttributes_specs[] = {
     827             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
     828             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
     829             :   { "r1", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &r1_getterinfo, GenericBindingSetter, &r1_setterinfo },
     830             :   { "r2", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &r2_getterinfo, GenericBindingSetter, &r2_setterinfo },
     831             :   { "angle", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &angle_getterinfo, GenericBindingSetter, &angle_setterinfo },
     832             :   { "largeArcFlag", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &largeArcFlag_getterinfo, GenericBindingSetter, &largeArcFlag_setterinfo },
     833             :   { "sweepFlag", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &sweepFlag_getterinfo, GenericBindingSetter, &sweepFlag_setterinfo },
     834             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
     835             : };
     836             : #if defined(__clang__)
     837             : #pragma clang diagnostic pop
     838             : #endif
     839             : 
     840             : 
     841             : // Can't be const because the pref-enabled boolean needs to be writable
     842             : static Prefable<const JSPropertySpec> sAttributes[] = {
     843             :   { nullptr, &sAttributes_specs[0] },
     844             :   { nullptr, nullptr }
     845             : };
     846             : 
     847             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
     848             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
     849             : static_assert(7 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
     850             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
     851             : 
     852             : 
     853             : static uint16_t sNativeProperties_sortedPropertyIndices[7];
     854             : static PropertyInfo sNativeProperties_propertyInfos[7];
     855             : 
     856             : static const NativePropertiesN<1> sNativeProperties = {
     857             :   false, 0,
     858             :   false, 0,
     859             :   false, 0,
     860             :   true,  0 /* sAttributes */,
     861             :   false, 0,
     862             :   false, 0,
     863             :   false, 0,
     864             :   -1,
     865             :   7,
     866             :   sNativeProperties_sortedPropertyIndices,
     867             :   {
     868             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
     869             :   }
     870             : };
     871             : static_assert(7 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
     872             :     "We have a property info count that is oversized");
     873             : 
     874             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
     875             :   {
     876             :     "Function",
     877             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
     878             :     &sBoringInterfaceObjectClassClassOps,
     879             :     JS_NULL_CLASS_SPEC,
     880             :     JS_NULL_CLASS_EXT,
     881             :     &sInterfaceObjectClassObjectOps
     882             :   },
     883             :   eInterface,
     884             :   true,
     885             :   prototypes::id::SVGPathSegArcAbs,
     886             :   PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth,
     887             :   sNativePropertyHooks,
     888             :   "function SVGPathSegArcAbs() {\n    [native code]\n}",
     889             :   SVGPathSegBinding::GetConstructorObject
     890             : };
     891             : 
     892             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
     893             :   {
     894             :     "SVGPathSegArcAbsPrototype",
     895             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
     896             :     JS_NULL_CLASS_OPS,
     897             :     JS_NULL_CLASS_SPEC,
     898             :     JS_NULL_CLASS_EXT,
     899             :     JS_NULL_OBJECT_OPS
     900             :   },
     901             :   eInterfacePrototype,
     902             :   false,
     903             :   prototypes::id::SVGPathSegArcAbs,
     904             :   PrototypeTraits<prototypes::id::SVGPathSegArcAbs>::Depth,
     905             :   sNativePropertyHooks,
     906             :   "[object SVGPathSegArcAbsPrototype]",
     907             :   SVGPathSegBinding::GetProtoObject
     908             : };
     909             : 
     910             : JSObject*
     911           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
     912             : {
     913           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
     914             : }
     915             : 
     916             : static const js::ClassOps sClassOps = {
     917             :   _addProperty, /* addProperty */
     918             :   nullptr,               /* delProperty */
     919             :   nullptr,               /* getProperty */
     920             :   nullptr,               /* setProperty */
     921             :   nullptr,               /* enumerate */
     922             :   nullptr, /* newEnumerate */
     923             :   nullptr, /* resolve */
     924             :   nullptr, /* mayResolve */
     925             :   _finalize, /* finalize */
     926             :   nullptr, /* call */
     927             :   nullptr,               /* hasInstance */
     928             :   nullptr,               /* construct */
     929             :   nullptr, /* trace */
     930             : };
     931             : 
     932             : static const js::ClassExtension sClassExtension = {
     933             :   nullptr, /* weakmapKeyDelegateOp */
     934             :   _objectMoved /* objectMovedOp */
     935             : };
     936             : 
     937             : static const DOMJSClass sClass = {
     938             :   { "SVGPathSegArcAbs",
     939             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
     940             :     &sClassOps,
     941             :     JS_NULL_CLASS_SPEC,
     942             :     &sClassExtension,
     943             :     JS_NULL_OBJECT_OPS
     944             :   },
     945             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegArcAbs, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
     946             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegArcAbs >::value,
     947             :   sNativePropertyHooks,
     948             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegArcAbs>::Get,
     949             :   GetProtoObjectHandle,
     950             :   GetCCParticipant<mozilla::DOMSVGPathSegArcAbs>::Get()
     951             : };
     952             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
     953             :               "Must have the right minimal number of reserved slots.");
     954             : static_assert(1 >= 1,
     955             :               "Must have enough reserved slots.");
     956             : 
     957             : const JSClass*
     958           0 : GetJSClass()
     959             : {
     960           0 :   return sClass.ToJSClass();
     961             : }
     962             : 
     963             : bool
     964           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegArcAbs* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
     965             : {
     966             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegArcAbs*>(aObject) ==
     967             :              reinterpret_cast<mozilla::DOMSVGPathSegArcAbs*>(aObject),
     968             :              "Multiple inheritance for mozilla::DOMSVGPathSegArcAbs is broken.");
     969             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
     970             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
     971             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
     972           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
     973           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
     974           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
     975             :              "You should probably not be using Wrap() directly; use "
     976             :              "GetOrCreateDOMReflector instead");
     977             : 
     978           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
     979             :              "nsISupports must be on our primary inheritance chain");
     980             : 
     981           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
     982           0 :   if (!global) {
     983           0 :     return false;
     984             :   }
     985           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
     986           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
     987             : 
     988             :   // That might have ended up wrapping us already, due to the wonders
     989             :   // of XBL.  Check for that, and bail out as needed.
     990           0 :   aReflector.set(aCache->GetWrapper());
     991           0 :   if (aReflector) {
     992             : #ifdef DEBUG
     993           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
     994             : #endif // DEBUG
     995           0 :     return true;
     996             :   }
     997             : 
     998           0 :   JSAutoCompartment ac(aCx, global);
     999           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    1000           0 :   if (!canonicalProto) {
    1001           0 :     return false;
    1002             :   }
    1003           0 :   JS::Rooted<JSObject*> proto(aCx);
    1004           0 :   if (aGivenProto) {
    1005           0 :     proto = aGivenProto;
    1006             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    1007             :     // coming in, we changed compartments to that of "parent" so may need
    1008             :     // to wrap the proto here.
    1009           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    1010           0 :       if (!JS_WrapObject(aCx, &proto)) {
    1011           0 :         return false;
    1012             :       }
    1013             :     }
    1014             :   } else {
    1015           0 :     proto = canonicalProto;
    1016             :   }
    1017             : 
    1018           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegArcAbs> creator(aCx);
    1019           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    1020           0 :   if (!aReflector) {
    1021           0 :     return false;
    1022             :   }
    1023             : 
    1024           0 :   aCache->SetWrapper(aReflector);
    1025           0 :   creator.InitializationSucceeded();
    1026             : 
    1027           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    1028             :              aCache->GetWrapperPreserveColor() == aReflector);
    1029             :   // If proto != canonicalProto, we have to preserve our wrapper;
    1030             :   // otherwise we won't be able to properly recreate it later, since
    1031             :   // we won't know what proto to use.  Note that we don't check
    1032             :   // aGivenProto here, since it's entirely possible (and even
    1033             :   // somewhat common) to have a non-null aGivenProto which is the
    1034             :   // same as canonicalProto.
    1035           0 :   if (proto != canonicalProto) {
    1036           0 :     PreserveWrapper(aObject);
    1037             :   }
    1038             : 
    1039           0 :   return true;
    1040             : }
    1041             : 
    1042             : const NativePropertyHooks sNativePropertyHooks[] = { {
    1043             :   nullptr,
    1044             :   nullptr,
    1045             :   nullptr,
    1046             :   { sNativeProperties.Upcast(), nullptr },
    1047             :   prototypes::id::SVGPathSegArcAbs,
    1048             :   constructors::id::SVGPathSegArcAbs,
    1049             :   SVGPathSegBinding::sNativePropertyHooks,
    1050             :   &DefaultXrayExpandoObjectClass
    1051             : } };
    1052             : 
    1053             : void
    1054           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    1055             : {
    1056           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    1057           0 :   if (!parentProto) {
    1058           0 :     return;
    1059             :   }
    1060             : 
    1061           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    1062           0 :   if (!constructorProto) {
    1063           0 :     return;
    1064             :   }
    1065             : 
    1066             :   static bool sIdsInited = false;
    1067           0 :   if (!sIdsInited && NS_IsMainThread()) {
    1068           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    1069           0 :       return;
    1070             :     }
    1071           0 :     sIdsInited = true;
    1072             :   }
    1073             : 
    1074           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegArcAbs);
    1075           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegArcAbs);
    1076           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    1077             :                               &sPrototypeClass.mBase, protoCache,
    1078             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    1079             :                               interfaceCache,
    1080             :                               sNativeProperties.Upcast(),
    1081             :                               nullptr,
    1082             :                               "SVGPathSegArcAbs", aDefineOnGlobal,
    1083             :                               nullptr,
    1084           0 :                               false);
    1085             : }
    1086             : 
    1087             : JS::Handle<JSObject*>
    1088           0 : GetProtoObjectHandle(JSContext* aCx)
    1089             : {
    1090             :   /* Get the interface prototype object for this class.  This will create the
    1091             :      object as needed. */
    1092           0 :   bool aDefineOnGlobal = true;
    1093             : 
    1094             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    1095           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    1096           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    1097           0 :     return nullptr;
    1098             :   }
    1099             : 
    1100             :   /* Check to see whether the interface objects are already installed */
    1101           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    1102           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegArcAbs)) {
    1103           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    1104           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    1105             :   }
    1106             : 
    1107             :   /*
    1108             :    * The object might _still_ be null, but that's OK.
    1109             :    *
    1110             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    1111             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    1112             :    * changed after they have been set.
    1113             :    *
    1114             :    * Calling address() avoids the read read barrier that does gray
    1115             :    * unmarking, but it's not possible for the object to be gray here.
    1116             :    */
    1117             : 
    1118           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegArcAbs);
    1119           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    1120           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    1121             : }
    1122             : 
    1123             : JS::Handle<JSObject*>
    1124           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    1125             : {
    1126             :   /* Get the interface object for this class.  This will create the object as
    1127             :      needed. */
    1128             : 
    1129             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    1130           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    1131           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    1132           0 :     return nullptr;
    1133             :   }
    1134             : 
    1135             :   /* Check to see whether the interface objects are already installed */
    1136           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    1137           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegArcAbs)) {
    1138           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    1139           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    1140             :   }
    1141             : 
    1142             :   /*
    1143             :    * The object might _still_ be null, but that's OK.
    1144             :    *
    1145             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    1146             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    1147             :    * changed after they have been set.
    1148             :    *
    1149             :    * Calling address() avoids the read read barrier that does gray
    1150             :    * unmarking, but it's not possible for the object to be gray here.
    1151             :    */
    1152             : 
    1153           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegArcAbs);
    1154           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    1155           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    1156             : }
    1157             : 
    1158             : JSObject*
    1159           0 : GetConstructorObject(JSContext* aCx)
    1160             : {
    1161           0 :   return GetConstructorObjectHandle(aCx);
    1162             : }
    1163             : 
    1164             : } // namespace SVGPathSegArcAbsBinding
    1165             : 
    1166             : 
    1167             : 
    1168             : namespace SVGPathSegArcRelBinding {
    1169             : 
    1170             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    1171             :               "Can't inherit from an interface with a different ownership model.");
    1172             : 
    1173             : static bool
    1174           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcRel* self, JSJitGetterCallArgs args)
    1175             : {
    1176           0 :   float result(self->X());
    1177           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1178           0 :   args.rval().set(JS_NumberValue(double(result)));
    1179           0 :   return true;
    1180             : }
    1181             : 
    1182             : static bool
    1183           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcRel* self, JSJitSetterCallArgs args)
    1184             : {
    1185             :   float arg0;
    1186           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    1187           0 :     return false;
    1188           0 :   } else if (!mozilla::IsFinite(arg0)) {
    1189           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegArcRel.x");
    1190           0 :     return false;
    1191             :   }
    1192           0 :   binding_detail::FastErrorResult rv;
    1193           0 :   self->SetX(arg0, rv);
    1194           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    1195           0 :     return false;
    1196             :   }
    1197           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1198             : 
    1199           0 :   return true;
    1200             : }
    1201             : 
    1202             : static const JSJitInfo x_getterinfo = {
    1203             :   { (JSJitGetterOp)get_x },
    1204             :   { prototypes::id::SVGPathSegArcRel },
    1205             :   { PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth },
    1206             :   JSJitInfo::Getter,
    1207             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1208             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    1209             :   true,  /* isInfallible. False in setters. */
    1210             :   false,  /* isMovable.  Not relevant for setters. */
    1211             :   false, /* isEliminatable.  Not relevant for setters. */
    1212             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1213             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1214             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1215             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1216             : };
    1217             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1218             : static_assert(0 < 1, "There is no slot for us");
    1219             : static const JSJitInfo x_setterinfo = {
    1220             :   { (JSJitGetterOp)set_x },
    1221             :   { prototypes::id::SVGPathSegArcRel },
    1222             :   { PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth },
    1223             :   JSJitInfo::Setter,
    1224             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1225             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1226             :   false,  /* isInfallible. False in setters. */
    1227             :   false,  /* isMovable.  Not relevant for setters. */
    1228             :   false, /* isEliminatable.  Not relevant for setters. */
    1229             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1230             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1231             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1232             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1233             : };
    1234             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1235             : static_assert(0 < 1, "There is no slot for us");
    1236             : 
    1237             : static bool
    1238           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcRel* self, JSJitGetterCallArgs args)
    1239             : {
    1240           0 :   float result(self->Y());
    1241           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1242           0 :   args.rval().set(JS_NumberValue(double(result)));
    1243           0 :   return true;
    1244             : }
    1245             : 
    1246             : static bool
    1247           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcRel* self, JSJitSetterCallArgs args)
    1248             : {
    1249             :   float arg0;
    1250           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    1251           0 :     return false;
    1252           0 :   } else if (!mozilla::IsFinite(arg0)) {
    1253           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegArcRel.y");
    1254           0 :     return false;
    1255             :   }
    1256           0 :   binding_detail::FastErrorResult rv;
    1257           0 :   self->SetY(arg0, rv);
    1258           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    1259           0 :     return false;
    1260             :   }
    1261           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1262             : 
    1263           0 :   return true;
    1264             : }
    1265             : 
    1266             : static const JSJitInfo y_getterinfo = {
    1267             :   { (JSJitGetterOp)get_y },
    1268             :   { prototypes::id::SVGPathSegArcRel },
    1269             :   { PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth },
    1270             :   JSJitInfo::Getter,
    1271             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1272             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    1273             :   true,  /* isInfallible. False in setters. */
    1274             :   false,  /* isMovable.  Not relevant for setters. */
    1275             :   false, /* isEliminatable.  Not relevant for setters. */
    1276             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1277             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1278             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1279             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1280             : };
    1281             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1282             : static_assert(0 < 1, "There is no slot for us");
    1283             : static const JSJitInfo y_setterinfo = {
    1284             :   { (JSJitGetterOp)set_y },
    1285             :   { prototypes::id::SVGPathSegArcRel },
    1286             :   { PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth },
    1287             :   JSJitInfo::Setter,
    1288             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1289             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1290             :   false,  /* isInfallible. False in setters. */
    1291             :   false,  /* isMovable.  Not relevant for setters. */
    1292             :   false, /* isEliminatable.  Not relevant for setters. */
    1293             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1294             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1295             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1296             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1297             : };
    1298             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1299             : static_assert(0 < 1, "There is no slot for us");
    1300             : 
    1301             : static bool
    1302           0 : get_r1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcRel* self, JSJitGetterCallArgs args)
    1303             : {
    1304           0 :   float result(self->R1());
    1305           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1306           0 :   args.rval().set(JS_NumberValue(double(result)));
    1307           0 :   return true;
    1308             : }
    1309             : 
    1310             : static bool
    1311           0 : set_r1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcRel* self, JSJitSetterCallArgs args)
    1312             : {
    1313             :   float arg0;
    1314           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    1315           0 :     return false;
    1316           0 :   } else if (!mozilla::IsFinite(arg0)) {
    1317           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegArcRel.r1");
    1318           0 :     return false;
    1319             :   }
    1320           0 :   binding_detail::FastErrorResult rv;
    1321           0 :   self->SetR1(arg0, rv);
    1322           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    1323           0 :     return false;
    1324             :   }
    1325           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1326             : 
    1327           0 :   return true;
    1328             : }
    1329             : 
    1330             : static const JSJitInfo r1_getterinfo = {
    1331             :   { (JSJitGetterOp)get_r1 },
    1332             :   { prototypes::id::SVGPathSegArcRel },
    1333             :   { PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth },
    1334             :   JSJitInfo::Getter,
    1335             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1336             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    1337             :   true,  /* isInfallible. False in setters. */
    1338             :   false,  /* isMovable.  Not relevant for setters. */
    1339             :   false, /* isEliminatable.  Not relevant for setters. */
    1340             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1341             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1342             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1343             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1344             : };
    1345             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1346             : static_assert(0 < 1, "There is no slot for us");
    1347             : static const JSJitInfo r1_setterinfo = {
    1348             :   { (JSJitGetterOp)set_r1 },
    1349             :   { prototypes::id::SVGPathSegArcRel },
    1350             :   { PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth },
    1351             :   JSJitInfo::Setter,
    1352             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1353             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1354             :   false,  /* isInfallible. False in setters. */
    1355             :   false,  /* isMovable.  Not relevant for setters. */
    1356             :   false, /* isEliminatable.  Not relevant for setters. */
    1357             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1358             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1359             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1360             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1361             : };
    1362             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1363             : static_assert(0 < 1, "There is no slot for us");
    1364             : 
    1365             : static bool
    1366           0 : get_r2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcRel* self, JSJitGetterCallArgs args)
    1367             : {
    1368           0 :   float result(self->R2());
    1369           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1370           0 :   args.rval().set(JS_NumberValue(double(result)));
    1371           0 :   return true;
    1372             : }
    1373             : 
    1374             : static bool
    1375           0 : set_r2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcRel* self, JSJitSetterCallArgs args)
    1376             : {
    1377             :   float arg0;
    1378           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    1379           0 :     return false;
    1380           0 :   } else if (!mozilla::IsFinite(arg0)) {
    1381           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegArcRel.r2");
    1382           0 :     return false;
    1383             :   }
    1384           0 :   binding_detail::FastErrorResult rv;
    1385           0 :   self->SetR2(arg0, rv);
    1386           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    1387           0 :     return false;
    1388             :   }
    1389           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1390             : 
    1391           0 :   return true;
    1392             : }
    1393             : 
    1394             : static const JSJitInfo r2_getterinfo = {
    1395             :   { (JSJitGetterOp)get_r2 },
    1396             :   { prototypes::id::SVGPathSegArcRel },
    1397             :   { PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth },
    1398             :   JSJitInfo::Getter,
    1399             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1400             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    1401             :   true,  /* isInfallible. False in setters. */
    1402             :   false,  /* isMovable.  Not relevant for setters. */
    1403             :   false, /* isEliminatable.  Not relevant for setters. */
    1404             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1405             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1406             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1407             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1408             : };
    1409             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1410             : static_assert(0 < 1, "There is no slot for us");
    1411             : static const JSJitInfo r2_setterinfo = {
    1412             :   { (JSJitGetterOp)set_r2 },
    1413             :   { prototypes::id::SVGPathSegArcRel },
    1414             :   { PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth },
    1415             :   JSJitInfo::Setter,
    1416             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1417             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1418             :   false,  /* isInfallible. False in setters. */
    1419             :   false,  /* isMovable.  Not relevant for setters. */
    1420             :   false, /* isEliminatable.  Not relevant for setters. */
    1421             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1422             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1423             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1424             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1425             : };
    1426             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1427             : static_assert(0 < 1, "There is no slot for us");
    1428             : 
    1429             : static bool
    1430           0 : get_angle(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcRel* self, JSJitGetterCallArgs args)
    1431             : {
    1432           0 :   float result(self->Angle());
    1433           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1434           0 :   args.rval().set(JS_NumberValue(double(result)));
    1435           0 :   return true;
    1436             : }
    1437             : 
    1438             : static bool
    1439           0 : set_angle(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcRel* self, JSJitSetterCallArgs args)
    1440             : {
    1441             :   float arg0;
    1442           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    1443           0 :     return false;
    1444           0 :   } else if (!mozilla::IsFinite(arg0)) {
    1445           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegArcRel.angle");
    1446           0 :     return false;
    1447             :   }
    1448           0 :   binding_detail::FastErrorResult rv;
    1449           0 :   self->SetAngle(arg0, rv);
    1450           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    1451           0 :     return false;
    1452             :   }
    1453           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1454             : 
    1455           0 :   return true;
    1456             : }
    1457             : 
    1458             : static const JSJitInfo angle_getterinfo = {
    1459             :   { (JSJitGetterOp)get_angle },
    1460             :   { prototypes::id::SVGPathSegArcRel },
    1461             :   { PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth },
    1462             :   JSJitInfo::Getter,
    1463             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1464             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    1465             :   true,  /* isInfallible. False in setters. */
    1466             :   false,  /* isMovable.  Not relevant for setters. */
    1467             :   false, /* isEliminatable.  Not relevant for setters. */
    1468             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1469             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1470             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1471             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1472             : };
    1473             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1474             : static_assert(0 < 1, "There is no slot for us");
    1475             : static const JSJitInfo angle_setterinfo = {
    1476             :   { (JSJitGetterOp)set_angle },
    1477             :   { prototypes::id::SVGPathSegArcRel },
    1478             :   { PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth },
    1479             :   JSJitInfo::Setter,
    1480             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1481             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1482             :   false,  /* isInfallible. False in setters. */
    1483             :   false,  /* isMovable.  Not relevant for setters. */
    1484             :   false, /* isEliminatable.  Not relevant for setters. */
    1485             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1486             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1487             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1488             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1489             : };
    1490             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1491             : static_assert(0 < 1, "There is no slot for us");
    1492             : 
    1493             : static bool
    1494           0 : get_largeArcFlag(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcRel* self, JSJitGetterCallArgs args)
    1495             : {
    1496           0 :   bool result(self->LargeArcFlag());
    1497           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1498           0 :   args.rval().setBoolean(result);
    1499           0 :   return true;
    1500             : }
    1501             : 
    1502             : static bool
    1503           0 : set_largeArcFlag(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcRel* self, JSJitSetterCallArgs args)
    1504             : {
    1505             :   bool arg0;
    1506           0 :   if (!ValueToPrimitive<bool, eDefault>(cx, args[0], &arg0)) {
    1507           0 :     return false;
    1508             :   }
    1509           0 :   binding_detail::FastErrorResult rv;
    1510           0 :   self->SetLargeArcFlag(arg0, rv);
    1511           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    1512           0 :     return false;
    1513             :   }
    1514           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1515             : 
    1516           0 :   return true;
    1517             : }
    1518             : 
    1519             : static const JSJitInfo largeArcFlag_getterinfo = {
    1520             :   { (JSJitGetterOp)get_largeArcFlag },
    1521             :   { prototypes::id::SVGPathSegArcRel },
    1522             :   { PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth },
    1523             :   JSJitInfo::Getter,
    1524             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1525             :   JSVAL_TYPE_BOOLEAN,  /* returnType.  Not relevant for setters. */
    1526             :   true,  /* isInfallible. False in setters. */
    1527             :   false,  /* isMovable.  Not relevant for setters. */
    1528             :   false, /* isEliminatable.  Not relevant for setters. */
    1529             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1530             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1531             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1532             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1533             : };
    1534             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1535             : static_assert(0 < 1, "There is no slot for us");
    1536             : static const JSJitInfo largeArcFlag_setterinfo = {
    1537             :   { (JSJitGetterOp)set_largeArcFlag },
    1538             :   { prototypes::id::SVGPathSegArcRel },
    1539             :   { PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth },
    1540             :   JSJitInfo::Setter,
    1541             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1542             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1543             :   false,  /* isInfallible. False in setters. */
    1544             :   false,  /* isMovable.  Not relevant for setters. */
    1545             :   false, /* isEliminatable.  Not relevant for setters. */
    1546             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1547             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1548             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1549             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1550             : };
    1551             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1552             : static_assert(0 < 1, "There is no slot for us");
    1553             : 
    1554             : static bool
    1555           0 : get_sweepFlag(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcRel* self, JSJitGetterCallArgs args)
    1556             : {
    1557           0 :   bool result(self->SweepFlag());
    1558           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1559           0 :   args.rval().setBoolean(result);
    1560           0 :   return true;
    1561             : }
    1562             : 
    1563             : static bool
    1564           0 : set_sweepFlag(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegArcRel* self, JSJitSetterCallArgs args)
    1565             : {
    1566             :   bool arg0;
    1567           0 :   if (!ValueToPrimitive<bool, eDefault>(cx, args[0], &arg0)) {
    1568           0 :     return false;
    1569             :   }
    1570           0 :   binding_detail::FastErrorResult rv;
    1571           0 :   self->SetSweepFlag(arg0, rv);
    1572           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    1573           0 :     return false;
    1574             :   }
    1575           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1576             : 
    1577           0 :   return true;
    1578             : }
    1579             : 
    1580             : static const JSJitInfo sweepFlag_getterinfo = {
    1581             :   { (JSJitGetterOp)get_sweepFlag },
    1582             :   { prototypes::id::SVGPathSegArcRel },
    1583             :   { PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth },
    1584             :   JSJitInfo::Getter,
    1585             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1586             :   JSVAL_TYPE_BOOLEAN,  /* returnType.  Not relevant for setters. */
    1587             :   true,  /* isInfallible. False in setters. */
    1588             :   false,  /* isMovable.  Not relevant for setters. */
    1589             :   false, /* isEliminatable.  Not relevant for setters. */
    1590             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1591             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1592             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1593             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1594             : };
    1595             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1596             : static_assert(0 < 1, "There is no slot for us");
    1597             : static const JSJitInfo sweepFlag_setterinfo = {
    1598             :   { (JSJitGetterOp)set_sweepFlag },
    1599             :   { prototypes::id::SVGPathSegArcRel },
    1600             :   { PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth },
    1601             :   JSJitInfo::Setter,
    1602             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1603             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1604             :   false,  /* isInfallible. False in setters. */
    1605             :   false,  /* isMovable.  Not relevant for setters. */
    1606             :   false, /* isEliminatable.  Not relevant for setters. */
    1607             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1608             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1609             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1610             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1611             : };
    1612             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1613             : static_assert(0 < 1, "There is no slot for us");
    1614             : 
    1615             : static bool
    1616           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    1617             : {
    1618           0 :   mozilla::DOMSVGPathSegArcRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegArcRel>(obj);
    1619             :   // We don't want to preserve if we don't have a wrapper, and we
    1620             :   // obviously can't preserve if we're not initialized.
    1621           0 :   if (self && self->GetWrapperPreserveColor()) {
    1622           0 :     PreserveWrapper(self);
    1623             :   }
    1624           0 :   return true;
    1625             : }
    1626             : 
    1627             : static void
    1628           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    1629             : {
    1630           0 :   mozilla::DOMSVGPathSegArcRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegArcRel>(obj);
    1631           0 :   if (self) {
    1632           0 :     ClearWrapper(self, self, obj);
    1633           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegArcRel>(self);
    1634             :   }
    1635           0 : }
    1636             : 
    1637             : static void
    1638           0 : _objectMoved(JSObject* obj, const JSObject* old)
    1639             : {
    1640           0 :   mozilla::DOMSVGPathSegArcRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegArcRel>(obj);
    1641           0 :   if (self) {
    1642           0 :     UpdateWrapper(self, self, obj, old);
    1643             :   }
    1644           0 : }
    1645             : 
    1646             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    1647             : #if defined(__clang__)
    1648             : #pragma clang diagnostic push
    1649             : #pragma clang diagnostic ignored "-Wmissing-braces"
    1650             : #endif
    1651             : static const JSPropertySpec sAttributes_specs[] = {
    1652             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
    1653             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
    1654             :   { "r1", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &r1_getterinfo, GenericBindingSetter, &r1_setterinfo },
    1655             :   { "r2", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &r2_getterinfo, GenericBindingSetter, &r2_setterinfo },
    1656             :   { "angle", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &angle_getterinfo, GenericBindingSetter, &angle_setterinfo },
    1657             :   { "largeArcFlag", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &largeArcFlag_getterinfo, GenericBindingSetter, &largeArcFlag_setterinfo },
    1658             :   { "sweepFlag", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &sweepFlag_getterinfo, GenericBindingSetter, &sweepFlag_setterinfo },
    1659             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    1660             : };
    1661             : #if defined(__clang__)
    1662             : #pragma clang diagnostic pop
    1663             : #endif
    1664             : 
    1665             : 
    1666             : // Can't be const because the pref-enabled boolean needs to be writable
    1667             : static Prefable<const JSPropertySpec> sAttributes[] = {
    1668             :   { nullptr, &sAttributes_specs[0] },
    1669             :   { nullptr, nullptr }
    1670             : };
    1671             : 
    1672             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    1673             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    1674             : static_assert(7 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    1675             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    1676             : 
    1677             : 
    1678             : static uint16_t sNativeProperties_sortedPropertyIndices[7];
    1679             : static PropertyInfo sNativeProperties_propertyInfos[7];
    1680             : 
    1681             : static const NativePropertiesN<1> sNativeProperties = {
    1682             :   false, 0,
    1683             :   false, 0,
    1684             :   false, 0,
    1685             :   true,  0 /* sAttributes */,
    1686             :   false, 0,
    1687             :   false, 0,
    1688             :   false, 0,
    1689             :   -1,
    1690             :   7,
    1691             :   sNativeProperties_sortedPropertyIndices,
    1692             :   {
    1693             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    1694             :   }
    1695             : };
    1696             : static_assert(7 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    1697             :     "We have a property info count that is oversized");
    1698             : 
    1699             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    1700             :   {
    1701             :     "Function",
    1702             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    1703             :     &sBoringInterfaceObjectClassClassOps,
    1704             :     JS_NULL_CLASS_SPEC,
    1705             :     JS_NULL_CLASS_EXT,
    1706             :     &sInterfaceObjectClassObjectOps
    1707             :   },
    1708             :   eInterface,
    1709             :   true,
    1710             :   prototypes::id::SVGPathSegArcRel,
    1711             :   PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth,
    1712             :   sNativePropertyHooks,
    1713             :   "function SVGPathSegArcRel() {\n    [native code]\n}",
    1714             :   SVGPathSegBinding::GetConstructorObject
    1715             : };
    1716             : 
    1717             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    1718             :   {
    1719             :     "SVGPathSegArcRelPrototype",
    1720             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    1721             :     JS_NULL_CLASS_OPS,
    1722             :     JS_NULL_CLASS_SPEC,
    1723             :     JS_NULL_CLASS_EXT,
    1724             :     JS_NULL_OBJECT_OPS
    1725             :   },
    1726             :   eInterfacePrototype,
    1727             :   false,
    1728             :   prototypes::id::SVGPathSegArcRel,
    1729             :   PrototypeTraits<prototypes::id::SVGPathSegArcRel>::Depth,
    1730             :   sNativePropertyHooks,
    1731             :   "[object SVGPathSegArcRelPrototype]",
    1732             :   SVGPathSegBinding::GetProtoObject
    1733             : };
    1734             : 
    1735             : JSObject*
    1736           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    1737             : {
    1738           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    1739             : }
    1740             : 
    1741             : static const js::ClassOps sClassOps = {
    1742             :   _addProperty, /* addProperty */
    1743             :   nullptr,               /* delProperty */
    1744             :   nullptr,               /* getProperty */
    1745             :   nullptr,               /* setProperty */
    1746             :   nullptr,               /* enumerate */
    1747             :   nullptr, /* newEnumerate */
    1748             :   nullptr, /* resolve */
    1749             :   nullptr, /* mayResolve */
    1750             :   _finalize, /* finalize */
    1751             :   nullptr, /* call */
    1752             :   nullptr,               /* hasInstance */
    1753             :   nullptr,               /* construct */
    1754             :   nullptr, /* trace */
    1755             : };
    1756             : 
    1757             : static const js::ClassExtension sClassExtension = {
    1758             :   nullptr, /* weakmapKeyDelegateOp */
    1759             :   _objectMoved /* objectMovedOp */
    1760             : };
    1761             : 
    1762             : static const DOMJSClass sClass = {
    1763             :   { "SVGPathSegArcRel",
    1764             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    1765             :     &sClassOps,
    1766             :     JS_NULL_CLASS_SPEC,
    1767             :     &sClassExtension,
    1768             :     JS_NULL_OBJECT_OPS
    1769             :   },
    1770             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegArcRel, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    1771             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegArcRel >::value,
    1772             :   sNativePropertyHooks,
    1773             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegArcRel>::Get,
    1774             :   GetProtoObjectHandle,
    1775             :   GetCCParticipant<mozilla::DOMSVGPathSegArcRel>::Get()
    1776             : };
    1777             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    1778             :               "Must have the right minimal number of reserved slots.");
    1779             : static_assert(1 >= 1,
    1780             :               "Must have enough reserved slots.");
    1781             : 
    1782             : const JSClass*
    1783           0 : GetJSClass()
    1784             : {
    1785           0 :   return sClass.ToJSClass();
    1786             : }
    1787             : 
    1788             : bool
    1789           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegArcRel* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    1790             : {
    1791             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegArcRel*>(aObject) ==
    1792             :              reinterpret_cast<mozilla::DOMSVGPathSegArcRel*>(aObject),
    1793             :              "Multiple inheritance for mozilla::DOMSVGPathSegArcRel is broken.");
    1794             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    1795             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    1796             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    1797           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    1798           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    1799           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    1800             :              "You should probably not be using Wrap() directly; use "
    1801             :              "GetOrCreateDOMReflector instead");
    1802             : 
    1803           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    1804             :              "nsISupports must be on our primary inheritance chain");
    1805             : 
    1806           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    1807           0 :   if (!global) {
    1808           0 :     return false;
    1809             :   }
    1810           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    1811           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    1812             : 
    1813             :   // That might have ended up wrapping us already, due to the wonders
    1814             :   // of XBL.  Check for that, and bail out as needed.
    1815           0 :   aReflector.set(aCache->GetWrapper());
    1816           0 :   if (aReflector) {
    1817             : #ifdef DEBUG
    1818           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    1819             : #endif // DEBUG
    1820           0 :     return true;
    1821             :   }
    1822             : 
    1823           0 :   JSAutoCompartment ac(aCx, global);
    1824           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    1825           0 :   if (!canonicalProto) {
    1826           0 :     return false;
    1827             :   }
    1828           0 :   JS::Rooted<JSObject*> proto(aCx);
    1829           0 :   if (aGivenProto) {
    1830           0 :     proto = aGivenProto;
    1831             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    1832             :     // coming in, we changed compartments to that of "parent" so may need
    1833             :     // to wrap the proto here.
    1834           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    1835           0 :       if (!JS_WrapObject(aCx, &proto)) {
    1836           0 :         return false;
    1837             :       }
    1838             :     }
    1839             :   } else {
    1840           0 :     proto = canonicalProto;
    1841             :   }
    1842             : 
    1843           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegArcRel> creator(aCx);
    1844           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    1845           0 :   if (!aReflector) {
    1846           0 :     return false;
    1847             :   }
    1848             : 
    1849           0 :   aCache->SetWrapper(aReflector);
    1850           0 :   creator.InitializationSucceeded();
    1851             : 
    1852           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    1853             :              aCache->GetWrapperPreserveColor() == aReflector);
    1854             :   // If proto != canonicalProto, we have to preserve our wrapper;
    1855             :   // otherwise we won't be able to properly recreate it later, since
    1856             :   // we won't know what proto to use.  Note that we don't check
    1857             :   // aGivenProto here, since it's entirely possible (and even
    1858             :   // somewhat common) to have a non-null aGivenProto which is the
    1859             :   // same as canonicalProto.
    1860           0 :   if (proto != canonicalProto) {
    1861           0 :     PreserveWrapper(aObject);
    1862             :   }
    1863             : 
    1864           0 :   return true;
    1865             : }
    1866             : 
    1867             : const NativePropertyHooks sNativePropertyHooks[] = { {
    1868             :   nullptr,
    1869             :   nullptr,
    1870             :   nullptr,
    1871             :   { sNativeProperties.Upcast(), nullptr },
    1872             :   prototypes::id::SVGPathSegArcRel,
    1873             :   constructors::id::SVGPathSegArcRel,
    1874             :   SVGPathSegBinding::sNativePropertyHooks,
    1875             :   &DefaultXrayExpandoObjectClass
    1876             : } };
    1877             : 
    1878             : void
    1879           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    1880             : {
    1881           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    1882           0 :   if (!parentProto) {
    1883           0 :     return;
    1884             :   }
    1885             : 
    1886           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    1887           0 :   if (!constructorProto) {
    1888           0 :     return;
    1889             :   }
    1890             : 
    1891             :   static bool sIdsInited = false;
    1892           0 :   if (!sIdsInited && NS_IsMainThread()) {
    1893           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    1894           0 :       return;
    1895             :     }
    1896           0 :     sIdsInited = true;
    1897             :   }
    1898             : 
    1899           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegArcRel);
    1900           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegArcRel);
    1901           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    1902             :                               &sPrototypeClass.mBase, protoCache,
    1903             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    1904             :                               interfaceCache,
    1905             :                               sNativeProperties.Upcast(),
    1906             :                               nullptr,
    1907             :                               "SVGPathSegArcRel", aDefineOnGlobal,
    1908             :                               nullptr,
    1909           0 :                               false);
    1910             : }
    1911             : 
    1912             : JS::Handle<JSObject*>
    1913           0 : GetProtoObjectHandle(JSContext* aCx)
    1914             : {
    1915             :   /* Get the interface prototype object for this class.  This will create the
    1916             :      object as needed. */
    1917           0 :   bool aDefineOnGlobal = true;
    1918             : 
    1919             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    1920           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    1921           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    1922           0 :     return nullptr;
    1923             :   }
    1924             : 
    1925             :   /* Check to see whether the interface objects are already installed */
    1926           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    1927           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegArcRel)) {
    1928           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    1929           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    1930             :   }
    1931             : 
    1932             :   /*
    1933             :    * The object might _still_ be null, but that's OK.
    1934             :    *
    1935             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    1936             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    1937             :    * changed after they have been set.
    1938             :    *
    1939             :    * Calling address() avoids the read read barrier that does gray
    1940             :    * unmarking, but it's not possible for the object to be gray here.
    1941             :    */
    1942             : 
    1943           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegArcRel);
    1944           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    1945           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    1946             : }
    1947             : 
    1948             : JS::Handle<JSObject*>
    1949           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    1950             : {
    1951             :   /* Get the interface object for this class.  This will create the object as
    1952             :      needed. */
    1953             : 
    1954             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    1955           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    1956           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    1957           0 :     return nullptr;
    1958             :   }
    1959             : 
    1960             :   /* Check to see whether the interface objects are already installed */
    1961           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    1962           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegArcRel)) {
    1963           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    1964           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    1965             :   }
    1966             : 
    1967             :   /*
    1968             :    * The object might _still_ be null, but that's OK.
    1969             :    *
    1970             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    1971             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    1972             :    * changed after they have been set.
    1973             :    *
    1974             :    * Calling address() avoids the read read barrier that does gray
    1975             :    * unmarking, but it's not possible for the object to be gray here.
    1976             :    */
    1977             : 
    1978           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegArcRel);
    1979           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    1980           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    1981             : }
    1982             : 
    1983             : JSObject*
    1984           0 : GetConstructorObject(JSContext* aCx)
    1985             : {
    1986           0 :   return GetConstructorObjectHandle(aCx);
    1987             : }
    1988             : 
    1989             : } // namespace SVGPathSegArcRelBinding
    1990             : 
    1991             : 
    1992             : 
    1993             : namespace SVGPathSegClosePathBinding {
    1994             : 
    1995             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    1996             :               "Can't inherit from an interface with a different ownership model.");
    1997             : 
    1998             : static bool
    1999           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    2000             : {
    2001           0 :   mozilla::DOMSVGPathSegClosePath* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegClosePath>(obj);
    2002             :   // We don't want to preserve if we don't have a wrapper, and we
    2003             :   // obviously can't preserve if we're not initialized.
    2004           0 :   if (self && self->GetWrapperPreserveColor()) {
    2005           0 :     PreserveWrapper(self);
    2006             :   }
    2007           0 :   return true;
    2008             : }
    2009             : 
    2010             : static void
    2011           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    2012             : {
    2013           0 :   mozilla::DOMSVGPathSegClosePath* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegClosePath>(obj);
    2014           0 :   if (self) {
    2015           0 :     ClearWrapper(self, self, obj);
    2016           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegClosePath>(self);
    2017             :   }
    2018           0 : }
    2019             : 
    2020             : static void
    2021           0 : _objectMoved(JSObject* obj, const JSObject* old)
    2022             : {
    2023           0 :   mozilla::DOMSVGPathSegClosePath* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegClosePath>(obj);
    2024           0 :   if (self) {
    2025           0 :     UpdateWrapper(self, self, obj, old);
    2026             :   }
    2027           0 : }
    2028             : 
    2029             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    2030             :   {
    2031             :     "Function",
    2032             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    2033             :     &sBoringInterfaceObjectClassClassOps,
    2034             :     JS_NULL_CLASS_SPEC,
    2035             :     JS_NULL_CLASS_EXT,
    2036             :     &sInterfaceObjectClassObjectOps
    2037             :   },
    2038             :   eInterface,
    2039             :   true,
    2040             :   prototypes::id::SVGPathSegClosePath,
    2041             :   PrototypeTraits<prototypes::id::SVGPathSegClosePath>::Depth,
    2042             :   sNativePropertyHooks,
    2043             :   "function SVGPathSegClosePath() {\n    [native code]\n}",
    2044             :   SVGPathSegBinding::GetConstructorObject
    2045             : };
    2046             : 
    2047             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    2048             :   {
    2049             :     "SVGPathSegClosePathPrototype",
    2050             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    2051             :     JS_NULL_CLASS_OPS,
    2052             :     JS_NULL_CLASS_SPEC,
    2053             :     JS_NULL_CLASS_EXT,
    2054             :     JS_NULL_OBJECT_OPS
    2055             :   },
    2056             :   eInterfacePrototype,
    2057             :   false,
    2058             :   prototypes::id::SVGPathSegClosePath,
    2059             :   PrototypeTraits<prototypes::id::SVGPathSegClosePath>::Depth,
    2060             :   sNativePropertyHooks,
    2061             :   "[object SVGPathSegClosePathPrototype]",
    2062             :   SVGPathSegBinding::GetProtoObject
    2063             : };
    2064             : 
    2065             : JSObject*
    2066           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    2067             : {
    2068           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    2069             : }
    2070             : 
    2071             : static const js::ClassOps sClassOps = {
    2072             :   _addProperty, /* addProperty */
    2073             :   nullptr,               /* delProperty */
    2074             :   nullptr,               /* getProperty */
    2075             :   nullptr,               /* setProperty */
    2076             :   nullptr,               /* enumerate */
    2077             :   nullptr, /* newEnumerate */
    2078             :   nullptr, /* resolve */
    2079             :   nullptr, /* mayResolve */
    2080             :   _finalize, /* finalize */
    2081             :   nullptr, /* call */
    2082             :   nullptr,               /* hasInstance */
    2083             :   nullptr,               /* construct */
    2084             :   nullptr, /* trace */
    2085             : };
    2086             : 
    2087             : static const js::ClassExtension sClassExtension = {
    2088             :   nullptr, /* weakmapKeyDelegateOp */
    2089             :   _objectMoved /* objectMovedOp */
    2090             : };
    2091             : 
    2092             : static const DOMJSClass sClass = {
    2093             :   { "SVGPathSegClosePath",
    2094             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    2095             :     &sClassOps,
    2096             :     JS_NULL_CLASS_SPEC,
    2097             :     &sClassExtension,
    2098             :     JS_NULL_OBJECT_OPS
    2099             :   },
    2100             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegClosePath, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    2101             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegClosePath >::value,
    2102             :   sNativePropertyHooks,
    2103             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegClosePath>::Get,
    2104             :   GetProtoObjectHandle,
    2105             :   GetCCParticipant<mozilla::DOMSVGPathSegClosePath>::Get()
    2106             : };
    2107             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    2108             :               "Must have the right minimal number of reserved slots.");
    2109             : static_assert(1 >= 1,
    2110             :               "Must have enough reserved slots.");
    2111             : 
    2112             : const JSClass*
    2113           0 : GetJSClass()
    2114             : {
    2115           0 :   return sClass.ToJSClass();
    2116             : }
    2117             : 
    2118             : bool
    2119           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegClosePath* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    2120             : {
    2121             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegClosePath*>(aObject) ==
    2122             :              reinterpret_cast<mozilla::DOMSVGPathSegClosePath*>(aObject),
    2123             :              "Multiple inheritance for mozilla::DOMSVGPathSegClosePath is broken.");
    2124             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    2125             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    2126             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    2127           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    2128           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    2129           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    2130             :              "You should probably not be using Wrap() directly; use "
    2131             :              "GetOrCreateDOMReflector instead");
    2132             : 
    2133           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    2134             :              "nsISupports must be on our primary inheritance chain");
    2135             : 
    2136           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    2137           0 :   if (!global) {
    2138           0 :     return false;
    2139             :   }
    2140           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    2141           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    2142             : 
    2143             :   // That might have ended up wrapping us already, due to the wonders
    2144             :   // of XBL.  Check for that, and bail out as needed.
    2145           0 :   aReflector.set(aCache->GetWrapper());
    2146           0 :   if (aReflector) {
    2147             : #ifdef DEBUG
    2148           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    2149             : #endif // DEBUG
    2150           0 :     return true;
    2151             :   }
    2152             : 
    2153           0 :   JSAutoCompartment ac(aCx, global);
    2154           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    2155           0 :   if (!canonicalProto) {
    2156           0 :     return false;
    2157             :   }
    2158           0 :   JS::Rooted<JSObject*> proto(aCx);
    2159           0 :   if (aGivenProto) {
    2160           0 :     proto = aGivenProto;
    2161             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    2162             :     // coming in, we changed compartments to that of "parent" so may need
    2163             :     // to wrap the proto here.
    2164           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    2165           0 :       if (!JS_WrapObject(aCx, &proto)) {
    2166           0 :         return false;
    2167             :       }
    2168             :     }
    2169             :   } else {
    2170           0 :     proto = canonicalProto;
    2171             :   }
    2172             : 
    2173           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegClosePath> creator(aCx);
    2174           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    2175           0 :   if (!aReflector) {
    2176           0 :     return false;
    2177             :   }
    2178             : 
    2179           0 :   aCache->SetWrapper(aReflector);
    2180           0 :   creator.InitializationSucceeded();
    2181             : 
    2182           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    2183             :              aCache->GetWrapperPreserveColor() == aReflector);
    2184             :   // If proto != canonicalProto, we have to preserve our wrapper;
    2185             :   // otherwise we won't be able to properly recreate it later, since
    2186             :   // we won't know what proto to use.  Note that we don't check
    2187             :   // aGivenProto here, since it's entirely possible (and even
    2188             :   // somewhat common) to have a non-null aGivenProto which is the
    2189             :   // same as canonicalProto.
    2190           0 :   if (proto != canonicalProto) {
    2191           0 :     PreserveWrapper(aObject);
    2192             :   }
    2193             : 
    2194           0 :   return true;
    2195             : }
    2196             : 
    2197             : const NativePropertyHooks sNativePropertyHooks[] = { {
    2198             :   nullptr,
    2199             :   nullptr,
    2200             :   nullptr,
    2201             :   { nullptr, nullptr },
    2202             :   prototypes::id::SVGPathSegClosePath,
    2203             :   constructors::id::SVGPathSegClosePath,
    2204             :   SVGPathSegBinding::sNativePropertyHooks,
    2205             :   &DefaultXrayExpandoObjectClass
    2206             : } };
    2207             : 
    2208             : void
    2209           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    2210             : {
    2211           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    2212           0 :   if (!parentProto) {
    2213           0 :     return;
    2214             :   }
    2215             : 
    2216           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    2217           0 :   if (!constructorProto) {
    2218           0 :     return;
    2219             :   }
    2220             : 
    2221           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegClosePath);
    2222           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegClosePath);
    2223           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    2224             :                               &sPrototypeClass.mBase, protoCache,
    2225             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    2226             :                               interfaceCache,
    2227             :                               nullptr,
    2228             :                               nullptr,
    2229             :                               "SVGPathSegClosePath", aDefineOnGlobal,
    2230             :                               nullptr,
    2231           0 :                               false);
    2232             : }
    2233             : 
    2234             : JS::Handle<JSObject*>
    2235           0 : GetProtoObjectHandle(JSContext* aCx)
    2236             : {
    2237             :   /* Get the interface prototype object for this class.  This will create the
    2238             :      object as needed. */
    2239           0 :   bool aDefineOnGlobal = true;
    2240             : 
    2241             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    2242           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    2243           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    2244           0 :     return nullptr;
    2245             :   }
    2246             : 
    2247             :   /* Check to see whether the interface objects are already installed */
    2248           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    2249           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegClosePath)) {
    2250           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    2251           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    2252             :   }
    2253             : 
    2254             :   /*
    2255             :    * The object might _still_ be null, but that's OK.
    2256             :    *
    2257             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    2258             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    2259             :    * changed after they have been set.
    2260             :    *
    2261             :    * Calling address() avoids the read read barrier that does gray
    2262             :    * unmarking, but it's not possible for the object to be gray here.
    2263             :    */
    2264             : 
    2265           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegClosePath);
    2266           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    2267           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    2268             : }
    2269             : 
    2270             : JS::Handle<JSObject*>
    2271           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    2272             : {
    2273             :   /* Get the interface object for this class.  This will create the object as
    2274             :      needed. */
    2275             : 
    2276             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    2277           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    2278           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    2279           0 :     return nullptr;
    2280             :   }
    2281             : 
    2282             :   /* Check to see whether the interface objects are already installed */
    2283           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    2284           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegClosePath)) {
    2285           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    2286           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    2287             :   }
    2288             : 
    2289             :   /*
    2290             :    * The object might _still_ be null, but that's OK.
    2291             :    *
    2292             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    2293             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    2294             :    * changed after they have been set.
    2295             :    *
    2296             :    * Calling address() avoids the read read barrier that does gray
    2297             :    * unmarking, but it's not possible for the object to be gray here.
    2298             :    */
    2299             : 
    2300           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegClosePath);
    2301           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    2302           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    2303             : }
    2304             : 
    2305             : JSObject*
    2306           0 : GetConstructorObject(JSContext* aCx)
    2307             : {
    2308           0 :   return GetConstructorObjectHandle(aCx);
    2309             : }
    2310             : 
    2311             : } // namespace SVGPathSegClosePathBinding
    2312             : 
    2313             : 
    2314             : 
    2315             : namespace SVGPathSegCurvetoCubicAbsBinding {
    2316             : 
    2317             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    2318             :               "Can't inherit from an interface with a different ownership model.");
    2319             : 
    2320             : static bool
    2321           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicAbs* self, JSJitGetterCallArgs args)
    2322             : {
    2323           0 :   float result(self->X());
    2324           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    2325           0 :   args.rval().set(JS_NumberValue(double(result)));
    2326           0 :   return true;
    2327             : }
    2328             : 
    2329             : static bool
    2330           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicAbs* self, JSJitSetterCallArgs args)
    2331             : {
    2332             :   float arg0;
    2333           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    2334           0 :     return false;
    2335           0 :   } else if (!mozilla::IsFinite(arg0)) {
    2336           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicAbs.x");
    2337           0 :     return false;
    2338             :   }
    2339           0 :   binding_detail::FastErrorResult rv;
    2340           0 :   self->SetX(arg0, rv);
    2341           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    2342           0 :     return false;
    2343             :   }
    2344           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    2345             : 
    2346           0 :   return true;
    2347             : }
    2348             : 
    2349             : static const JSJitInfo x_getterinfo = {
    2350             :   { (JSJitGetterOp)get_x },
    2351             :   { prototypes::id::SVGPathSegCurvetoCubicAbs },
    2352             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicAbs>::Depth },
    2353             :   JSJitInfo::Getter,
    2354             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    2355             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    2356             :   true,  /* isInfallible. False in setters. */
    2357             :   false,  /* isMovable.  Not relevant for setters. */
    2358             :   false, /* isEliminatable.  Not relevant for setters. */
    2359             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    2360             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    2361             :   false,  /* isTypedMethod.  Only relevant for methods. */
    2362             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    2363             : };
    2364             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    2365             : static_assert(0 < 1, "There is no slot for us");
    2366             : static const JSJitInfo x_setterinfo = {
    2367             :   { (JSJitGetterOp)set_x },
    2368             :   { prototypes::id::SVGPathSegCurvetoCubicAbs },
    2369             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicAbs>::Depth },
    2370             :   JSJitInfo::Setter,
    2371             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    2372             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    2373             :   false,  /* isInfallible. False in setters. */
    2374             :   false,  /* isMovable.  Not relevant for setters. */
    2375             :   false, /* isEliminatable.  Not relevant for setters. */
    2376             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    2377             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    2378             :   false,  /* isTypedMethod.  Only relevant for methods. */
    2379             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    2380             : };
    2381             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    2382             : static_assert(0 < 1, "There is no slot for us");
    2383             : 
    2384             : static bool
    2385           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicAbs* self, JSJitGetterCallArgs args)
    2386             : {
    2387           0 :   float result(self->Y());
    2388           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    2389           0 :   args.rval().set(JS_NumberValue(double(result)));
    2390           0 :   return true;
    2391             : }
    2392             : 
    2393             : static bool
    2394           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicAbs* self, JSJitSetterCallArgs args)
    2395             : {
    2396             :   float arg0;
    2397           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    2398           0 :     return false;
    2399           0 :   } else if (!mozilla::IsFinite(arg0)) {
    2400           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicAbs.y");
    2401           0 :     return false;
    2402             :   }
    2403           0 :   binding_detail::FastErrorResult rv;
    2404           0 :   self->SetY(arg0, rv);
    2405           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    2406           0 :     return false;
    2407             :   }
    2408           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    2409             : 
    2410           0 :   return true;
    2411             : }
    2412             : 
    2413             : static const JSJitInfo y_getterinfo = {
    2414             :   { (JSJitGetterOp)get_y },
    2415             :   { prototypes::id::SVGPathSegCurvetoCubicAbs },
    2416             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicAbs>::Depth },
    2417             :   JSJitInfo::Getter,
    2418             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    2419             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    2420             :   true,  /* isInfallible. False in setters. */
    2421             :   false,  /* isMovable.  Not relevant for setters. */
    2422             :   false, /* isEliminatable.  Not relevant for setters. */
    2423             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    2424             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    2425             :   false,  /* isTypedMethod.  Only relevant for methods. */
    2426             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    2427             : };
    2428             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    2429             : static_assert(0 < 1, "There is no slot for us");
    2430             : static const JSJitInfo y_setterinfo = {
    2431             :   { (JSJitGetterOp)set_y },
    2432             :   { prototypes::id::SVGPathSegCurvetoCubicAbs },
    2433             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicAbs>::Depth },
    2434             :   JSJitInfo::Setter,
    2435             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    2436             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    2437             :   false,  /* isInfallible. False in setters. */
    2438             :   false,  /* isMovable.  Not relevant for setters. */
    2439             :   false, /* isEliminatable.  Not relevant for setters. */
    2440             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    2441             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    2442             :   false,  /* isTypedMethod.  Only relevant for methods. */
    2443             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    2444             : };
    2445             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    2446             : static_assert(0 < 1, "There is no slot for us");
    2447             : 
    2448             : static bool
    2449           0 : get_x1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicAbs* self, JSJitGetterCallArgs args)
    2450             : {
    2451           0 :   float result(self->X1());
    2452           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    2453           0 :   args.rval().set(JS_NumberValue(double(result)));
    2454           0 :   return true;
    2455             : }
    2456             : 
    2457             : static bool
    2458           0 : set_x1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicAbs* self, JSJitSetterCallArgs args)
    2459             : {
    2460             :   float arg0;
    2461           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    2462           0 :     return false;
    2463           0 :   } else if (!mozilla::IsFinite(arg0)) {
    2464           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicAbs.x1");
    2465           0 :     return false;
    2466             :   }
    2467           0 :   binding_detail::FastErrorResult rv;
    2468           0 :   self->SetX1(arg0, rv);
    2469           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    2470           0 :     return false;
    2471             :   }
    2472           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    2473             : 
    2474           0 :   return true;
    2475             : }
    2476             : 
    2477             : static const JSJitInfo x1_getterinfo = {
    2478             :   { (JSJitGetterOp)get_x1 },
    2479             :   { prototypes::id::SVGPathSegCurvetoCubicAbs },
    2480             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicAbs>::Depth },
    2481             :   JSJitInfo::Getter,
    2482             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    2483             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    2484             :   true,  /* isInfallible. False in setters. */
    2485             :   false,  /* isMovable.  Not relevant for setters. */
    2486             :   false, /* isEliminatable.  Not relevant for setters. */
    2487             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    2488             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    2489             :   false,  /* isTypedMethod.  Only relevant for methods. */
    2490             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    2491             : };
    2492             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    2493             : static_assert(0 < 1, "There is no slot for us");
    2494             : static const JSJitInfo x1_setterinfo = {
    2495             :   { (JSJitGetterOp)set_x1 },
    2496             :   { prototypes::id::SVGPathSegCurvetoCubicAbs },
    2497             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicAbs>::Depth },
    2498             :   JSJitInfo::Setter,
    2499             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    2500             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    2501             :   false,  /* isInfallible. False in setters. */
    2502             :   false,  /* isMovable.  Not relevant for setters. */
    2503             :   false, /* isEliminatable.  Not relevant for setters. */
    2504             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    2505             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    2506             :   false,  /* isTypedMethod.  Only relevant for methods. */
    2507             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    2508             : };
    2509             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    2510             : static_assert(0 < 1, "There is no slot for us");
    2511             : 
    2512             : static bool
    2513           0 : get_y1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicAbs* self, JSJitGetterCallArgs args)
    2514             : {
    2515           0 :   float result(self->Y1());
    2516           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    2517           0 :   args.rval().set(JS_NumberValue(double(result)));
    2518           0 :   return true;
    2519             : }
    2520             : 
    2521             : static bool
    2522           0 : set_y1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicAbs* self, JSJitSetterCallArgs args)
    2523             : {
    2524             :   float arg0;
    2525           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    2526           0 :     return false;
    2527           0 :   } else if (!mozilla::IsFinite(arg0)) {
    2528           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicAbs.y1");
    2529           0 :     return false;
    2530             :   }
    2531           0 :   binding_detail::FastErrorResult rv;
    2532           0 :   self->SetY1(arg0, rv);
    2533           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    2534           0 :     return false;
    2535             :   }
    2536           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    2537             : 
    2538           0 :   return true;
    2539             : }
    2540             : 
    2541             : static const JSJitInfo y1_getterinfo = {
    2542             :   { (JSJitGetterOp)get_y1 },
    2543             :   { prototypes::id::SVGPathSegCurvetoCubicAbs },
    2544             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicAbs>::Depth },
    2545             :   JSJitInfo::Getter,
    2546             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    2547             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    2548             :   true,  /* isInfallible. False in setters. */
    2549             :   false,  /* isMovable.  Not relevant for setters. */
    2550             :   false, /* isEliminatable.  Not relevant for setters. */
    2551             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    2552             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    2553             :   false,  /* isTypedMethod.  Only relevant for methods. */
    2554             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    2555             : };
    2556             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    2557             : static_assert(0 < 1, "There is no slot for us");
    2558             : static const JSJitInfo y1_setterinfo = {
    2559             :   { (JSJitGetterOp)set_y1 },
    2560             :   { prototypes::id::SVGPathSegCurvetoCubicAbs },
    2561             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicAbs>::Depth },
    2562             :   JSJitInfo::Setter,
    2563             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    2564             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    2565             :   false,  /* isInfallible. False in setters. */
    2566             :   false,  /* isMovable.  Not relevant for setters. */
    2567             :   false, /* isEliminatable.  Not relevant for setters. */
    2568             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    2569             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    2570             :   false,  /* isTypedMethod.  Only relevant for methods. */
    2571             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    2572             : };
    2573             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    2574             : static_assert(0 < 1, "There is no slot for us");
    2575             : 
    2576             : static bool
    2577           0 : get_x2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicAbs* self, JSJitGetterCallArgs args)
    2578             : {
    2579           0 :   float result(self->X2());
    2580           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    2581           0 :   args.rval().set(JS_NumberValue(double(result)));
    2582           0 :   return true;
    2583             : }
    2584             : 
    2585             : static bool
    2586           0 : set_x2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicAbs* self, JSJitSetterCallArgs args)
    2587             : {
    2588             :   float arg0;
    2589           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    2590           0 :     return false;
    2591           0 :   } else if (!mozilla::IsFinite(arg0)) {
    2592           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicAbs.x2");
    2593           0 :     return false;
    2594             :   }
    2595           0 :   binding_detail::FastErrorResult rv;
    2596           0 :   self->SetX2(arg0, rv);
    2597           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    2598           0 :     return false;
    2599             :   }
    2600           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    2601             : 
    2602           0 :   return true;
    2603             : }
    2604             : 
    2605             : static const JSJitInfo x2_getterinfo = {
    2606             :   { (JSJitGetterOp)get_x2 },
    2607             :   { prototypes::id::SVGPathSegCurvetoCubicAbs },
    2608             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicAbs>::Depth },
    2609             :   JSJitInfo::Getter,
    2610             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    2611             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    2612             :   true,  /* isInfallible. False in setters. */
    2613             :   false,  /* isMovable.  Not relevant for setters. */
    2614             :   false, /* isEliminatable.  Not relevant for setters. */
    2615             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    2616             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    2617             :   false,  /* isTypedMethod.  Only relevant for methods. */
    2618             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    2619             : };
    2620             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    2621             : static_assert(0 < 1, "There is no slot for us");
    2622             : static const JSJitInfo x2_setterinfo = {
    2623             :   { (JSJitGetterOp)set_x2 },
    2624             :   { prototypes::id::SVGPathSegCurvetoCubicAbs },
    2625             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicAbs>::Depth },
    2626             :   JSJitInfo::Setter,
    2627             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    2628             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    2629             :   false,  /* isInfallible. False in setters. */
    2630             :   false,  /* isMovable.  Not relevant for setters. */
    2631             :   false, /* isEliminatable.  Not relevant for setters. */
    2632             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    2633             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    2634             :   false,  /* isTypedMethod.  Only relevant for methods. */
    2635             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    2636             : };
    2637             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    2638             : static_assert(0 < 1, "There is no slot for us");
    2639             : 
    2640             : static bool
    2641           0 : get_y2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicAbs* self, JSJitGetterCallArgs args)
    2642             : {
    2643           0 :   float result(self->Y2());
    2644           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    2645           0 :   args.rval().set(JS_NumberValue(double(result)));
    2646           0 :   return true;
    2647             : }
    2648             : 
    2649             : static bool
    2650           0 : set_y2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicAbs* self, JSJitSetterCallArgs args)
    2651             : {
    2652             :   float arg0;
    2653           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    2654           0 :     return false;
    2655           0 :   } else if (!mozilla::IsFinite(arg0)) {
    2656           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicAbs.y2");
    2657           0 :     return false;
    2658             :   }
    2659           0 :   binding_detail::FastErrorResult rv;
    2660           0 :   self->SetY2(arg0, rv);
    2661           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    2662           0 :     return false;
    2663             :   }
    2664           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    2665             : 
    2666           0 :   return true;
    2667             : }
    2668             : 
    2669             : static const JSJitInfo y2_getterinfo = {
    2670             :   { (JSJitGetterOp)get_y2 },
    2671             :   { prototypes::id::SVGPathSegCurvetoCubicAbs },
    2672             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicAbs>::Depth },
    2673             :   JSJitInfo::Getter,
    2674             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    2675             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    2676             :   true,  /* isInfallible. False in setters. */
    2677             :   false,  /* isMovable.  Not relevant for setters. */
    2678             :   false, /* isEliminatable.  Not relevant for setters. */
    2679             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    2680             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    2681             :   false,  /* isTypedMethod.  Only relevant for methods. */
    2682             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    2683             : };
    2684             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    2685             : static_assert(0 < 1, "There is no slot for us");
    2686             : static const JSJitInfo y2_setterinfo = {
    2687             :   { (JSJitGetterOp)set_y2 },
    2688             :   { prototypes::id::SVGPathSegCurvetoCubicAbs },
    2689             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicAbs>::Depth },
    2690             :   JSJitInfo::Setter,
    2691             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    2692             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    2693             :   false,  /* isInfallible. False in setters. */
    2694             :   false,  /* isMovable.  Not relevant for setters. */
    2695             :   false, /* isEliminatable.  Not relevant for setters. */
    2696             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    2697             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    2698             :   false,  /* isTypedMethod.  Only relevant for methods. */
    2699             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    2700             : };
    2701             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    2702             : static_assert(0 < 1, "There is no slot for us");
    2703             : 
    2704             : static bool
    2705           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    2706             : {
    2707           0 :   mozilla::DOMSVGPathSegCurvetoCubicAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoCubicAbs>(obj);
    2708             :   // We don't want to preserve if we don't have a wrapper, and we
    2709             :   // obviously can't preserve if we're not initialized.
    2710           0 :   if (self && self->GetWrapperPreserveColor()) {
    2711           0 :     PreserveWrapper(self);
    2712             :   }
    2713           0 :   return true;
    2714             : }
    2715             : 
    2716             : static void
    2717           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    2718             : {
    2719           0 :   mozilla::DOMSVGPathSegCurvetoCubicAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoCubicAbs>(obj);
    2720           0 :   if (self) {
    2721           0 :     ClearWrapper(self, self, obj);
    2722           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegCurvetoCubicAbs>(self);
    2723             :   }
    2724           0 : }
    2725             : 
    2726             : static void
    2727           0 : _objectMoved(JSObject* obj, const JSObject* old)
    2728             : {
    2729           0 :   mozilla::DOMSVGPathSegCurvetoCubicAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoCubicAbs>(obj);
    2730           0 :   if (self) {
    2731           0 :     UpdateWrapper(self, self, obj, old);
    2732             :   }
    2733           0 : }
    2734             : 
    2735             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    2736             : #if defined(__clang__)
    2737             : #pragma clang diagnostic push
    2738             : #pragma clang diagnostic ignored "-Wmissing-braces"
    2739             : #endif
    2740             : static const JSPropertySpec sAttributes_specs[] = {
    2741             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
    2742             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
    2743             :   { "x1", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x1_getterinfo, GenericBindingSetter, &x1_setterinfo },
    2744             :   { "y1", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y1_getterinfo, GenericBindingSetter, &y1_setterinfo },
    2745             :   { "x2", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x2_getterinfo, GenericBindingSetter, &x2_setterinfo },
    2746             :   { "y2", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y2_getterinfo, GenericBindingSetter, &y2_setterinfo },
    2747             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    2748             : };
    2749             : #if defined(__clang__)
    2750             : #pragma clang diagnostic pop
    2751             : #endif
    2752             : 
    2753             : 
    2754             : // Can't be const because the pref-enabled boolean needs to be writable
    2755             : static Prefable<const JSPropertySpec> sAttributes[] = {
    2756             :   { nullptr, &sAttributes_specs[0] },
    2757             :   { nullptr, nullptr }
    2758             : };
    2759             : 
    2760             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    2761             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    2762             : static_assert(6 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    2763             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    2764             : 
    2765             : 
    2766             : static uint16_t sNativeProperties_sortedPropertyIndices[6];
    2767             : static PropertyInfo sNativeProperties_propertyInfos[6];
    2768             : 
    2769             : static const NativePropertiesN<1> sNativeProperties = {
    2770             :   false, 0,
    2771             :   false, 0,
    2772             :   false, 0,
    2773             :   true,  0 /* sAttributes */,
    2774             :   false, 0,
    2775             :   false, 0,
    2776             :   false, 0,
    2777             :   -1,
    2778             :   6,
    2779             :   sNativeProperties_sortedPropertyIndices,
    2780             :   {
    2781             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    2782             :   }
    2783             : };
    2784             : static_assert(6 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    2785             :     "We have a property info count that is oversized");
    2786             : 
    2787             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    2788             :   {
    2789             :     "Function",
    2790             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    2791             :     &sBoringInterfaceObjectClassClassOps,
    2792             :     JS_NULL_CLASS_SPEC,
    2793             :     JS_NULL_CLASS_EXT,
    2794             :     &sInterfaceObjectClassObjectOps
    2795             :   },
    2796             :   eInterface,
    2797             :   true,
    2798             :   prototypes::id::SVGPathSegCurvetoCubicAbs,
    2799             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicAbs>::Depth,
    2800             :   sNativePropertyHooks,
    2801             :   "function SVGPathSegCurvetoCubicAbs() {\n    [native code]\n}",
    2802             :   SVGPathSegBinding::GetConstructorObject
    2803             : };
    2804             : 
    2805             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    2806             :   {
    2807             :     "SVGPathSegCurvetoCubicAbsPrototype",
    2808             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    2809             :     JS_NULL_CLASS_OPS,
    2810             :     JS_NULL_CLASS_SPEC,
    2811             :     JS_NULL_CLASS_EXT,
    2812             :     JS_NULL_OBJECT_OPS
    2813             :   },
    2814             :   eInterfacePrototype,
    2815             :   false,
    2816             :   prototypes::id::SVGPathSegCurvetoCubicAbs,
    2817             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicAbs>::Depth,
    2818             :   sNativePropertyHooks,
    2819             :   "[object SVGPathSegCurvetoCubicAbsPrototype]",
    2820             :   SVGPathSegBinding::GetProtoObject
    2821             : };
    2822             : 
    2823             : JSObject*
    2824           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    2825             : {
    2826           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    2827             : }
    2828             : 
    2829             : static const js::ClassOps sClassOps = {
    2830             :   _addProperty, /* addProperty */
    2831             :   nullptr,               /* delProperty */
    2832             :   nullptr,               /* getProperty */
    2833             :   nullptr,               /* setProperty */
    2834             :   nullptr,               /* enumerate */
    2835             :   nullptr, /* newEnumerate */
    2836             :   nullptr, /* resolve */
    2837             :   nullptr, /* mayResolve */
    2838             :   _finalize, /* finalize */
    2839             :   nullptr, /* call */
    2840             :   nullptr,               /* hasInstance */
    2841             :   nullptr,               /* construct */
    2842             :   nullptr, /* trace */
    2843             : };
    2844             : 
    2845             : static const js::ClassExtension sClassExtension = {
    2846             :   nullptr, /* weakmapKeyDelegateOp */
    2847             :   _objectMoved /* objectMovedOp */
    2848             : };
    2849             : 
    2850             : static const DOMJSClass sClass = {
    2851             :   { "SVGPathSegCurvetoCubicAbs",
    2852             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    2853             :     &sClassOps,
    2854             :     JS_NULL_CLASS_SPEC,
    2855             :     &sClassExtension,
    2856             :     JS_NULL_OBJECT_OPS
    2857             :   },
    2858             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegCurvetoCubicAbs, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    2859             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegCurvetoCubicAbs >::value,
    2860             :   sNativePropertyHooks,
    2861             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegCurvetoCubicAbs>::Get,
    2862             :   GetProtoObjectHandle,
    2863             :   GetCCParticipant<mozilla::DOMSVGPathSegCurvetoCubicAbs>::Get()
    2864             : };
    2865             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    2866             :               "Must have the right minimal number of reserved slots.");
    2867             : static_assert(1 >= 1,
    2868             :               "Must have enough reserved slots.");
    2869             : 
    2870             : const JSClass*
    2871           0 : GetJSClass()
    2872             : {
    2873           0 :   return sClass.ToJSClass();
    2874             : }
    2875             : 
    2876             : bool
    2877           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegCurvetoCubicAbs* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    2878             : {
    2879             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegCurvetoCubicAbs*>(aObject) ==
    2880             :              reinterpret_cast<mozilla::DOMSVGPathSegCurvetoCubicAbs*>(aObject),
    2881             :              "Multiple inheritance for mozilla::DOMSVGPathSegCurvetoCubicAbs is broken.");
    2882             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    2883             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    2884             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    2885           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    2886           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    2887           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    2888             :              "You should probably not be using Wrap() directly; use "
    2889             :              "GetOrCreateDOMReflector instead");
    2890             : 
    2891           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    2892             :              "nsISupports must be on our primary inheritance chain");
    2893             : 
    2894           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    2895           0 :   if (!global) {
    2896           0 :     return false;
    2897             :   }
    2898           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    2899           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    2900             : 
    2901             :   // That might have ended up wrapping us already, due to the wonders
    2902             :   // of XBL.  Check for that, and bail out as needed.
    2903           0 :   aReflector.set(aCache->GetWrapper());
    2904           0 :   if (aReflector) {
    2905             : #ifdef DEBUG
    2906           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    2907             : #endif // DEBUG
    2908           0 :     return true;
    2909             :   }
    2910             : 
    2911           0 :   JSAutoCompartment ac(aCx, global);
    2912           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    2913           0 :   if (!canonicalProto) {
    2914           0 :     return false;
    2915             :   }
    2916           0 :   JS::Rooted<JSObject*> proto(aCx);
    2917           0 :   if (aGivenProto) {
    2918           0 :     proto = aGivenProto;
    2919             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    2920             :     // coming in, we changed compartments to that of "parent" so may need
    2921             :     // to wrap the proto here.
    2922           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    2923           0 :       if (!JS_WrapObject(aCx, &proto)) {
    2924           0 :         return false;
    2925             :       }
    2926             :     }
    2927             :   } else {
    2928           0 :     proto = canonicalProto;
    2929             :   }
    2930             : 
    2931           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegCurvetoCubicAbs> creator(aCx);
    2932           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    2933           0 :   if (!aReflector) {
    2934           0 :     return false;
    2935             :   }
    2936             : 
    2937           0 :   aCache->SetWrapper(aReflector);
    2938           0 :   creator.InitializationSucceeded();
    2939             : 
    2940           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    2941             :              aCache->GetWrapperPreserveColor() == aReflector);
    2942             :   // If proto != canonicalProto, we have to preserve our wrapper;
    2943             :   // otherwise we won't be able to properly recreate it later, since
    2944             :   // we won't know what proto to use.  Note that we don't check
    2945             :   // aGivenProto here, since it's entirely possible (and even
    2946             :   // somewhat common) to have a non-null aGivenProto which is the
    2947             :   // same as canonicalProto.
    2948           0 :   if (proto != canonicalProto) {
    2949           0 :     PreserveWrapper(aObject);
    2950             :   }
    2951             : 
    2952           0 :   return true;
    2953             : }
    2954             : 
    2955             : const NativePropertyHooks sNativePropertyHooks[] = { {
    2956             :   nullptr,
    2957             :   nullptr,
    2958             :   nullptr,
    2959             :   { sNativeProperties.Upcast(), nullptr },
    2960             :   prototypes::id::SVGPathSegCurvetoCubicAbs,
    2961             :   constructors::id::SVGPathSegCurvetoCubicAbs,
    2962             :   SVGPathSegBinding::sNativePropertyHooks,
    2963             :   &DefaultXrayExpandoObjectClass
    2964             : } };
    2965             : 
    2966             : void
    2967           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    2968             : {
    2969           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    2970           0 :   if (!parentProto) {
    2971           0 :     return;
    2972             :   }
    2973             : 
    2974           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    2975           0 :   if (!constructorProto) {
    2976           0 :     return;
    2977             :   }
    2978             : 
    2979             :   static bool sIdsInited = false;
    2980           0 :   if (!sIdsInited && NS_IsMainThread()) {
    2981           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    2982           0 :       return;
    2983             :     }
    2984           0 :     sIdsInited = true;
    2985             :   }
    2986             : 
    2987           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegCurvetoCubicAbs);
    2988           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegCurvetoCubicAbs);
    2989           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    2990             :                               &sPrototypeClass.mBase, protoCache,
    2991             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    2992             :                               interfaceCache,
    2993             :                               sNativeProperties.Upcast(),
    2994             :                               nullptr,
    2995             :                               "SVGPathSegCurvetoCubicAbs", aDefineOnGlobal,
    2996             :                               nullptr,
    2997           0 :                               false);
    2998             : }
    2999             : 
    3000             : JS::Handle<JSObject*>
    3001           0 : GetProtoObjectHandle(JSContext* aCx)
    3002             : {
    3003             :   /* Get the interface prototype object for this class.  This will create the
    3004             :      object as needed. */
    3005           0 :   bool aDefineOnGlobal = true;
    3006             : 
    3007             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    3008           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    3009           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    3010           0 :     return nullptr;
    3011             :   }
    3012             : 
    3013             :   /* Check to see whether the interface objects are already installed */
    3014           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    3015           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegCurvetoCubicAbs)) {
    3016           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    3017           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    3018             :   }
    3019             : 
    3020             :   /*
    3021             :    * The object might _still_ be null, but that's OK.
    3022             :    *
    3023             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    3024             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    3025             :    * changed after they have been set.
    3026             :    *
    3027             :    * Calling address() avoids the read read barrier that does gray
    3028             :    * unmarking, but it's not possible for the object to be gray here.
    3029             :    */
    3030             : 
    3031           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegCurvetoCubicAbs);
    3032           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    3033           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    3034             : }
    3035             : 
    3036             : JS::Handle<JSObject*>
    3037           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    3038             : {
    3039             :   /* Get the interface object for this class.  This will create the object as
    3040             :      needed. */
    3041             : 
    3042             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    3043           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    3044           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    3045           0 :     return nullptr;
    3046             :   }
    3047             : 
    3048             :   /* Check to see whether the interface objects are already installed */
    3049           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    3050           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegCurvetoCubicAbs)) {
    3051           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    3052           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    3053             :   }
    3054             : 
    3055             :   /*
    3056             :    * The object might _still_ be null, but that's OK.
    3057             :    *
    3058             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    3059             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    3060             :    * changed after they have been set.
    3061             :    *
    3062             :    * Calling address() avoids the read read barrier that does gray
    3063             :    * unmarking, but it's not possible for the object to be gray here.
    3064             :    */
    3065             : 
    3066           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegCurvetoCubicAbs);
    3067           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    3068           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    3069             : }
    3070             : 
    3071             : JSObject*
    3072           0 : GetConstructorObject(JSContext* aCx)
    3073             : {
    3074           0 :   return GetConstructorObjectHandle(aCx);
    3075             : }
    3076             : 
    3077             : } // namespace SVGPathSegCurvetoCubicAbsBinding
    3078             : 
    3079             : 
    3080             : 
    3081             : namespace SVGPathSegCurvetoCubicRelBinding {
    3082             : 
    3083             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    3084             :               "Can't inherit from an interface with a different ownership model.");
    3085             : 
    3086             : static bool
    3087           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicRel* self, JSJitGetterCallArgs args)
    3088             : {
    3089           0 :   float result(self->X());
    3090           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3091           0 :   args.rval().set(JS_NumberValue(double(result)));
    3092           0 :   return true;
    3093             : }
    3094             : 
    3095             : static bool
    3096           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicRel* self, JSJitSetterCallArgs args)
    3097             : {
    3098             :   float arg0;
    3099           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    3100           0 :     return false;
    3101           0 :   } else if (!mozilla::IsFinite(arg0)) {
    3102           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicRel.x");
    3103           0 :     return false;
    3104             :   }
    3105           0 :   binding_detail::FastErrorResult rv;
    3106           0 :   self->SetX(arg0, rv);
    3107           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    3108           0 :     return false;
    3109             :   }
    3110           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3111             : 
    3112           0 :   return true;
    3113             : }
    3114             : 
    3115             : static const JSJitInfo x_getterinfo = {
    3116             :   { (JSJitGetterOp)get_x },
    3117             :   { prototypes::id::SVGPathSegCurvetoCubicRel },
    3118             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicRel>::Depth },
    3119             :   JSJitInfo::Getter,
    3120             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3121             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    3122             :   true,  /* isInfallible. False in setters. */
    3123             :   false,  /* isMovable.  Not relevant for setters. */
    3124             :   false, /* isEliminatable.  Not relevant for setters. */
    3125             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3126             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3127             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3128             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3129             : };
    3130             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3131             : static_assert(0 < 1, "There is no slot for us");
    3132             : static const JSJitInfo x_setterinfo = {
    3133             :   { (JSJitGetterOp)set_x },
    3134             :   { prototypes::id::SVGPathSegCurvetoCubicRel },
    3135             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicRel>::Depth },
    3136             :   JSJitInfo::Setter,
    3137             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3138             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    3139             :   false,  /* isInfallible. False in setters. */
    3140             :   false,  /* isMovable.  Not relevant for setters. */
    3141             :   false, /* isEliminatable.  Not relevant for setters. */
    3142             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3143             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3144             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3145             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3146             : };
    3147             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3148             : static_assert(0 < 1, "There is no slot for us");
    3149             : 
    3150             : static bool
    3151           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicRel* self, JSJitGetterCallArgs args)
    3152             : {
    3153           0 :   float result(self->Y());
    3154           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3155           0 :   args.rval().set(JS_NumberValue(double(result)));
    3156           0 :   return true;
    3157             : }
    3158             : 
    3159             : static bool
    3160           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicRel* self, JSJitSetterCallArgs args)
    3161             : {
    3162             :   float arg0;
    3163           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    3164           0 :     return false;
    3165           0 :   } else if (!mozilla::IsFinite(arg0)) {
    3166           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicRel.y");
    3167           0 :     return false;
    3168             :   }
    3169           0 :   binding_detail::FastErrorResult rv;
    3170           0 :   self->SetY(arg0, rv);
    3171           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    3172           0 :     return false;
    3173             :   }
    3174           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3175             : 
    3176           0 :   return true;
    3177             : }
    3178             : 
    3179             : static const JSJitInfo y_getterinfo = {
    3180             :   { (JSJitGetterOp)get_y },
    3181             :   { prototypes::id::SVGPathSegCurvetoCubicRel },
    3182             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicRel>::Depth },
    3183             :   JSJitInfo::Getter,
    3184             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3185             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    3186             :   true,  /* isInfallible. False in setters. */
    3187             :   false,  /* isMovable.  Not relevant for setters. */
    3188             :   false, /* isEliminatable.  Not relevant for setters. */
    3189             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3190             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3191             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3192             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3193             : };
    3194             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3195             : static_assert(0 < 1, "There is no slot for us");
    3196             : static const JSJitInfo y_setterinfo = {
    3197             :   { (JSJitGetterOp)set_y },
    3198             :   { prototypes::id::SVGPathSegCurvetoCubicRel },
    3199             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicRel>::Depth },
    3200             :   JSJitInfo::Setter,
    3201             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3202             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    3203             :   false,  /* isInfallible. False in setters. */
    3204             :   false,  /* isMovable.  Not relevant for setters. */
    3205             :   false, /* isEliminatable.  Not relevant for setters. */
    3206             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3207             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3208             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3209             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3210             : };
    3211             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3212             : static_assert(0 < 1, "There is no slot for us");
    3213             : 
    3214             : static bool
    3215           0 : get_x1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicRel* self, JSJitGetterCallArgs args)
    3216             : {
    3217           0 :   float result(self->X1());
    3218           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3219           0 :   args.rval().set(JS_NumberValue(double(result)));
    3220           0 :   return true;
    3221             : }
    3222             : 
    3223             : static bool
    3224           0 : set_x1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicRel* self, JSJitSetterCallArgs args)
    3225             : {
    3226             :   float arg0;
    3227           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    3228           0 :     return false;
    3229           0 :   } else if (!mozilla::IsFinite(arg0)) {
    3230           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicRel.x1");
    3231           0 :     return false;
    3232             :   }
    3233           0 :   binding_detail::FastErrorResult rv;
    3234           0 :   self->SetX1(arg0, rv);
    3235           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    3236           0 :     return false;
    3237             :   }
    3238           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3239             : 
    3240           0 :   return true;
    3241             : }
    3242             : 
    3243             : static const JSJitInfo x1_getterinfo = {
    3244             :   { (JSJitGetterOp)get_x1 },
    3245             :   { prototypes::id::SVGPathSegCurvetoCubicRel },
    3246             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicRel>::Depth },
    3247             :   JSJitInfo::Getter,
    3248             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3249             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    3250             :   true,  /* isInfallible. False in setters. */
    3251             :   false,  /* isMovable.  Not relevant for setters. */
    3252             :   false, /* isEliminatable.  Not relevant for setters. */
    3253             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3254             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3255             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3256             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3257             : };
    3258             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3259             : static_assert(0 < 1, "There is no slot for us");
    3260             : static const JSJitInfo x1_setterinfo = {
    3261             :   { (JSJitGetterOp)set_x1 },
    3262             :   { prototypes::id::SVGPathSegCurvetoCubicRel },
    3263             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicRel>::Depth },
    3264             :   JSJitInfo::Setter,
    3265             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3266             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    3267             :   false,  /* isInfallible. False in setters. */
    3268             :   false,  /* isMovable.  Not relevant for setters. */
    3269             :   false, /* isEliminatable.  Not relevant for setters. */
    3270             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3271             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3272             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3273             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3274             : };
    3275             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3276             : static_assert(0 < 1, "There is no slot for us");
    3277             : 
    3278             : static bool
    3279           0 : get_y1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicRel* self, JSJitGetterCallArgs args)
    3280             : {
    3281           0 :   float result(self->Y1());
    3282           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3283           0 :   args.rval().set(JS_NumberValue(double(result)));
    3284           0 :   return true;
    3285             : }
    3286             : 
    3287             : static bool
    3288           0 : set_y1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicRel* self, JSJitSetterCallArgs args)
    3289             : {
    3290             :   float arg0;
    3291           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    3292           0 :     return false;
    3293           0 :   } else if (!mozilla::IsFinite(arg0)) {
    3294           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicRel.y1");
    3295           0 :     return false;
    3296             :   }
    3297           0 :   binding_detail::FastErrorResult rv;
    3298           0 :   self->SetY1(arg0, rv);
    3299           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    3300           0 :     return false;
    3301             :   }
    3302           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3303             : 
    3304           0 :   return true;
    3305             : }
    3306             : 
    3307             : static const JSJitInfo y1_getterinfo = {
    3308             :   { (JSJitGetterOp)get_y1 },
    3309             :   { prototypes::id::SVGPathSegCurvetoCubicRel },
    3310             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicRel>::Depth },
    3311             :   JSJitInfo::Getter,
    3312             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3313             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    3314             :   true,  /* isInfallible. False in setters. */
    3315             :   false,  /* isMovable.  Not relevant for setters. */
    3316             :   false, /* isEliminatable.  Not relevant for setters. */
    3317             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3318             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3319             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3320             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3321             : };
    3322             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3323             : static_assert(0 < 1, "There is no slot for us");
    3324             : static const JSJitInfo y1_setterinfo = {
    3325             :   { (JSJitGetterOp)set_y1 },
    3326             :   { prototypes::id::SVGPathSegCurvetoCubicRel },
    3327             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicRel>::Depth },
    3328             :   JSJitInfo::Setter,
    3329             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3330             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    3331             :   false,  /* isInfallible. False in setters. */
    3332             :   false,  /* isMovable.  Not relevant for setters. */
    3333             :   false, /* isEliminatable.  Not relevant for setters. */
    3334             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3335             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3336             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3337             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3338             : };
    3339             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3340             : static_assert(0 < 1, "There is no slot for us");
    3341             : 
    3342             : static bool
    3343           0 : get_x2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicRel* self, JSJitGetterCallArgs args)
    3344             : {
    3345           0 :   float result(self->X2());
    3346           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3347           0 :   args.rval().set(JS_NumberValue(double(result)));
    3348           0 :   return true;
    3349             : }
    3350             : 
    3351             : static bool
    3352           0 : set_x2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicRel* self, JSJitSetterCallArgs args)
    3353             : {
    3354             :   float arg0;
    3355           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    3356           0 :     return false;
    3357           0 :   } else if (!mozilla::IsFinite(arg0)) {
    3358           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicRel.x2");
    3359           0 :     return false;
    3360             :   }
    3361           0 :   binding_detail::FastErrorResult rv;
    3362           0 :   self->SetX2(arg0, rv);
    3363           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    3364           0 :     return false;
    3365             :   }
    3366           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3367             : 
    3368           0 :   return true;
    3369             : }
    3370             : 
    3371             : static const JSJitInfo x2_getterinfo = {
    3372             :   { (JSJitGetterOp)get_x2 },
    3373             :   { prototypes::id::SVGPathSegCurvetoCubicRel },
    3374             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicRel>::Depth },
    3375             :   JSJitInfo::Getter,
    3376             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3377             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    3378             :   true,  /* isInfallible. False in setters. */
    3379             :   false,  /* isMovable.  Not relevant for setters. */
    3380             :   false, /* isEliminatable.  Not relevant for setters. */
    3381             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3382             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3383             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3384             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3385             : };
    3386             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3387             : static_assert(0 < 1, "There is no slot for us");
    3388             : static const JSJitInfo x2_setterinfo = {
    3389             :   { (JSJitGetterOp)set_x2 },
    3390             :   { prototypes::id::SVGPathSegCurvetoCubicRel },
    3391             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicRel>::Depth },
    3392             :   JSJitInfo::Setter,
    3393             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3394             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    3395             :   false,  /* isInfallible. False in setters. */
    3396             :   false,  /* isMovable.  Not relevant for setters. */
    3397             :   false, /* isEliminatable.  Not relevant for setters. */
    3398             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3399             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3400             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3401             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3402             : };
    3403             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3404             : static_assert(0 < 1, "There is no slot for us");
    3405             : 
    3406             : static bool
    3407           0 : get_y2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicRel* self, JSJitGetterCallArgs args)
    3408             : {
    3409           0 :   float result(self->Y2());
    3410           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3411           0 :   args.rval().set(JS_NumberValue(double(result)));
    3412           0 :   return true;
    3413             : }
    3414             : 
    3415             : static bool
    3416           0 : set_y2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicRel* self, JSJitSetterCallArgs args)
    3417             : {
    3418             :   float arg0;
    3419           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    3420           0 :     return false;
    3421           0 :   } else if (!mozilla::IsFinite(arg0)) {
    3422           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicRel.y2");
    3423           0 :     return false;
    3424             :   }
    3425           0 :   binding_detail::FastErrorResult rv;
    3426           0 :   self->SetY2(arg0, rv);
    3427           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    3428           0 :     return false;
    3429             :   }
    3430           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3431             : 
    3432           0 :   return true;
    3433             : }
    3434             : 
    3435             : static const JSJitInfo y2_getterinfo = {
    3436             :   { (JSJitGetterOp)get_y2 },
    3437             :   { prototypes::id::SVGPathSegCurvetoCubicRel },
    3438             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicRel>::Depth },
    3439             :   JSJitInfo::Getter,
    3440             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3441             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    3442             :   true,  /* isInfallible. False in setters. */
    3443             :   false,  /* isMovable.  Not relevant for setters. */
    3444             :   false, /* isEliminatable.  Not relevant for setters. */
    3445             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3446             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3447             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3448             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3449             : };
    3450             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3451             : static_assert(0 < 1, "There is no slot for us");
    3452             : static const JSJitInfo y2_setterinfo = {
    3453             :   { (JSJitGetterOp)set_y2 },
    3454             :   { prototypes::id::SVGPathSegCurvetoCubicRel },
    3455             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicRel>::Depth },
    3456             :   JSJitInfo::Setter,
    3457             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3458             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    3459             :   false,  /* isInfallible. False in setters. */
    3460             :   false,  /* isMovable.  Not relevant for setters. */
    3461             :   false, /* isEliminatable.  Not relevant for setters. */
    3462             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3463             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3464             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3465             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3466             : };
    3467             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3468             : static_assert(0 < 1, "There is no slot for us");
    3469             : 
    3470             : static bool
    3471           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    3472             : {
    3473           0 :   mozilla::DOMSVGPathSegCurvetoCubicRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoCubicRel>(obj);
    3474             :   // We don't want to preserve if we don't have a wrapper, and we
    3475             :   // obviously can't preserve if we're not initialized.
    3476           0 :   if (self && self->GetWrapperPreserveColor()) {
    3477           0 :     PreserveWrapper(self);
    3478             :   }
    3479           0 :   return true;
    3480             : }
    3481             : 
    3482             : static void
    3483           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    3484             : {
    3485           0 :   mozilla::DOMSVGPathSegCurvetoCubicRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoCubicRel>(obj);
    3486           0 :   if (self) {
    3487           0 :     ClearWrapper(self, self, obj);
    3488           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegCurvetoCubicRel>(self);
    3489             :   }
    3490           0 : }
    3491             : 
    3492             : static void
    3493           0 : _objectMoved(JSObject* obj, const JSObject* old)
    3494             : {
    3495           0 :   mozilla::DOMSVGPathSegCurvetoCubicRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoCubicRel>(obj);
    3496           0 :   if (self) {
    3497           0 :     UpdateWrapper(self, self, obj, old);
    3498             :   }
    3499           0 : }
    3500             : 
    3501             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    3502             : #if defined(__clang__)
    3503             : #pragma clang diagnostic push
    3504             : #pragma clang diagnostic ignored "-Wmissing-braces"
    3505             : #endif
    3506             : static const JSPropertySpec sAttributes_specs[] = {
    3507             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
    3508             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
    3509             :   { "x1", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x1_getterinfo, GenericBindingSetter, &x1_setterinfo },
    3510             :   { "y1", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y1_getterinfo, GenericBindingSetter, &y1_setterinfo },
    3511             :   { "x2", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x2_getterinfo, GenericBindingSetter, &x2_setterinfo },
    3512             :   { "y2", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y2_getterinfo, GenericBindingSetter, &y2_setterinfo },
    3513             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    3514             : };
    3515             : #if defined(__clang__)
    3516             : #pragma clang diagnostic pop
    3517             : #endif
    3518             : 
    3519             : 
    3520             : // Can't be const because the pref-enabled boolean needs to be writable
    3521             : static Prefable<const JSPropertySpec> sAttributes[] = {
    3522             :   { nullptr, &sAttributes_specs[0] },
    3523             :   { nullptr, nullptr }
    3524             : };
    3525             : 
    3526             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    3527             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    3528             : static_assert(6 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    3529             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    3530             : 
    3531             : 
    3532             : static uint16_t sNativeProperties_sortedPropertyIndices[6];
    3533             : static PropertyInfo sNativeProperties_propertyInfos[6];
    3534             : 
    3535             : static const NativePropertiesN<1> sNativeProperties = {
    3536             :   false, 0,
    3537             :   false, 0,
    3538             :   false, 0,
    3539             :   true,  0 /* sAttributes */,
    3540             :   false, 0,
    3541             :   false, 0,
    3542             :   false, 0,
    3543             :   -1,
    3544             :   6,
    3545             :   sNativeProperties_sortedPropertyIndices,
    3546             :   {
    3547             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    3548             :   }
    3549             : };
    3550             : static_assert(6 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    3551             :     "We have a property info count that is oversized");
    3552             : 
    3553             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    3554             :   {
    3555             :     "Function",
    3556             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    3557             :     &sBoringInterfaceObjectClassClassOps,
    3558             :     JS_NULL_CLASS_SPEC,
    3559             :     JS_NULL_CLASS_EXT,
    3560             :     &sInterfaceObjectClassObjectOps
    3561             :   },
    3562             :   eInterface,
    3563             :   true,
    3564             :   prototypes::id::SVGPathSegCurvetoCubicRel,
    3565             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicRel>::Depth,
    3566             :   sNativePropertyHooks,
    3567             :   "function SVGPathSegCurvetoCubicRel() {\n    [native code]\n}",
    3568             :   SVGPathSegBinding::GetConstructorObject
    3569             : };
    3570             : 
    3571             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    3572             :   {
    3573             :     "SVGPathSegCurvetoCubicRelPrototype",
    3574             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    3575             :     JS_NULL_CLASS_OPS,
    3576             :     JS_NULL_CLASS_SPEC,
    3577             :     JS_NULL_CLASS_EXT,
    3578             :     JS_NULL_OBJECT_OPS
    3579             :   },
    3580             :   eInterfacePrototype,
    3581             :   false,
    3582             :   prototypes::id::SVGPathSegCurvetoCubicRel,
    3583             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicRel>::Depth,
    3584             :   sNativePropertyHooks,
    3585             :   "[object SVGPathSegCurvetoCubicRelPrototype]",
    3586             :   SVGPathSegBinding::GetProtoObject
    3587             : };
    3588             : 
    3589             : JSObject*
    3590           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    3591             : {
    3592           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    3593             : }
    3594             : 
    3595             : static const js::ClassOps sClassOps = {
    3596             :   _addProperty, /* addProperty */
    3597             :   nullptr,               /* delProperty */
    3598             :   nullptr,               /* getProperty */
    3599             :   nullptr,               /* setProperty */
    3600             :   nullptr,               /* enumerate */
    3601             :   nullptr, /* newEnumerate */
    3602             :   nullptr, /* resolve */
    3603             :   nullptr, /* mayResolve */
    3604             :   _finalize, /* finalize */
    3605             :   nullptr, /* call */
    3606             :   nullptr,               /* hasInstance */
    3607             :   nullptr,               /* construct */
    3608             :   nullptr, /* trace */
    3609             : };
    3610             : 
    3611             : static const js::ClassExtension sClassExtension = {
    3612             :   nullptr, /* weakmapKeyDelegateOp */
    3613             :   _objectMoved /* objectMovedOp */
    3614             : };
    3615             : 
    3616             : static const DOMJSClass sClass = {
    3617             :   { "SVGPathSegCurvetoCubicRel",
    3618             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    3619             :     &sClassOps,
    3620             :     JS_NULL_CLASS_SPEC,
    3621             :     &sClassExtension,
    3622             :     JS_NULL_OBJECT_OPS
    3623             :   },
    3624             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegCurvetoCubicRel, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    3625             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegCurvetoCubicRel >::value,
    3626             :   sNativePropertyHooks,
    3627             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegCurvetoCubicRel>::Get,
    3628             :   GetProtoObjectHandle,
    3629             :   GetCCParticipant<mozilla::DOMSVGPathSegCurvetoCubicRel>::Get()
    3630             : };
    3631             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    3632             :               "Must have the right minimal number of reserved slots.");
    3633             : static_assert(1 >= 1,
    3634             :               "Must have enough reserved slots.");
    3635             : 
    3636             : const JSClass*
    3637           0 : GetJSClass()
    3638             : {
    3639           0 :   return sClass.ToJSClass();
    3640             : }
    3641             : 
    3642             : bool
    3643           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegCurvetoCubicRel* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    3644             : {
    3645             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegCurvetoCubicRel*>(aObject) ==
    3646             :              reinterpret_cast<mozilla::DOMSVGPathSegCurvetoCubicRel*>(aObject),
    3647             :              "Multiple inheritance for mozilla::DOMSVGPathSegCurvetoCubicRel is broken.");
    3648             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    3649             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    3650             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    3651           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    3652           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    3653           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    3654             :              "You should probably not be using Wrap() directly; use "
    3655             :              "GetOrCreateDOMReflector instead");
    3656             : 
    3657           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    3658             :              "nsISupports must be on our primary inheritance chain");
    3659             : 
    3660           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    3661           0 :   if (!global) {
    3662           0 :     return false;
    3663             :   }
    3664           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    3665           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    3666             : 
    3667             :   // That might have ended up wrapping us already, due to the wonders
    3668             :   // of XBL.  Check for that, and bail out as needed.
    3669           0 :   aReflector.set(aCache->GetWrapper());
    3670           0 :   if (aReflector) {
    3671             : #ifdef DEBUG
    3672           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    3673             : #endif // DEBUG
    3674           0 :     return true;
    3675             :   }
    3676             : 
    3677           0 :   JSAutoCompartment ac(aCx, global);
    3678           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    3679           0 :   if (!canonicalProto) {
    3680           0 :     return false;
    3681             :   }
    3682           0 :   JS::Rooted<JSObject*> proto(aCx);
    3683           0 :   if (aGivenProto) {
    3684           0 :     proto = aGivenProto;
    3685             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    3686             :     // coming in, we changed compartments to that of "parent" so may need
    3687             :     // to wrap the proto here.
    3688           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    3689           0 :       if (!JS_WrapObject(aCx, &proto)) {
    3690           0 :         return false;
    3691             :       }
    3692             :     }
    3693             :   } else {
    3694           0 :     proto = canonicalProto;
    3695             :   }
    3696             : 
    3697           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegCurvetoCubicRel> creator(aCx);
    3698           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    3699           0 :   if (!aReflector) {
    3700           0 :     return false;
    3701             :   }
    3702             : 
    3703           0 :   aCache->SetWrapper(aReflector);
    3704           0 :   creator.InitializationSucceeded();
    3705             : 
    3706           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    3707             :              aCache->GetWrapperPreserveColor() == aReflector);
    3708             :   // If proto != canonicalProto, we have to preserve our wrapper;
    3709             :   // otherwise we won't be able to properly recreate it later, since
    3710             :   // we won't know what proto to use.  Note that we don't check
    3711             :   // aGivenProto here, since it's entirely possible (and even
    3712             :   // somewhat common) to have a non-null aGivenProto which is the
    3713             :   // same as canonicalProto.
    3714           0 :   if (proto != canonicalProto) {
    3715           0 :     PreserveWrapper(aObject);
    3716             :   }
    3717             : 
    3718           0 :   return true;
    3719             : }
    3720             : 
    3721             : const NativePropertyHooks sNativePropertyHooks[] = { {
    3722             :   nullptr,
    3723             :   nullptr,
    3724             :   nullptr,
    3725             :   { sNativeProperties.Upcast(), nullptr },
    3726             :   prototypes::id::SVGPathSegCurvetoCubicRel,
    3727             :   constructors::id::SVGPathSegCurvetoCubicRel,
    3728             :   SVGPathSegBinding::sNativePropertyHooks,
    3729             :   &DefaultXrayExpandoObjectClass
    3730             : } };
    3731             : 
    3732             : void
    3733           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    3734             : {
    3735           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    3736           0 :   if (!parentProto) {
    3737           0 :     return;
    3738             :   }
    3739             : 
    3740           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    3741           0 :   if (!constructorProto) {
    3742           0 :     return;
    3743             :   }
    3744             : 
    3745             :   static bool sIdsInited = false;
    3746           0 :   if (!sIdsInited && NS_IsMainThread()) {
    3747           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    3748           0 :       return;
    3749             :     }
    3750           0 :     sIdsInited = true;
    3751             :   }
    3752             : 
    3753           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegCurvetoCubicRel);
    3754           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegCurvetoCubicRel);
    3755           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    3756             :                               &sPrototypeClass.mBase, protoCache,
    3757             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    3758             :                               interfaceCache,
    3759             :                               sNativeProperties.Upcast(),
    3760             :                               nullptr,
    3761             :                               "SVGPathSegCurvetoCubicRel", aDefineOnGlobal,
    3762             :                               nullptr,
    3763           0 :                               false);
    3764             : }
    3765             : 
    3766             : JS::Handle<JSObject*>
    3767           0 : GetProtoObjectHandle(JSContext* aCx)
    3768             : {
    3769             :   /* Get the interface prototype object for this class.  This will create the
    3770             :      object as needed. */
    3771           0 :   bool aDefineOnGlobal = true;
    3772             : 
    3773             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    3774           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    3775           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    3776           0 :     return nullptr;
    3777             :   }
    3778             : 
    3779             :   /* Check to see whether the interface objects are already installed */
    3780           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    3781           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegCurvetoCubicRel)) {
    3782           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    3783           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    3784             :   }
    3785             : 
    3786             :   /*
    3787             :    * The object might _still_ be null, but that's OK.
    3788             :    *
    3789             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    3790             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    3791             :    * changed after they have been set.
    3792             :    *
    3793             :    * Calling address() avoids the read read barrier that does gray
    3794             :    * unmarking, but it's not possible for the object to be gray here.
    3795             :    */
    3796             : 
    3797           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegCurvetoCubicRel);
    3798           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    3799           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    3800             : }
    3801             : 
    3802             : JS::Handle<JSObject*>
    3803           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    3804             : {
    3805             :   /* Get the interface object for this class.  This will create the object as
    3806             :      needed. */
    3807             : 
    3808             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    3809           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    3810           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    3811           0 :     return nullptr;
    3812             :   }
    3813             : 
    3814             :   /* Check to see whether the interface objects are already installed */
    3815           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    3816           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegCurvetoCubicRel)) {
    3817           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    3818           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    3819             :   }
    3820             : 
    3821             :   /*
    3822             :    * The object might _still_ be null, but that's OK.
    3823             :    *
    3824             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    3825             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    3826             :    * changed after they have been set.
    3827             :    *
    3828             :    * Calling address() avoids the read read barrier that does gray
    3829             :    * unmarking, but it's not possible for the object to be gray here.
    3830             :    */
    3831             : 
    3832           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegCurvetoCubicRel);
    3833           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    3834           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    3835             : }
    3836             : 
    3837             : JSObject*
    3838           0 : GetConstructorObject(JSContext* aCx)
    3839             : {
    3840           0 :   return GetConstructorObjectHandle(aCx);
    3841             : }
    3842             : 
    3843             : } // namespace SVGPathSegCurvetoCubicRelBinding
    3844             : 
    3845             : 
    3846             : 
    3847             : namespace SVGPathSegCurvetoCubicSmoothAbsBinding {
    3848             : 
    3849             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    3850             :               "Can't inherit from an interface with a different ownership model.");
    3851             : 
    3852             : static bool
    3853           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs* self, JSJitGetterCallArgs args)
    3854             : {
    3855           0 :   float result(self->X());
    3856           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3857           0 :   args.rval().set(JS_NumberValue(double(result)));
    3858           0 :   return true;
    3859             : }
    3860             : 
    3861             : static bool
    3862           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs* self, JSJitSetterCallArgs args)
    3863             : {
    3864             :   float arg0;
    3865           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    3866           0 :     return false;
    3867           0 :   } else if (!mozilla::IsFinite(arg0)) {
    3868           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicSmoothAbs.x");
    3869           0 :     return false;
    3870             :   }
    3871           0 :   binding_detail::FastErrorResult rv;
    3872           0 :   self->SetX(arg0, rv);
    3873           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    3874           0 :     return false;
    3875             :   }
    3876           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3877             : 
    3878           0 :   return true;
    3879             : }
    3880             : 
    3881             : static const JSJitInfo x_getterinfo = {
    3882             :   { (JSJitGetterOp)get_x },
    3883             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothAbs },
    3884             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothAbs>::Depth },
    3885             :   JSJitInfo::Getter,
    3886             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3887             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    3888             :   true,  /* isInfallible. False in setters. */
    3889             :   false,  /* isMovable.  Not relevant for setters. */
    3890             :   false, /* isEliminatable.  Not relevant for setters. */
    3891             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3892             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3893             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3894             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3895             : };
    3896             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3897             : static_assert(0 < 1, "There is no slot for us");
    3898             : static const JSJitInfo x_setterinfo = {
    3899             :   { (JSJitGetterOp)set_x },
    3900             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothAbs },
    3901             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothAbs>::Depth },
    3902             :   JSJitInfo::Setter,
    3903             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3904             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    3905             :   false,  /* isInfallible. False in setters. */
    3906             :   false,  /* isMovable.  Not relevant for setters. */
    3907             :   false, /* isEliminatable.  Not relevant for setters. */
    3908             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3909             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3910             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3911             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3912             : };
    3913             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3914             : static_assert(0 < 1, "There is no slot for us");
    3915             : 
    3916             : static bool
    3917           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs* self, JSJitGetterCallArgs args)
    3918             : {
    3919           0 :   float result(self->Y());
    3920           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3921           0 :   args.rval().set(JS_NumberValue(double(result)));
    3922           0 :   return true;
    3923             : }
    3924             : 
    3925             : static bool
    3926           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs* self, JSJitSetterCallArgs args)
    3927             : {
    3928             :   float arg0;
    3929           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    3930           0 :     return false;
    3931           0 :   } else if (!mozilla::IsFinite(arg0)) {
    3932           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicSmoothAbs.y");
    3933           0 :     return false;
    3934             :   }
    3935           0 :   binding_detail::FastErrorResult rv;
    3936           0 :   self->SetY(arg0, rv);
    3937           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    3938           0 :     return false;
    3939             :   }
    3940           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3941             : 
    3942           0 :   return true;
    3943             : }
    3944             : 
    3945             : static const JSJitInfo y_getterinfo = {
    3946             :   { (JSJitGetterOp)get_y },
    3947             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothAbs },
    3948             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothAbs>::Depth },
    3949             :   JSJitInfo::Getter,
    3950             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3951             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    3952             :   true,  /* isInfallible. False in setters. */
    3953             :   false,  /* isMovable.  Not relevant for setters. */
    3954             :   false, /* isEliminatable.  Not relevant for setters. */
    3955             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3956             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3957             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3958             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3959             : };
    3960             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3961             : static_assert(0 < 1, "There is no slot for us");
    3962             : static const JSJitInfo y_setterinfo = {
    3963             :   { (JSJitGetterOp)set_y },
    3964             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothAbs },
    3965             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothAbs>::Depth },
    3966             :   JSJitInfo::Setter,
    3967             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    3968             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    3969             :   false,  /* isInfallible. False in setters. */
    3970             :   false,  /* isMovable.  Not relevant for setters. */
    3971             :   false, /* isEliminatable.  Not relevant for setters. */
    3972             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    3973             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    3974             :   false,  /* isTypedMethod.  Only relevant for methods. */
    3975             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    3976             : };
    3977             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    3978             : static_assert(0 < 1, "There is no slot for us");
    3979             : 
    3980             : static bool
    3981           0 : get_x2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs* self, JSJitGetterCallArgs args)
    3982             : {
    3983           0 :   float result(self->X2());
    3984           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    3985           0 :   args.rval().set(JS_NumberValue(double(result)));
    3986           0 :   return true;
    3987             : }
    3988             : 
    3989             : static bool
    3990           0 : set_x2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs* self, JSJitSetterCallArgs args)
    3991             : {
    3992             :   float arg0;
    3993           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    3994           0 :     return false;
    3995           0 :   } else if (!mozilla::IsFinite(arg0)) {
    3996           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicSmoothAbs.x2");
    3997           0 :     return false;
    3998             :   }
    3999           0 :   binding_detail::FastErrorResult rv;
    4000           0 :   self->SetX2(arg0, rv);
    4001           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    4002           0 :     return false;
    4003             :   }
    4004           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    4005             : 
    4006           0 :   return true;
    4007             : }
    4008             : 
    4009             : static const JSJitInfo x2_getterinfo = {
    4010             :   { (JSJitGetterOp)get_x2 },
    4011             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothAbs },
    4012             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothAbs>::Depth },
    4013             :   JSJitInfo::Getter,
    4014             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    4015             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    4016             :   true,  /* isInfallible. False in setters. */
    4017             :   false,  /* isMovable.  Not relevant for setters. */
    4018             :   false, /* isEliminatable.  Not relevant for setters. */
    4019             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    4020             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    4021             :   false,  /* isTypedMethod.  Only relevant for methods. */
    4022             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    4023             : };
    4024             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    4025             : static_assert(0 < 1, "There is no slot for us");
    4026             : static const JSJitInfo x2_setterinfo = {
    4027             :   { (JSJitGetterOp)set_x2 },
    4028             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothAbs },
    4029             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothAbs>::Depth },
    4030             :   JSJitInfo::Setter,
    4031             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    4032             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    4033             :   false,  /* isInfallible. False in setters. */
    4034             :   false,  /* isMovable.  Not relevant for setters. */
    4035             :   false, /* isEliminatable.  Not relevant for setters. */
    4036             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    4037             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    4038             :   false,  /* isTypedMethod.  Only relevant for methods. */
    4039             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    4040             : };
    4041             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    4042             : static_assert(0 < 1, "There is no slot for us");
    4043             : 
    4044             : static bool
    4045           0 : get_y2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs* self, JSJitGetterCallArgs args)
    4046             : {
    4047           0 :   float result(self->Y2());
    4048           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    4049           0 :   args.rval().set(JS_NumberValue(double(result)));
    4050           0 :   return true;
    4051             : }
    4052             : 
    4053             : static bool
    4054           0 : set_y2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs* self, JSJitSetterCallArgs args)
    4055             : {
    4056             :   float arg0;
    4057           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    4058           0 :     return false;
    4059           0 :   } else if (!mozilla::IsFinite(arg0)) {
    4060           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicSmoothAbs.y2");
    4061           0 :     return false;
    4062             :   }
    4063           0 :   binding_detail::FastErrorResult rv;
    4064           0 :   self->SetY2(arg0, rv);
    4065           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    4066           0 :     return false;
    4067             :   }
    4068           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    4069             : 
    4070           0 :   return true;
    4071             : }
    4072             : 
    4073             : static const JSJitInfo y2_getterinfo = {
    4074             :   { (JSJitGetterOp)get_y2 },
    4075             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothAbs },
    4076             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothAbs>::Depth },
    4077             :   JSJitInfo::Getter,
    4078             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    4079             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    4080             :   true,  /* isInfallible. False in setters. */
    4081             :   false,  /* isMovable.  Not relevant for setters. */
    4082             :   false, /* isEliminatable.  Not relevant for setters. */
    4083             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    4084             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    4085             :   false,  /* isTypedMethod.  Only relevant for methods. */
    4086             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    4087             : };
    4088             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    4089             : static_assert(0 < 1, "There is no slot for us");
    4090             : static const JSJitInfo y2_setterinfo = {
    4091             :   { (JSJitGetterOp)set_y2 },
    4092             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothAbs },
    4093             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothAbs>::Depth },
    4094             :   JSJitInfo::Setter,
    4095             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    4096             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    4097             :   false,  /* isInfallible. False in setters. */
    4098             :   false,  /* isMovable.  Not relevant for setters. */
    4099             :   false, /* isEliminatable.  Not relevant for setters. */
    4100             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    4101             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    4102             :   false,  /* isTypedMethod.  Only relevant for methods. */
    4103             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    4104             : };
    4105             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    4106             : static_assert(0 < 1, "There is no slot for us");
    4107             : 
    4108             : static bool
    4109           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    4110             : {
    4111           0 :   mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs>(obj);
    4112             :   // We don't want to preserve if we don't have a wrapper, and we
    4113             :   // obviously can't preserve if we're not initialized.
    4114           0 :   if (self && self->GetWrapperPreserveColor()) {
    4115           0 :     PreserveWrapper(self);
    4116             :   }
    4117           0 :   return true;
    4118             : }
    4119             : 
    4120             : static void
    4121           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    4122             : {
    4123           0 :   mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs>(obj);
    4124           0 :   if (self) {
    4125           0 :     ClearWrapper(self, self, obj);
    4126           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs>(self);
    4127             :   }
    4128           0 : }
    4129             : 
    4130             : static void
    4131           0 : _objectMoved(JSObject* obj, const JSObject* old)
    4132             : {
    4133           0 :   mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs>(obj);
    4134           0 :   if (self) {
    4135           0 :     UpdateWrapper(self, self, obj, old);
    4136             :   }
    4137           0 : }
    4138             : 
    4139             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    4140             : #if defined(__clang__)
    4141             : #pragma clang diagnostic push
    4142             : #pragma clang diagnostic ignored "-Wmissing-braces"
    4143             : #endif
    4144             : static const JSPropertySpec sAttributes_specs[] = {
    4145             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
    4146             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
    4147             :   { "x2", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x2_getterinfo, GenericBindingSetter, &x2_setterinfo },
    4148             :   { "y2", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y2_getterinfo, GenericBindingSetter, &y2_setterinfo },
    4149             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    4150             : };
    4151             : #if defined(__clang__)
    4152             : #pragma clang diagnostic pop
    4153             : #endif
    4154             : 
    4155             : 
    4156             : // Can't be const because the pref-enabled boolean needs to be writable
    4157             : static Prefable<const JSPropertySpec> sAttributes[] = {
    4158             :   { nullptr, &sAttributes_specs[0] },
    4159             :   { nullptr, nullptr }
    4160             : };
    4161             : 
    4162             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    4163             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    4164             : static_assert(4 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    4165             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    4166             : 
    4167             : 
    4168             : static uint16_t sNativeProperties_sortedPropertyIndices[4];
    4169             : static PropertyInfo sNativeProperties_propertyInfos[4];
    4170             : 
    4171             : static const NativePropertiesN<1> sNativeProperties = {
    4172             :   false, 0,
    4173             :   false, 0,
    4174             :   false, 0,
    4175             :   true,  0 /* sAttributes */,
    4176             :   false, 0,
    4177             :   false, 0,
    4178             :   false, 0,
    4179             :   -1,
    4180             :   4,
    4181             :   sNativeProperties_sortedPropertyIndices,
    4182             :   {
    4183             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    4184             :   }
    4185             : };
    4186             : static_assert(4 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    4187             :     "We have a property info count that is oversized");
    4188             : 
    4189             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    4190             :   {
    4191             :     "Function",
    4192             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    4193             :     &sBoringInterfaceObjectClassClassOps,
    4194             :     JS_NULL_CLASS_SPEC,
    4195             :     JS_NULL_CLASS_EXT,
    4196             :     &sInterfaceObjectClassObjectOps
    4197             :   },
    4198             :   eInterface,
    4199             :   true,
    4200             :   prototypes::id::SVGPathSegCurvetoCubicSmoothAbs,
    4201             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothAbs>::Depth,
    4202             :   sNativePropertyHooks,
    4203             :   "function SVGPathSegCurvetoCubicSmoothAbs() {\n    [native code]\n}",
    4204             :   SVGPathSegBinding::GetConstructorObject
    4205             : };
    4206             : 
    4207             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    4208             :   {
    4209             :     "SVGPathSegCurvetoCubicSmoothAbsPrototype",
    4210             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    4211             :     JS_NULL_CLASS_OPS,
    4212             :     JS_NULL_CLASS_SPEC,
    4213             :     JS_NULL_CLASS_EXT,
    4214             :     JS_NULL_OBJECT_OPS
    4215             :   },
    4216             :   eInterfacePrototype,
    4217             :   false,
    4218             :   prototypes::id::SVGPathSegCurvetoCubicSmoothAbs,
    4219             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothAbs>::Depth,
    4220             :   sNativePropertyHooks,
    4221             :   "[object SVGPathSegCurvetoCubicSmoothAbsPrototype]",
    4222             :   SVGPathSegBinding::GetProtoObject
    4223             : };
    4224             : 
    4225             : JSObject*
    4226           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    4227             : {
    4228           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    4229             : }
    4230             : 
    4231             : static const js::ClassOps sClassOps = {
    4232             :   _addProperty, /* addProperty */
    4233             :   nullptr,               /* delProperty */
    4234             :   nullptr,               /* getProperty */
    4235             :   nullptr,               /* setProperty */
    4236             :   nullptr,               /* enumerate */
    4237             :   nullptr, /* newEnumerate */
    4238             :   nullptr, /* resolve */
    4239             :   nullptr, /* mayResolve */
    4240             :   _finalize, /* finalize */
    4241             :   nullptr, /* call */
    4242             :   nullptr,               /* hasInstance */
    4243             :   nullptr,               /* construct */
    4244             :   nullptr, /* trace */
    4245             : };
    4246             : 
    4247             : static const js::ClassExtension sClassExtension = {
    4248             :   nullptr, /* weakmapKeyDelegateOp */
    4249             :   _objectMoved /* objectMovedOp */
    4250             : };
    4251             : 
    4252             : static const DOMJSClass sClass = {
    4253             :   { "SVGPathSegCurvetoCubicSmoothAbs",
    4254             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    4255             :     &sClassOps,
    4256             :     JS_NULL_CLASS_SPEC,
    4257             :     &sClassExtension,
    4258             :     JS_NULL_OBJECT_OPS
    4259             :   },
    4260             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegCurvetoCubicSmoothAbs, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    4261             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs >::value,
    4262             :   sNativePropertyHooks,
    4263             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs>::Get,
    4264             :   GetProtoObjectHandle,
    4265             :   GetCCParticipant<mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs>::Get()
    4266             : };
    4267             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    4268             :               "Must have the right minimal number of reserved slots.");
    4269             : static_assert(1 >= 1,
    4270             :               "Must have enough reserved slots.");
    4271             : 
    4272             : const JSClass*
    4273           0 : GetJSClass()
    4274             : {
    4275           0 :   return sClass.ToJSClass();
    4276             : }
    4277             : 
    4278             : bool
    4279           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    4280             : {
    4281             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs*>(aObject) ==
    4282             :              reinterpret_cast<mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs*>(aObject),
    4283             :              "Multiple inheritance for mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs is broken.");
    4284             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    4285             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    4286             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    4287           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    4288           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    4289           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    4290             :              "You should probably not be using Wrap() directly; use "
    4291             :              "GetOrCreateDOMReflector instead");
    4292             : 
    4293           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    4294             :              "nsISupports must be on our primary inheritance chain");
    4295             : 
    4296           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    4297           0 :   if (!global) {
    4298           0 :     return false;
    4299             :   }
    4300           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    4301           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    4302             : 
    4303             :   // That might have ended up wrapping us already, due to the wonders
    4304             :   // of XBL.  Check for that, and bail out as needed.
    4305           0 :   aReflector.set(aCache->GetWrapper());
    4306           0 :   if (aReflector) {
    4307             : #ifdef DEBUG
    4308           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    4309             : #endif // DEBUG
    4310           0 :     return true;
    4311             :   }
    4312             : 
    4313           0 :   JSAutoCompartment ac(aCx, global);
    4314           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    4315           0 :   if (!canonicalProto) {
    4316           0 :     return false;
    4317             :   }
    4318           0 :   JS::Rooted<JSObject*> proto(aCx);
    4319           0 :   if (aGivenProto) {
    4320           0 :     proto = aGivenProto;
    4321             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    4322             :     // coming in, we changed compartments to that of "parent" so may need
    4323             :     // to wrap the proto here.
    4324           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    4325           0 :       if (!JS_WrapObject(aCx, &proto)) {
    4326           0 :         return false;
    4327             :       }
    4328             :     }
    4329             :   } else {
    4330           0 :     proto = canonicalProto;
    4331             :   }
    4332             : 
    4333           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegCurvetoCubicSmoothAbs> creator(aCx);
    4334           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    4335           0 :   if (!aReflector) {
    4336           0 :     return false;
    4337             :   }
    4338             : 
    4339           0 :   aCache->SetWrapper(aReflector);
    4340           0 :   creator.InitializationSucceeded();
    4341             : 
    4342           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    4343             :              aCache->GetWrapperPreserveColor() == aReflector);
    4344             :   // If proto != canonicalProto, we have to preserve our wrapper;
    4345             :   // otherwise we won't be able to properly recreate it later, since
    4346             :   // we won't know what proto to use.  Note that we don't check
    4347             :   // aGivenProto here, since it's entirely possible (and even
    4348             :   // somewhat common) to have a non-null aGivenProto which is the
    4349             :   // same as canonicalProto.
    4350           0 :   if (proto != canonicalProto) {
    4351           0 :     PreserveWrapper(aObject);
    4352             :   }
    4353             : 
    4354           0 :   return true;
    4355             : }
    4356             : 
    4357             : const NativePropertyHooks sNativePropertyHooks[] = { {
    4358             :   nullptr,
    4359             :   nullptr,
    4360             :   nullptr,
    4361             :   { sNativeProperties.Upcast(), nullptr },
    4362             :   prototypes::id::SVGPathSegCurvetoCubicSmoothAbs,
    4363             :   constructors::id::SVGPathSegCurvetoCubicSmoothAbs,
    4364             :   SVGPathSegBinding::sNativePropertyHooks,
    4365             :   &DefaultXrayExpandoObjectClass
    4366             : } };
    4367             : 
    4368             : void
    4369           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    4370             : {
    4371           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    4372           0 :   if (!parentProto) {
    4373           0 :     return;
    4374             :   }
    4375             : 
    4376           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    4377           0 :   if (!constructorProto) {
    4378           0 :     return;
    4379             :   }
    4380             : 
    4381             :   static bool sIdsInited = false;
    4382           0 :   if (!sIdsInited && NS_IsMainThread()) {
    4383           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    4384           0 :       return;
    4385             :     }
    4386           0 :     sIdsInited = true;
    4387             :   }
    4388             : 
    4389           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegCurvetoCubicSmoothAbs);
    4390           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegCurvetoCubicSmoothAbs);
    4391           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    4392             :                               &sPrototypeClass.mBase, protoCache,
    4393             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    4394             :                               interfaceCache,
    4395             :                               sNativeProperties.Upcast(),
    4396             :                               nullptr,
    4397             :                               "SVGPathSegCurvetoCubicSmoothAbs", aDefineOnGlobal,
    4398             :                               nullptr,
    4399           0 :                               false);
    4400             : }
    4401             : 
    4402             : JS::Handle<JSObject*>
    4403           0 : GetProtoObjectHandle(JSContext* aCx)
    4404             : {
    4405             :   /* Get the interface prototype object for this class.  This will create the
    4406             :      object as needed. */
    4407           0 :   bool aDefineOnGlobal = true;
    4408             : 
    4409             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    4410           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    4411           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    4412           0 :     return nullptr;
    4413             :   }
    4414             : 
    4415             :   /* Check to see whether the interface objects are already installed */
    4416           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    4417           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegCurvetoCubicSmoothAbs)) {
    4418           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    4419           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    4420             :   }
    4421             : 
    4422             :   /*
    4423             :    * The object might _still_ be null, but that's OK.
    4424             :    *
    4425             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    4426             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    4427             :    * changed after they have been set.
    4428             :    *
    4429             :    * Calling address() avoids the read read barrier that does gray
    4430             :    * unmarking, but it's not possible for the object to be gray here.
    4431             :    */
    4432             : 
    4433           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegCurvetoCubicSmoothAbs);
    4434           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    4435           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    4436             : }
    4437             : 
    4438             : JS::Handle<JSObject*>
    4439           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    4440             : {
    4441             :   /* Get the interface object for this class.  This will create the object as
    4442             :      needed. */
    4443             : 
    4444             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    4445           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    4446           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    4447           0 :     return nullptr;
    4448             :   }
    4449             : 
    4450             :   /* Check to see whether the interface objects are already installed */
    4451           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    4452           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegCurvetoCubicSmoothAbs)) {
    4453           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    4454           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    4455             :   }
    4456             : 
    4457             :   /*
    4458             :    * The object might _still_ be null, but that's OK.
    4459             :    *
    4460             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    4461             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    4462             :    * changed after they have been set.
    4463             :    *
    4464             :    * Calling address() avoids the read read barrier that does gray
    4465             :    * unmarking, but it's not possible for the object to be gray here.
    4466             :    */
    4467             : 
    4468           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegCurvetoCubicSmoothAbs);
    4469           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    4470           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    4471             : }
    4472             : 
    4473             : JSObject*
    4474           0 : GetConstructorObject(JSContext* aCx)
    4475             : {
    4476           0 :   return GetConstructorObjectHandle(aCx);
    4477             : }
    4478             : 
    4479             : } // namespace SVGPathSegCurvetoCubicSmoothAbsBinding
    4480             : 
    4481             : 
    4482             : 
    4483             : namespace SVGPathSegCurvetoCubicSmoothRelBinding {
    4484             : 
    4485             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    4486             :               "Can't inherit from an interface with a different ownership model.");
    4487             : 
    4488             : static bool
    4489           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothRel* self, JSJitGetterCallArgs args)
    4490             : {
    4491           0 :   float result(self->X());
    4492           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    4493           0 :   args.rval().set(JS_NumberValue(double(result)));
    4494           0 :   return true;
    4495             : }
    4496             : 
    4497             : static bool
    4498           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothRel* self, JSJitSetterCallArgs args)
    4499             : {
    4500             :   float arg0;
    4501           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    4502           0 :     return false;
    4503           0 :   } else if (!mozilla::IsFinite(arg0)) {
    4504           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicSmoothRel.x");
    4505           0 :     return false;
    4506             :   }
    4507           0 :   binding_detail::FastErrorResult rv;
    4508           0 :   self->SetX(arg0, rv);
    4509           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    4510           0 :     return false;
    4511             :   }
    4512           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    4513             : 
    4514           0 :   return true;
    4515             : }
    4516             : 
    4517             : static const JSJitInfo x_getterinfo = {
    4518             :   { (JSJitGetterOp)get_x },
    4519             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothRel },
    4520             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothRel>::Depth },
    4521             :   JSJitInfo::Getter,
    4522             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    4523             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    4524             :   true,  /* isInfallible. False in setters. */
    4525             :   false,  /* isMovable.  Not relevant for setters. */
    4526             :   false, /* isEliminatable.  Not relevant for setters. */
    4527             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    4528             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    4529             :   false,  /* isTypedMethod.  Only relevant for methods. */
    4530             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    4531             : };
    4532             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    4533             : static_assert(0 < 1, "There is no slot for us");
    4534             : static const JSJitInfo x_setterinfo = {
    4535             :   { (JSJitGetterOp)set_x },
    4536             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothRel },
    4537             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothRel>::Depth },
    4538             :   JSJitInfo::Setter,
    4539             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    4540             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    4541             :   false,  /* isInfallible. False in setters. */
    4542             :   false,  /* isMovable.  Not relevant for setters. */
    4543             :   false, /* isEliminatable.  Not relevant for setters. */
    4544             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    4545             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    4546             :   false,  /* isTypedMethod.  Only relevant for methods. */
    4547             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    4548             : };
    4549             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    4550             : static_assert(0 < 1, "There is no slot for us");
    4551             : 
    4552             : static bool
    4553           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothRel* self, JSJitGetterCallArgs args)
    4554             : {
    4555           0 :   float result(self->Y());
    4556           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    4557           0 :   args.rval().set(JS_NumberValue(double(result)));
    4558           0 :   return true;
    4559             : }
    4560             : 
    4561             : static bool
    4562           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothRel* self, JSJitSetterCallArgs args)
    4563             : {
    4564             :   float arg0;
    4565           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    4566           0 :     return false;
    4567           0 :   } else if (!mozilla::IsFinite(arg0)) {
    4568           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicSmoothRel.y");
    4569           0 :     return false;
    4570             :   }
    4571           0 :   binding_detail::FastErrorResult rv;
    4572           0 :   self->SetY(arg0, rv);
    4573           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    4574           0 :     return false;
    4575             :   }
    4576           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    4577             : 
    4578           0 :   return true;
    4579             : }
    4580             : 
    4581             : static const JSJitInfo y_getterinfo = {
    4582             :   { (JSJitGetterOp)get_y },
    4583             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothRel },
    4584             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothRel>::Depth },
    4585             :   JSJitInfo::Getter,
    4586             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    4587             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    4588             :   true,  /* isInfallible. False in setters. */
    4589             :   false,  /* isMovable.  Not relevant for setters. */
    4590             :   false, /* isEliminatable.  Not relevant for setters. */
    4591             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    4592             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    4593             :   false,  /* isTypedMethod.  Only relevant for methods. */
    4594             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    4595             : };
    4596             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    4597             : static_assert(0 < 1, "There is no slot for us");
    4598             : static const JSJitInfo y_setterinfo = {
    4599             :   { (JSJitGetterOp)set_y },
    4600             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothRel },
    4601             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothRel>::Depth },
    4602             :   JSJitInfo::Setter,
    4603             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    4604             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    4605             :   false,  /* isInfallible. False in setters. */
    4606             :   false,  /* isMovable.  Not relevant for setters. */
    4607             :   false, /* isEliminatable.  Not relevant for setters. */
    4608             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    4609             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    4610             :   false,  /* isTypedMethod.  Only relevant for methods. */
    4611             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    4612             : };
    4613             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    4614             : static_assert(0 < 1, "There is no slot for us");
    4615             : 
    4616             : static bool
    4617           0 : get_x2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothRel* self, JSJitGetterCallArgs args)
    4618             : {
    4619           0 :   float result(self->X2());
    4620           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    4621           0 :   args.rval().set(JS_NumberValue(double(result)));
    4622           0 :   return true;
    4623             : }
    4624             : 
    4625             : static bool
    4626           0 : set_x2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothRel* self, JSJitSetterCallArgs args)
    4627             : {
    4628             :   float arg0;
    4629           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    4630           0 :     return false;
    4631           0 :   } else if (!mozilla::IsFinite(arg0)) {
    4632           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicSmoothRel.x2");
    4633           0 :     return false;
    4634             :   }
    4635           0 :   binding_detail::FastErrorResult rv;
    4636           0 :   self->SetX2(arg0, rv);
    4637           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    4638           0 :     return false;
    4639             :   }
    4640           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    4641             : 
    4642           0 :   return true;
    4643             : }
    4644             : 
    4645             : static const JSJitInfo x2_getterinfo = {
    4646             :   { (JSJitGetterOp)get_x2 },
    4647             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothRel },
    4648             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothRel>::Depth },
    4649             :   JSJitInfo::Getter,
    4650             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    4651             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    4652             :   true,  /* isInfallible. False in setters. */
    4653             :   false,  /* isMovable.  Not relevant for setters. */
    4654             :   false, /* isEliminatable.  Not relevant for setters. */
    4655             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    4656             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    4657             :   false,  /* isTypedMethod.  Only relevant for methods. */
    4658             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    4659             : };
    4660             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    4661             : static_assert(0 < 1, "There is no slot for us");
    4662             : static const JSJitInfo x2_setterinfo = {
    4663             :   { (JSJitGetterOp)set_x2 },
    4664             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothRel },
    4665             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothRel>::Depth },
    4666             :   JSJitInfo::Setter,
    4667             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    4668             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    4669             :   false,  /* isInfallible. False in setters. */
    4670             :   false,  /* isMovable.  Not relevant for setters. */
    4671             :   false, /* isEliminatable.  Not relevant for setters. */
    4672             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    4673             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    4674             :   false,  /* isTypedMethod.  Only relevant for methods. */
    4675             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    4676             : };
    4677             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    4678             : static_assert(0 < 1, "There is no slot for us");
    4679             : 
    4680             : static bool
    4681           0 : get_y2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothRel* self, JSJitGetterCallArgs args)
    4682             : {
    4683           0 :   float result(self->Y2());
    4684           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    4685           0 :   args.rval().set(JS_NumberValue(double(result)));
    4686           0 :   return true;
    4687             : }
    4688             : 
    4689             : static bool
    4690           0 : set_y2(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoCubicSmoothRel* self, JSJitSetterCallArgs args)
    4691             : {
    4692             :   float arg0;
    4693           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    4694           0 :     return false;
    4695           0 :   } else if (!mozilla::IsFinite(arg0)) {
    4696           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoCubicSmoothRel.y2");
    4697           0 :     return false;
    4698             :   }
    4699           0 :   binding_detail::FastErrorResult rv;
    4700           0 :   self->SetY2(arg0, rv);
    4701           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    4702           0 :     return false;
    4703             :   }
    4704           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    4705             : 
    4706           0 :   return true;
    4707             : }
    4708             : 
    4709             : static const JSJitInfo y2_getterinfo = {
    4710             :   { (JSJitGetterOp)get_y2 },
    4711             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothRel },
    4712             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothRel>::Depth },
    4713             :   JSJitInfo::Getter,
    4714             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    4715             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    4716             :   true,  /* isInfallible. False in setters. */
    4717             :   false,  /* isMovable.  Not relevant for setters. */
    4718             :   false, /* isEliminatable.  Not relevant for setters. */
    4719             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    4720             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    4721             :   false,  /* isTypedMethod.  Only relevant for methods. */
    4722             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    4723             : };
    4724             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    4725             : static_assert(0 < 1, "There is no slot for us");
    4726             : static const JSJitInfo y2_setterinfo = {
    4727             :   { (JSJitGetterOp)set_y2 },
    4728             :   { prototypes::id::SVGPathSegCurvetoCubicSmoothRel },
    4729             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothRel>::Depth },
    4730             :   JSJitInfo::Setter,
    4731             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    4732             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    4733             :   false,  /* isInfallible. False in setters. */
    4734             :   false,  /* isMovable.  Not relevant for setters. */
    4735             :   false, /* isEliminatable.  Not relevant for setters. */
    4736             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    4737             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    4738             :   false,  /* isTypedMethod.  Only relevant for methods. */
    4739             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    4740             : };
    4741             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    4742             : static_assert(0 < 1, "There is no slot for us");
    4743             : 
    4744             : static bool
    4745           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    4746             : {
    4747           0 :   mozilla::DOMSVGPathSegCurvetoCubicSmoothRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoCubicSmoothRel>(obj);
    4748             :   // We don't want to preserve if we don't have a wrapper, and we
    4749             :   // obviously can't preserve if we're not initialized.
    4750           0 :   if (self && self->GetWrapperPreserveColor()) {
    4751           0 :     PreserveWrapper(self);
    4752             :   }
    4753           0 :   return true;
    4754             : }
    4755             : 
    4756             : static void
    4757           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    4758             : {
    4759           0 :   mozilla::DOMSVGPathSegCurvetoCubicSmoothRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoCubicSmoothRel>(obj);
    4760           0 :   if (self) {
    4761           0 :     ClearWrapper(self, self, obj);
    4762           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegCurvetoCubicSmoothRel>(self);
    4763             :   }
    4764           0 : }
    4765             : 
    4766             : static void
    4767           0 : _objectMoved(JSObject* obj, const JSObject* old)
    4768             : {
    4769           0 :   mozilla::DOMSVGPathSegCurvetoCubicSmoothRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoCubicSmoothRel>(obj);
    4770           0 :   if (self) {
    4771           0 :     UpdateWrapper(self, self, obj, old);
    4772             :   }
    4773           0 : }
    4774             : 
    4775             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    4776             : #if defined(__clang__)
    4777             : #pragma clang diagnostic push
    4778             : #pragma clang diagnostic ignored "-Wmissing-braces"
    4779             : #endif
    4780             : static const JSPropertySpec sAttributes_specs[] = {
    4781             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
    4782             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
    4783             :   { "x2", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x2_getterinfo, GenericBindingSetter, &x2_setterinfo },
    4784             :   { "y2", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y2_getterinfo, GenericBindingSetter, &y2_setterinfo },
    4785             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    4786             : };
    4787             : #if defined(__clang__)
    4788             : #pragma clang diagnostic pop
    4789             : #endif
    4790             : 
    4791             : 
    4792             : // Can't be const because the pref-enabled boolean needs to be writable
    4793             : static Prefable<const JSPropertySpec> sAttributes[] = {
    4794             :   { nullptr, &sAttributes_specs[0] },
    4795             :   { nullptr, nullptr }
    4796             : };
    4797             : 
    4798             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    4799             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    4800             : static_assert(4 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    4801             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    4802             : 
    4803             : 
    4804             : static uint16_t sNativeProperties_sortedPropertyIndices[4];
    4805             : static PropertyInfo sNativeProperties_propertyInfos[4];
    4806             : 
    4807             : static const NativePropertiesN<1> sNativeProperties = {
    4808             :   false, 0,
    4809             :   false, 0,
    4810             :   false, 0,
    4811             :   true,  0 /* sAttributes */,
    4812             :   false, 0,
    4813             :   false, 0,
    4814             :   false, 0,
    4815             :   -1,
    4816             :   4,
    4817             :   sNativeProperties_sortedPropertyIndices,
    4818             :   {
    4819             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    4820             :   }
    4821             : };
    4822             : static_assert(4 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    4823             :     "We have a property info count that is oversized");
    4824             : 
    4825             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    4826             :   {
    4827             :     "Function",
    4828             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    4829             :     &sBoringInterfaceObjectClassClassOps,
    4830             :     JS_NULL_CLASS_SPEC,
    4831             :     JS_NULL_CLASS_EXT,
    4832             :     &sInterfaceObjectClassObjectOps
    4833             :   },
    4834             :   eInterface,
    4835             :   true,
    4836             :   prototypes::id::SVGPathSegCurvetoCubicSmoothRel,
    4837             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothRel>::Depth,
    4838             :   sNativePropertyHooks,
    4839             :   "function SVGPathSegCurvetoCubicSmoothRel() {\n    [native code]\n}",
    4840             :   SVGPathSegBinding::GetConstructorObject
    4841             : };
    4842             : 
    4843             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    4844             :   {
    4845             :     "SVGPathSegCurvetoCubicSmoothRelPrototype",
    4846             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    4847             :     JS_NULL_CLASS_OPS,
    4848             :     JS_NULL_CLASS_SPEC,
    4849             :     JS_NULL_CLASS_EXT,
    4850             :     JS_NULL_OBJECT_OPS
    4851             :   },
    4852             :   eInterfacePrototype,
    4853             :   false,
    4854             :   prototypes::id::SVGPathSegCurvetoCubicSmoothRel,
    4855             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoCubicSmoothRel>::Depth,
    4856             :   sNativePropertyHooks,
    4857             :   "[object SVGPathSegCurvetoCubicSmoothRelPrototype]",
    4858             :   SVGPathSegBinding::GetProtoObject
    4859             : };
    4860             : 
    4861             : JSObject*
    4862           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    4863             : {
    4864           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    4865             : }
    4866             : 
    4867             : static const js::ClassOps sClassOps = {
    4868             :   _addProperty, /* addProperty */
    4869             :   nullptr,               /* delProperty */
    4870             :   nullptr,               /* getProperty */
    4871             :   nullptr,               /* setProperty */
    4872             :   nullptr,               /* enumerate */
    4873             :   nullptr, /* newEnumerate */
    4874             :   nullptr, /* resolve */
    4875             :   nullptr, /* mayResolve */
    4876             :   _finalize, /* finalize */
    4877             :   nullptr, /* call */
    4878             :   nullptr,               /* hasInstance */
    4879             :   nullptr,               /* construct */
    4880             :   nullptr, /* trace */
    4881             : };
    4882             : 
    4883             : static const js::ClassExtension sClassExtension = {
    4884             :   nullptr, /* weakmapKeyDelegateOp */
    4885             :   _objectMoved /* objectMovedOp */
    4886             : };
    4887             : 
    4888             : static const DOMJSClass sClass = {
    4889             :   { "SVGPathSegCurvetoCubicSmoothRel",
    4890             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    4891             :     &sClassOps,
    4892             :     JS_NULL_CLASS_SPEC,
    4893             :     &sClassExtension,
    4894             :     JS_NULL_OBJECT_OPS
    4895             :   },
    4896             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegCurvetoCubicSmoothRel, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    4897             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegCurvetoCubicSmoothRel >::value,
    4898             :   sNativePropertyHooks,
    4899             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegCurvetoCubicSmoothRel>::Get,
    4900             :   GetProtoObjectHandle,
    4901             :   GetCCParticipant<mozilla::DOMSVGPathSegCurvetoCubicSmoothRel>::Get()
    4902             : };
    4903             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    4904             :               "Must have the right minimal number of reserved slots.");
    4905             : static_assert(1 >= 1,
    4906             :               "Must have enough reserved slots.");
    4907             : 
    4908             : const JSClass*
    4909           0 : GetJSClass()
    4910             : {
    4911           0 :   return sClass.ToJSClass();
    4912             : }
    4913             : 
    4914             : bool
    4915           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegCurvetoCubicSmoothRel* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    4916             : {
    4917             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegCurvetoCubicSmoothRel*>(aObject) ==
    4918             :              reinterpret_cast<mozilla::DOMSVGPathSegCurvetoCubicSmoothRel*>(aObject),
    4919             :              "Multiple inheritance for mozilla::DOMSVGPathSegCurvetoCubicSmoothRel is broken.");
    4920             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    4921             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    4922             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    4923           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    4924           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    4925           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    4926             :              "You should probably not be using Wrap() directly; use "
    4927             :              "GetOrCreateDOMReflector instead");
    4928             : 
    4929           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    4930             :              "nsISupports must be on our primary inheritance chain");
    4931             : 
    4932           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    4933           0 :   if (!global) {
    4934           0 :     return false;
    4935             :   }
    4936           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    4937           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    4938             : 
    4939             :   // That might have ended up wrapping us already, due to the wonders
    4940             :   // of XBL.  Check for that, and bail out as needed.
    4941           0 :   aReflector.set(aCache->GetWrapper());
    4942           0 :   if (aReflector) {
    4943             : #ifdef DEBUG
    4944           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    4945             : #endif // DEBUG
    4946           0 :     return true;
    4947             :   }
    4948             : 
    4949           0 :   JSAutoCompartment ac(aCx, global);
    4950           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    4951           0 :   if (!canonicalProto) {
    4952           0 :     return false;
    4953             :   }
    4954           0 :   JS::Rooted<JSObject*> proto(aCx);
    4955           0 :   if (aGivenProto) {
    4956           0 :     proto = aGivenProto;
    4957             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    4958             :     // coming in, we changed compartments to that of "parent" so may need
    4959             :     // to wrap the proto here.
    4960           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    4961           0 :       if (!JS_WrapObject(aCx, &proto)) {
    4962           0 :         return false;
    4963             :       }
    4964             :     }
    4965             :   } else {
    4966           0 :     proto = canonicalProto;
    4967             :   }
    4968             : 
    4969           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegCurvetoCubicSmoothRel> creator(aCx);
    4970           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    4971           0 :   if (!aReflector) {
    4972           0 :     return false;
    4973             :   }
    4974             : 
    4975           0 :   aCache->SetWrapper(aReflector);
    4976           0 :   creator.InitializationSucceeded();
    4977             : 
    4978           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    4979             :              aCache->GetWrapperPreserveColor() == aReflector);
    4980             :   // If proto != canonicalProto, we have to preserve our wrapper;
    4981             :   // otherwise we won't be able to properly recreate it later, since
    4982             :   // we won't know what proto to use.  Note that we don't check
    4983             :   // aGivenProto here, since it's entirely possible (and even
    4984             :   // somewhat common) to have a non-null aGivenProto which is the
    4985             :   // same as canonicalProto.
    4986           0 :   if (proto != canonicalProto) {
    4987           0 :     PreserveWrapper(aObject);
    4988             :   }
    4989             : 
    4990           0 :   return true;
    4991             : }
    4992             : 
    4993             : const NativePropertyHooks sNativePropertyHooks[] = { {
    4994             :   nullptr,
    4995             :   nullptr,
    4996             :   nullptr,
    4997             :   { sNativeProperties.Upcast(), nullptr },
    4998             :   prototypes::id::SVGPathSegCurvetoCubicSmoothRel,
    4999             :   constructors::id::SVGPathSegCurvetoCubicSmoothRel,
    5000             :   SVGPathSegBinding::sNativePropertyHooks,
    5001             :   &DefaultXrayExpandoObjectClass
    5002             : } };
    5003             : 
    5004             : void
    5005           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    5006             : {
    5007           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    5008           0 :   if (!parentProto) {
    5009           0 :     return;
    5010             :   }
    5011             : 
    5012           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    5013           0 :   if (!constructorProto) {
    5014           0 :     return;
    5015             :   }
    5016             : 
    5017             :   static bool sIdsInited = false;
    5018           0 :   if (!sIdsInited && NS_IsMainThread()) {
    5019           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    5020           0 :       return;
    5021             :     }
    5022           0 :     sIdsInited = true;
    5023             :   }
    5024             : 
    5025           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegCurvetoCubicSmoothRel);
    5026           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegCurvetoCubicSmoothRel);
    5027           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    5028             :                               &sPrototypeClass.mBase, protoCache,
    5029             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    5030             :                               interfaceCache,
    5031             :                               sNativeProperties.Upcast(),
    5032             :                               nullptr,
    5033             :                               "SVGPathSegCurvetoCubicSmoothRel", aDefineOnGlobal,
    5034             :                               nullptr,
    5035           0 :                               false);
    5036             : }
    5037             : 
    5038             : JS::Handle<JSObject*>
    5039           0 : GetProtoObjectHandle(JSContext* aCx)
    5040             : {
    5041             :   /* Get the interface prototype object for this class.  This will create the
    5042             :      object as needed. */
    5043           0 :   bool aDefineOnGlobal = true;
    5044             : 
    5045             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    5046           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    5047           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    5048           0 :     return nullptr;
    5049             :   }
    5050             : 
    5051             :   /* Check to see whether the interface objects are already installed */
    5052           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    5053           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegCurvetoCubicSmoothRel)) {
    5054           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    5055           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    5056             :   }
    5057             : 
    5058             :   /*
    5059             :    * The object might _still_ be null, but that's OK.
    5060             :    *
    5061             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    5062             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    5063             :    * changed after they have been set.
    5064             :    *
    5065             :    * Calling address() avoids the read read barrier that does gray
    5066             :    * unmarking, but it's not possible for the object to be gray here.
    5067             :    */
    5068             : 
    5069           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegCurvetoCubicSmoothRel);
    5070           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    5071           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    5072             : }
    5073             : 
    5074             : JS::Handle<JSObject*>
    5075           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    5076             : {
    5077             :   /* Get the interface object for this class.  This will create the object as
    5078             :      needed. */
    5079             : 
    5080             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    5081           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    5082           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    5083           0 :     return nullptr;
    5084             :   }
    5085             : 
    5086             :   /* Check to see whether the interface objects are already installed */
    5087           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    5088           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegCurvetoCubicSmoothRel)) {
    5089           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    5090           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    5091             :   }
    5092             : 
    5093             :   /*
    5094             :    * The object might _still_ be null, but that's OK.
    5095             :    *
    5096             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    5097             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    5098             :    * changed after they have been set.
    5099             :    *
    5100             :    * Calling address() avoids the read read barrier that does gray
    5101             :    * unmarking, but it's not possible for the object to be gray here.
    5102             :    */
    5103             : 
    5104           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegCurvetoCubicSmoothRel);
    5105           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    5106           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    5107             : }
    5108             : 
    5109             : JSObject*
    5110           0 : GetConstructorObject(JSContext* aCx)
    5111             : {
    5112           0 :   return GetConstructorObjectHandle(aCx);
    5113             : }
    5114             : 
    5115             : } // namespace SVGPathSegCurvetoCubicSmoothRelBinding
    5116             : 
    5117             : 
    5118             : 
    5119             : namespace SVGPathSegCurvetoQuadraticAbsBinding {
    5120             : 
    5121             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    5122             :               "Can't inherit from an interface with a different ownership model.");
    5123             : 
    5124             : static bool
    5125           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticAbs* self, JSJitGetterCallArgs args)
    5126             : {
    5127           0 :   float result(self->X());
    5128           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5129           0 :   args.rval().set(JS_NumberValue(double(result)));
    5130           0 :   return true;
    5131             : }
    5132             : 
    5133             : static bool
    5134           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticAbs* self, JSJitSetterCallArgs args)
    5135             : {
    5136             :   float arg0;
    5137           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    5138           0 :     return false;
    5139           0 :   } else if (!mozilla::IsFinite(arg0)) {
    5140           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoQuadraticAbs.x");
    5141           0 :     return false;
    5142             :   }
    5143           0 :   binding_detail::FastErrorResult rv;
    5144           0 :   self->SetX(arg0, rv);
    5145           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    5146           0 :     return false;
    5147             :   }
    5148           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5149             : 
    5150           0 :   return true;
    5151             : }
    5152             : 
    5153             : static const JSJitInfo x_getterinfo = {
    5154             :   { (JSJitGetterOp)get_x },
    5155             :   { prototypes::id::SVGPathSegCurvetoQuadraticAbs },
    5156             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticAbs>::Depth },
    5157             :   JSJitInfo::Getter,
    5158             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5159             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    5160             :   true,  /* isInfallible. False in setters. */
    5161             :   false,  /* isMovable.  Not relevant for setters. */
    5162             :   false, /* isEliminatable.  Not relevant for setters. */
    5163             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5164             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5165             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5166             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5167             : };
    5168             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5169             : static_assert(0 < 1, "There is no slot for us");
    5170             : static const JSJitInfo x_setterinfo = {
    5171             :   { (JSJitGetterOp)set_x },
    5172             :   { prototypes::id::SVGPathSegCurvetoQuadraticAbs },
    5173             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticAbs>::Depth },
    5174             :   JSJitInfo::Setter,
    5175             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5176             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    5177             :   false,  /* isInfallible. False in setters. */
    5178             :   false,  /* isMovable.  Not relevant for setters. */
    5179             :   false, /* isEliminatable.  Not relevant for setters. */
    5180             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5181             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5182             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5183             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5184             : };
    5185             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5186             : static_assert(0 < 1, "There is no slot for us");
    5187             : 
    5188             : static bool
    5189           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticAbs* self, JSJitGetterCallArgs args)
    5190             : {
    5191           0 :   float result(self->Y());
    5192           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5193           0 :   args.rval().set(JS_NumberValue(double(result)));
    5194           0 :   return true;
    5195             : }
    5196             : 
    5197             : static bool
    5198           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticAbs* self, JSJitSetterCallArgs args)
    5199             : {
    5200             :   float arg0;
    5201           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    5202           0 :     return false;
    5203           0 :   } else if (!mozilla::IsFinite(arg0)) {
    5204           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoQuadraticAbs.y");
    5205           0 :     return false;
    5206             :   }
    5207           0 :   binding_detail::FastErrorResult rv;
    5208           0 :   self->SetY(arg0, rv);
    5209           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    5210           0 :     return false;
    5211             :   }
    5212           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5213             : 
    5214           0 :   return true;
    5215             : }
    5216             : 
    5217             : static const JSJitInfo y_getterinfo = {
    5218             :   { (JSJitGetterOp)get_y },
    5219             :   { prototypes::id::SVGPathSegCurvetoQuadraticAbs },
    5220             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticAbs>::Depth },
    5221             :   JSJitInfo::Getter,
    5222             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5223             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    5224             :   true,  /* isInfallible. False in setters. */
    5225             :   false,  /* isMovable.  Not relevant for setters. */
    5226             :   false, /* isEliminatable.  Not relevant for setters. */
    5227             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5228             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5229             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5230             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5231             : };
    5232             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5233             : static_assert(0 < 1, "There is no slot for us");
    5234             : static const JSJitInfo y_setterinfo = {
    5235             :   { (JSJitGetterOp)set_y },
    5236             :   { prototypes::id::SVGPathSegCurvetoQuadraticAbs },
    5237             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticAbs>::Depth },
    5238             :   JSJitInfo::Setter,
    5239             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5240             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    5241             :   false,  /* isInfallible. False in setters. */
    5242             :   false,  /* isMovable.  Not relevant for setters. */
    5243             :   false, /* isEliminatable.  Not relevant for setters. */
    5244             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5245             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5246             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5247             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5248             : };
    5249             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5250             : static_assert(0 < 1, "There is no slot for us");
    5251             : 
    5252             : static bool
    5253           0 : get_x1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticAbs* self, JSJitGetterCallArgs args)
    5254             : {
    5255           0 :   float result(self->X1());
    5256           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5257           0 :   args.rval().set(JS_NumberValue(double(result)));
    5258           0 :   return true;
    5259             : }
    5260             : 
    5261             : static bool
    5262           0 : set_x1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticAbs* self, JSJitSetterCallArgs args)
    5263             : {
    5264             :   float arg0;
    5265           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    5266           0 :     return false;
    5267           0 :   } else if (!mozilla::IsFinite(arg0)) {
    5268           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoQuadraticAbs.x1");
    5269           0 :     return false;
    5270             :   }
    5271           0 :   binding_detail::FastErrorResult rv;
    5272           0 :   self->SetX1(arg0, rv);
    5273           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    5274           0 :     return false;
    5275             :   }
    5276           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5277             : 
    5278           0 :   return true;
    5279             : }
    5280             : 
    5281             : static const JSJitInfo x1_getterinfo = {
    5282             :   { (JSJitGetterOp)get_x1 },
    5283             :   { prototypes::id::SVGPathSegCurvetoQuadraticAbs },
    5284             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticAbs>::Depth },
    5285             :   JSJitInfo::Getter,
    5286             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5287             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    5288             :   true,  /* isInfallible. False in setters. */
    5289             :   false,  /* isMovable.  Not relevant for setters. */
    5290             :   false, /* isEliminatable.  Not relevant for setters. */
    5291             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5292             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5293             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5294             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5295             : };
    5296             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5297             : static_assert(0 < 1, "There is no slot for us");
    5298             : static const JSJitInfo x1_setterinfo = {
    5299             :   { (JSJitGetterOp)set_x1 },
    5300             :   { prototypes::id::SVGPathSegCurvetoQuadraticAbs },
    5301             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticAbs>::Depth },
    5302             :   JSJitInfo::Setter,
    5303             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5304             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    5305             :   false,  /* isInfallible. False in setters. */
    5306             :   false,  /* isMovable.  Not relevant for setters. */
    5307             :   false, /* isEliminatable.  Not relevant for setters. */
    5308             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5309             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5310             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5311             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5312             : };
    5313             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5314             : static_assert(0 < 1, "There is no slot for us");
    5315             : 
    5316             : static bool
    5317           0 : get_y1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticAbs* self, JSJitGetterCallArgs args)
    5318             : {
    5319           0 :   float result(self->Y1());
    5320           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5321           0 :   args.rval().set(JS_NumberValue(double(result)));
    5322           0 :   return true;
    5323             : }
    5324             : 
    5325             : static bool
    5326           0 : set_y1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticAbs* self, JSJitSetterCallArgs args)
    5327             : {
    5328             :   float arg0;
    5329           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    5330           0 :     return false;
    5331           0 :   } else if (!mozilla::IsFinite(arg0)) {
    5332           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoQuadraticAbs.y1");
    5333           0 :     return false;
    5334             :   }
    5335           0 :   binding_detail::FastErrorResult rv;
    5336           0 :   self->SetY1(arg0, rv);
    5337           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    5338           0 :     return false;
    5339             :   }
    5340           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5341             : 
    5342           0 :   return true;
    5343             : }
    5344             : 
    5345             : static const JSJitInfo y1_getterinfo = {
    5346             :   { (JSJitGetterOp)get_y1 },
    5347             :   { prototypes::id::SVGPathSegCurvetoQuadraticAbs },
    5348             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticAbs>::Depth },
    5349             :   JSJitInfo::Getter,
    5350             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5351             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    5352             :   true,  /* isInfallible. False in setters. */
    5353             :   false,  /* isMovable.  Not relevant for setters. */
    5354             :   false, /* isEliminatable.  Not relevant for setters. */
    5355             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5356             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5357             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5358             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5359             : };
    5360             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5361             : static_assert(0 < 1, "There is no slot for us");
    5362             : static const JSJitInfo y1_setterinfo = {
    5363             :   { (JSJitGetterOp)set_y1 },
    5364             :   { prototypes::id::SVGPathSegCurvetoQuadraticAbs },
    5365             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticAbs>::Depth },
    5366             :   JSJitInfo::Setter,
    5367             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5368             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    5369             :   false,  /* isInfallible. False in setters. */
    5370             :   false,  /* isMovable.  Not relevant for setters. */
    5371             :   false, /* isEliminatable.  Not relevant for setters. */
    5372             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5373             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5374             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5375             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5376             : };
    5377             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5378             : static_assert(0 < 1, "There is no slot for us");
    5379             : 
    5380             : static bool
    5381           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    5382             : {
    5383           0 :   mozilla::DOMSVGPathSegCurvetoQuadraticAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoQuadraticAbs>(obj);
    5384             :   // We don't want to preserve if we don't have a wrapper, and we
    5385             :   // obviously can't preserve if we're not initialized.
    5386           0 :   if (self && self->GetWrapperPreserveColor()) {
    5387           0 :     PreserveWrapper(self);
    5388             :   }
    5389           0 :   return true;
    5390             : }
    5391             : 
    5392             : static void
    5393           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    5394             : {
    5395           0 :   mozilla::DOMSVGPathSegCurvetoQuadraticAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoQuadraticAbs>(obj);
    5396           0 :   if (self) {
    5397           0 :     ClearWrapper(self, self, obj);
    5398           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegCurvetoQuadraticAbs>(self);
    5399             :   }
    5400           0 : }
    5401             : 
    5402             : static void
    5403           0 : _objectMoved(JSObject* obj, const JSObject* old)
    5404             : {
    5405           0 :   mozilla::DOMSVGPathSegCurvetoQuadraticAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoQuadraticAbs>(obj);
    5406           0 :   if (self) {
    5407           0 :     UpdateWrapper(self, self, obj, old);
    5408             :   }
    5409           0 : }
    5410             : 
    5411             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    5412             : #if defined(__clang__)
    5413             : #pragma clang diagnostic push
    5414             : #pragma clang diagnostic ignored "-Wmissing-braces"
    5415             : #endif
    5416             : static const JSPropertySpec sAttributes_specs[] = {
    5417             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
    5418             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
    5419             :   { "x1", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x1_getterinfo, GenericBindingSetter, &x1_setterinfo },
    5420             :   { "y1", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y1_getterinfo, GenericBindingSetter, &y1_setterinfo },
    5421             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    5422             : };
    5423             : #if defined(__clang__)
    5424             : #pragma clang diagnostic pop
    5425             : #endif
    5426             : 
    5427             : 
    5428             : // Can't be const because the pref-enabled boolean needs to be writable
    5429             : static Prefable<const JSPropertySpec> sAttributes[] = {
    5430             :   { nullptr, &sAttributes_specs[0] },
    5431             :   { nullptr, nullptr }
    5432             : };
    5433             : 
    5434             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    5435             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    5436             : static_assert(4 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    5437             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    5438             : 
    5439             : 
    5440             : static uint16_t sNativeProperties_sortedPropertyIndices[4];
    5441             : static PropertyInfo sNativeProperties_propertyInfos[4];
    5442             : 
    5443             : static const NativePropertiesN<1> sNativeProperties = {
    5444             :   false, 0,
    5445             :   false, 0,
    5446             :   false, 0,
    5447             :   true,  0 /* sAttributes */,
    5448             :   false, 0,
    5449             :   false, 0,
    5450             :   false, 0,
    5451             :   -1,
    5452             :   4,
    5453             :   sNativeProperties_sortedPropertyIndices,
    5454             :   {
    5455             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    5456             :   }
    5457             : };
    5458             : static_assert(4 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    5459             :     "We have a property info count that is oversized");
    5460             : 
    5461             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    5462             :   {
    5463             :     "Function",
    5464             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    5465             :     &sBoringInterfaceObjectClassClassOps,
    5466             :     JS_NULL_CLASS_SPEC,
    5467             :     JS_NULL_CLASS_EXT,
    5468             :     &sInterfaceObjectClassObjectOps
    5469             :   },
    5470             :   eInterface,
    5471             :   true,
    5472             :   prototypes::id::SVGPathSegCurvetoQuadraticAbs,
    5473             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticAbs>::Depth,
    5474             :   sNativePropertyHooks,
    5475             :   "function SVGPathSegCurvetoQuadraticAbs() {\n    [native code]\n}",
    5476             :   SVGPathSegBinding::GetConstructorObject
    5477             : };
    5478             : 
    5479             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    5480             :   {
    5481             :     "SVGPathSegCurvetoQuadraticAbsPrototype",
    5482             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    5483             :     JS_NULL_CLASS_OPS,
    5484             :     JS_NULL_CLASS_SPEC,
    5485             :     JS_NULL_CLASS_EXT,
    5486             :     JS_NULL_OBJECT_OPS
    5487             :   },
    5488             :   eInterfacePrototype,
    5489             :   false,
    5490             :   prototypes::id::SVGPathSegCurvetoQuadraticAbs,
    5491             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticAbs>::Depth,
    5492             :   sNativePropertyHooks,
    5493             :   "[object SVGPathSegCurvetoQuadraticAbsPrototype]",
    5494             :   SVGPathSegBinding::GetProtoObject
    5495             : };
    5496             : 
    5497             : JSObject*
    5498           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    5499             : {
    5500           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    5501             : }
    5502             : 
    5503             : static const js::ClassOps sClassOps = {
    5504             :   _addProperty, /* addProperty */
    5505             :   nullptr,               /* delProperty */
    5506             :   nullptr,               /* getProperty */
    5507             :   nullptr,               /* setProperty */
    5508             :   nullptr,               /* enumerate */
    5509             :   nullptr, /* newEnumerate */
    5510             :   nullptr, /* resolve */
    5511             :   nullptr, /* mayResolve */
    5512             :   _finalize, /* finalize */
    5513             :   nullptr, /* call */
    5514             :   nullptr,               /* hasInstance */
    5515             :   nullptr,               /* construct */
    5516             :   nullptr, /* trace */
    5517             : };
    5518             : 
    5519             : static const js::ClassExtension sClassExtension = {
    5520             :   nullptr, /* weakmapKeyDelegateOp */
    5521             :   _objectMoved /* objectMovedOp */
    5522             : };
    5523             : 
    5524             : static const DOMJSClass sClass = {
    5525             :   { "SVGPathSegCurvetoQuadraticAbs",
    5526             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    5527             :     &sClassOps,
    5528             :     JS_NULL_CLASS_SPEC,
    5529             :     &sClassExtension,
    5530             :     JS_NULL_OBJECT_OPS
    5531             :   },
    5532             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegCurvetoQuadraticAbs, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    5533             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegCurvetoQuadraticAbs >::value,
    5534             :   sNativePropertyHooks,
    5535             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegCurvetoQuadraticAbs>::Get,
    5536             :   GetProtoObjectHandle,
    5537             :   GetCCParticipant<mozilla::DOMSVGPathSegCurvetoQuadraticAbs>::Get()
    5538             : };
    5539             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    5540             :               "Must have the right minimal number of reserved slots.");
    5541             : static_assert(1 >= 1,
    5542             :               "Must have enough reserved slots.");
    5543             : 
    5544             : const JSClass*
    5545           0 : GetJSClass()
    5546             : {
    5547           0 :   return sClass.ToJSClass();
    5548             : }
    5549             : 
    5550             : bool
    5551           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegCurvetoQuadraticAbs* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    5552             : {
    5553             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegCurvetoQuadraticAbs*>(aObject) ==
    5554             :              reinterpret_cast<mozilla::DOMSVGPathSegCurvetoQuadraticAbs*>(aObject),
    5555             :              "Multiple inheritance for mozilla::DOMSVGPathSegCurvetoQuadraticAbs is broken.");
    5556             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    5557             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    5558             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    5559           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    5560           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    5561           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    5562             :              "You should probably not be using Wrap() directly; use "
    5563             :              "GetOrCreateDOMReflector instead");
    5564             : 
    5565           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    5566             :              "nsISupports must be on our primary inheritance chain");
    5567             : 
    5568           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    5569           0 :   if (!global) {
    5570           0 :     return false;
    5571             :   }
    5572           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    5573           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    5574             : 
    5575             :   // That might have ended up wrapping us already, due to the wonders
    5576             :   // of XBL.  Check for that, and bail out as needed.
    5577           0 :   aReflector.set(aCache->GetWrapper());
    5578           0 :   if (aReflector) {
    5579             : #ifdef DEBUG
    5580           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    5581             : #endif // DEBUG
    5582           0 :     return true;
    5583             :   }
    5584             : 
    5585           0 :   JSAutoCompartment ac(aCx, global);
    5586           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    5587           0 :   if (!canonicalProto) {
    5588           0 :     return false;
    5589             :   }
    5590           0 :   JS::Rooted<JSObject*> proto(aCx);
    5591           0 :   if (aGivenProto) {
    5592           0 :     proto = aGivenProto;
    5593             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    5594             :     // coming in, we changed compartments to that of "parent" so may need
    5595             :     // to wrap the proto here.
    5596           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    5597           0 :       if (!JS_WrapObject(aCx, &proto)) {
    5598           0 :         return false;
    5599             :       }
    5600             :     }
    5601             :   } else {
    5602           0 :     proto = canonicalProto;
    5603             :   }
    5604             : 
    5605           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegCurvetoQuadraticAbs> creator(aCx);
    5606           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    5607           0 :   if (!aReflector) {
    5608           0 :     return false;
    5609             :   }
    5610             : 
    5611           0 :   aCache->SetWrapper(aReflector);
    5612           0 :   creator.InitializationSucceeded();
    5613             : 
    5614           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    5615             :              aCache->GetWrapperPreserveColor() == aReflector);
    5616             :   // If proto != canonicalProto, we have to preserve our wrapper;
    5617             :   // otherwise we won't be able to properly recreate it later, since
    5618             :   // we won't know what proto to use.  Note that we don't check
    5619             :   // aGivenProto here, since it's entirely possible (and even
    5620             :   // somewhat common) to have a non-null aGivenProto which is the
    5621             :   // same as canonicalProto.
    5622           0 :   if (proto != canonicalProto) {
    5623           0 :     PreserveWrapper(aObject);
    5624             :   }
    5625             : 
    5626           0 :   return true;
    5627             : }
    5628             : 
    5629             : const NativePropertyHooks sNativePropertyHooks[] = { {
    5630             :   nullptr,
    5631             :   nullptr,
    5632             :   nullptr,
    5633             :   { sNativeProperties.Upcast(), nullptr },
    5634             :   prototypes::id::SVGPathSegCurvetoQuadraticAbs,
    5635             :   constructors::id::SVGPathSegCurvetoQuadraticAbs,
    5636             :   SVGPathSegBinding::sNativePropertyHooks,
    5637             :   &DefaultXrayExpandoObjectClass
    5638             : } };
    5639             : 
    5640             : void
    5641           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    5642             : {
    5643           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    5644           0 :   if (!parentProto) {
    5645           0 :     return;
    5646             :   }
    5647             : 
    5648           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    5649           0 :   if (!constructorProto) {
    5650           0 :     return;
    5651             :   }
    5652             : 
    5653             :   static bool sIdsInited = false;
    5654           0 :   if (!sIdsInited && NS_IsMainThread()) {
    5655           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    5656           0 :       return;
    5657             :     }
    5658           0 :     sIdsInited = true;
    5659             :   }
    5660             : 
    5661           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegCurvetoQuadraticAbs);
    5662           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegCurvetoQuadraticAbs);
    5663           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    5664             :                               &sPrototypeClass.mBase, protoCache,
    5665             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    5666             :                               interfaceCache,
    5667             :                               sNativeProperties.Upcast(),
    5668             :                               nullptr,
    5669             :                               "SVGPathSegCurvetoQuadraticAbs", aDefineOnGlobal,
    5670             :                               nullptr,
    5671           0 :                               false);
    5672             : }
    5673             : 
    5674             : JS::Handle<JSObject*>
    5675           0 : GetProtoObjectHandle(JSContext* aCx)
    5676             : {
    5677             :   /* Get the interface prototype object for this class.  This will create the
    5678             :      object as needed. */
    5679           0 :   bool aDefineOnGlobal = true;
    5680             : 
    5681             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    5682           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    5683           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    5684           0 :     return nullptr;
    5685             :   }
    5686             : 
    5687             :   /* Check to see whether the interface objects are already installed */
    5688           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    5689           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegCurvetoQuadraticAbs)) {
    5690           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    5691           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    5692             :   }
    5693             : 
    5694             :   /*
    5695             :    * The object might _still_ be null, but that's OK.
    5696             :    *
    5697             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    5698             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    5699             :    * changed after they have been set.
    5700             :    *
    5701             :    * Calling address() avoids the read read barrier that does gray
    5702             :    * unmarking, but it's not possible for the object to be gray here.
    5703             :    */
    5704             : 
    5705           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegCurvetoQuadraticAbs);
    5706           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    5707           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    5708             : }
    5709             : 
    5710             : JS::Handle<JSObject*>
    5711           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    5712             : {
    5713             :   /* Get the interface object for this class.  This will create the object as
    5714             :      needed. */
    5715             : 
    5716             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    5717           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    5718           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    5719           0 :     return nullptr;
    5720             :   }
    5721             : 
    5722             :   /* Check to see whether the interface objects are already installed */
    5723           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    5724           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegCurvetoQuadraticAbs)) {
    5725           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    5726           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    5727             :   }
    5728             : 
    5729             :   /*
    5730             :    * The object might _still_ be null, but that's OK.
    5731             :    *
    5732             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    5733             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    5734             :    * changed after they have been set.
    5735             :    *
    5736             :    * Calling address() avoids the read read barrier that does gray
    5737             :    * unmarking, but it's not possible for the object to be gray here.
    5738             :    */
    5739             : 
    5740           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegCurvetoQuadraticAbs);
    5741           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    5742           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    5743             : }
    5744             : 
    5745             : JSObject*
    5746           0 : GetConstructorObject(JSContext* aCx)
    5747             : {
    5748           0 :   return GetConstructorObjectHandle(aCx);
    5749             : }
    5750             : 
    5751             : } // namespace SVGPathSegCurvetoQuadraticAbsBinding
    5752             : 
    5753             : 
    5754             : 
    5755             : namespace SVGPathSegCurvetoQuadraticRelBinding {
    5756             : 
    5757             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    5758             :               "Can't inherit from an interface with a different ownership model.");
    5759             : 
    5760             : static bool
    5761           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticRel* self, JSJitGetterCallArgs args)
    5762             : {
    5763           0 :   float result(self->X());
    5764           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5765           0 :   args.rval().set(JS_NumberValue(double(result)));
    5766           0 :   return true;
    5767             : }
    5768             : 
    5769             : static bool
    5770           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticRel* self, JSJitSetterCallArgs args)
    5771             : {
    5772             :   float arg0;
    5773           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    5774           0 :     return false;
    5775           0 :   } else if (!mozilla::IsFinite(arg0)) {
    5776           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoQuadraticRel.x");
    5777           0 :     return false;
    5778             :   }
    5779           0 :   binding_detail::FastErrorResult rv;
    5780           0 :   self->SetX(arg0, rv);
    5781           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    5782           0 :     return false;
    5783             :   }
    5784           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5785             : 
    5786           0 :   return true;
    5787             : }
    5788             : 
    5789             : static const JSJitInfo x_getterinfo = {
    5790             :   { (JSJitGetterOp)get_x },
    5791             :   { prototypes::id::SVGPathSegCurvetoQuadraticRel },
    5792             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticRel>::Depth },
    5793             :   JSJitInfo::Getter,
    5794             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5795             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    5796             :   true,  /* isInfallible. False in setters. */
    5797             :   false,  /* isMovable.  Not relevant for setters. */
    5798             :   false, /* isEliminatable.  Not relevant for setters. */
    5799             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5800             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5801             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5802             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5803             : };
    5804             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5805             : static_assert(0 < 1, "There is no slot for us");
    5806             : static const JSJitInfo x_setterinfo = {
    5807             :   { (JSJitGetterOp)set_x },
    5808             :   { prototypes::id::SVGPathSegCurvetoQuadraticRel },
    5809             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticRel>::Depth },
    5810             :   JSJitInfo::Setter,
    5811             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5812             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    5813             :   false,  /* isInfallible. False in setters. */
    5814             :   false,  /* isMovable.  Not relevant for setters. */
    5815             :   false, /* isEliminatable.  Not relevant for setters. */
    5816             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5817             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5818             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5819             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5820             : };
    5821             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5822             : static_assert(0 < 1, "There is no slot for us");
    5823             : 
    5824             : static bool
    5825           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticRel* self, JSJitGetterCallArgs args)
    5826             : {
    5827           0 :   float result(self->Y());
    5828           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5829           0 :   args.rval().set(JS_NumberValue(double(result)));
    5830           0 :   return true;
    5831             : }
    5832             : 
    5833             : static bool
    5834           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticRel* self, JSJitSetterCallArgs args)
    5835             : {
    5836             :   float arg0;
    5837           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    5838           0 :     return false;
    5839           0 :   } else if (!mozilla::IsFinite(arg0)) {
    5840           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoQuadraticRel.y");
    5841           0 :     return false;
    5842             :   }
    5843           0 :   binding_detail::FastErrorResult rv;
    5844           0 :   self->SetY(arg0, rv);
    5845           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    5846           0 :     return false;
    5847             :   }
    5848           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5849             : 
    5850           0 :   return true;
    5851             : }
    5852             : 
    5853             : static const JSJitInfo y_getterinfo = {
    5854             :   { (JSJitGetterOp)get_y },
    5855             :   { prototypes::id::SVGPathSegCurvetoQuadraticRel },
    5856             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticRel>::Depth },
    5857             :   JSJitInfo::Getter,
    5858             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5859             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    5860             :   true,  /* isInfallible. False in setters. */
    5861             :   false,  /* isMovable.  Not relevant for setters. */
    5862             :   false, /* isEliminatable.  Not relevant for setters. */
    5863             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5864             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5865             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5866             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5867             : };
    5868             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5869             : static_assert(0 < 1, "There is no slot for us");
    5870             : static const JSJitInfo y_setterinfo = {
    5871             :   { (JSJitGetterOp)set_y },
    5872             :   { prototypes::id::SVGPathSegCurvetoQuadraticRel },
    5873             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticRel>::Depth },
    5874             :   JSJitInfo::Setter,
    5875             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5876             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    5877             :   false,  /* isInfallible. False in setters. */
    5878             :   false,  /* isMovable.  Not relevant for setters. */
    5879             :   false, /* isEliminatable.  Not relevant for setters. */
    5880             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5881             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5882             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5883             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5884             : };
    5885             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5886             : static_assert(0 < 1, "There is no slot for us");
    5887             : 
    5888             : static bool
    5889           0 : get_x1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticRel* self, JSJitGetterCallArgs args)
    5890             : {
    5891           0 :   float result(self->X1());
    5892           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5893           0 :   args.rval().set(JS_NumberValue(double(result)));
    5894           0 :   return true;
    5895             : }
    5896             : 
    5897             : static bool
    5898           0 : set_x1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticRel* self, JSJitSetterCallArgs args)
    5899             : {
    5900             :   float arg0;
    5901           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    5902           0 :     return false;
    5903           0 :   } else if (!mozilla::IsFinite(arg0)) {
    5904           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoQuadraticRel.x1");
    5905           0 :     return false;
    5906             :   }
    5907           0 :   binding_detail::FastErrorResult rv;
    5908           0 :   self->SetX1(arg0, rv);
    5909           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    5910           0 :     return false;
    5911             :   }
    5912           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5913             : 
    5914           0 :   return true;
    5915             : }
    5916             : 
    5917             : static const JSJitInfo x1_getterinfo = {
    5918             :   { (JSJitGetterOp)get_x1 },
    5919             :   { prototypes::id::SVGPathSegCurvetoQuadraticRel },
    5920             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticRel>::Depth },
    5921             :   JSJitInfo::Getter,
    5922             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5923             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    5924             :   true,  /* isInfallible. False in setters. */
    5925             :   false,  /* isMovable.  Not relevant for setters. */
    5926             :   false, /* isEliminatable.  Not relevant for setters. */
    5927             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5928             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5929             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5930             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5931             : };
    5932             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5933             : static_assert(0 < 1, "There is no slot for us");
    5934             : static const JSJitInfo x1_setterinfo = {
    5935             :   { (JSJitGetterOp)set_x1 },
    5936             :   { prototypes::id::SVGPathSegCurvetoQuadraticRel },
    5937             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticRel>::Depth },
    5938             :   JSJitInfo::Setter,
    5939             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5940             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    5941             :   false,  /* isInfallible. False in setters. */
    5942             :   false,  /* isMovable.  Not relevant for setters. */
    5943             :   false, /* isEliminatable.  Not relevant for setters. */
    5944             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5945             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5946             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5947             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5948             : };
    5949             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5950             : static_assert(0 < 1, "There is no slot for us");
    5951             : 
    5952             : static bool
    5953           0 : get_y1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticRel* self, JSJitGetterCallArgs args)
    5954             : {
    5955           0 :   float result(self->Y1());
    5956           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5957           0 :   args.rval().set(JS_NumberValue(double(result)));
    5958           0 :   return true;
    5959             : }
    5960             : 
    5961             : static bool
    5962           0 : set_y1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticRel* self, JSJitSetterCallArgs args)
    5963             : {
    5964             :   float arg0;
    5965           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    5966           0 :     return false;
    5967           0 :   } else if (!mozilla::IsFinite(arg0)) {
    5968           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoQuadraticRel.y1");
    5969           0 :     return false;
    5970             :   }
    5971           0 :   binding_detail::FastErrorResult rv;
    5972           0 :   self->SetY1(arg0, rv);
    5973           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    5974           0 :     return false;
    5975             :   }
    5976           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    5977             : 
    5978           0 :   return true;
    5979             : }
    5980             : 
    5981             : static const JSJitInfo y1_getterinfo = {
    5982             :   { (JSJitGetterOp)get_y1 },
    5983             :   { prototypes::id::SVGPathSegCurvetoQuadraticRel },
    5984             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticRel>::Depth },
    5985             :   JSJitInfo::Getter,
    5986             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    5987             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    5988             :   true,  /* isInfallible. False in setters. */
    5989             :   false,  /* isMovable.  Not relevant for setters. */
    5990             :   false, /* isEliminatable.  Not relevant for setters. */
    5991             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    5992             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    5993             :   false,  /* isTypedMethod.  Only relevant for methods. */
    5994             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    5995             : };
    5996             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    5997             : static_assert(0 < 1, "There is no slot for us");
    5998             : static const JSJitInfo y1_setterinfo = {
    5999             :   { (JSJitGetterOp)set_y1 },
    6000             :   { prototypes::id::SVGPathSegCurvetoQuadraticRel },
    6001             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticRel>::Depth },
    6002             :   JSJitInfo::Setter,
    6003             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    6004             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    6005             :   false,  /* isInfallible. False in setters. */
    6006             :   false,  /* isMovable.  Not relevant for setters. */
    6007             :   false, /* isEliminatable.  Not relevant for setters. */
    6008             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    6009             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    6010             :   false,  /* isTypedMethod.  Only relevant for methods. */
    6011             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    6012             : };
    6013             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    6014             : static_assert(0 < 1, "There is no slot for us");
    6015             : 
    6016             : static bool
    6017           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    6018             : {
    6019           0 :   mozilla::DOMSVGPathSegCurvetoQuadraticRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoQuadraticRel>(obj);
    6020             :   // We don't want to preserve if we don't have a wrapper, and we
    6021             :   // obviously can't preserve if we're not initialized.
    6022           0 :   if (self && self->GetWrapperPreserveColor()) {
    6023           0 :     PreserveWrapper(self);
    6024             :   }
    6025           0 :   return true;
    6026             : }
    6027             : 
    6028             : static void
    6029           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    6030             : {
    6031           0 :   mozilla::DOMSVGPathSegCurvetoQuadraticRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoQuadraticRel>(obj);
    6032           0 :   if (self) {
    6033           0 :     ClearWrapper(self, self, obj);
    6034           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegCurvetoQuadraticRel>(self);
    6035             :   }
    6036           0 : }
    6037             : 
    6038             : static void
    6039           0 : _objectMoved(JSObject* obj, const JSObject* old)
    6040             : {
    6041           0 :   mozilla::DOMSVGPathSegCurvetoQuadraticRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoQuadraticRel>(obj);
    6042           0 :   if (self) {
    6043           0 :     UpdateWrapper(self, self, obj, old);
    6044             :   }
    6045           0 : }
    6046             : 
    6047             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    6048             : #if defined(__clang__)
    6049             : #pragma clang diagnostic push
    6050             : #pragma clang diagnostic ignored "-Wmissing-braces"
    6051             : #endif
    6052             : static const JSPropertySpec sAttributes_specs[] = {
    6053             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
    6054             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
    6055             :   { "x1", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x1_getterinfo, GenericBindingSetter, &x1_setterinfo },
    6056             :   { "y1", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y1_getterinfo, GenericBindingSetter, &y1_setterinfo },
    6057             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    6058             : };
    6059             : #if defined(__clang__)
    6060             : #pragma clang diagnostic pop
    6061             : #endif
    6062             : 
    6063             : 
    6064             : // Can't be const because the pref-enabled boolean needs to be writable
    6065             : static Prefable<const JSPropertySpec> sAttributes[] = {
    6066             :   { nullptr, &sAttributes_specs[0] },
    6067             :   { nullptr, nullptr }
    6068             : };
    6069             : 
    6070             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    6071             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    6072             : static_assert(4 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    6073             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    6074             : 
    6075             : 
    6076             : static uint16_t sNativeProperties_sortedPropertyIndices[4];
    6077             : static PropertyInfo sNativeProperties_propertyInfos[4];
    6078             : 
    6079             : static const NativePropertiesN<1> sNativeProperties = {
    6080             :   false, 0,
    6081             :   false, 0,
    6082             :   false, 0,
    6083             :   true,  0 /* sAttributes */,
    6084             :   false, 0,
    6085             :   false, 0,
    6086             :   false, 0,
    6087             :   -1,
    6088             :   4,
    6089             :   sNativeProperties_sortedPropertyIndices,
    6090             :   {
    6091             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    6092             :   }
    6093             : };
    6094             : static_assert(4 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    6095             :     "We have a property info count that is oversized");
    6096             : 
    6097             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    6098             :   {
    6099             :     "Function",
    6100             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    6101             :     &sBoringInterfaceObjectClassClassOps,
    6102             :     JS_NULL_CLASS_SPEC,
    6103             :     JS_NULL_CLASS_EXT,
    6104             :     &sInterfaceObjectClassObjectOps
    6105             :   },
    6106             :   eInterface,
    6107             :   true,
    6108             :   prototypes::id::SVGPathSegCurvetoQuadraticRel,
    6109             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticRel>::Depth,
    6110             :   sNativePropertyHooks,
    6111             :   "function SVGPathSegCurvetoQuadraticRel() {\n    [native code]\n}",
    6112             :   SVGPathSegBinding::GetConstructorObject
    6113             : };
    6114             : 
    6115             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    6116             :   {
    6117             :     "SVGPathSegCurvetoQuadraticRelPrototype",
    6118             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    6119             :     JS_NULL_CLASS_OPS,
    6120             :     JS_NULL_CLASS_SPEC,
    6121             :     JS_NULL_CLASS_EXT,
    6122             :     JS_NULL_OBJECT_OPS
    6123             :   },
    6124             :   eInterfacePrototype,
    6125             :   false,
    6126             :   prototypes::id::SVGPathSegCurvetoQuadraticRel,
    6127             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticRel>::Depth,
    6128             :   sNativePropertyHooks,
    6129             :   "[object SVGPathSegCurvetoQuadraticRelPrototype]",
    6130             :   SVGPathSegBinding::GetProtoObject
    6131             : };
    6132             : 
    6133             : JSObject*
    6134           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    6135             : {
    6136           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    6137             : }
    6138             : 
    6139             : static const js::ClassOps sClassOps = {
    6140             :   _addProperty, /* addProperty */
    6141             :   nullptr,               /* delProperty */
    6142             :   nullptr,               /* getProperty */
    6143             :   nullptr,               /* setProperty */
    6144             :   nullptr,               /* enumerate */
    6145             :   nullptr, /* newEnumerate */
    6146             :   nullptr, /* resolve */
    6147             :   nullptr, /* mayResolve */
    6148             :   _finalize, /* finalize */
    6149             :   nullptr, /* call */
    6150             :   nullptr,               /* hasInstance */
    6151             :   nullptr,               /* construct */
    6152             :   nullptr, /* trace */
    6153             : };
    6154             : 
    6155             : static const js::ClassExtension sClassExtension = {
    6156             :   nullptr, /* weakmapKeyDelegateOp */
    6157             :   _objectMoved /* objectMovedOp */
    6158             : };
    6159             : 
    6160             : static const DOMJSClass sClass = {
    6161             :   { "SVGPathSegCurvetoQuadraticRel",
    6162             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    6163             :     &sClassOps,
    6164             :     JS_NULL_CLASS_SPEC,
    6165             :     &sClassExtension,
    6166             :     JS_NULL_OBJECT_OPS
    6167             :   },
    6168             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegCurvetoQuadraticRel, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    6169             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegCurvetoQuadraticRel >::value,
    6170             :   sNativePropertyHooks,
    6171             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegCurvetoQuadraticRel>::Get,
    6172             :   GetProtoObjectHandle,
    6173             :   GetCCParticipant<mozilla::DOMSVGPathSegCurvetoQuadraticRel>::Get()
    6174             : };
    6175             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    6176             :               "Must have the right minimal number of reserved slots.");
    6177             : static_assert(1 >= 1,
    6178             :               "Must have enough reserved slots.");
    6179             : 
    6180             : const JSClass*
    6181           0 : GetJSClass()
    6182             : {
    6183           0 :   return sClass.ToJSClass();
    6184             : }
    6185             : 
    6186             : bool
    6187           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegCurvetoQuadraticRel* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    6188             : {
    6189             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegCurvetoQuadraticRel*>(aObject) ==
    6190             :              reinterpret_cast<mozilla::DOMSVGPathSegCurvetoQuadraticRel*>(aObject),
    6191             :              "Multiple inheritance for mozilla::DOMSVGPathSegCurvetoQuadraticRel is broken.");
    6192             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    6193             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    6194             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    6195           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    6196           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    6197           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    6198             :              "You should probably not be using Wrap() directly; use "
    6199             :              "GetOrCreateDOMReflector instead");
    6200             : 
    6201           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    6202             :              "nsISupports must be on our primary inheritance chain");
    6203             : 
    6204           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    6205           0 :   if (!global) {
    6206           0 :     return false;
    6207             :   }
    6208           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    6209           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    6210             : 
    6211             :   // That might have ended up wrapping us already, due to the wonders
    6212             :   // of XBL.  Check for that, and bail out as needed.
    6213           0 :   aReflector.set(aCache->GetWrapper());
    6214           0 :   if (aReflector) {
    6215             : #ifdef DEBUG
    6216           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    6217             : #endif // DEBUG
    6218           0 :     return true;
    6219             :   }
    6220             : 
    6221           0 :   JSAutoCompartment ac(aCx, global);
    6222           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    6223           0 :   if (!canonicalProto) {
    6224           0 :     return false;
    6225             :   }
    6226           0 :   JS::Rooted<JSObject*> proto(aCx);
    6227           0 :   if (aGivenProto) {
    6228           0 :     proto = aGivenProto;
    6229             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    6230             :     // coming in, we changed compartments to that of "parent" so may need
    6231             :     // to wrap the proto here.
    6232           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    6233           0 :       if (!JS_WrapObject(aCx, &proto)) {
    6234           0 :         return false;
    6235             :       }
    6236             :     }
    6237             :   } else {
    6238           0 :     proto = canonicalProto;
    6239             :   }
    6240             : 
    6241           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegCurvetoQuadraticRel> creator(aCx);
    6242           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    6243           0 :   if (!aReflector) {
    6244           0 :     return false;
    6245             :   }
    6246             : 
    6247           0 :   aCache->SetWrapper(aReflector);
    6248           0 :   creator.InitializationSucceeded();
    6249             : 
    6250           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    6251             :              aCache->GetWrapperPreserveColor() == aReflector);
    6252             :   // If proto != canonicalProto, we have to preserve our wrapper;
    6253             :   // otherwise we won't be able to properly recreate it later, since
    6254             :   // we won't know what proto to use.  Note that we don't check
    6255             :   // aGivenProto here, since it's entirely possible (and even
    6256             :   // somewhat common) to have a non-null aGivenProto which is the
    6257             :   // same as canonicalProto.
    6258           0 :   if (proto != canonicalProto) {
    6259           0 :     PreserveWrapper(aObject);
    6260             :   }
    6261             : 
    6262           0 :   return true;
    6263             : }
    6264             : 
    6265             : const NativePropertyHooks sNativePropertyHooks[] = { {
    6266             :   nullptr,
    6267             :   nullptr,
    6268             :   nullptr,
    6269             :   { sNativeProperties.Upcast(), nullptr },
    6270             :   prototypes::id::SVGPathSegCurvetoQuadraticRel,
    6271             :   constructors::id::SVGPathSegCurvetoQuadraticRel,
    6272             :   SVGPathSegBinding::sNativePropertyHooks,
    6273             :   &DefaultXrayExpandoObjectClass
    6274             : } };
    6275             : 
    6276             : void
    6277           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    6278             : {
    6279           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    6280           0 :   if (!parentProto) {
    6281           0 :     return;
    6282             :   }
    6283             : 
    6284           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    6285           0 :   if (!constructorProto) {
    6286           0 :     return;
    6287             :   }
    6288             : 
    6289             :   static bool sIdsInited = false;
    6290           0 :   if (!sIdsInited && NS_IsMainThread()) {
    6291           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    6292           0 :       return;
    6293             :     }
    6294           0 :     sIdsInited = true;
    6295             :   }
    6296             : 
    6297           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegCurvetoQuadraticRel);
    6298           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegCurvetoQuadraticRel);
    6299           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    6300             :                               &sPrototypeClass.mBase, protoCache,
    6301             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    6302             :                               interfaceCache,
    6303             :                               sNativeProperties.Upcast(),
    6304             :                               nullptr,
    6305             :                               "SVGPathSegCurvetoQuadraticRel", aDefineOnGlobal,
    6306             :                               nullptr,
    6307           0 :                               false);
    6308             : }
    6309             : 
    6310             : JS::Handle<JSObject*>
    6311           0 : GetProtoObjectHandle(JSContext* aCx)
    6312             : {
    6313             :   /* Get the interface prototype object for this class.  This will create the
    6314             :      object as needed. */
    6315           0 :   bool aDefineOnGlobal = true;
    6316             : 
    6317             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    6318           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    6319           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    6320           0 :     return nullptr;
    6321             :   }
    6322             : 
    6323             :   /* Check to see whether the interface objects are already installed */
    6324           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    6325           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegCurvetoQuadraticRel)) {
    6326           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    6327           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    6328             :   }
    6329             : 
    6330             :   /*
    6331             :    * The object might _still_ be null, but that's OK.
    6332             :    *
    6333             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    6334             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    6335             :    * changed after they have been set.
    6336             :    *
    6337             :    * Calling address() avoids the read read barrier that does gray
    6338             :    * unmarking, but it's not possible for the object to be gray here.
    6339             :    */
    6340             : 
    6341           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegCurvetoQuadraticRel);
    6342           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    6343           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    6344             : }
    6345             : 
    6346             : JS::Handle<JSObject*>
    6347           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    6348             : {
    6349             :   /* Get the interface object for this class.  This will create the object as
    6350             :      needed. */
    6351             : 
    6352             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    6353           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    6354           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    6355           0 :     return nullptr;
    6356             :   }
    6357             : 
    6358             :   /* Check to see whether the interface objects are already installed */
    6359           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    6360           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegCurvetoQuadraticRel)) {
    6361           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    6362           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    6363             :   }
    6364             : 
    6365             :   /*
    6366             :    * The object might _still_ be null, but that's OK.
    6367             :    *
    6368             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    6369             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    6370             :    * changed after they have been set.
    6371             :    *
    6372             :    * Calling address() avoids the read read barrier that does gray
    6373             :    * unmarking, but it's not possible for the object to be gray here.
    6374             :    */
    6375             : 
    6376           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegCurvetoQuadraticRel);
    6377           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    6378           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    6379             : }
    6380             : 
    6381             : JSObject*
    6382           0 : GetConstructorObject(JSContext* aCx)
    6383             : {
    6384           0 :   return GetConstructorObjectHandle(aCx);
    6385             : }
    6386             : 
    6387             : } // namespace SVGPathSegCurvetoQuadraticRelBinding
    6388             : 
    6389             : 
    6390             : 
    6391             : namespace SVGPathSegCurvetoQuadraticSmoothAbsBinding {
    6392             : 
    6393             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    6394             :               "Can't inherit from an interface with a different ownership model.");
    6395             : 
    6396             : static bool
    6397           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs* self, JSJitGetterCallArgs args)
    6398             : {
    6399           0 :   float result(self->X());
    6400           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    6401           0 :   args.rval().set(JS_NumberValue(double(result)));
    6402           0 :   return true;
    6403             : }
    6404             : 
    6405             : static bool
    6406           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs* self, JSJitSetterCallArgs args)
    6407             : {
    6408             :   float arg0;
    6409           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    6410           0 :     return false;
    6411           0 :   } else if (!mozilla::IsFinite(arg0)) {
    6412           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoQuadraticSmoothAbs.x");
    6413           0 :     return false;
    6414             :   }
    6415           0 :   binding_detail::FastErrorResult rv;
    6416           0 :   self->SetX(arg0, rv);
    6417           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    6418           0 :     return false;
    6419             :   }
    6420           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    6421             : 
    6422           0 :   return true;
    6423             : }
    6424             : 
    6425             : static const JSJitInfo x_getterinfo = {
    6426             :   { (JSJitGetterOp)get_x },
    6427             :   { prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs },
    6428             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs>::Depth },
    6429             :   JSJitInfo::Getter,
    6430             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    6431             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    6432             :   true,  /* isInfallible. False in setters. */
    6433             :   false,  /* isMovable.  Not relevant for setters. */
    6434             :   false, /* isEliminatable.  Not relevant for setters. */
    6435             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    6436             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    6437             :   false,  /* isTypedMethod.  Only relevant for methods. */
    6438             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    6439             : };
    6440             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    6441             : static_assert(0 < 1, "There is no slot for us");
    6442             : static const JSJitInfo x_setterinfo = {
    6443             :   { (JSJitGetterOp)set_x },
    6444             :   { prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs },
    6445             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs>::Depth },
    6446             :   JSJitInfo::Setter,
    6447             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    6448             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    6449             :   false,  /* isInfallible. False in setters. */
    6450             :   false,  /* isMovable.  Not relevant for setters. */
    6451             :   false, /* isEliminatable.  Not relevant for setters. */
    6452             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    6453             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    6454             :   false,  /* isTypedMethod.  Only relevant for methods. */
    6455             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    6456             : };
    6457             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    6458             : static_assert(0 < 1, "There is no slot for us");
    6459             : 
    6460             : static bool
    6461           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs* self, JSJitGetterCallArgs args)
    6462             : {
    6463           0 :   float result(self->Y());
    6464           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    6465           0 :   args.rval().set(JS_NumberValue(double(result)));
    6466           0 :   return true;
    6467             : }
    6468             : 
    6469             : static bool
    6470           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs* self, JSJitSetterCallArgs args)
    6471             : {
    6472             :   float arg0;
    6473           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    6474           0 :     return false;
    6475           0 :   } else if (!mozilla::IsFinite(arg0)) {
    6476           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoQuadraticSmoothAbs.y");
    6477           0 :     return false;
    6478             :   }
    6479           0 :   binding_detail::FastErrorResult rv;
    6480           0 :   self->SetY(arg0, rv);
    6481           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    6482           0 :     return false;
    6483             :   }
    6484           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    6485             : 
    6486           0 :   return true;
    6487             : }
    6488             : 
    6489             : static const JSJitInfo y_getterinfo = {
    6490             :   { (JSJitGetterOp)get_y },
    6491             :   { prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs },
    6492             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs>::Depth },
    6493             :   JSJitInfo::Getter,
    6494             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    6495             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    6496             :   true,  /* isInfallible. False in setters. */
    6497             :   false,  /* isMovable.  Not relevant for setters. */
    6498             :   false, /* isEliminatable.  Not relevant for setters. */
    6499             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    6500             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    6501             :   false,  /* isTypedMethod.  Only relevant for methods. */
    6502             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    6503             : };
    6504             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    6505             : static_assert(0 < 1, "There is no slot for us");
    6506             : static const JSJitInfo y_setterinfo = {
    6507             :   { (JSJitGetterOp)set_y },
    6508             :   { prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs },
    6509             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs>::Depth },
    6510             :   JSJitInfo::Setter,
    6511             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    6512             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    6513             :   false,  /* isInfallible. False in setters. */
    6514             :   false,  /* isMovable.  Not relevant for setters. */
    6515             :   false, /* isEliminatable.  Not relevant for setters. */
    6516             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    6517             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    6518             :   false,  /* isTypedMethod.  Only relevant for methods. */
    6519             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    6520             : };
    6521             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    6522             : static_assert(0 < 1, "There is no slot for us");
    6523             : 
    6524             : static bool
    6525           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    6526             : {
    6527           0 :   mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs>(obj);
    6528             :   // We don't want to preserve if we don't have a wrapper, and we
    6529             :   // obviously can't preserve if we're not initialized.
    6530           0 :   if (self && self->GetWrapperPreserveColor()) {
    6531           0 :     PreserveWrapper(self);
    6532             :   }
    6533           0 :   return true;
    6534             : }
    6535             : 
    6536             : static void
    6537           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    6538             : {
    6539           0 :   mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs>(obj);
    6540           0 :   if (self) {
    6541           0 :     ClearWrapper(self, self, obj);
    6542           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs>(self);
    6543             :   }
    6544           0 : }
    6545             : 
    6546             : static void
    6547           0 : _objectMoved(JSObject* obj, const JSObject* old)
    6548             : {
    6549           0 :   mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs>(obj);
    6550           0 :   if (self) {
    6551           0 :     UpdateWrapper(self, self, obj, old);
    6552             :   }
    6553           0 : }
    6554             : 
    6555             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    6556             : #if defined(__clang__)
    6557             : #pragma clang diagnostic push
    6558             : #pragma clang diagnostic ignored "-Wmissing-braces"
    6559             : #endif
    6560             : static const JSPropertySpec sAttributes_specs[] = {
    6561             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
    6562             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
    6563             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    6564             : };
    6565             : #if defined(__clang__)
    6566             : #pragma clang diagnostic pop
    6567             : #endif
    6568             : 
    6569             : 
    6570             : // Can't be const because the pref-enabled boolean needs to be writable
    6571             : static Prefable<const JSPropertySpec> sAttributes[] = {
    6572             :   { nullptr, &sAttributes_specs[0] },
    6573             :   { nullptr, nullptr }
    6574             : };
    6575             : 
    6576             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    6577             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    6578             : static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    6579             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    6580             : 
    6581             : 
    6582             : static uint16_t sNativeProperties_sortedPropertyIndices[2];
    6583             : static PropertyInfo sNativeProperties_propertyInfos[2];
    6584             : 
    6585             : static const NativePropertiesN<1> sNativeProperties = {
    6586             :   false, 0,
    6587             :   false, 0,
    6588             :   false, 0,
    6589             :   true,  0 /* sAttributes */,
    6590             :   false, 0,
    6591             :   false, 0,
    6592             :   false, 0,
    6593             :   -1,
    6594             :   2,
    6595             :   sNativeProperties_sortedPropertyIndices,
    6596             :   {
    6597             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    6598             :   }
    6599             : };
    6600             : static_assert(2 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    6601             :     "We have a property info count that is oversized");
    6602             : 
    6603             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    6604             :   {
    6605             :     "Function",
    6606             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    6607             :     &sBoringInterfaceObjectClassClassOps,
    6608             :     JS_NULL_CLASS_SPEC,
    6609             :     JS_NULL_CLASS_EXT,
    6610             :     &sInterfaceObjectClassObjectOps
    6611             :   },
    6612             :   eInterface,
    6613             :   true,
    6614             :   prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs,
    6615             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs>::Depth,
    6616             :   sNativePropertyHooks,
    6617             :   "function SVGPathSegCurvetoQuadraticSmoothAbs() {\n    [native code]\n}",
    6618             :   SVGPathSegBinding::GetConstructorObject
    6619             : };
    6620             : 
    6621             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    6622             :   {
    6623             :     "SVGPathSegCurvetoQuadraticSmoothAbsPrototype",
    6624             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    6625             :     JS_NULL_CLASS_OPS,
    6626             :     JS_NULL_CLASS_SPEC,
    6627             :     JS_NULL_CLASS_EXT,
    6628             :     JS_NULL_OBJECT_OPS
    6629             :   },
    6630             :   eInterfacePrototype,
    6631             :   false,
    6632             :   prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs,
    6633             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs>::Depth,
    6634             :   sNativePropertyHooks,
    6635             :   "[object SVGPathSegCurvetoQuadraticSmoothAbsPrototype]",
    6636             :   SVGPathSegBinding::GetProtoObject
    6637             : };
    6638             : 
    6639             : JSObject*
    6640           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    6641             : {
    6642           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    6643             : }
    6644             : 
    6645             : static const js::ClassOps sClassOps = {
    6646             :   _addProperty, /* addProperty */
    6647             :   nullptr,               /* delProperty */
    6648             :   nullptr,               /* getProperty */
    6649             :   nullptr,               /* setProperty */
    6650             :   nullptr,               /* enumerate */
    6651             :   nullptr, /* newEnumerate */
    6652             :   nullptr, /* resolve */
    6653             :   nullptr, /* mayResolve */
    6654             :   _finalize, /* finalize */
    6655             :   nullptr, /* call */
    6656             :   nullptr,               /* hasInstance */
    6657             :   nullptr,               /* construct */
    6658             :   nullptr, /* trace */
    6659             : };
    6660             : 
    6661             : static const js::ClassExtension sClassExtension = {
    6662             :   nullptr, /* weakmapKeyDelegateOp */
    6663             :   _objectMoved /* objectMovedOp */
    6664             : };
    6665             : 
    6666             : static const DOMJSClass sClass = {
    6667             :   { "SVGPathSegCurvetoQuadraticSmoothAbs",
    6668             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    6669             :     &sClassOps,
    6670             :     JS_NULL_CLASS_SPEC,
    6671             :     &sClassExtension,
    6672             :     JS_NULL_OBJECT_OPS
    6673             :   },
    6674             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    6675             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs >::value,
    6676             :   sNativePropertyHooks,
    6677             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs>::Get,
    6678             :   GetProtoObjectHandle,
    6679             :   GetCCParticipant<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs>::Get()
    6680             : };
    6681             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    6682             :               "Must have the right minimal number of reserved slots.");
    6683             : static_assert(1 >= 1,
    6684             :               "Must have enough reserved slots.");
    6685             : 
    6686             : const JSClass*
    6687           0 : GetJSClass()
    6688             : {
    6689           0 :   return sClass.ToJSClass();
    6690             : }
    6691             : 
    6692             : bool
    6693           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    6694             : {
    6695             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs*>(aObject) ==
    6696             :              reinterpret_cast<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs*>(aObject),
    6697             :              "Multiple inheritance for mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs is broken.");
    6698             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    6699             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    6700             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    6701           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    6702           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    6703           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    6704             :              "You should probably not be using Wrap() directly; use "
    6705             :              "GetOrCreateDOMReflector instead");
    6706             : 
    6707           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    6708             :              "nsISupports must be on our primary inheritance chain");
    6709             : 
    6710           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    6711           0 :   if (!global) {
    6712           0 :     return false;
    6713             :   }
    6714           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    6715           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    6716             : 
    6717             :   // That might have ended up wrapping us already, due to the wonders
    6718             :   // of XBL.  Check for that, and bail out as needed.
    6719           0 :   aReflector.set(aCache->GetWrapper());
    6720           0 :   if (aReflector) {
    6721             : #ifdef DEBUG
    6722           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    6723             : #endif // DEBUG
    6724           0 :     return true;
    6725             :   }
    6726             : 
    6727           0 :   JSAutoCompartment ac(aCx, global);
    6728           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    6729           0 :   if (!canonicalProto) {
    6730           0 :     return false;
    6731             :   }
    6732           0 :   JS::Rooted<JSObject*> proto(aCx);
    6733           0 :   if (aGivenProto) {
    6734           0 :     proto = aGivenProto;
    6735             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    6736             :     // coming in, we changed compartments to that of "parent" so may need
    6737             :     // to wrap the proto here.
    6738           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    6739           0 :       if (!JS_WrapObject(aCx, &proto)) {
    6740           0 :         return false;
    6741             :       }
    6742             :     }
    6743             :   } else {
    6744           0 :     proto = canonicalProto;
    6745             :   }
    6746             : 
    6747           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothAbs> creator(aCx);
    6748           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    6749           0 :   if (!aReflector) {
    6750           0 :     return false;
    6751             :   }
    6752             : 
    6753           0 :   aCache->SetWrapper(aReflector);
    6754           0 :   creator.InitializationSucceeded();
    6755             : 
    6756           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    6757             :              aCache->GetWrapperPreserveColor() == aReflector);
    6758             :   // If proto != canonicalProto, we have to preserve our wrapper;
    6759             :   // otherwise we won't be able to properly recreate it later, since
    6760             :   // we won't know what proto to use.  Note that we don't check
    6761             :   // aGivenProto here, since it's entirely possible (and even
    6762             :   // somewhat common) to have a non-null aGivenProto which is the
    6763             :   // same as canonicalProto.
    6764           0 :   if (proto != canonicalProto) {
    6765           0 :     PreserveWrapper(aObject);
    6766             :   }
    6767             : 
    6768           0 :   return true;
    6769             : }
    6770             : 
    6771             : const NativePropertyHooks sNativePropertyHooks[] = { {
    6772             :   nullptr,
    6773             :   nullptr,
    6774             :   nullptr,
    6775             :   { sNativeProperties.Upcast(), nullptr },
    6776             :   prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs,
    6777             :   constructors::id::SVGPathSegCurvetoQuadraticSmoothAbs,
    6778             :   SVGPathSegBinding::sNativePropertyHooks,
    6779             :   &DefaultXrayExpandoObjectClass
    6780             : } };
    6781             : 
    6782             : void
    6783           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    6784             : {
    6785           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    6786           0 :   if (!parentProto) {
    6787           0 :     return;
    6788             :   }
    6789             : 
    6790           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    6791           0 :   if (!constructorProto) {
    6792           0 :     return;
    6793             :   }
    6794             : 
    6795             :   static bool sIdsInited = false;
    6796           0 :   if (!sIdsInited && NS_IsMainThread()) {
    6797           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    6798           0 :       return;
    6799             :     }
    6800           0 :     sIdsInited = true;
    6801             :   }
    6802             : 
    6803           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs);
    6804           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegCurvetoQuadraticSmoothAbs);
    6805           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    6806             :                               &sPrototypeClass.mBase, protoCache,
    6807             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    6808             :                               interfaceCache,
    6809             :                               sNativeProperties.Upcast(),
    6810             :                               nullptr,
    6811             :                               "SVGPathSegCurvetoQuadraticSmoothAbs", aDefineOnGlobal,
    6812             :                               nullptr,
    6813           0 :                               false);
    6814             : }
    6815             : 
    6816             : JS::Handle<JSObject*>
    6817           0 : GetProtoObjectHandle(JSContext* aCx)
    6818             : {
    6819             :   /* Get the interface prototype object for this class.  This will create the
    6820             :      object as needed. */
    6821           0 :   bool aDefineOnGlobal = true;
    6822             : 
    6823             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    6824           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    6825           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    6826           0 :     return nullptr;
    6827             :   }
    6828             : 
    6829             :   /* Check to see whether the interface objects are already installed */
    6830           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    6831           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs)) {
    6832           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    6833           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    6834             :   }
    6835             : 
    6836             :   /*
    6837             :    * The object might _still_ be null, but that's OK.
    6838             :    *
    6839             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    6840             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    6841             :    * changed after they have been set.
    6842             :    *
    6843             :    * Calling address() avoids the read read barrier that does gray
    6844             :    * unmarking, but it's not possible for the object to be gray here.
    6845             :    */
    6846             : 
    6847           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegCurvetoQuadraticSmoothAbs);
    6848           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    6849           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    6850             : }
    6851             : 
    6852             : JS::Handle<JSObject*>
    6853           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    6854             : {
    6855             :   /* Get the interface object for this class.  This will create the object as
    6856             :      needed. */
    6857             : 
    6858             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    6859           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    6860           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    6861           0 :     return nullptr;
    6862             :   }
    6863             : 
    6864             :   /* Check to see whether the interface objects are already installed */
    6865           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    6866           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegCurvetoQuadraticSmoothAbs)) {
    6867           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    6868           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    6869             :   }
    6870             : 
    6871             :   /*
    6872             :    * The object might _still_ be null, but that's OK.
    6873             :    *
    6874             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    6875             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    6876             :    * changed after they have been set.
    6877             :    *
    6878             :    * Calling address() avoids the read read barrier that does gray
    6879             :    * unmarking, but it's not possible for the object to be gray here.
    6880             :    */
    6881             : 
    6882           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegCurvetoQuadraticSmoothAbs);
    6883           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    6884           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    6885             : }
    6886             : 
    6887             : JSObject*
    6888           0 : GetConstructorObject(JSContext* aCx)
    6889             : {
    6890           0 :   return GetConstructorObjectHandle(aCx);
    6891             : }
    6892             : 
    6893             : } // namespace SVGPathSegCurvetoQuadraticSmoothAbsBinding
    6894             : 
    6895             : 
    6896             : 
    6897             : namespace SVGPathSegCurvetoQuadraticSmoothRelBinding {
    6898             : 
    6899             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    6900             :               "Can't inherit from an interface with a different ownership model.");
    6901             : 
    6902             : static bool
    6903           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel* self, JSJitGetterCallArgs args)
    6904             : {
    6905           0 :   float result(self->X());
    6906           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    6907           0 :   args.rval().set(JS_NumberValue(double(result)));
    6908           0 :   return true;
    6909             : }
    6910             : 
    6911             : static bool
    6912           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel* self, JSJitSetterCallArgs args)
    6913             : {
    6914             :   float arg0;
    6915           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    6916           0 :     return false;
    6917           0 :   } else if (!mozilla::IsFinite(arg0)) {
    6918           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoQuadraticSmoothRel.x");
    6919           0 :     return false;
    6920             :   }
    6921           0 :   binding_detail::FastErrorResult rv;
    6922           0 :   self->SetX(arg0, rv);
    6923           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    6924           0 :     return false;
    6925             :   }
    6926           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    6927             : 
    6928           0 :   return true;
    6929             : }
    6930             : 
    6931             : static const JSJitInfo x_getterinfo = {
    6932             :   { (JSJitGetterOp)get_x },
    6933             :   { prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel },
    6934             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel>::Depth },
    6935             :   JSJitInfo::Getter,
    6936             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    6937             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    6938             :   true,  /* isInfallible. False in setters. */
    6939             :   false,  /* isMovable.  Not relevant for setters. */
    6940             :   false, /* isEliminatable.  Not relevant for setters. */
    6941             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    6942             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    6943             :   false,  /* isTypedMethod.  Only relevant for methods. */
    6944             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    6945             : };
    6946             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    6947             : static_assert(0 < 1, "There is no slot for us");
    6948             : static const JSJitInfo x_setterinfo = {
    6949             :   { (JSJitGetterOp)set_x },
    6950             :   { prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel },
    6951             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel>::Depth },
    6952             :   JSJitInfo::Setter,
    6953             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    6954             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    6955             :   false,  /* isInfallible. False in setters. */
    6956             :   false,  /* isMovable.  Not relevant for setters. */
    6957             :   false, /* isEliminatable.  Not relevant for setters. */
    6958             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    6959             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    6960             :   false,  /* isTypedMethod.  Only relevant for methods. */
    6961             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    6962             : };
    6963             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    6964             : static_assert(0 < 1, "There is no slot for us");
    6965             : 
    6966             : static bool
    6967           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel* self, JSJitGetterCallArgs args)
    6968             : {
    6969           0 :   float result(self->Y());
    6970           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    6971           0 :   args.rval().set(JS_NumberValue(double(result)));
    6972           0 :   return true;
    6973             : }
    6974             : 
    6975             : static bool
    6976           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel* self, JSJitSetterCallArgs args)
    6977             : {
    6978             :   float arg0;
    6979           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    6980           0 :     return false;
    6981           0 :   } else if (!mozilla::IsFinite(arg0)) {
    6982           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegCurvetoQuadraticSmoothRel.y");
    6983           0 :     return false;
    6984             :   }
    6985           0 :   binding_detail::FastErrorResult rv;
    6986           0 :   self->SetY(arg0, rv);
    6987           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    6988           0 :     return false;
    6989             :   }
    6990           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    6991             : 
    6992           0 :   return true;
    6993             : }
    6994             : 
    6995             : static const JSJitInfo y_getterinfo = {
    6996             :   { (JSJitGetterOp)get_y },
    6997             :   { prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel },
    6998             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel>::Depth },
    6999             :   JSJitInfo::Getter,
    7000             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    7001             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    7002             :   true,  /* isInfallible. False in setters. */
    7003             :   false,  /* isMovable.  Not relevant for setters. */
    7004             :   false, /* isEliminatable.  Not relevant for setters. */
    7005             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    7006             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    7007             :   false,  /* isTypedMethod.  Only relevant for methods. */
    7008             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    7009             : };
    7010             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    7011             : static_assert(0 < 1, "There is no slot for us");
    7012             : static const JSJitInfo y_setterinfo = {
    7013             :   { (JSJitGetterOp)set_y },
    7014             :   { prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel },
    7015             :   { PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel>::Depth },
    7016             :   JSJitInfo::Setter,
    7017             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    7018             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    7019             :   false,  /* isInfallible. False in setters. */
    7020             :   false,  /* isMovable.  Not relevant for setters. */
    7021             :   false, /* isEliminatable.  Not relevant for setters. */
    7022             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    7023             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    7024             :   false,  /* isTypedMethod.  Only relevant for methods. */
    7025             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    7026             : };
    7027             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    7028             : static_assert(0 < 1, "There is no slot for us");
    7029             : 
    7030             : static bool
    7031           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    7032             : {
    7033           0 :   mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel>(obj);
    7034             :   // We don't want to preserve if we don't have a wrapper, and we
    7035             :   // obviously can't preserve if we're not initialized.
    7036           0 :   if (self && self->GetWrapperPreserveColor()) {
    7037           0 :     PreserveWrapper(self);
    7038             :   }
    7039           0 :   return true;
    7040             : }
    7041             : 
    7042             : static void
    7043           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    7044             : {
    7045           0 :   mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel>(obj);
    7046           0 :   if (self) {
    7047           0 :     ClearWrapper(self, self, obj);
    7048           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel>(self);
    7049             :   }
    7050           0 : }
    7051             : 
    7052             : static void
    7053           0 : _objectMoved(JSObject* obj, const JSObject* old)
    7054             : {
    7055           0 :   mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel>(obj);
    7056           0 :   if (self) {
    7057           0 :     UpdateWrapper(self, self, obj, old);
    7058             :   }
    7059           0 : }
    7060             : 
    7061             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    7062             : #if defined(__clang__)
    7063             : #pragma clang diagnostic push
    7064             : #pragma clang diagnostic ignored "-Wmissing-braces"
    7065             : #endif
    7066             : static const JSPropertySpec sAttributes_specs[] = {
    7067             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
    7068             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
    7069             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    7070             : };
    7071             : #if defined(__clang__)
    7072             : #pragma clang diagnostic pop
    7073             : #endif
    7074             : 
    7075             : 
    7076             : // Can't be const because the pref-enabled boolean needs to be writable
    7077             : static Prefable<const JSPropertySpec> sAttributes[] = {
    7078             :   { nullptr, &sAttributes_specs[0] },
    7079             :   { nullptr, nullptr }
    7080             : };
    7081             : 
    7082             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    7083             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    7084             : static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    7085             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    7086             : 
    7087             : 
    7088             : static uint16_t sNativeProperties_sortedPropertyIndices[2];
    7089             : static PropertyInfo sNativeProperties_propertyInfos[2];
    7090             : 
    7091             : static const NativePropertiesN<1> sNativeProperties = {
    7092             :   false, 0,
    7093             :   false, 0,
    7094             :   false, 0,
    7095             :   true,  0 /* sAttributes */,
    7096             :   false, 0,
    7097             :   false, 0,
    7098             :   false, 0,
    7099             :   -1,
    7100             :   2,
    7101             :   sNativeProperties_sortedPropertyIndices,
    7102             :   {
    7103             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    7104             :   }
    7105             : };
    7106             : static_assert(2 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    7107             :     "We have a property info count that is oversized");
    7108             : 
    7109             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    7110             :   {
    7111             :     "Function",
    7112             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    7113             :     &sBoringInterfaceObjectClassClassOps,
    7114             :     JS_NULL_CLASS_SPEC,
    7115             :     JS_NULL_CLASS_EXT,
    7116             :     &sInterfaceObjectClassObjectOps
    7117             :   },
    7118             :   eInterface,
    7119             :   true,
    7120             :   prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel,
    7121             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel>::Depth,
    7122             :   sNativePropertyHooks,
    7123             :   "function SVGPathSegCurvetoQuadraticSmoothRel() {\n    [native code]\n}",
    7124             :   SVGPathSegBinding::GetConstructorObject
    7125             : };
    7126             : 
    7127             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    7128             :   {
    7129             :     "SVGPathSegCurvetoQuadraticSmoothRelPrototype",
    7130             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    7131             :     JS_NULL_CLASS_OPS,
    7132             :     JS_NULL_CLASS_SPEC,
    7133             :     JS_NULL_CLASS_EXT,
    7134             :     JS_NULL_OBJECT_OPS
    7135             :   },
    7136             :   eInterfacePrototype,
    7137             :   false,
    7138             :   prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel,
    7139             :   PrototypeTraits<prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel>::Depth,
    7140             :   sNativePropertyHooks,
    7141             :   "[object SVGPathSegCurvetoQuadraticSmoothRelPrototype]",
    7142             :   SVGPathSegBinding::GetProtoObject
    7143             : };
    7144             : 
    7145             : JSObject*
    7146           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    7147             : {
    7148           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    7149             : }
    7150             : 
    7151             : static const js::ClassOps sClassOps = {
    7152             :   _addProperty, /* addProperty */
    7153             :   nullptr,               /* delProperty */
    7154             :   nullptr,               /* getProperty */
    7155             :   nullptr,               /* setProperty */
    7156             :   nullptr,               /* enumerate */
    7157             :   nullptr, /* newEnumerate */
    7158             :   nullptr, /* resolve */
    7159             :   nullptr, /* mayResolve */
    7160             :   _finalize, /* finalize */
    7161             :   nullptr, /* call */
    7162             :   nullptr,               /* hasInstance */
    7163             :   nullptr,               /* construct */
    7164             :   nullptr, /* trace */
    7165             : };
    7166             : 
    7167             : static const js::ClassExtension sClassExtension = {
    7168             :   nullptr, /* weakmapKeyDelegateOp */
    7169             :   _objectMoved /* objectMovedOp */
    7170             : };
    7171             : 
    7172             : static const DOMJSClass sClass = {
    7173             :   { "SVGPathSegCurvetoQuadraticSmoothRel",
    7174             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    7175             :     &sClassOps,
    7176             :     JS_NULL_CLASS_SPEC,
    7177             :     &sClassExtension,
    7178             :     JS_NULL_OBJECT_OPS
    7179             :   },
    7180             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    7181             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel >::value,
    7182             :   sNativePropertyHooks,
    7183             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel>::Get,
    7184             :   GetProtoObjectHandle,
    7185             :   GetCCParticipant<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel>::Get()
    7186             : };
    7187             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    7188             :               "Must have the right minimal number of reserved slots.");
    7189             : static_assert(1 >= 1,
    7190             :               "Must have enough reserved slots.");
    7191             : 
    7192             : const JSClass*
    7193           0 : GetJSClass()
    7194             : {
    7195           0 :   return sClass.ToJSClass();
    7196             : }
    7197             : 
    7198             : bool
    7199           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    7200             : {
    7201             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel*>(aObject) ==
    7202             :              reinterpret_cast<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel*>(aObject),
    7203             :              "Multiple inheritance for mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel is broken.");
    7204             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    7205             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    7206             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    7207           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    7208           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    7209           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    7210             :              "You should probably not be using Wrap() directly; use "
    7211             :              "GetOrCreateDOMReflector instead");
    7212             : 
    7213           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    7214             :              "nsISupports must be on our primary inheritance chain");
    7215             : 
    7216           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    7217           0 :   if (!global) {
    7218           0 :     return false;
    7219             :   }
    7220           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    7221           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    7222             : 
    7223             :   // That might have ended up wrapping us already, due to the wonders
    7224             :   // of XBL.  Check for that, and bail out as needed.
    7225           0 :   aReflector.set(aCache->GetWrapper());
    7226           0 :   if (aReflector) {
    7227             : #ifdef DEBUG
    7228           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    7229             : #endif // DEBUG
    7230           0 :     return true;
    7231             :   }
    7232             : 
    7233           0 :   JSAutoCompartment ac(aCx, global);
    7234           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    7235           0 :   if (!canonicalProto) {
    7236           0 :     return false;
    7237             :   }
    7238           0 :   JS::Rooted<JSObject*> proto(aCx);
    7239           0 :   if (aGivenProto) {
    7240           0 :     proto = aGivenProto;
    7241             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    7242             :     // coming in, we changed compartments to that of "parent" so may need
    7243             :     // to wrap the proto here.
    7244           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    7245           0 :       if (!JS_WrapObject(aCx, &proto)) {
    7246           0 :         return false;
    7247             :       }
    7248             :     }
    7249             :   } else {
    7250           0 :     proto = canonicalProto;
    7251             :   }
    7252             : 
    7253           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegCurvetoQuadraticSmoothRel> creator(aCx);
    7254           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    7255           0 :   if (!aReflector) {
    7256           0 :     return false;
    7257             :   }
    7258             : 
    7259           0 :   aCache->SetWrapper(aReflector);
    7260           0 :   creator.InitializationSucceeded();
    7261             : 
    7262           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    7263             :              aCache->GetWrapperPreserveColor() == aReflector);
    7264             :   // If proto != canonicalProto, we have to preserve our wrapper;
    7265             :   // otherwise we won't be able to properly recreate it later, since
    7266             :   // we won't know what proto to use.  Note that we don't check
    7267             :   // aGivenProto here, since it's entirely possible (and even
    7268             :   // somewhat common) to have a non-null aGivenProto which is the
    7269             :   // same as canonicalProto.
    7270           0 :   if (proto != canonicalProto) {
    7271           0 :     PreserveWrapper(aObject);
    7272             :   }
    7273             : 
    7274           0 :   return true;
    7275             : }
    7276             : 
    7277             : const NativePropertyHooks sNativePropertyHooks[] = { {
    7278             :   nullptr,
    7279             :   nullptr,
    7280             :   nullptr,
    7281             :   { sNativeProperties.Upcast(), nullptr },
    7282             :   prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel,
    7283             :   constructors::id::SVGPathSegCurvetoQuadraticSmoothRel,
    7284             :   SVGPathSegBinding::sNativePropertyHooks,
    7285             :   &DefaultXrayExpandoObjectClass
    7286             : } };
    7287             : 
    7288             : void
    7289           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    7290             : {
    7291           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    7292           0 :   if (!parentProto) {
    7293           0 :     return;
    7294             :   }
    7295             : 
    7296           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    7297           0 :   if (!constructorProto) {
    7298           0 :     return;
    7299             :   }
    7300             : 
    7301             :   static bool sIdsInited = false;
    7302           0 :   if (!sIdsInited && NS_IsMainThread()) {
    7303           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    7304           0 :       return;
    7305             :     }
    7306           0 :     sIdsInited = true;
    7307             :   }
    7308             : 
    7309           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel);
    7310           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegCurvetoQuadraticSmoothRel);
    7311           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    7312             :                               &sPrototypeClass.mBase, protoCache,
    7313             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    7314             :                               interfaceCache,
    7315             :                               sNativeProperties.Upcast(),
    7316             :                               nullptr,
    7317             :                               "SVGPathSegCurvetoQuadraticSmoothRel", aDefineOnGlobal,
    7318             :                               nullptr,
    7319           0 :                               false);
    7320             : }
    7321             : 
    7322             : JS::Handle<JSObject*>
    7323           0 : GetProtoObjectHandle(JSContext* aCx)
    7324             : {
    7325             :   /* Get the interface prototype object for this class.  This will create the
    7326             :      object as needed. */
    7327           0 :   bool aDefineOnGlobal = true;
    7328             : 
    7329             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    7330           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    7331           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    7332           0 :     return nullptr;
    7333             :   }
    7334             : 
    7335             :   /* Check to see whether the interface objects are already installed */
    7336           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    7337           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel)) {
    7338           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    7339           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    7340             :   }
    7341             : 
    7342             :   /*
    7343             :    * The object might _still_ be null, but that's OK.
    7344             :    *
    7345             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    7346             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    7347             :    * changed after they have been set.
    7348             :    *
    7349             :    * Calling address() avoids the read read barrier that does gray
    7350             :    * unmarking, but it's not possible for the object to be gray here.
    7351             :    */
    7352             : 
    7353           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegCurvetoQuadraticSmoothRel);
    7354           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    7355           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    7356             : }
    7357             : 
    7358             : JS::Handle<JSObject*>
    7359           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    7360             : {
    7361             :   /* Get the interface object for this class.  This will create the object as
    7362             :      needed. */
    7363             : 
    7364             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    7365           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    7366           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    7367           0 :     return nullptr;
    7368             :   }
    7369             : 
    7370             :   /* Check to see whether the interface objects are already installed */
    7371           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    7372           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegCurvetoQuadraticSmoothRel)) {
    7373           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    7374           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    7375             :   }
    7376             : 
    7377             :   /*
    7378             :    * The object might _still_ be null, but that's OK.
    7379             :    *
    7380             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    7381             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    7382             :    * changed after they have been set.
    7383             :    *
    7384             :    * Calling address() avoids the read read barrier that does gray
    7385             :    * unmarking, but it's not possible for the object to be gray here.
    7386             :    */
    7387             : 
    7388           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegCurvetoQuadraticSmoothRel);
    7389           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    7390           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    7391             : }
    7392             : 
    7393             : JSObject*
    7394           0 : GetConstructorObject(JSContext* aCx)
    7395             : {
    7396           0 :   return GetConstructorObjectHandle(aCx);
    7397             : }
    7398             : 
    7399             : } // namespace SVGPathSegCurvetoQuadraticSmoothRelBinding
    7400             : 
    7401             : 
    7402             : 
    7403             : namespace SVGPathSegLinetoAbsBinding {
    7404             : 
    7405             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    7406             :               "Can't inherit from an interface with a different ownership model.");
    7407             : 
    7408             : static bool
    7409           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoAbs* self, JSJitGetterCallArgs args)
    7410             : {
    7411           0 :   float result(self->X());
    7412           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    7413           0 :   args.rval().set(JS_NumberValue(double(result)));
    7414           0 :   return true;
    7415             : }
    7416             : 
    7417             : static bool
    7418           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoAbs* self, JSJitSetterCallArgs args)
    7419             : {
    7420             :   float arg0;
    7421           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    7422           0 :     return false;
    7423           0 :   } else if (!mozilla::IsFinite(arg0)) {
    7424           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegLinetoAbs.x");
    7425           0 :     return false;
    7426             :   }
    7427           0 :   binding_detail::FastErrorResult rv;
    7428           0 :   self->SetX(arg0, rv);
    7429           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    7430           0 :     return false;
    7431             :   }
    7432           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    7433             : 
    7434           0 :   return true;
    7435             : }
    7436             : 
    7437             : static const JSJitInfo x_getterinfo = {
    7438             :   { (JSJitGetterOp)get_x },
    7439             :   { prototypes::id::SVGPathSegLinetoAbs },
    7440             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoAbs>::Depth },
    7441             :   JSJitInfo::Getter,
    7442             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    7443             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    7444             :   true,  /* isInfallible. False in setters. */
    7445             :   false,  /* isMovable.  Not relevant for setters. */
    7446             :   false, /* isEliminatable.  Not relevant for setters. */
    7447             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    7448             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    7449             :   false,  /* isTypedMethod.  Only relevant for methods. */
    7450             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    7451             : };
    7452             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    7453             : static_assert(0 < 1, "There is no slot for us");
    7454             : static const JSJitInfo x_setterinfo = {
    7455             :   { (JSJitGetterOp)set_x },
    7456             :   { prototypes::id::SVGPathSegLinetoAbs },
    7457             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoAbs>::Depth },
    7458             :   JSJitInfo::Setter,
    7459             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    7460             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    7461             :   false,  /* isInfallible. False in setters. */
    7462             :   false,  /* isMovable.  Not relevant for setters. */
    7463             :   false, /* isEliminatable.  Not relevant for setters. */
    7464             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    7465             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    7466             :   false,  /* isTypedMethod.  Only relevant for methods. */
    7467             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    7468             : };
    7469             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    7470             : static_assert(0 < 1, "There is no slot for us");
    7471             : 
    7472             : static bool
    7473           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoAbs* self, JSJitGetterCallArgs args)
    7474             : {
    7475           0 :   float result(self->Y());
    7476           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    7477           0 :   args.rval().set(JS_NumberValue(double(result)));
    7478           0 :   return true;
    7479             : }
    7480             : 
    7481             : static bool
    7482           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoAbs* self, JSJitSetterCallArgs args)
    7483             : {
    7484             :   float arg0;
    7485           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    7486           0 :     return false;
    7487           0 :   } else if (!mozilla::IsFinite(arg0)) {
    7488           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegLinetoAbs.y");
    7489           0 :     return false;
    7490             :   }
    7491           0 :   binding_detail::FastErrorResult rv;
    7492           0 :   self->SetY(arg0, rv);
    7493           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    7494           0 :     return false;
    7495             :   }
    7496           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    7497             : 
    7498           0 :   return true;
    7499             : }
    7500             : 
    7501             : static const JSJitInfo y_getterinfo = {
    7502             :   { (JSJitGetterOp)get_y },
    7503             :   { prototypes::id::SVGPathSegLinetoAbs },
    7504             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoAbs>::Depth },
    7505             :   JSJitInfo::Getter,
    7506             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    7507             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    7508             :   true,  /* isInfallible. False in setters. */
    7509             :   false,  /* isMovable.  Not relevant for setters. */
    7510             :   false, /* isEliminatable.  Not relevant for setters. */
    7511             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    7512             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    7513             :   false,  /* isTypedMethod.  Only relevant for methods. */
    7514             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    7515             : };
    7516             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    7517             : static_assert(0 < 1, "There is no slot for us");
    7518             : static const JSJitInfo y_setterinfo = {
    7519             :   { (JSJitGetterOp)set_y },
    7520             :   { prototypes::id::SVGPathSegLinetoAbs },
    7521             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoAbs>::Depth },
    7522             :   JSJitInfo::Setter,
    7523             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    7524             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    7525             :   false,  /* isInfallible. False in setters. */
    7526             :   false,  /* isMovable.  Not relevant for setters. */
    7527             :   false, /* isEliminatable.  Not relevant for setters. */
    7528             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    7529             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    7530             :   false,  /* isTypedMethod.  Only relevant for methods. */
    7531             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    7532             : };
    7533             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    7534             : static_assert(0 < 1, "There is no slot for us");
    7535             : 
    7536             : static bool
    7537           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    7538             : {
    7539           0 :   mozilla::DOMSVGPathSegLinetoAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoAbs>(obj);
    7540             :   // We don't want to preserve if we don't have a wrapper, and we
    7541             :   // obviously can't preserve if we're not initialized.
    7542           0 :   if (self && self->GetWrapperPreserveColor()) {
    7543           0 :     PreserveWrapper(self);
    7544             :   }
    7545           0 :   return true;
    7546             : }
    7547             : 
    7548             : static void
    7549           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    7550             : {
    7551           0 :   mozilla::DOMSVGPathSegLinetoAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoAbs>(obj);
    7552           0 :   if (self) {
    7553           0 :     ClearWrapper(self, self, obj);
    7554           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegLinetoAbs>(self);
    7555             :   }
    7556           0 : }
    7557             : 
    7558             : static void
    7559           0 : _objectMoved(JSObject* obj, const JSObject* old)
    7560             : {
    7561           0 :   mozilla::DOMSVGPathSegLinetoAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoAbs>(obj);
    7562           0 :   if (self) {
    7563           0 :     UpdateWrapper(self, self, obj, old);
    7564             :   }
    7565           0 : }
    7566             : 
    7567             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    7568             : #if defined(__clang__)
    7569             : #pragma clang diagnostic push
    7570             : #pragma clang diagnostic ignored "-Wmissing-braces"
    7571             : #endif
    7572             : static const JSPropertySpec sAttributes_specs[] = {
    7573             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
    7574             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
    7575             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    7576             : };
    7577             : #if defined(__clang__)
    7578             : #pragma clang diagnostic pop
    7579             : #endif
    7580             : 
    7581             : 
    7582             : // Can't be const because the pref-enabled boolean needs to be writable
    7583             : static Prefable<const JSPropertySpec> sAttributes[] = {
    7584             :   { nullptr, &sAttributes_specs[0] },
    7585             :   { nullptr, nullptr }
    7586             : };
    7587             : 
    7588             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    7589             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    7590             : static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    7591             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    7592             : 
    7593             : 
    7594             : static uint16_t sNativeProperties_sortedPropertyIndices[2];
    7595             : static PropertyInfo sNativeProperties_propertyInfos[2];
    7596             : 
    7597             : static const NativePropertiesN<1> sNativeProperties = {
    7598             :   false, 0,
    7599             :   false, 0,
    7600             :   false, 0,
    7601             :   true,  0 /* sAttributes */,
    7602             :   false, 0,
    7603             :   false, 0,
    7604             :   false, 0,
    7605             :   -1,
    7606             :   2,
    7607             :   sNativeProperties_sortedPropertyIndices,
    7608             :   {
    7609             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    7610             :   }
    7611             : };
    7612             : static_assert(2 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    7613             :     "We have a property info count that is oversized");
    7614             : 
    7615             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    7616             :   {
    7617             :     "Function",
    7618             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    7619             :     &sBoringInterfaceObjectClassClassOps,
    7620             :     JS_NULL_CLASS_SPEC,
    7621             :     JS_NULL_CLASS_EXT,
    7622             :     &sInterfaceObjectClassObjectOps
    7623             :   },
    7624             :   eInterface,
    7625             :   true,
    7626             :   prototypes::id::SVGPathSegLinetoAbs,
    7627             :   PrototypeTraits<prototypes::id::SVGPathSegLinetoAbs>::Depth,
    7628             :   sNativePropertyHooks,
    7629             :   "function SVGPathSegLinetoAbs() {\n    [native code]\n}",
    7630             :   SVGPathSegBinding::GetConstructorObject
    7631             : };
    7632             : 
    7633             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    7634             :   {
    7635             :     "SVGPathSegLinetoAbsPrototype",
    7636             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    7637             :     JS_NULL_CLASS_OPS,
    7638             :     JS_NULL_CLASS_SPEC,
    7639             :     JS_NULL_CLASS_EXT,
    7640             :     JS_NULL_OBJECT_OPS
    7641             :   },
    7642             :   eInterfacePrototype,
    7643             :   false,
    7644             :   prototypes::id::SVGPathSegLinetoAbs,
    7645             :   PrototypeTraits<prototypes::id::SVGPathSegLinetoAbs>::Depth,
    7646             :   sNativePropertyHooks,
    7647             :   "[object SVGPathSegLinetoAbsPrototype]",
    7648             :   SVGPathSegBinding::GetProtoObject
    7649             : };
    7650             : 
    7651             : JSObject*
    7652           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    7653             : {
    7654           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    7655             : }
    7656             : 
    7657             : static const js::ClassOps sClassOps = {
    7658             :   _addProperty, /* addProperty */
    7659             :   nullptr,               /* delProperty */
    7660             :   nullptr,               /* getProperty */
    7661             :   nullptr,               /* setProperty */
    7662             :   nullptr,               /* enumerate */
    7663             :   nullptr, /* newEnumerate */
    7664             :   nullptr, /* resolve */
    7665             :   nullptr, /* mayResolve */
    7666             :   _finalize, /* finalize */
    7667             :   nullptr, /* call */
    7668             :   nullptr,               /* hasInstance */
    7669             :   nullptr,               /* construct */
    7670             :   nullptr, /* trace */
    7671             : };
    7672             : 
    7673             : static const js::ClassExtension sClassExtension = {
    7674             :   nullptr, /* weakmapKeyDelegateOp */
    7675             :   _objectMoved /* objectMovedOp */
    7676             : };
    7677             : 
    7678             : static const DOMJSClass sClass = {
    7679             :   { "SVGPathSegLinetoAbs",
    7680             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    7681             :     &sClassOps,
    7682             :     JS_NULL_CLASS_SPEC,
    7683             :     &sClassExtension,
    7684             :     JS_NULL_OBJECT_OPS
    7685             :   },
    7686             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegLinetoAbs, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    7687             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegLinetoAbs >::value,
    7688             :   sNativePropertyHooks,
    7689             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegLinetoAbs>::Get,
    7690             :   GetProtoObjectHandle,
    7691             :   GetCCParticipant<mozilla::DOMSVGPathSegLinetoAbs>::Get()
    7692             : };
    7693             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    7694             :               "Must have the right minimal number of reserved slots.");
    7695             : static_assert(1 >= 1,
    7696             :               "Must have enough reserved slots.");
    7697             : 
    7698             : const JSClass*
    7699           0 : GetJSClass()
    7700             : {
    7701           0 :   return sClass.ToJSClass();
    7702             : }
    7703             : 
    7704             : bool
    7705           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegLinetoAbs* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    7706             : {
    7707             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegLinetoAbs*>(aObject) ==
    7708             :              reinterpret_cast<mozilla::DOMSVGPathSegLinetoAbs*>(aObject),
    7709             :              "Multiple inheritance for mozilla::DOMSVGPathSegLinetoAbs is broken.");
    7710             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    7711             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    7712             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    7713           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    7714           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    7715           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    7716             :              "You should probably not be using Wrap() directly; use "
    7717             :              "GetOrCreateDOMReflector instead");
    7718             : 
    7719           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    7720             :              "nsISupports must be on our primary inheritance chain");
    7721             : 
    7722           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    7723           0 :   if (!global) {
    7724           0 :     return false;
    7725             :   }
    7726           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    7727           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    7728             : 
    7729             :   // That might have ended up wrapping us already, due to the wonders
    7730             :   // of XBL.  Check for that, and bail out as needed.
    7731           0 :   aReflector.set(aCache->GetWrapper());
    7732           0 :   if (aReflector) {
    7733             : #ifdef DEBUG
    7734           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    7735             : #endif // DEBUG
    7736           0 :     return true;
    7737             :   }
    7738             : 
    7739           0 :   JSAutoCompartment ac(aCx, global);
    7740           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    7741           0 :   if (!canonicalProto) {
    7742           0 :     return false;
    7743             :   }
    7744           0 :   JS::Rooted<JSObject*> proto(aCx);
    7745           0 :   if (aGivenProto) {
    7746           0 :     proto = aGivenProto;
    7747             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    7748             :     // coming in, we changed compartments to that of "parent" so may need
    7749             :     // to wrap the proto here.
    7750           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    7751           0 :       if (!JS_WrapObject(aCx, &proto)) {
    7752           0 :         return false;
    7753             :       }
    7754             :     }
    7755             :   } else {
    7756           0 :     proto = canonicalProto;
    7757             :   }
    7758             : 
    7759           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegLinetoAbs> creator(aCx);
    7760           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    7761           0 :   if (!aReflector) {
    7762           0 :     return false;
    7763             :   }
    7764             : 
    7765           0 :   aCache->SetWrapper(aReflector);
    7766           0 :   creator.InitializationSucceeded();
    7767             : 
    7768           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    7769             :              aCache->GetWrapperPreserveColor() == aReflector);
    7770             :   // If proto != canonicalProto, we have to preserve our wrapper;
    7771             :   // otherwise we won't be able to properly recreate it later, since
    7772             :   // we won't know what proto to use.  Note that we don't check
    7773             :   // aGivenProto here, since it's entirely possible (and even
    7774             :   // somewhat common) to have a non-null aGivenProto which is the
    7775             :   // same as canonicalProto.
    7776           0 :   if (proto != canonicalProto) {
    7777           0 :     PreserveWrapper(aObject);
    7778             :   }
    7779             : 
    7780           0 :   return true;
    7781             : }
    7782             : 
    7783             : const NativePropertyHooks sNativePropertyHooks[] = { {
    7784             :   nullptr,
    7785             :   nullptr,
    7786             :   nullptr,
    7787             :   { sNativeProperties.Upcast(), nullptr },
    7788             :   prototypes::id::SVGPathSegLinetoAbs,
    7789             :   constructors::id::SVGPathSegLinetoAbs,
    7790             :   SVGPathSegBinding::sNativePropertyHooks,
    7791             :   &DefaultXrayExpandoObjectClass
    7792             : } };
    7793             : 
    7794             : void
    7795           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    7796             : {
    7797           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    7798           0 :   if (!parentProto) {
    7799           0 :     return;
    7800             :   }
    7801             : 
    7802           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    7803           0 :   if (!constructorProto) {
    7804           0 :     return;
    7805             :   }
    7806             : 
    7807             :   static bool sIdsInited = false;
    7808           0 :   if (!sIdsInited && NS_IsMainThread()) {
    7809           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    7810           0 :       return;
    7811             :     }
    7812           0 :     sIdsInited = true;
    7813             :   }
    7814             : 
    7815           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegLinetoAbs);
    7816           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegLinetoAbs);
    7817           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    7818             :                               &sPrototypeClass.mBase, protoCache,
    7819             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    7820             :                               interfaceCache,
    7821             :                               sNativeProperties.Upcast(),
    7822             :                               nullptr,
    7823             :                               "SVGPathSegLinetoAbs", aDefineOnGlobal,
    7824             :                               nullptr,
    7825           0 :                               false);
    7826             : }
    7827             : 
    7828             : JS::Handle<JSObject*>
    7829           0 : GetProtoObjectHandle(JSContext* aCx)
    7830             : {
    7831             :   /* Get the interface prototype object for this class.  This will create the
    7832             :      object as needed. */
    7833           0 :   bool aDefineOnGlobal = true;
    7834             : 
    7835             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    7836           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    7837           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    7838           0 :     return nullptr;
    7839             :   }
    7840             : 
    7841             :   /* Check to see whether the interface objects are already installed */
    7842           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    7843           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegLinetoAbs)) {
    7844           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    7845           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    7846             :   }
    7847             : 
    7848             :   /*
    7849             :    * The object might _still_ be null, but that's OK.
    7850             :    *
    7851             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    7852             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    7853             :    * changed after they have been set.
    7854             :    *
    7855             :    * Calling address() avoids the read read barrier that does gray
    7856             :    * unmarking, but it's not possible for the object to be gray here.
    7857             :    */
    7858             : 
    7859           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegLinetoAbs);
    7860           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    7861           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    7862             : }
    7863             : 
    7864             : JS::Handle<JSObject*>
    7865           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    7866             : {
    7867             :   /* Get the interface object for this class.  This will create the object as
    7868             :      needed. */
    7869             : 
    7870             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    7871           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    7872           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    7873           0 :     return nullptr;
    7874             :   }
    7875             : 
    7876             :   /* Check to see whether the interface objects are already installed */
    7877           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    7878           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegLinetoAbs)) {
    7879           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    7880           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    7881             :   }
    7882             : 
    7883             :   /*
    7884             :    * The object might _still_ be null, but that's OK.
    7885             :    *
    7886             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    7887             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    7888             :    * changed after they have been set.
    7889             :    *
    7890             :    * Calling address() avoids the read read barrier that does gray
    7891             :    * unmarking, but it's not possible for the object to be gray here.
    7892             :    */
    7893             : 
    7894           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegLinetoAbs);
    7895           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    7896           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    7897             : }
    7898             : 
    7899             : JSObject*
    7900           0 : GetConstructorObject(JSContext* aCx)
    7901             : {
    7902           0 :   return GetConstructorObjectHandle(aCx);
    7903             : }
    7904             : 
    7905             : } // namespace SVGPathSegLinetoAbsBinding
    7906             : 
    7907             : 
    7908             : 
    7909             : namespace SVGPathSegLinetoHorizontalAbsBinding {
    7910             : 
    7911             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    7912             :               "Can't inherit from an interface with a different ownership model.");
    7913             : 
    7914             : static bool
    7915           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoHorizontalAbs* self, JSJitGetterCallArgs args)
    7916             : {
    7917           0 :   float result(self->X());
    7918           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    7919           0 :   args.rval().set(JS_NumberValue(double(result)));
    7920           0 :   return true;
    7921             : }
    7922             : 
    7923             : static bool
    7924           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoHorizontalAbs* self, JSJitSetterCallArgs args)
    7925             : {
    7926             :   float arg0;
    7927           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    7928           0 :     return false;
    7929           0 :   } else if (!mozilla::IsFinite(arg0)) {
    7930           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegLinetoHorizontalAbs.x");
    7931           0 :     return false;
    7932             :   }
    7933           0 :   binding_detail::FastErrorResult rv;
    7934           0 :   self->SetX(arg0, rv);
    7935           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    7936           0 :     return false;
    7937             :   }
    7938           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    7939             : 
    7940           0 :   return true;
    7941             : }
    7942             : 
    7943             : static const JSJitInfo x_getterinfo = {
    7944             :   { (JSJitGetterOp)get_x },
    7945             :   { prototypes::id::SVGPathSegLinetoHorizontalAbs },
    7946             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoHorizontalAbs>::Depth },
    7947             :   JSJitInfo::Getter,
    7948             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    7949             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    7950             :   true,  /* isInfallible. False in setters. */
    7951             :   false,  /* isMovable.  Not relevant for setters. */
    7952             :   false, /* isEliminatable.  Not relevant for setters. */
    7953             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    7954             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    7955             :   false,  /* isTypedMethod.  Only relevant for methods. */
    7956             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    7957             : };
    7958             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    7959             : static_assert(0 < 1, "There is no slot for us");
    7960             : static const JSJitInfo x_setterinfo = {
    7961             :   { (JSJitGetterOp)set_x },
    7962             :   { prototypes::id::SVGPathSegLinetoHorizontalAbs },
    7963             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoHorizontalAbs>::Depth },
    7964             :   JSJitInfo::Setter,
    7965             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    7966             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    7967             :   false,  /* isInfallible. False in setters. */
    7968             :   false,  /* isMovable.  Not relevant for setters. */
    7969             :   false, /* isEliminatable.  Not relevant for setters. */
    7970             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    7971             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    7972             :   false,  /* isTypedMethod.  Only relevant for methods. */
    7973             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    7974             : };
    7975             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    7976             : static_assert(0 < 1, "There is no slot for us");
    7977             : 
    7978             : static bool
    7979           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    7980             : {
    7981           0 :   mozilla::DOMSVGPathSegLinetoHorizontalAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoHorizontalAbs>(obj);
    7982             :   // We don't want to preserve if we don't have a wrapper, and we
    7983             :   // obviously can't preserve if we're not initialized.
    7984           0 :   if (self && self->GetWrapperPreserveColor()) {
    7985           0 :     PreserveWrapper(self);
    7986             :   }
    7987           0 :   return true;
    7988             : }
    7989             : 
    7990             : static void
    7991           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    7992             : {
    7993           0 :   mozilla::DOMSVGPathSegLinetoHorizontalAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoHorizontalAbs>(obj);
    7994           0 :   if (self) {
    7995           0 :     ClearWrapper(self, self, obj);
    7996           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegLinetoHorizontalAbs>(self);
    7997             :   }
    7998           0 : }
    7999             : 
    8000             : static void
    8001           0 : _objectMoved(JSObject* obj, const JSObject* old)
    8002             : {
    8003           0 :   mozilla::DOMSVGPathSegLinetoHorizontalAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoHorizontalAbs>(obj);
    8004           0 :   if (self) {
    8005           0 :     UpdateWrapper(self, self, obj, old);
    8006             :   }
    8007           0 : }
    8008             : 
    8009             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    8010             : #if defined(__clang__)
    8011             : #pragma clang diagnostic push
    8012             : #pragma clang diagnostic ignored "-Wmissing-braces"
    8013             : #endif
    8014             : static const JSPropertySpec sAttributes_specs[] = {
    8015             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
    8016             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    8017             : };
    8018             : #if defined(__clang__)
    8019             : #pragma clang diagnostic pop
    8020             : #endif
    8021             : 
    8022             : 
    8023             : // Can't be const because the pref-enabled boolean needs to be writable
    8024             : static Prefable<const JSPropertySpec> sAttributes[] = {
    8025             :   { nullptr, &sAttributes_specs[0] },
    8026             :   { nullptr, nullptr }
    8027             : };
    8028             : 
    8029             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    8030             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    8031             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    8032             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    8033             : 
    8034             : 
    8035             : static uint16_t sNativeProperties_sortedPropertyIndices[1];
    8036             : static PropertyInfo sNativeProperties_propertyInfos[1];
    8037             : 
    8038             : static const NativePropertiesN<1> sNativeProperties = {
    8039             :   false, 0,
    8040             :   false, 0,
    8041             :   false, 0,
    8042             :   true,  0 /* sAttributes */,
    8043             :   false, 0,
    8044             :   false, 0,
    8045             :   false, 0,
    8046             :   -1,
    8047             :   1,
    8048             :   sNativeProperties_sortedPropertyIndices,
    8049             :   {
    8050             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    8051             :   }
    8052             : };
    8053             : static_assert(1 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    8054             :     "We have a property info count that is oversized");
    8055             : 
    8056             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    8057             :   {
    8058             :     "Function",
    8059             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    8060             :     &sBoringInterfaceObjectClassClassOps,
    8061             :     JS_NULL_CLASS_SPEC,
    8062             :     JS_NULL_CLASS_EXT,
    8063             :     &sInterfaceObjectClassObjectOps
    8064             :   },
    8065             :   eInterface,
    8066             :   true,
    8067             :   prototypes::id::SVGPathSegLinetoHorizontalAbs,
    8068             :   PrototypeTraits<prototypes::id::SVGPathSegLinetoHorizontalAbs>::Depth,
    8069             :   sNativePropertyHooks,
    8070             :   "function SVGPathSegLinetoHorizontalAbs() {\n    [native code]\n}",
    8071             :   SVGPathSegBinding::GetConstructorObject
    8072             : };
    8073             : 
    8074             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    8075             :   {
    8076             :     "SVGPathSegLinetoHorizontalAbsPrototype",
    8077             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    8078             :     JS_NULL_CLASS_OPS,
    8079             :     JS_NULL_CLASS_SPEC,
    8080             :     JS_NULL_CLASS_EXT,
    8081             :     JS_NULL_OBJECT_OPS
    8082             :   },
    8083             :   eInterfacePrototype,
    8084             :   false,
    8085             :   prototypes::id::SVGPathSegLinetoHorizontalAbs,
    8086             :   PrototypeTraits<prototypes::id::SVGPathSegLinetoHorizontalAbs>::Depth,
    8087             :   sNativePropertyHooks,
    8088             :   "[object SVGPathSegLinetoHorizontalAbsPrototype]",
    8089             :   SVGPathSegBinding::GetProtoObject
    8090             : };
    8091             : 
    8092             : JSObject*
    8093           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    8094             : {
    8095           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    8096             : }
    8097             : 
    8098             : static const js::ClassOps sClassOps = {
    8099             :   _addProperty, /* addProperty */
    8100             :   nullptr,               /* delProperty */
    8101             :   nullptr,               /* getProperty */
    8102             :   nullptr,               /* setProperty */
    8103             :   nullptr,               /* enumerate */
    8104             :   nullptr, /* newEnumerate */
    8105             :   nullptr, /* resolve */
    8106             :   nullptr, /* mayResolve */
    8107             :   _finalize, /* finalize */
    8108             :   nullptr, /* call */
    8109             :   nullptr,               /* hasInstance */
    8110             :   nullptr,               /* construct */
    8111             :   nullptr, /* trace */
    8112             : };
    8113             : 
    8114             : static const js::ClassExtension sClassExtension = {
    8115             :   nullptr, /* weakmapKeyDelegateOp */
    8116             :   _objectMoved /* objectMovedOp */
    8117             : };
    8118             : 
    8119             : static const DOMJSClass sClass = {
    8120             :   { "SVGPathSegLinetoHorizontalAbs",
    8121             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    8122             :     &sClassOps,
    8123             :     JS_NULL_CLASS_SPEC,
    8124             :     &sClassExtension,
    8125             :     JS_NULL_OBJECT_OPS
    8126             :   },
    8127             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegLinetoHorizontalAbs, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    8128             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegLinetoHorizontalAbs >::value,
    8129             :   sNativePropertyHooks,
    8130             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegLinetoHorizontalAbs>::Get,
    8131             :   GetProtoObjectHandle,
    8132             :   GetCCParticipant<mozilla::DOMSVGPathSegLinetoHorizontalAbs>::Get()
    8133             : };
    8134             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    8135             :               "Must have the right minimal number of reserved slots.");
    8136             : static_assert(1 >= 1,
    8137             :               "Must have enough reserved slots.");
    8138             : 
    8139             : const JSClass*
    8140           0 : GetJSClass()
    8141             : {
    8142           0 :   return sClass.ToJSClass();
    8143             : }
    8144             : 
    8145             : bool
    8146           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegLinetoHorizontalAbs* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    8147             : {
    8148             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegLinetoHorizontalAbs*>(aObject) ==
    8149             :              reinterpret_cast<mozilla::DOMSVGPathSegLinetoHorizontalAbs*>(aObject),
    8150             :              "Multiple inheritance for mozilla::DOMSVGPathSegLinetoHorizontalAbs is broken.");
    8151             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    8152             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    8153             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    8154           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    8155           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    8156           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    8157             :              "You should probably not be using Wrap() directly; use "
    8158             :              "GetOrCreateDOMReflector instead");
    8159             : 
    8160           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    8161             :              "nsISupports must be on our primary inheritance chain");
    8162             : 
    8163           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    8164           0 :   if (!global) {
    8165           0 :     return false;
    8166             :   }
    8167           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    8168           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    8169             : 
    8170             :   // That might have ended up wrapping us already, due to the wonders
    8171             :   // of XBL.  Check for that, and bail out as needed.
    8172           0 :   aReflector.set(aCache->GetWrapper());
    8173           0 :   if (aReflector) {
    8174             : #ifdef DEBUG
    8175           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    8176             : #endif // DEBUG
    8177           0 :     return true;
    8178             :   }
    8179             : 
    8180           0 :   JSAutoCompartment ac(aCx, global);
    8181           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    8182           0 :   if (!canonicalProto) {
    8183           0 :     return false;
    8184             :   }
    8185           0 :   JS::Rooted<JSObject*> proto(aCx);
    8186           0 :   if (aGivenProto) {
    8187           0 :     proto = aGivenProto;
    8188             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    8189             :     // coming in, we changed compartments to that of "parent" so may need
    8190             :     // to wrap the proto here.
    8191           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    8192           0 :       if (!JS_WrapObject(aCx, &proto)) {
    8193           0 :         return false;
    8194             :       }
    8195             :     }
    8196             :   } else {
    8197           0 :     proto = canonicalProto;
    8198             :   }
    8199             : 
    8200           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegLinetoHorizontalAbs> creator(aCx);
    8201           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    8202           0 :   if (!aReflector) {
    8203           0 :     return false;
    8204             :   }
    8205             : 
    8206           0 :   aCache->SetWrapper(aReflector);
    8207           0 :   creator.InitializationSucceeded();
    8208             : 
    8209           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    8210             :              aCache->GetWrapperPreserveColor() == aReflector);
    8211             :   // If proto != canonicalProto, we have to preserve our wrapper;
    8212             :   // otherwise we won't be able to properly recreate it later, since
    8213             :   // we won't know what proto to use.  Note that we don't check
    8214             :   // aGivenProto here, since it's entirely possible (and even
    8215             :   // somewhat common) to have a non-null aGivenProto which is the
    8216             :   // same as canonicalProto.
    8217           0 :   if (proto != canonicalProto) {
    8218           0 :     PreserveWrapper(aObject);
    8219             :   }
    8220             : 
    8221           0 :   return true;
    8222             : }
    8223             : 
    8224             : const NativePropertyHooks sNativePropertyHooks[] = { {
    8225             :   nullptr,
    8226             :   nullptr,
    8227             :   nullptr,
    8228             :   { sNativeProperties.Upcast(), nullptr },
    8229             :   prototypes::id::SVGPathSegLinetoHorizontalAbs,
    8230             :   constructors::id::SVGPathSegLinetoHorizontalAbs,
    8231             :   SVGPathSegBinding::sNativePropertyHooks,
    8232             :   &DefaultXrayExpandoObjectClass
    8233             : } };
    8234             : 
    8235             : void
    8236           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    8237             : {
    8238           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    8239           0 :   if (!parentProto) {
    8240           0 :     return;
    8241             :   }
    8242             : 
    8243           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    8244           0 :   if (!constructorProto) {
    8245           0 :     return;
    8246             :   }
    8247             : 
    8248             :   static bool sIdsInited = false;
    8249           0 :   if (!sIdsInited && NS_IsMainThread()) {
    8250           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    8251           0 :       return;
    8252             :     }
    8253           0 :     sIdsInited = true;
    8254             :   }
    8255             : 
    8256           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegLinetoHorizontalAbs);
    8257           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegLinetoHorizontalAbs);
    8258           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    8259             :                               &sPrototypeClass.mBase, protoCache,
    8260             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    8261             :                               interfaceCache,
    8262             :                               sNativeProperties.Upcast(),
    8263             :                               nullptr,
    8264             :                               "SVGPathSegLinetoHorizontalAbs", aDefineOnGlobal,
    8265             :                               nullptr,
    8266           0 :                               false);
    8267             : }
    8268             : 
    8269             : JS::Handle<JSObject*>
    8270           0 : GetProtoObjectHandle(JSContext* aCx)
    8271             : {
    8272             :   /* Get the interface prototype object for this class.  This will create the
    8273             :      object as needed. */
    8274           0 :   bool aDefineOnGlobal = true;
    8275             : 
    8276             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    8277           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    8278           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    8279           0 :     return nullptr;
    8280             :   }
    8281             : 
    8282             :   /* Check to see whether the interface objects are already installed */
    8283           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    8284           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegLinetoHorizontalAbs)) {
    8285           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    8286           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    8287             :   }
    8288             : 
    8289             :   /*
    8290             :    * The object might _still_ be null, but that's OK.
    8291             :    *
    8292             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    8293             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    8294             :    * changed after they have been set.
    8295             :    *
    8296             :    * Calling address() avoids the read read barrier that does gray
    8297             :    * unmarking, but it's not possible for the object to be gray here.
    8298             :    */
    8299             : 
    8300           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegLinetoHorizontalAbs);
    8301           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    8302           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    8303             : }
    8304             : 
    8305             : JS::Handle<JSObject*>
    8306           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    8307             : {
    8308             :   /* Get the interface object for this class.  This will create the object as
    8309             :      needed. */
    8310             : 
    8311             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    8312           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    8313           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    8314           0 :     return nullptr;
    8315             :   }
    8316             : 
    8317             :   /* Check to see whether the interface objects are already installed */
    8318           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    8319           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegLinetoHorizontalAbs)) {
    8320           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    8321           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    8322             :   }
    8323             : 
    8324             :   /*
    8325             :    * The object might _still_ be null, but that's OK.
    8326             :    *
    8327             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    8328             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    8329             :    * changed after they have been set.
    8330             :    *
    8331             :    * Calling address() avoids the read read barrier that does gray
    8332             :    * unmarking, but it's not possible for the object to be gray here.
    8333             :    */
    8334             : 
    8335           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegLinetoHorizontalAbs);
    8336           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    8337           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    8338             : }
    8339             : 
    8340             : JSObject*
    8341           0 : GetConstructorObject(JSContext* aCx)
    8342             : {
    8343           0 :   return GetConstructorObjectHandle(aCx);
    8344             : }
    8345             : 
    8346             : } // namespace SVGPathSegLinetoHorizontalAbsBinding
    8347             : 
    8348             : 
    8349             : 
    8350             : namespace SVGPathSegLinetoHorizontalRelBinding {
    8351             : 
    8352             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    8353             :               "Can't inherit from an interface with a different ownership model.");
    8354             : 
    8355             : static bool
    8356           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoHorizontalRel* self, JSJitGetterCallArgs args)
    8357             : {
    8358           0 :   float result(self->X());
    8359           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    8360           0 :   args.rval().set(JS_NumberValue(double(result)));
    8361           0 :   return true;
    8362             : }
    8363             : 
    8364             : static bool
    8365           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoHorizontalRel* self, JSJitSetterCallArgs args)
    8366             : {
    8367             :   float arg0;
    8368           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    8369           0 :     return false;
    8370           0 :   } else if (!mozilla::IsFinite(arg0)) {
    8371           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegLinetoHorizontalRel.x");
    8372           0 :     return false;
    8373             :   }
    8374           0 :   binding_detail::FastErrorResult rv;
    8375           0 :   self->SetX(arg0, rv);
    8376           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    8377           0 :     return false;
    8378             :   }
    8379           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    8380             : 
    8381           0 :   return true;
    8382             : }
    8383             : 
    8384             : static const JSJitInfo x_getterinfo = {
    8385             :   { (JSJitGetterOp)get_x },
    8386             :   { prototypes::id::SVGPathSegLinetoHorizontalRel },
    8387             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoHorizontalRel>::Depth },
    8388             :   JSJitInfo::Getter,
    8389             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    8390             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    8391             :   true,  /* isInfallible. False in setters. */
    8392             :   false,  /* isMovable.  Not relevant for setters. */
    8393             :   false, /* isEliminatable.  Not relevant for setters. */
    8394             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    8395             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    8396             :   false,  /* isTypedMethod.  Only relevant for methods. */
    8397             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    8398             : };
    8399             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    8400             : static_assert(0 < 1, "There is no slot for us");
    8401             : static const JSJitInfo x_setterinfo = {
    8402             :   { (JSJitGetterOp)set_x },
    8403             :   { prototypes::id::SVGPathSegLinetoHorizontalRel },
    8404             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoHorizontalRel>::Depth },
    8405             :   JSJitInfo::Setter,
    8406             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    8407             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    8408             :   false,  /* isInfallible. False in setters. */
    8409             :   false,  /* isMovable.  Not relevant for setters. */
    8410             :   false, /* isEliminatable.  Not relevant for setters. */
    8411             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    8412             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    8413             :   false,  /* isTypedMethod.  Only relevant for methods. */
    8414             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    8415             : };
    8416             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    8417             : static_assert(0 < 1, "There is no slot for us");
    8418             : 
    8419             : static bool
    8420           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    8421             : {
    8422           0 :   mozilla::DOMSVGPathSegLinetoHorizontalRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoHorizontalRel>(obj);
    8423             :   // We don't want to preserve if we don't have a wrapper, and we
    8424             :   // obviously can't preserve if we're not initialized.
    8425           0 :   if (self && self->GetWrapperPreserveColor()) {
    8426           0 :     PreserveWrapper(self);
    8427             :   }
    8428           0 :   return true;
    8429             : }
    8430             : 
    8431             : static void
    8432           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    8433             : {
    8434           0 :   mozilla::DOMSVGPathSegLinetoHorizontalRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoHorizontalRel>(obj);
    8435           0 :   if (self) {
    8436           0 :     ClearWrapper(self, self, obj);
    8437           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegLinetoHorizontalRel>(self);
    8438             :   }
    8439           0 : }
    8440             : 
    8441             : static void
    8442           0 : _objectMoved(JSObject* obj, const JSObject* old)
    8443             : {
    8444           0 :   mozilla::DOMSVGPathSegLinetoHorizontalRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoHorizontalRel>(obj);
    8445           0 :   if (self) {
    8446           0 :     UpdateWrapper(self, self, obj, old);
    8447             :   }
    8448           0 : }
    8449             : 
    8450             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    8451             : #if defined(__clang__)
    8452             : #pragma clang diagnostic push
    8453             : #pragma clang diagnostic ignored "-Wmissing-braces"
    8454             : #endif
    8455             : static const JSPropertySpec sAttributes_specs[] = {
    8456             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
    8457             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    8458             : };
    8459             : #if defined(__clang__)
    8460             : #pragma clang diagnostic pop
    8461             : #endif
    8462             : 
    8463             : 
    8464             : // Can't be const because the pref-enabled boolean needs to be writable
    8465             : static Prefable<const JSPropertySpec> sAttributes[] = {
    8466             :   { nullptr, &sAttributes_specs[0] },
    8467             :   { nullptr, nullptr }
    8468             : };
    8469             : 
    8470             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    8471             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    8472             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    8473             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    8474             : 
    8475             : 
    8476             : static uint16_t sNativeProperties_sortedPropertyIndices[1];
    8477             : static PropertyInfo sNativeProperties_propertyInfos[1];
    8478             : 
    8479             : static const NativePropertiesN<1> sNativeProperties = {
    8480             :   false, 0,
    8481             :   false, 0,
    8482             :   false, 0,
    8483             :   true,  0 /* sAttributes */,
    8484             :   false, 0,
    8485             :   false, 0,
    8486             :   false, 0,
    8487             :   -1,
    8488             :   1,
    8489             :   sNativeProperties_sortedPropertyIndices,
    8490             :   {
    8491             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    8492             :   }
    8493             : };
    8494             : static_assert(1 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    8495             :     "We have a property info count that is oversized");
    8496             : 
    8497             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    8498             :   {
    8499             :     "Function",
    8500             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    8501             :     &sBoringInterfaceObjectClassClassOps,
    8502             :     JS_NULL_CLASS_SPEC,
    8503             :     JS_NULL_CLASS_EXT,
    8504             :     &sInterfaceObjectClassObjectOps
    8505             :   },
    8506             :   eInterface,
    8507             :   true,
    8508             :   prototypes::id::SVGPathSegLinetoHorizontalRel,
    8509             :   PrototypeTraits<prototypes::id::SVGPathSegLinetoHorizontalRel>::Depth,
    8510             :   sNativePropertyHooks,
    8511             :   "function SVGPathSegLinetoHorizontalRel() {\n    [native code]\n}",
    8512             :   SVGPathSegBinding::GetConstructorObject
    8513             : };
    8514             : 
    8515             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    8516             :   {
    8517             :     "SVGPathSegLinetoHorizontalRelPrototype",
    8518             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    8519             :     JS_NULL_CLASS_OPS,
    8520             :     JS_NULL_CLASS_SPEC,
    8521             :     JS_NULL_CLASS_EXT,
    8522             :     JS_NULL_OBJECT_OPS
    8523             :   },
    8524             :   eInterfacePrototype,
    8525             :   false,
    8526             :   prototypes::id::SVGPathSegLinetoHorizontalRel,
    8527             :   PrototypeTraits<prototypes::id::SVGPathSegLinetoHorizontalRel>::Depth,
    8528             :   sNativePropertyHooks,
    8529             :   "[object SVGPathSegLinetoHorizontalRelPrototype]",
    8530             :   SVGPathSegBinding::GetProtoObject
    8531             : };
    8532             : 
    8533             : JSObject*
    8534           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    8535             : {
    8536           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    8537             : }
    8538             : 
    8539             : static const js::ClassOps sClassOps = {
    8540             :   _addProperty, /* addProperty */
    8541             :   nullptr,               /* delProperty */
    8542             :   nullptr,               /* getProperty */
    8543             :   nullptr,               /* setProperty */
    8544             :   nullptr,               /* enumerate */
    8545             :   nullptr, /* newEnumerate */
    8546             :   nullptr, /* resolve */
    8547             :   nullptr, /* mayResolve */
    8548             :   _finalize, /* finalize */
    8549             :   nullptr, /* call */
    8550             :   nullptr,               /* hasInstance */
    8551             :   nullptr,               /* construct */
    8552             :   nullptr, /* trace */
    8553             : };
    8554             : 
    8555             : static const js::ClassExtension sClassExtension = {
    8556             :   nullptr, /* weakmapKeyDelegateOp */
    8557             :   _objectMoved /* objectMovedOp */
    8558             : };
    8559             : 
    8560             : static const DOMJSClass sClass = {
    8561             :   { "SVGPathSegLinetoHorizontalRel",
    8562             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    8563             :     &sClassOps,
    8564             :     JS_NULL_CLASS_SPEC,
    8565             :     &sClassExtension,
    8566             :     JS_NULL_OBJECT_OPS
    8567             :   },
    8568             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegLinetoHorizontalRel, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    8569             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegLinetoHorizontalRel >::value,
    8570             :   sNativePropertyHooks,
    8571             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegLinetoHorizontalRel>::Get,
    8572             :   GetProtoObjectHandle,
    8573             :   GetCCParticipant<mozilla::DOMSVGPathSegLinetoHorizontalRel>::Get()
    8574             : };
    8575             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    8576             :               "Must have the right minimal number of reserved slots.");
    8577             : static_assert(1 >= 1,
    8578             :               "Must have enough reserved slots.");
    8579             : 
    8580             : const JSClass*
    8581           0 : GetJSClass()
    8582             : {
    8583           0 :   return sClass.ToJSClass();
    8584             : }
    8585             : 
    8586             : bool
    8587           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegLinetoHorizontalRel* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    8588             : {
    8589             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegLinetoHorizontalRel*>(aObject) ==
    8590             :              reinterpret_cast<mozilla::DOMSVGPathSegLinetoHorizontalRel*>(aObject),
    8591             :              "Multiple inheritance for mozilla::DOMSVGPathSegLinetoHorizontalRel is broken.");
    8592             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    8593             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    8594             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    8595           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    8596           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    8597           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    8598             :              "You should probably not be using Wrap() directly; use "
    8599             :              "GetOrCreateDOMReflector instead");
    8600             : 
    8601           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    8602             :              "nsISupports must be on our primary inheritance chain");
    8603             : 
    8604           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    8605           0 :   if (!global) {
    8606           0 :     return false;
    8607             :   }
    8608           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    8609           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    8610             : 
    8611             :   // That might have ended up wrapping us already, due to the wonders
    8612             :   // of XBL.  Check for that, and bail out as needed.
    8613           0 :   aReflector.set(aCache->GetWrapper());
    8614           0 :   if (aReflector) {
    8615             : #ifdef DEBUG
    8616           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    8617             : #endif // DEBUG
    8618           0 :     return true;
    8619             :   }
    8620             : 
    8621           0 :   JSAutoCompartment ac(aCx, global);
    8622           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    8623           0 :   if (!canonicalProto) {
    8624           0 :     return false;
    8625             :   }
    8626           0 :   JS::Rooted<JSObject*> proto(aCx);
    8627           0 :   if (aGivenProto) {
    8628           0 :     proto = aGivenProto;
    8629             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    8630             :     // coming in, we changed compartments to that of "parent" so may need
    8631             :     // to wrap the proto here.
    8632           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    8633           0 :       if (!JS_WrapObject(aCx, &proto)) {
    8634           0 :         return false;
    8635             :       }
    8636             :     }
    8637             :   } else {
    8638           0 :     proto = canonicalProto;
    8639             :   }
    8640             : 
    8641           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegLinetoHorizontalRel> creator(aCx);
    8642           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    8643           0 :   if (!aReflector) {
    8644           0 :     return false;
    8645             :   }
    8646             : 
    8647           0 :   aCache->SetWrapper(aReflector);
    8648           0 :   creator.InitializationSucceeded();
    8649             : 
    8650           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    8651             :              aCache->GetWrapperPreserveColor() == aReflector);
    8652             :   // If proto != canonicalProto, we have to preserve our wrapper;
    8653             :   // otherwise we won't be able to properly recreate it later, since
    8654             :   // we won't know what proto to use.  Note that we don't check
    8655             :   // aGivenProto here, since it's entirely possible (and even
    8656             :   // somewhat common) to have a non-null aGivenProto which is the
    8657             :   // same as canonicalProto.
    8658           0 :   if (proto != canonicalProto) {
    8659           0 :     PreserveWrapper(aObject);
    8660             :   }
    8661             : 
    8662           0 :   return true;
    8663             : }
    8664             : 
    8665             : const NativePropertyHooks sNativePropertyHooks[] = { {
    8666             :   nullptr,
    8667             :   nullptr,
    8668             :   nullptr,
    8669             :   { sNativeProperties.Upcast(), nullptr },
    8670             :   prototypes::id::SVGPathSegLinetoHorizontalRel,
    8671             :   constructors::id::SVGPathSegLinetoHorizontalRel,
    8672             :   SVGPathSegBinding::sNativePropertyHooks,
    8673             :   &DefaultXrayExpandoObjectClass
    8674             : } };
    8675             : 
    8676             : void
    8677           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    8678             : {
    8679           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    8680           0 :   if (!parentProto) {
    8681           0 :     return;
    8682             :   }
    8683             : 
    8684           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    8685           0 :   if (!constructorProto) {
    8686           0 :     return;
    8687             :   }
    8688             : 
    8689             :   static bool sIdsInited = false;
    8690           0 :   if (!sIdsInited && NS_IsMainThread()) {
    8691           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    8692           0 :       return;
    8693             :     }
    8694           0 :     sIdsInited = true;
    8695             :   }
    8696             : 
    8697           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegLinetoHorizontalRel);
    8698           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegLinetoHorizontalRel);
    8699           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    8700             :                               &sPrototypeClass.mBase, protoCache,
    8701             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    8702             :                               interfaceCache,
    8703             :                               sNativeProperties.Upcast(),
    8704             :                               nullptr,
    8705             :                               "SVGPathSegLinetoHorizontalRel", aDefineOnGlobal,
    8706             :                               nullptr,
    8707           0 :                               false);
    8708             : }
    8709             : 
    8710             : JS::Handle<JSObject*>
    8711           0 : GetProtoObjectHandle(JSContext* aCx)
    8712             : {
    8713             :   /* Get the interface prototype object for this class.  This will create the
    8714             :      object as needed. */
    8715           0 :   bool aDefineOnGlobal = true;
    8716             : 
    8717             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    8718           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    8719           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    8720           0 :     return nullptr;
    8721             :   }
    8722             : 
    8723             :   /* Check to see whether the interface objects are already installed */
    8724           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    8725           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegLinetoHorizontalRel)) {
    8726           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    8727           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    8728             :   }
    8729             : 
    8730             :   /*
    8731             :    * The object might _still_ be null, but that's OK.
    8732             :    *
    8733             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    8734             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    8735             :    * changed after they have been set.
    8736             :    *
    8737             :    * Calling address() avoids the read read barrier that does gray
    8738             :    * unmarking, but it's not possible for the object to be gray here.
    8739             :    */
    8740             : 
    8741           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegLinetoHorizontalRel);
    8742           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    8743           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    8744             : }
    8745             : 
    8746             : JS::Handle<JSObject*>
    8747           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    8748             : {
    8749             :   /* Get the interface object for this class.  This will create the object as
    8750             :      needed. */
    8751             : 
    8752             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    8753           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    8754           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    8755           0 :     return nullptr;
    8756             :   }
    8757             : 
    8758             :   /* Check to see whether the interface objects are already installed */
    8759           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    8760           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegLinetoHorizontalRel)) {
    8761           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    8762           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    8763             :   }
    8764             : 
    8765             :   /*
    8766             :    * The object might _still_ be null, but that's OK.
    8767             :    *
    8768             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    8769             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    8770             :    * changed after they have been set.
    8771             :    *
    8772             :    * Calling address() avoids the read read barrier that does gray
    8773             :    * unmarking, but it's not possible for the object to be gray here.
    8774             :    */
    8775             : 
    8776           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegLinetoHorizontalRel);
    8777           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    8778           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    8779             : }
    8780             : 
    8781             : JSObject*
    8782           0 : GetConstructorObject(JSContext* aCx)
    8783             : {
    8784           0 :   return GetConstructorObjectHandle(aCx);
    8785             : }
    8786             : 
    8787             : } // namespace SVGPathSegLinetoHorizontalRelBinding
    8788             : 
    8789             : 
    8790             : 
    8791             : namespace SVGPathSegLinetoRelBinding {
    8792             : 
    8793             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    8794             :               "Can't inherit from an interface with a different ownership model.");
    8795             : 
    8796             : static bool
    8797           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoRel* self, JSJitGetterCallArgs args)
    8798             : {
    8799           0 :   float result(self->X());
    8800           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    8801           0 :   args.rval().set(JS_NumberValue(double(result)));
    8802           0 :   return true;
    8803             : }
    8804             : 
    8805             : static bool
    8806           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoRel* self, JSJitSetterCallArgs args)
    8807             : {
    8808             :   float arg0;
    8809           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    8810           0 :     return false;
    8811           0 :   } else if (!mozilla::IsFinite(arg0)) {
    8812           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegLinetoRel.x");
    8813           0 :     return false;
    8814             :   }
    8815           0 :   binding_detail::FastErrorResult rv;
    8816           0 :   self->SetX(arg0, rv);
    8817           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    8818           0 :     return false;
    8819             :   }
    8820           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    8821             : 
    8822           0 :   return true;
    8823             : }
    8824             : 
    8825             : static const JSJitInfo x_getterinfo = {
    8826             :   { (JSJitGetterOp)get_x },
    8827             :   { prototypes::id::SVGPathSegLinetoRel },
    8828             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoRel>::Depth },
    8829             :   JSJitInfo::Getter,
    8830             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    8831             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    8832             :   true,  /* isInfallible. False in setters. */
    8833             :   false,  /* isMovable.  Not relevant for setters. */
    8834             :   false, /* isEliminatable.  Not relevant for setters. */
    8835             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    8836             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    8837             :   false,  /* isTypedMethod.  Only relevant for methods. */
    8838             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    8839             : };
    8840             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    8841             : static_assert(0 < 1, "There is no slot for us");
    8842             : static const JSJitInfo x_setterinfo = {
    8843             :   { (JSJitGetterOp)set_x },
    8844             :   { prototypes::id::SVGPathSegLinetoRel },
    8845             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoRel>::Depth },
    8846             :   JSJitInfo::Setter,
    8847             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    8848             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    8849             :   false,  /* isInfallible. False in setters. */
    8850             :   false,  /* isMovable.  Not relevant for setters. */
    8851             :   false, /* isEliminatable.  Not relevant for setters. */
    8852             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    8853             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    8854             :   false,  /* isTypedMethod.  Only relevant for methods. */
    8855             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    8856             : };
    8857             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    8858             : static_assert(0 < 1, "There is no slot for us");
    8859             : 
    8860             : static bool
    8861           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoRel* self, JSJitGetterCallArgs args)
    8862             : {
    8863           0 :   float result(self->Y());
    8864           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    8865           0 :   args.rval().set(JS_NumberValue(double(result)));
    8866           0 :   return true;
    8867             : }
    8868             : 
    8869             : static bool
    8870           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoRel* self, JSJitSetterCallArgs args)
    8871             : {
    8872             :   float arg0;
    8873           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    8874           0 :     return false;
    8875           0 :   } else if (!mozilla::IsFinite(arg0)) {
    8876           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegLinetoRel.y");
    8877           0 :     return false;
    8878             :   }
    8879           0 :   binding_detail::FastErrorResult rv;
    8880           0 :   self->SetY(arg0, rv);
    8881           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    8882           0 :     return false;
    8883             :   }
    8884           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    8885             : 
    8886           0 :   return true;
    8887             : }
    8888             : 
    8889             : static const JSJitInfo y_getterinfo = {
    8890             :   { (JSJitGetterOp)get_y },
    8891             :   { prototypes::id::SVGPathSegLinetoRel },
    8892             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoRel>::Depth },
    8893             :   JSJitInfo::Getter,
    8894             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    8895             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    8896             :   true,  /* isInfallible. False in setters. */
    8897             :   false,  /* isMovable.  Not relevant for setters. */
    8898             :   false, /* isEliminatable.  Not relevant for setters. */
    8899             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    8900             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    8901             :   false,  /* isTypedMethod.  Only relevant for methods. */
    8902             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    8903             : };
    8904             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    8905             : static_assert(0 < 1, "There is no slot for us");
    8906             : static const JSJitInfo y_setterinfo = {
    8907             :   { (JSJitGetterOp)set_y },
    8908             :   { prototypes::id::SVGPathSegLinetoRel },
    8909             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoRel>::Depth },
    8910             :   JSJitInfo::Setter,
    8911             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    8912             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    8913             :   false,  /* isInfallible. False in setters. */
    8914             :   false,  /* isMovable.  Not relevant for setters. */
    8915             :   false, /* isEliminatable.  Not relevant for setters. */
    8916             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    8917             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    8918             :   false,  /* isTypedMethod.  Only relevant for methods. */
    8919             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    8920             : };
    8921             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    8922             : static_assert(0 < 1, "There is no slot for us");
    8923             : 
    8924             : static bool
    8925           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    8926             : {
    8927           0 :   mozilla::DOMSVGPathSegLinetoRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoRel>(obj);
    8928             :   // We don't want to preserve if we don't have a wrapper, and we
    8929             :   // obviously can't preserve if we're not initialized.
    8930           0 :   if (self && self->GetWrapperPreserveColor()) {
    8931           0 :     PreserveWrapper(self);
    8932             :   }
    8933           0 :   return true;
    8934             : }
    8935             : 
    8936             : static void
    8937           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    8938             : {
    8939           0 :   mozilla::DOMSVGPathSegLinetoRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoRel>(obj);
    8940           0 :   if (self) {
    8941           0 :     ClearWrapper(self, self, obj);
    8942           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegLinetoRel>(self);
    8943             :   }
    8944           0 : }
    8945             : 
    8946             : static void
    8947           0 : _objectMoved(JSObject* obj, const JSObject* old)
    8948             : {
    8949           0 :   mozilla::DOMSVGPathSegLinetoRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoRel>(obj);
    8950           0 :   if (self) {
    8951           0 :     UpdateWrapper(self, self, obj, old);
    8952             :   }
    8953           0 : }
    8954             : 
    8955             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    8956             : #if defined(__clang__)
    8957             : #pragma clang diagnostic push
    8958             : #pragma clang diagnostic ignored "-Wmissing-braces"
    8959             : #endif
    8960             : static const JSPropertySpec sAttributes_specs[] = {
    8961             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
    8962             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
    8963             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    8964             : };
    8965             : #if defined(__clang__)
    8966             : #pragma clang diagnostic pop
    8967             : #endif
    8968             : 
    8969             : 
    8970             : // Can't be const because the pref-enabled boolean needs to be writable
    8971             : static Prefable<const JSPropertySpec> sAttributes[] = {
    8972             :   { nullptr, &sAttributes_specs[0] },
    8973             :   { nullptr, nullptr }
    8974             : };
    8975             : 
    8976             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    8977             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    8978             : static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    8979             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    8980             : 
    8981             : 
    8982             : static uint16_t sNativeProperties_sortedPropertyIndices[2];
    8983             : static PropertyInfo sNativeProperties_propertyInfos[2];
    8984             : 
    8985             : static const NativePropertiesN<1> sNativeProperties = {
    8986             :   false, 0,
    8987             :   false, 0,
    8988             :   false, 0,
    8989             :   true,  0 /* sAttributes */,
    8990             :   false, 0,
    8991             :   false, 0,
    8992             :   false, 0,
    8993             :   -1,
    8994             :   2,
    8995             :   sNativeProperties_sortedPropertyIndices,
    8996             :   {
    8997             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    8998             :   }
    8999             : };
    9000             : static_assert(2 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    9001             :     "We have a property info count that is oversized");
    9002             : 
    9003             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    9004             :   {
    9005             :     "Function",
    9006             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    9007             :     &sBoringInterfaceObjectClassClassOps,
    9008             :     JS_NULL_CLASS_SPEC,
    9009             :     JS_NULL_CLASS_EXT,
    9010             :     &sInterfaceObjectClassObjectOps
    9011             :   },
    9012             :   eInterface,
    9013             :   true,
    9014             :   prototypes::id::SVGPathSegLinetoRel,
    9015             :   PrototypeTraits<prototypes::id::SVGPathSegLinetoRel>::Depth,
    9016             :   sNativePropertyHooks,
    9017             :   "function SVGPathSegLinetoRel() {\n    [native code]\n}",
    9018             :   SVGPathSegBinding::GetConstructorObject
    9019             : };
    9020             : 
    9021             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    9022             :   {
    9023             :     "SVGPathSegLinetoRelPrototype",
    9024             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    9025             :     JS_NULL_CLASS_OPS,
    9026             :     JS_NULL_CLASS_SPEC,
    9027             :     JS_NULL_CLASS_EXT,
    9028             :     JS_NULL_OBJECT_OPS
    9029             :   },
    9030             :   eInterfacePrototype,
    9031             :   false,
    9032             :   prototypes::id::SVGPathSegLinetoRel,
    9033             :   PrototypeTraits<prototypes::id::SVGPathSegLinetoRel>::Depth,
    9034             :   sNativePropertyHooks,
    9035             :   "[object SVGPathSegLinetoRelPrototype]",
    9036             :   SVGPathSegBinding::GetProtoObject
    9037             : };
    9038             : 
    9039             : JSObject*
    9040           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    9041             : {
    9042           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    9043             : }
    9044             : 
    9045             : static const js::ClassOps sClassOps = {
    9046             :   _addProperty, /* addProperty */
    9047             :   nullptr,               /* delProperty */
    9048             :   nullptr,               /* getProperty */
    9049             :   nullptr,               /* setProperty */
    9050             :   nullptr,               /* enumerate */
    9051             :   nullptr, /* newEnumerate */
    9052             :   nullptr, /* resolve */
    9053             :   nullptr, /* mayResolve */
    9054             :   _finalize, /* finalize */
    9055             :   nullptr, /* call */
    9056             :   nullptr,               /* hasInstance */
    9057             :   nullptr,               /* construct */
    9058             :   nullptr, /* trace */
    9059             : };
    9060             : 
    9061             : static const js::ClassExtension sClassExtension = {
    9062             :   nullptr, /* weakmapKeyDelegateOp */
    9063             :   _objectMoved /* objectMovedOp */
    9064             : };
    9065             : 
    9066             : static const DOMJSClass sClass = {
    9067             :   { "SVGPathSegLinetoRel",
    9068             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    9069             :     &sClassOps,
    9070             :     JS_NULL_CLASS_SPEC,
    9071             :     &sClassExtension,
    9072             :     JS_NULL_OBJECT_OPS
    9073             :   },
    9074             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegLinetoRel, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    9075             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegLinetoRel >::value,
    9076             :   sNativePropertyHooks,
    9077             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegLinetoRel>::Get,
    9078             :   GetProtoObjectHandle,
    9079             :   GetCCParticipant<mozilla::DOMSVGPathSegLinetoRel>::Get()
    9080             : };
    9081             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    9082             :               "Must have the right minimal number of reserved slots.");
    9083             : static_assert(1 >= 1,
    9084             :               "Must have enough reserved slots.");
    9085             : 
    9086             : const JSClass*
    9087           0 : GetJSClass()
    9088             : {
    9089           0 :   return sClass.ToJSClass();
    9090             : }
    9091             : 
    9092             : bool
    9093           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegLinetoRel* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    9094             : {
    9095             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegLinetoRel*>(aObject) ==
    9096             :              reinterpret_cast<mozilla::DOMSVGPathSegLinetoRel*>(aObject),
    9097             :              "Multiple inheritance for mozilla::DOMSVGPathSegLinetoRel is broken.");
    9098             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    9099             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    9100             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    9101           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    9102           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    9103           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    9104             :              "You should probably not be using Wrap() directly; use "
    9105             :              "GetOrCreateDOMReflector instead");
    9106             : 
    9107           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    9108             :              "nsISupports must be on our primary inheritance chain");
    9109             : 
    9110           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    9111           0 :   if (!global) {
    9112           0 :     return false;
    9113             :   }
    9114           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    9115           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    9116             : 
    9117             :   // That might have ended up wrapping us already, due to the wonders
    9118             :   // of XBL.  Check for that, and bail out as needed.
    9119           0 :   aReflector.set(aCache->GetWrapper());
    9120           0 :   if (aReflector) {
    9121             : #ifdef DEBUG
    9122           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    9123             : #endif // DEBUG
    9124           0 :     return true;
    9125             :   }
    9126             : 
    9127           0 :   JSAutoCompartment ac(aCx, global);
    9128           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    9129           0 :   if (!canonicalProto) {
    9130           0 :     return false;
    9131             :   }
    9132           0 :   JS::Rooted<JSObject*> proto(aCx);
    9133           0 :   if (aGivenProto) {
    9134           0 :     proto = aGivenProto;
    9135             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    9136             :     // coming in, we changed compartments to that of "parent" so may need
    9137             :     // to wrap the proto here.
    9138           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    9139           0 :       if (!JS_WrapObject(aCx, &proto)) {
    9140           0 :         return false;
    9141             :       }
    9142             :     }
    9143             :   } else {
    9144           0 :     proto = canonicalProto;
    9145             :   }
    9146             : 
    9147           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegLinetoRel> creator(aCx);
    9148           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    9149           0 :   if (!aReflector) {
    9150           0 :     return false;
    9151             :   }
    9152             : 
    9153           0 :   aCache->SetWrapper(aReflector);
    9154           0 :   creator.InitializationSucceeded();
    9155             : 
    9156           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    9157             :              aCache->GetWrapperPreserveColor() == aReflector);
    9158             :   // If proto != canonicalProto, we have to preserve our wrapper;
    9159             :   // otherwise we won't be able to properly recreate it later, since
    9160             :   // we won't know what proto to use.  Note that we don't check
    9161             :   // aGivenProto here, since it's entirely possible (and even
    9162             :   // somewhat common) to have a non-null aGivenProto which is the
    9163             :   // same as canonicalProto.
    9164           0 :   if (proto != canonicalProto) {
    9165           0 :     PreserveWrapper(aObject);
    9166             :   }
    9167             : 
    9168           0 :   return true;
    9169             : }
    9170             : 
    9171             : const NativePropertyHooks sNativePropertyHooks[] = { {
    9172             :   nullptr,
    9173             :   nullptr,
    9174             :   nullptr,
    9175             :   { sNativeProperties.Upcast(), nullptr },
    9176             :   prototypes::id::SVGPathSegLinetoRel,
    9177             :   constructors::id::SVGPathSegLinetoRel,
    9178             :   SVGPathSegBinding::sNativePropertyHooks,
    9179             :   &DefaultXrayExpandoObjectClass
    9180             : } };
    9181             : 
    9182             : void
    9183           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    9184             : {
    9185           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    9186           0 :   if (!parentProto) {
    9187           0 :     return;
    9188             :   }
    9189             : 
    9190           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    9191           0 :   if (!constructorProto) {
    9192           0 :     return;
    9193             :   }
    9194             : 
    9195             :   static bool sIdsInited = false;
    9196           0 :   if (!sIdsInited && NS_IsMainThread()) {
    9197           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    9198           0 :       return;
    9199             :     }
    9200           0 :     sIdsInited = true;
    9201             :   }
    9202             : 
    9203           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegLinetoRel);
    9204           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegLinetoRel);
    9205           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    9206             :                               &sPrototypeClass.mBase, protoCache,
    9207             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    9208             :                               interfaceCache,
    9209             :                               sNativeProperties.Upcast(),
    9210             :                               nullptr,
    9211             :                               "SVGPathSegLinetoRel", aDefineOnGlobal,
    9212             :                               nullptr,
    9213           0 :                               false);
    9214             : }
    9215             : 
    9216             : JS::Handle<JSObject*>
    9217           0 : GetProtoObjectHandle(JSContext* aCx)
    9218             : {
    9219             :   /* Get the interface prototype object for this class.  This will create the
    9220             :      object as needed. */
    9221           0 :   bool aDefineOnGlobal = true;
    9222             : 
    9223             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    9224           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    9225           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    9226           0 :     return nullptr;
    9227             :   }
    9228             : 
    9229             :   /* Check to see whether the interface objects are already installed */
    9230           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    9231           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegLinetoRel)) {
    9232           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    9233           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    9234             :   }
    9235             : 
    9236             :   /*
    9237             :    * The object might _still_ be null, but that's OK.
    9238             :    *
    9239             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    9240             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    9241             :    * changed after they have been set.
    9242             :    *
    9243             :    * Calling address() avoids the read read barrier that does gray
    9244             :    * unmarking, but it's not possible for the object to be gray here.
    9245             :    */
    9246             : 
    9247           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegLinetoRel);
    9248           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    9249           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    9250             : }
    9251             : 
    9252             : JS::Handle<JSObject*>
    9253           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    9254             : {
    9255             :   /* Get the interface object for this class.  This will create the object as
    9256             :      needed. */
    9257             : 
    9258             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    9259           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    9260           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    9261           0 :     return nullptr;
    9262             :   }
    9263             : 
    9264             :   /* Check to see whether the interface objects are already installed */
    9265           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    9266           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegLinetoRel)) {
    9267           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    9268           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    9269             :   }
    9270             : 
    9271             :   /*
    9272             :    * The object might _still_ be null, but that's OK.
    9273             :    *
    9274             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    9275             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    9276             :    * changed after they have been set.
    9277             :    *
    9278             :    * Calling address() avoids the read read barrier that does gray
    9279             :    * unmarking, but it's not possible for the object to be gray here.
    9280             :    */
    9281             : 
    9282           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegLinetoRel);
    9283           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    9284           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    9285             : }
    9286             : 
    9287             : JSObject*
    9288           0 : GetConstructorObject(JSContext* aCx)
    9289             : {
    9290           0 :   return GetConstructorObjectHandle(aCx);
    9291             : }
    9292             : 
    9293             : } // namespace SVGPathSegLinetoRelBinding
    9294             : 
    9295             : 
    9296             : 
    9297             : namespace SVGPathSegLinetoVerticalAbsBinding {
    9298             : 
    9299             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    9300             :               "Can't inherit from an interface with a different ownership model.");
    9301             : 
    9302             : static bool
    9303           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoVerticalAbs* self, JSJitGetterCallArgs args)
    9304             : {
    9305           0 :   float result(self->Y());
    9306           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    9307           0 :   args.rval().set(JS_NumberValue(double(result)));
    9308           0 :   return true;
    9309             : }
    9310             : 
    9311             : static bool
    9312           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoVerticalAbs* self, JSJitSetterCallArgs args)
    9313             : {
    9314             :   float arg0;
    9315           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    9316           0 :     return false;
    9317           0 :   } else if (!mozilla::IsFinite(arg0)) {
    9318           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegLinetoVerticalAbs.y");
    9319           0 :     return false;
    9320             :   }
    9321           0 :   binding_detail::FastErrorResult rv;
    9322           0 :   self->SetY(arg0, rv);
    9323           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    9324           0 :     return false;
    9325             :   }
    9326           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    9327             : 
    9328           0 :   return true;
    9329             : }
    9330             : 
    9331             : static const JSJitInfo y_getterinfo = {
    9332             :   { (JSJitGetterOp)get_y },
    9333             :   { prototypes::id::SVGPathSegLinetoVerticalAbs },
    9334             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoVerticalAbs>::Depth },
    9335             :   JSJitInfo::Getter,
    9336             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    9337             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    9338             :   true,  /* isInfallible. False in setters. */
    9339             :   false,  /* isMovable.  Not relevant for setters. */
    9340             :   false, /* isEliminatable.  Not relevant for setters. */
    9341             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    9342             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    9343             :   false,  /* isTypedMethod.  Only relevant for methods. */
    9344             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    9345             : };
    9346             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    9347             : static_assert(0 < 1, "There is no slot for us");
    9348             : static const JSJitInfo y_setterinfo = {
    9349             :   { (JSJitGetterOp)set_y },
    9350             :   { prototypes::id::SVGPathSegLinetoVerticalAbs },
    9351             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoVerticalAbs>::Depth },
    9352             :   JSJitInfo::Setter,
    9353             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    9354             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    9355             :   false,  /* isInfallible. False in setters. */
    9356             :   false,  /* isMovable.  Not relevant for setters. */
    9357             :   false, /* isEliminatable.  Not relevant for setters. */
    9358             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    9359             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    9360             :   false,  /* isTypedMethod.  Only relevant for methods. */
    9361             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    9362             : };
    9363             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    9364             : static_assert(0 < 1, "There is no slot for us");
    9365             : 
    9366             : static bool
    9367           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    9368             : {
    9369           0 :   mozilla::DOMSVGPathSegLinetoVerticalAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoVerticalAbs>(obj);
    9370             :   // We don't want to preserve if we don't have a wrapper, and we
    9371             :   // obviously can't preserve if we're not initialized.
    9372           0 :   if (self && self->GetWrapperPreserveColor()) {
    9373           0 :     PreserveWrapper(self);
    9374             :   }
    9375           0 :   return true;
    9376             : }
    9377             : 
    9378             : static void
    9379           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    9380             : {
    9381           0 :   mozilla::DOMSVGPathSegLinetoVerticalAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoVerticalAbs>(obj);
    9382           0 :   if (self) {
    9383           0 :     ClearWrapper(self, self, obj);
    9384           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegLinetoVerticalAbs>(self);
    9385             :   }
    9386           0 : }
    9387             : 
    9388             : static void
    9389           0 : _objectMoved(JSObject* obj, const JSObject* old)
    9390             : {
    9391           0 :   mozilla::DOMSVGPathSegLinetoVerticalAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoVerticalAbs>(obj);
    9392           0 :   if (self) {
    9393           0 :     UpdateWrapper(self, self, obj, old);
    9394             :   }
    9395           0 : }
    9396             : 
    9397             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    9398             : #if defined(__clang__)
    9399             : #pragma clang diagnostic push
    9400             : #pragma clang diagnostic ignored "-Wmissing-braces"
    9401             : #endif
    9402             : static const JSPropertySpec sAttributes_specs[] = {
    9403             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
    9404             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    9405             : };
    9406             : #if defined(__clang__)
    9407             : #pragma clang diagnostic pop
    9408             : #endif
    9409             : 
    9410             : 
    9411             : // Can't be const because the pref-enabled boolean needs to be writable
    9412             : static Prefable<const JSPropertySpec> sAttributes[] = {
    9413             :   { nullptr, &sAttributes_specs[0] },
    9414             :   { nullptr, nullptr }
    9415             : };
    9416             : 
    9417             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    9418             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    9419             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    9420             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    9421             : 
    9422             : 
    9423             : static uint16_t sNativeProperties_sortedPropertyIndices[1];
    9424             : static PropertyInfo sNativeProperties_propertyInfos[1];
    9425             : 
    9426             : static const NativePropertiesN<1> sNativeProperties = {
    9427             :   false, 0,
    9428             :   false, 0,
    9429             :   false, 0,
    9430             :   true,  0 /* sAttributes */,
    9431             :   false, 0,
    9432             :   false, 0,
    9433             :   false, 0,
    9434             :   -1,
    9435             :   1,
    9436             :   sNativeProperties_sortedPropertyIndices,
    9437             :   {
    9438             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    9439             :   }
    9440             : };
    9441             : static_assert(1 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    9442             :     "We have a property info count that is oversized");
    9443             : 
    9444             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    9445             :   {
    9446             :     "Function",
    9447             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    9448             :     &sBoringInterfaceObjectClassClassOps,
    9449             :     JS_NULL_CLASS_SPEC,
    9450             :     JS_NULL_CLASS_EXT,
    9451             :     &sInterfaceObjectClassObjectOps
    9452             :   },
    9453             :   eInterface,
    9454             :   true,
    9455             :   prototypes::id::SVGPathSegLinetoVerticalAbs,
    9456             :   PrototypeTraits<prototypes::id::SVGPathSegLinetoVerticalAbs>::Depth,
    9457             :   sNativePropertyHooks,
    9458             :   "function SVGPathSegLinetoVerticalAbs() {\n    [native code]\n}",
    9459             :   SVGPathSegBinding::GetConstructorObject
    9460             : };
    9461             : 
    9462             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    9463             :   {
    9464             :     "SVGPathSegLinetoVerticalAbsPrototype",
    9465             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    9466             :     JS_NULL_CLASS_OPS,
    9467             :     JS_NULL_CLASS_SPEC,
    9468             :     JS_NULL_CLASS_EXT,
    9469             :     JS_NULL_OBJECT_OPS
    9470             :   },
    9471             :   eInterfacePrototype,
    9472             :   false,
    9473             :   prototypes::id::SVGPathSegLinetoVerticalAbs,
    9474             :   PrototypeTraits<prototypes::id::SVGPathSegLinetoVerticalAbs>::Depth,
    9475             :   sNativePropertyHooks,
    9476             :   "[object SVGPathSegLinetoVerticalAbsPrototype]",
    9477             :   SVGPathSegBinding::GetProtoObject
    9478             : };
    9479             : 
    9480             : JSObject*
    9481           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    9482             : {
    9483           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    9484             : }
    9485             : 
    9486             : static const js::ClassOps sClassOps = {
    9487             :   _addProperty, /* addProperty */
    9488             :   nullptr,               /* delProperty */
    9489             :   nullptr,               /* getProperty */
    9490             :   nullptr,               /* setProperty */
    9491             :   nullptr,               /* enumerate */
    9492             :   nullptr, /* newEnumerate */
    9493             :   nullptr, /* resolve */
    9494             :   nullptr, /* mayResolve */
    9495             :   _finalize, /* finalize */
    9496             :   nullptr, /* call */
    9497             :   nullptr,               /* hasInstance */
    9498             :   nullptr,               /* construct */
    9499             :   nullptr, /* trace */
    9500             : };
    9501             : 
    9502             : static const js::ClassExtension sClassExtension = {
    9503             :   nullptr, /* weakmapKeyDelegateOp */
    9504             :   _objectMoved /* objectMovedOp */
    9505             : };
    9506             : 
    9507             : static const DOMJSClass sClass = {
    9508             :   { "SVGPathSegLinetoVerticalAbs",
    9509             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    9510             :     &sClassOps,
    9511             :     JS_NULL_CLASS_SPEC,
    9512             :     &sClassExtension,
    9513             :     JS_NULL_OBJECT_OPS
    9514             :   },
    9515             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegLinetoVerticalAbs, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    9516             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegLinetoVerticalAbs >::value,
    9517             :   sNativePropertyHooks,
    9518             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegLinetoVerticalAbs>::Get,
    9519             :   GetProtoObjectHandle,
    9520             :   GetCCParticipant<mozilla::DOMSVGPathSegLinetoVerticalAbs>::Get()
    9521             : };
    9522             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    9523             :               "Must have the right minimal number of reserved slots.");
    9524             : static_assert(1 >= 1,
    9525             :               "Must have enough reserved slots.");
    9526             : 
    9527             : const JSClass*
    9528           0 : GetJSClass()
    9529             : {
    9530           0 :   return sClass.ToJSClass();
    9531             : }
    9532             : 
    9533             : bool
    9534           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegLinetoVerticalAbs* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    9535             : {
    9536             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegLinetoVerticalAbs*>(aObject) ==
    9537             :              reinterpret_cast<mozilla::DOMSVGPathSegLinetoVerticalAbs*>(aObject),
    9538             :              "Multiple inheritance for mozilla::DOMSVGPathSegLinetoVerticalAbs is broken.");
    9539             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    9540             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    9541             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    9542           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    9543           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    9544           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    9545             :              "You should probably not be using Wrap() directly; use "
    9546             :              "GetOrCreateDOMReflector instead");
    9547             : 
    9548           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    9549             :              "nsISupports must be on our primary inheritance chain");
    9550             : 
    9551           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    9552           0 :   if (!global) {
    9553           0 :     return false;
    9554             :   }
    9555           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    9556           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    9557             : 
    9558             :   // That might have ended up wrapping us already, due to the wonders
    9559             :   // of XBL.  Check for that, and bail out as needed.
    9560           0 :   aReflector.set(aCache->GetWrapper());
    9561           0 :   if (aReflector) {
    9562             : #ifdef DEBUG
    9563           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    9564             : #endif // DEBUG
    9565           0 :     return true;
    9566             :   }
    9567             : 
    9568           0 :   JSAutoCompartment ac(aCx, global);
    9569           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    9570           0 :   if (!canonicalProto) {
    9571           0 :     return false;
    9572             :   }
    9573           0 :   JS::Rooted<JSObject*> proto(aCx);
    9574           0 :   if (aGivenProto) {
    9575           0 :     proto = aGivenProto;
    9576             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    9577             :     // coming in, we changed compartments to that of "parent" so may need
    9578             :     // to wrap the proto here.
    9579           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    9580           0 :       if (!JS_WrapObject(aCx, &proto)) {
    9581           0 :         return false;
    9582             :       }
    9583             :     }
    9584             :   } else {
    9585           0 :     proto = canonicalProto;
    9586             :   }
    9587             : 
    9588           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegLinetoVerticalAbs> creator(aCx);
    9589           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    9590           0 :   if (!aReflector) {
    9591           0 :     return false;
    9592             :   }
    9593             : 
    9594           0 :   aCache->SetWrapper(aReflector);
    9595           0 :   creator.InitializationSucceeded();
    9596             : 
    9597           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    9598             :              aCache->GetWrapperPreserveColor() == aReflector);
    9599             :   // If proto != canonicalProto, we have to preserve our wrapper;
    9600             :   // otherwise we won't be able to properly recreate it later, since
    9601             :   // we won't know what proto to use.  Note that we don't check
    9602             :   // aGivenProto here, since it's entirely possible (and even
    9603             :   // somewhat common) to have a non-null aGivenProto which is the
    9604             :   // same as canonicalProto.
    9605           0 :   if (proto != canonicalProto) {
    9606           0 :     PreserveWrapper(aObject);
    9607             :   }
    9608             : 
    9609           0 :   return true;
    9610             : }
    9611             : 
    9612             : const NativePropertyHooks sNativePropertyHooks[] = { {
    9613             :   nullptr,
    9614             :   nullptr,
    9615             :   nullptr,
    9616             :   { sNativeProperties.Upcast(), nullptr },
    9617             :   prototypes::id::SVGPathSegLinetoVerticalAbs,
    9618             :   constructors::id::SVGPathSegLinetoVerticalAbs,
    9619             :   SVGPathSegBinding::sNativePropertyHooks,
    9620             :   &DefaultXrayExpandoObjectClass
    9621             : } };
    9622             : 
    9623             : void
    9624           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    9625             : {
    9626           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
    9627           0 :   if (!parentProto) {
    9628           0 :     return;
    9629             :   }
    9630             : 
    9631           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
    9632           0 :   if (!constructorProto) {
    9633           0 :     return;
    9634             :   }
    9635             : 
    9636             :   static bool sIdsInited = false;
    9637           0 :   if (!sIdsInited && NS_IsMainThread()) {
    9638           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    9639           0 :       return;
    9640             :     }
    9641           0 :     sIdsInited = true;
    9642             :   }
    9643             : 
    9644           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegLinetoVerticalAbs);
    9645           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegLinetoVerticalAbs);
    9646           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    9647             :                               &sPrototypeClass.mBase, protoCache,
    9648             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    9649             :                               interfaceCache,
    9650             :                               sNativeProperties.Upcast(),
    9651             :                               nullptr,
    9652             :                               "SVGPathSegLinetoVerticalAbs", aDefineOnGlobal,
    9653             :                               nullptr,
    9654           0 :                               false);
    9655             : }
    9656             : 
    9657             : JS::Handle<JSObject*>
    9658           0 : GetProtoObjectHandle(JSContext* aCx)
    9659             : {
    9660             :   /* Get the interface prototype object for this class.  This will create the
    9661             :      object as needed. */
    9662           0 :   bool aDefineOnGlobal = true;
    9663             : 
    9664             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    9665           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    9666           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    9667           0 :     return nullptr;
    9668             :   }
    9669             : 
    9670             :   /* Check to see whether the interface objects are already installed */
    9671           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    9672           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegLinetoVerticalAbs)) {
    9673           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    9674           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    9675             :   }
    9676             : 
    9677             :   /*
    9678             :    * The object might _still_ be null, but that's OK.
    9679             :    *
    9680             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    9681             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    9682             :    * changed after they have been set.
    9683             :    *
    9684             :    * Calling address() avoids the read read barrier that does gray
    9685             :    * unmarking, but it's not possible for the object to be gray here.
    9686             :    */
    9687             : 
    9688           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegLinetoVerticalAbs);
    9689           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    9690           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    9691             : }
    9692             : 
    9693             : JS::Handle<JSObject*>
    9694           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    9695             : {
    9696             :   /* Get the interface object for this class.  This will create the object as
    9697             :      needed. */
    9698             : 
    9699             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    9700           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    9701           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    9702           0 :     return nullptr;
    9703             :   }
    9704             : 
    9705             :   /* Check to see whether the interface objects are already installed */
    9706           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    9707           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegLinetoVerticalAbs)) {
    9708           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    9709           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    9710             :   }
    9711             : 
    9712             :   /*
    9713             :    * The object might _still_ be null, but that's OK.
    9714             :    *
    9715             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    9716             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    9717             :    * changed after they have been set.
    9718             :    *
    9719             :    * Calling address() avoids the read read barrier that does gray
    9720             :    * unmarking, but it's not possible for the object to be gray here.
    9721             :    */
    9722             : 
    9723           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegLinetoVerticalAbs);
    9724           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    9725           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    9726             : }
    9727             : 
    9728             : JSObject*
    9729           0 : GetConstructorObject(JSContext* aCx)
    9730             : {
    9731           0 :   return GetConstructorObjectHandle(aCx);
    9732             : }
    9733             : 
    9734             : } // namespace SVGPathSegLinetoVerticalAbsBinding
    9735             : 
    9736             : 
    9737             : 
    9738             : namespace SVGPathSegLinetoVerticalRelBinding {
    9739             : 
    9740             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
    9741             :               "Can't inherit from an interface with a different ownership model.");
    9742             : 
    9743             : static bool
    9744           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoVerticalRel* self, JSJitGetterCallArgs args)
    9745             : {
    9746           0 :   float result(self->Y());
    9747           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    9748           0 :   args.rval().set(JS_NumberValue(double(result)));
    9749           0 :   return true;
    9750             : }
    9751             : 
    9752             : static bool
    9753           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegLinetoVerticalRel* self, JSJitSetterCallArgs args)
    9754             : {
    9755             :   float arg0;
    9756           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
    9757           0 :     return false;
    9758           0 :   } else if (!mozilla::IsFinite(arg0)) {
    9759           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegLinetoVerticalRel.y");
    9760           0 :     return false;
    9761             :   }
    9762           0 :   binding_detail::FastErrorResult rv;
    9763           0 :   self->SetY(arg0, rv);
    9764           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    9765           0 :     return false;
    9766             :   }
    9767           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    9768             : 
    9769           0 :   return true;
    9770             : }
    9771             : 
    9772             : static const JSJitInfo y_getterinfo = {
    9773             :   { (JSJitGetterOp)get_y },
    9774             :   { prototypes::id::SVGPathSegLinetoVerticalRel },
    9775             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoVerticalRel>::Depth },
    9776             :   JSJitInfo::Getter,
    9777             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    9778             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
    9779             :   true,  /* isInfallible. False in setters. */
    9780             :   false,  /* isMovable.  Not relevant for setters. */
    9781             :   false, /* isEliminatable.  Not relevant for setters. */
    9782             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    9783             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    9784             :   false,  /* isTypedMethod.  Only relevant for methods. */
    9785             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    9786             : };
    9787             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    9788             : static_assert(0 < 1, "There is no slot for us");
    9789             : static const JSJitInfo y_setterinfo = {
    9790             :   { (JSJitGetterOp)set_y },
    9791             :   { prototypes::id::SVGPathSegLinetoVerticalRel },
    9792             :   { PrototypeTraits<prototypes::id::SVGPathSegLinetoVerticalRel>::Depth },
    9793             :   JSJitInfo::Setter,
    9794             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    9795             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    9796             :   false,  /* isInfallible. False in setters. */
    9797             :   false,  /* isMovable.  Not relevant for setters. */
    9798             :   false, /* isEliminatable.  Not relevant for setters. */
    9799             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    9800             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    9801             :   false,  /* isTypedMethod.  Only relevant for methods. */
    9802             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    9803             : };
    9804             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    9805             : static_assert(0 < 1, "There is no slot for us");
    9806             : 
    9807             : static bool
    9808           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    9809             : {
    9810           0 :   mozilla::DOMSVGPathSegLinetoVerticalRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoVerticalRel>(obj);
    9811             :   // We don't want to preserve if we don't have a wrapper, and we
    9812             :   // obviously can't preserve if we're not initialized.
    9813           0 :   if (self && self->GetWrapperPreserveColor()) {
    9814           0 :     PreserveWrapper(self);
    9815             :   }
    9816           0 :   return true;
    9817             : }
    9818             : 
    9819             : static void
    9820           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    9821             : {
    9822           0 :   mozilla::DOMSVGPathSegLinetoVerticalRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoVerticalRel>(obj);
    9823           0 :   if (self) {
    9824           0 :     ClearWrapper(self, self, obj);
    9825           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegLinetoVerticalRel>(self);
    9826             :   }
    9827           0 : }
    9828             : 
    9829             : static void
    9830           0 : _objectMoved(JSObject* obj, const JSObject* old)
    9831             : {
    9832           0 :   mozilla::DOMSVGPathSegLinetoVerticalRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegLinetoVerticalRel>(obj);
    9833           0 :   if (self) {
    9834           0 :     UpdateWrapper(self, self, obj, old);
    9835             :   }
    9836           0 : }
    9837             : 
    9838             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    9839             : #if defined(__clang__)
    9840             : #pragma clang diagnostic push
    9841             : #pragma clang diagnostic ignored "-Wmissing-braces"
    9842             : #endif
    9843             : static const JSPropertySpec sAttributes_specs[] = {
    9844             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
    9845             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    9846             : };
    9847             : #if defined(__clang__)
    9848             : #pragma clang diagnostic pop
    9849             : #endif
    9850             : 
    9851             : 
    9852             : // Can't be const because the pref-enabled boolean needs to be writable
    9853             : static Prefable<const JSPropertySpec> sAttributes[] = {
    9854             :   { nullptr, &sAttributes_specs[0] },
    9855             :   { nullptr, nullptr }
    9856             : };
    9857             : 
    9858             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    9859             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    9860             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    9861             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    9862             : 
    9863             : 
    9864             : static uint16_t sNativeProperties_sortedPropertyIndices[1];
    9865             : static PropertyInfo sNativeProperties_propertyInfos[1];
    9866             : 
    9867             : static const NativePropertiesN<1> sNativeProperties = {
    9868             :   false, 0,
    9869             :   false, 0,
    9870             :   false, 0,
    9871             :   true,  0 /* sAttributes */,
    9872             :   false, 0,
    9873             :   false, 0,
    9874             :   false, 0,
    9875             :   -1,
    9876             :   1,
    9877             :   sNativeProperties_sortedPropertyIndices,
    9878             :   {
    9879             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
    9880             :   }
    9881             : };
    9882             : static_assert(1 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    9883             :     "We have a property info count that is oversized");
    9884             : 
    9885             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    9886             :   {
    9887             :     "Function",
    9888             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    9889             :     &sBoringInterfaceObjectClassClassOps,
    9890             :     JS_NULL_CLASS_SPEC,
    9891             :     JS_NULL_CLASS_EXT,
    9892             :     &sInterfaceObjectClassObjectOps
    9893             :   },
    9894             :   eInterface,
    9895             :   true,
    9896             :   prototypes::id::SVGPathSegLinetoVerticalRel,
    9897             :   PrototypeTraits<prototypes::id::SVGPathSegLinetoVerticalRel>::Depth,
    9898             :   sNativePropertyHooks,
    9899             :   "function SVGPathSegLinetoVerticalRel() {\n    [native code]\n}",
    9900             :   SVGPathSegBinding::GetConstructorObject
    9901             : };
    9902             : 
    9903             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    9904             :   {
    9905             :     "SVGPathSegLinetoVerticalRelPrototype",
    9906             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    9907             :     JS_NULL_CLASS_OPS,
    9908             :     JS_NULL_CLASS_SPEC,
    9909             :     JS_NULL_CLASS_EXT,
    9910             :     JS_NULL_OBJECT_OPS
    9911             :   },
    9912             :   eInterfacePrototype,
    9913             :   false,
    9914             :   prototypes::id::SVGPathSegLinetoVerticalRel,
    9915             :   PrototypeTraits<prototypes::id::SVGPathSegLinetoVerticalRel>::Depth,
    9916             :   sNativePropertyHooks,
    9917             :   "[object SVGPathSegLinetoVerticalRelPrototype]",
    9918             :   SVGPathSegBinding::GetProtoObject
    9919             : };
    9920             : 
    9921             : JSObject*
    9922           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    9923             : {
    9924           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    9925             : }
    9926             : 
    9927             : static const js::ClassOps sClassOps = {
    9928             :   _addProperty, /* addProperty */
    9929             :   nullptr,               /* delProperty */
    9930             :   nullptr,               /* getProperty */
    9931             :   nullptr,               /* setProperty */
    9932             :   nullptr,               /* enumerate */
    9933             :   nullptr, /* newEnumerate */
    9934             :   nullptr, /* resolve */
    9935             :   nullptr, /* mayResolve */
    9936             :   _finalize, /* finalize */
    9937             :   nullptr, /* call */
    9938             :   nullptr,               /* hasInstance */
    9939             :   nullptr,               /* construct */
    9940             :   nullptr, /* trace */
    9941             : };
    9942             : 
    9943             : static const js::ClassExtension sClassExtension = {
    9944             :   nullptr, /* weakmapKeyDelegateOp */
    9945             :   _objectMoved /* objectMovedOp */
    9946             : };
    9947             : 
    9948             : static const DOMJSClass sClass = {
    9949             :   { "SVGPathSegLinetoVerticalRel",
    9950             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    9951             :     &sClassOps,
    9952             :     JS_NULL_CLASS_SPEC,
    9953             :     &sClassExtension,
    9954             :     JS_NULL_OBJECT_OPS
    9955             :   },
    9956             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegLinetoVerticalRel, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    9957             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegLinetoVerticalRel >::value,
    9958             :   sNativePropertyHooks,
    9959             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegLinetoVerticalRel>::Get,
    9960             :   GetProtoObjectHandle,
    9961             :   GetCCParticipant<mozilla::DOMSVGPathSegLinetoVerticalRel>::Get()
    9962             : };
    9963             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    9964             :               "Must have the right minimal number of reserved slots.");
    9965             : static_assert(1 >= 1,
    9966             :               "Must have enough reserved slots.");
    9967             : 
    9968             : const JSClass*
    9969           0 : GetJSClass()
    9970             : {
    9971           0 :   return sClass.ToJSClass();
    9972             : }
    9973             : 
    9974             : bool
    9975           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegLinetoVerticalRel* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    9976             : {
    9977             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegLinetoVerticalRel*>(aObject) ==
    9978             :              reinterpret_cast<mozilla::DOMSVGPathSegLinetoVerticalRel*>(aObject),
    9979             :              "Multiple inheritance for mozilla::DOMSVGPathSegLinetoVerticalRel is broken.");
    9980             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
    9981             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
    9982             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
    9983           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    9984           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    9985           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    9986             :              "You should probably not be using Wrap() directly; use "
    9987             :              "GetOrCreateDOMReflector instead");
    9988             : 
    9989           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    9990             :              "nsISupports must be on our primary inheritance chain");
    9991             : 
    9992           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    9993           0 :   if (!global) {
    9994           0 :     return false;
    9995             :   }
    9996           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    9997           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    9998             : 
    9999             :   // That might have ended up wrapping us already, due to the wonders
   10000             :   // of XBL.  Check for that, and bail out as needed.
   10001           0 :   aReflector.set(aCache->GetWrapper());
   10002           0 :   if (aReflector) {
   10003             : #ifdef DEBUG
   10004           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
   10005             : #endif // DEBUG
   10006           0 :     return true;
   10007             :   }
   10008             : 
   10009           0 :   JSAutoCompartment ac(aCx, global);
   10010           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
   10011           0 :   if (!canonicalProto) {
   10012           0 :     return false;
   10013             :   }
   10014           0 :   JS::Rooted<JSObject*> proto(aCx);
   10015           0 :   if (aGivenProto) {
   10016           0 :     proto = aGivenProto;
   10017             :     // Unfortunately, while aGivenProto was in the compartment of aCx
   10018             :     // coming in, we changed compartments to that of "parent" so may need
   10019             :     // to wrap the proto here.
   10020           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
   10021           0 :       if (!JS_WrapObject(aCx, &proto)) {
   10022           0 :         return false;
   10023             :       }
   10024             :     }
   10025             :   } else {
   10026           0 :     proto = canonicalProto;
   10027             :   }
   10028             : 
   10029           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegLinetoVerticalRel> creator(aCx);
   10030           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
   10031           0 :   if (!aReflector) {
   10032           0 :     return false;
   10033             :   }
   10034             : 
   10035           0 :   aCache->SetWrapper(aReflector);
   10036           0 :   creator.InitializationSucceeded();
   10037             : 
   10038           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
   10039             :              aCache->GetWrapperPreserveColor() == aReflector);
   10040             :   // If proto != canonicalProto, we have to preserve our wrapper;
   10041             :   // otherwise we won't be able to properly recreate it later, since
   10042             :   // we won't know what proto to use.  Note that we don't check
   10043             :   // aGivenProto here, since it's entirely possible (and even
   10044             :   // somewhat common) to have a non-null aGivenProto which is the
   10045             :   // same as canonicalProto.
   10046           0 :   if (proto != canonicalProto) {
   10047           0 :     PreserveWrapper(aObject);
   10048             :   }
   10049             : 
   10050           0 :   return true;
   10051             : }
   10052             : 
   10053             : const NativePropertyHooks sNativePropertyHooks[] = { {
   10054             :   nullptr,
   10055             :   nullptr,
   10056             :   nullptr,
   10057             :   { sNativeProperties.Upcast(), nullptr },
   10058             :   prototypes::id::SVGPathSegLinetoVerticalRel,
   10059             :   constructors::id::SVGPathSegLinetoVerticalRel,
   10060             :   SVGPathSegBinding::sNativePropertyHooks,
   10061             :   &DefaultXrayExpandoObjectClass
   10062             : } };
   10063             : 
   10064             : void
   10065           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
   10066             : {
   10067           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
   10068           0 :   if (!parentProto) {
   10069           0 :     return;
   10070             :   }
   10071             : 
   10072           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
   10073           0 :   if (!constructorProto) {
   10074           0 :     return;
   10075             :   }
   10076             : 
   10077             :   static bool sIdsInited = false;
   10078           0 :   if (!sIdsInited && NS_IsMainThread()) {
   10079           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
   10080           0 :       return;
   10081             :     }
   10082           0 :     sIdsInited = true;
   10083             :   }
   10084             : 
   10085           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegLinetoVerticalRel);
   10086           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegLinetoVerticalRel);
   10087           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
   10088             :                               &sPrototypeClass.mBase, protoCache,
   10089             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
   10090             :                               interfaceCache,
   10091             :                               sNativeProperties.Upcast(),
   10092             :                               nullptr,
   10093             :                               "SVGPathSegLinetoVerticalRel", aDefineOnGlobal,
   10094             :                               nullptr,
   10095           0 :                               false);
   10096             : }
   10097             : 
   10098             : JS::Handle<JSObject*>
   10099           0 : GetProtoObjectHandle(JSContext* aCx)
   10100             : {
   10101             :   /* Get the interface prototype object for this class.  This will create the
   10102             :      object as needed. */
   10103           0 :   bool aDefineOnGlobal = true;
   10104             : 
   10105             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
   10106           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
   10107           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
   10108           0 :     return nullptr;
   10109             :   }
   10110             : 
   10111             :   /* Check to see whether the interface objects are already installed */
   10112           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
   10113           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegLinetoVerticalRel)) {
   10114           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
   10115           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
   10116             :   }
   10117             : 
   10118             :   /*
   10119             :    * The object might _still_ be null, but that's OK.
   10120             :    *
   10121             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
   10122             :    * traced by TraceProtoAndIfaceCache() and its contents are never
   10123             :    * changed after they have been set.
   10124             :    *
   10125             :    * Calling address() avoids the read read barrier that does gray
   10126             :    * unmarking, but it's not possible for the object to be gray here.
   10127             :    */
   10128             : 
   10129           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegLinetoVerticalRel);
   10130           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
   10131           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
   10132             : }
   10133             : 
   10134             : JS::Handle<JSObject*>
   10135           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
   10136             : {
   10137             :   /* Get the interface object for this class.  This will create the object as
   10138             :      needed. */
   10139             : 
   10140             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
   10141           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
   10142           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
   10143           0 :     return nullptr;
   10144             :   }
   10145             : 
   10146             :   /* Check to see whether the interface objects are already installed */
   10147           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
   10148           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegLinetoVerticalRel)) {
   10149           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
   10150           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
   10151             :   }
   10152             : 
   10153             :   /*
   10154             :    * The object might _still_ be null, but that's OK.
   10155             :    *
   10156             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
   10157             :    * traced by TraceProtoAndIfaceCache() and its contents are never
   10158             :    * changed after they have been set.
   10159             :    *
   10160             :    * Calling address() avoids the read read barrier that does gray
   10161             :    * unmarking, but it's not possible for the object to be gray here.
   10162             :    */
   10163             : 
   10164           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegLinetoVerticalRel);
   10165           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
   10166           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
   10167             : }
   10168             : 
   10169             : JSObject*
   10170           0 : GetConstructorObject(JSContext* aCx)
   10171             : {
   10172           0 :   return GetConstructorObjectHandle(aCx);
   10173             : }
   10174             : 
   10175             : } // namespace SVGPathSegLinetoVerticalRelBinding
   10176             : 
   10177             : 
   10178             : 
   10179             : namespace SVGPathSegMovetoAbsBinding {
   10180             : 
   10181             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
   10182             :               "Can't inherit from an interface with a different ownership model.");
   10183             : 
   10184             : static bool
   10185           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegMovetoAbs* self, JSJitGetterCallArgs args)
   10186             : {
   10187           0 :   float result(self->X());
   10188           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
   10189           0 :   args.rval().set(JS_NumberValue(double(result)));
   10190           0 :   return true;
   10191             : }
   10192             : 
   10193             : static bool
   10194           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegMovetoAbs* self, JSJitSetterCallArgs args)
   10195             : {
   10196             :   float arg0;
   10197           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
   10198           0 :     return false;
   10199           0 :   } else if (!mozilla::IsFinite(arg0)) {
   10200           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegMovetoAbs.x");
   10201           0 :     return false;
   10202             :   }
   10203           0 :   binding_detail::FastErrorResult rv;
   10204           0 :   self->SetX(arg0, rv);
   10205           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
   10206           0 :     return false;
   10207             :   }
   10208           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
   10209             : 
   10210           0 :   return true;
   10211             : }
   10212             : 
   10213             : static const JSJitInfo x_getterinfo = {
   10214             :   { (JSJitGetterOp)get_x },
   10215             :   { prototypes::id::SVGPathSegMovetoAbs },
   10216             :   { PrototypeTraits<prototypes::id::SVGPathSegMovetoAbs>::Depth },
   10217             :   JSJitInfo::Getter,
   10218             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
   10219             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
   10220             :   true,  /* isInfallible. False in setters. */
   10221             :   false,  /* isMovable.  Not relevant for setters. */
   10222             :   false, /* isEliminatable.  Not relevant for setters. */
   10223             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
   10224             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
   10225             :   false,  /* isTypedMethod.  Only relevant for methods. */
   10226             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
   10227             : };
   10228             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
   10229             : static_assert(0 < 1, "There is no slot for us");
   10230             : static const JSJitInfo x_setterinfo = {
   10231             :   { (JSJitGetterOp)set_x },
   10232             :   { prototypes::id::SVGPathSegMovetoAbs },
   10233             :   { PrototypeTraits<prototypes::id::SVGPathSegMovetoAbs>::Depth },
   10234             :   JSJitInfo::Setter,
   10235             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
   10236             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
   10237             :   false,  /* isInfallible. False in setters. */
   10238             :   false,  /* isMovable.  Not relevant for setters. */
   10239             :   false, /* isEliminatable.  Not relevant for setters. */
   10240             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
   10241             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
   10242             :   false,  /* isTypedMethod.  Only relevant for methods. */
   10243             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
   10244             : };
   10245             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
   10246             : static_assert(0 < 1, "There is no slot for us");
   10247             : 
   10248             : static bool
   10249           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegMovetoAbs* self, JSJitGetterCallArgs args)
   10250             : {
   10251           0 :   float result(self->Y());
   10252           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
   10253           0 :   args.rval().set(JS_NumberValue(double(result)));
   10254           0 :   return true;
   10255             : }
   10256             : 
   10257             : static bool
   10258           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegMovetoAbs* self, JSJitSetterCallArgs args)
   10259             : {
   10260             :   float arg0;
   10261           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
   10262           0 :     return false;
   10263           0 :   } else if (!mozilla::IsFinite(arg0)) {
   10264           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegMovetoAbs.y");
   10265           0 :     return false;
   10266             :   }
   10267           0 :   binding_detail::FastErrorResult rv;
   10268           0 :   self->SetY(arg0, rv);
   10269           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
   10270           0 :     return false;
   10271             :   }
   10272           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
   10273             : 
   10274           0 :   return true;
   10275             : }
   10276             : 
   10277             : static const JSJitInfo y_getterinfo = {
   10278             :   { (JSJitGetterOp)get_y },
   10279             :   { prototypes::id::SVGPathSegMovetoAbs },
   10280             :   { PrototypeTraits<prototypes::id::SVGPathSegMovetoAbs>::Depth },
   10281             :   JSJitInfo::Getter,
   10282             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
   10283             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
   10284             :   true,  /* isInfallible. False in setters. */
   10285             :   false,  /* isMovable.  Not relevant for setters. */
   10286             :   false, /* isEliminatable.  Not relevant for setters. */
   10287             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
   10288             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
   10289             :   false,  /* isTypedMethod.  Only relevant for methods. */
   10290             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
   10291             : };
   10292             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
   10293             : static_assert(0 < 1, "There is no slot for us");
   10294             : static const JSJitInfo y_setterinfo = {
   10295             :   { (JSJitGetterOp)set_y },
   10296             :   { prototypes::id::SVGPathSegMovetoAbs },
   10297             :   { PrototypeTraits<prototypes::id::SVGPathSegMovetoAbs>::Depth },
   10298             :   JSJitInfo::Setter,
   10299             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
   10300             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
   10301             :   false,  /* isInfallible. False in setters. */
   10302             :   false,  /* isMovable.  Not relevant for setters. */
   10303             :   false, /* isEliminatable.  Not relevant for setters. */
   10304             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
   10305             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
   10306             :   false,  /* isTypedMethod.  Only relevant for methods. */
   10307             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
   10308             : };
   10309             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
   10310             : static_assert(0 < 1, "There is no slot for us");
   10311             : 
   10312             : static bool
   10313           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
   10314             : {
   10315           0 :   mozilla::DOMSVGPathSegMovetoAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegMovetoAbs>(obj);
   10316             :   // We don't want to preserve if we don't have a wrapper, and we
   10317             :   // obviously can't preserve if we're not initialized.
   10318           0 :   if (self && self->GetWrapperPreserveColor()) {
   10319           0 :     PreserveWrapper(self);
   10320             :   }
   10321           0 :   return true;
   10322             : }
   10323             : 
   10324             : static void
   10325           0 : _finalize(js::FreeOp* fop, JSObject* obj)
   10326             : {
   10327           0 :   mozilla::DOMSVGPathSegMovetoAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegMovetoAbs>(obj);
   10328           0 :   if (self) {
   10329           0 :     ClearWrapper(self, self, obj);
   10330           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegMovetoAbs>(self);
   10331             :   }
   10332           0 : }
   10333             : 
   10334             : static void
   10335           0 : _objectMoved(JSObject* obj, const JSObject* old)
   10336             : {
   10337           0 :   mozilla::DOMSVGPathSegMovetoAbs* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegMovetoAbs>(obj);
   10338           0 :   if (self) {
   10339           0 :     UpdateWrapper(self, self, obj, old);
   10340             :   }
   10341           0 : }
   10342             : 
   10343             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
   10344             : #if defined(__clang__)
   10345             : #pragma clang diagnostic push
   10346             : #pragma clang diagnostic ignored "-Wmissing-braces"
   10347             : #endif
   10348             : static const JSPropertySpec sAttributes_specs[] = {
   10349             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
   10350             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
   10351             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
   10352             : };
   10353             : #if defined(__clang__)
   10354             : #pragma clang diagnostic pop
   10355             : #endif
   10356             : 
   10357             : 
   10358             : // Can't be const because the pref-enabled boolean needs to be writable
   10359             : static Prefable<const JSPropertySpec> sAttributes[] = {
   10360             :   { nullptr, &sAttributes_specs[0] },
   10361             :   { nullptr, nullptr }
   10362             : };
   10363             : 
   10364             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
   10365             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
   10366             : static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
   10367             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
   10368             : 
   10369             : 
   10370             : static uint16_t sNativeProperties_sortedPropertyIndices[2];
   10371             : static PropertyInfo sNativeProperties_propertyInfos[2];
   10372             : 
   10373             : static const NativePropertiesN<1> sNativeProperties = {
   10374             :   false, 0,
   10375             :   false, 0,
   10376             :   false, 0,
   10377             :   true,  0 /* sAttributes */,
   10378             :   false, 0,
   10379             :   false, 0,
   10380             :   false, 0,
   10381             :   -1,
   10382             :   2,
   10383             :   sNativeProperties_sortedPropertyIndices,
   10384             :   {
   10385             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
   10386             :   }
   10387             : };
   10388             : static_assert(2 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
   10389             :     "We have a property info count that is oversized");
   10390             : 
   10391             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
   10392             :   {
   10393             :     "Function",
   10394             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
   10395             :     &sBoringInterfaceObjectClassClassOps,
   10396             :     JS_NULL_CLASS_SPEC,
   10397             :     JS_NULL_CLASS_EXT,
   10398             :     &sInterfaceObjectClassObjectOps
   10399             :   },
   10400             :   eInterface,
   10401             :   true,
   10402             :   prototypes::id::SVGPathSegMovetoAbs,
   10403             :   PrototypeTraits<prototypes::id::SVGPathSegMovetoAbs>::Depth,
   10404             :   sNativePropertyHooks,
   10405             :   "function SVGPathSegMovetoAbs() {\n    [native code]\n}",
   10406             :   SVGPathSegBinding::GetConstructorObject
   10407             : };
   10408             : 
   10409             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
   10410             :   {
   10411             :     "SVGPathSegMovetoAbsPrototype",
   10412             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
   10413             :     JS_NULL_CLASS_OPS,
   10414             :     JS_NULL_CLASS_SPEC,
   10415             :     JS_NULL_CLASS_EXT,
   10416             :     JS_NULL_OBJECT_OPS
   10417             :   },
   10418             :   eInterfacePrototype,
   10419             :   false,
   10420             :   prototypes::id::SVGPathSegMovetoAbs,
   10421             :   PrototypeTraits<prototypes::id::SVGPathSegMovetoAbs>::Depth,
   10422             :   sNativePropertyHooks,
   10423             :   "[object SVGPathSegMovetoAbsPrototype]",
   10424             :   SVGPathSegBinding::GetProtoObject
   10425             : };
   10426             : 
   10427             : JSObject*
   10428           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
   10429             : {
   10430           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
   10431             : }
   10432             : 
   10433             : static const js::ClassOps sClassOps = {
   10434             :   _addProperty, /* addProperty */
   10435             :   nullptr,               /* delProperty */
   10436             :   nullptr,               /* getProperty */
   10437             :   nullptr,               /* setProperty */
   10438             :   nullptr,               /* enumerate */
   10439             :   nullptr, /* newEnumerate */
   10440             :   nullptr, /* resolve */
   10441             :   nullptr, /* mayResolve */
   10442             :   _finalize, /* finalize */
   10443             :   nullptr, /* call */
   10444             :   nullptr,               /* hasInstance */
   10445             :   nullptr,               /* construct */
   10446             :   nullptr, /* trace */
   10447             : };
   10448             : 
   10449             : static const js::ClassExtension sClassExtension = {
   10450             :   nullptr, /* weakmapKeyDelegateOp */
   10451             :   _objectMoved /* objectMovedOp */
   10452             : };
   10453             : 
   10454             : static const DOMJSClass sClass = {
   10455             :   { "SVGPathSegMovetoAbs",
   10456             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
   10457             :     &sClassOps,
   10458             :     JS_NULL_CLASS_SPEC,
   10459             :     &sClassExtension,
   10460             :     JS_NULL_OBJECT_OPS
   10461             :   },
   10462             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegMovetoAbs, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
   10463             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegMovetoAbs >::value,
   10464             :   sNativePropertyHooks,
   10465             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegMovetoAbs>::Get,
   10466             :   GetProtoObjectHandle,
   10467             :   GetCCParticipant<mozilla::DOMSVGPathSegMovetoAbs>::Get()
   10468             : };
   10469             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
   10470             :               "Must have the right minimal number of reserved slots.");
   10471             : static_assert(1 >= 1,
   10472             :               "Must have enough reserved slots.");
   10473             : 
   10474             : const JSClass*
   10475           0 : GetJSClass()
   10476             : {
   10477           0 :   return sClass.ToJSClass();
   10478             : }
   10479             : 
   10480             : bool
   10481           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegMovetoAbs* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
   10482             : {
   10483             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegMovetoAbs*>(aObject) ==
   10484             :              reinterpret_cast<mozilla::DOMSVGPathSegMovetoAbs*>(aObject),
   10485             :              "Multiple inheritance for mozilla::DOMSVGPathSegMovetoAbs is broken.");
   10486             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
   10487             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
   10488             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
   10489           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
   10490           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
   10491           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
   10492             :              "You should probably not be using Wrap() directly; use "
   10493             :              "GetOrCreateDOMReflector instead");
   10494             : 
   10495           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
   10496             :              "nsISupports must be on our primary inheritance chain");
   10497             : 
   10498           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
   10499           0 :   if (!global) {
   10500           0 :     return false;
   10501             :   }
   10502           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
   10503           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
   10504             : 
   10505             :   // That might have ended up wrapping us already, due to the wonders
   10506             :   // of XBL.  Check for that, and bail out as needed.
   10507           0 :   aReflector.set(aCache->GetWrapper());
   10508           0 :   if (aReflector) {
   10509             : #ifdef DEBUG
   10510           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
   10511             : #endif // DEBUG
   10512           0 :     return true;
   10513             :   }
   10514             : 
   10515           0 :   JSAutoCompartment ac(aCx, global);
   10516           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
   10517           0 :   if (!canonicalProto) {
   10518           0 :     return false;
   10519             :   }
   10520           0 :   JS::Rooted<JSObject*> proto(aCx);
   10521           0 :   if (aGivenProto) {
   10522           0 :     proto = aGivenProto;
   10523             :     // Unfortunately, while aGivenProto was in the compartment of aCx
   10524             :     // coming in, we changed compartments to that of "parent" so may need
   10525             :     // to wrap the proto here.
   10526           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
   10527           0 :       if (!JS_WrapObject(aCx, &proto)) {
   10528           0 :         return false;
   10529             :       }
   10530             :     }
   10531             :   } else {
   10532           0 :     proto = canonicalProto;
   10533             :   }
   10534             : 
   10535           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegMovetoAbs> creator(aCx);
   10536           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
   10537           0 :   if (!aReflector) {
   10538           0 :     return false;
   10539             :   }
   10540             : 
   10541           0 :   aCache->SetWrapper(aReflector);
   10542           0 :   creator.InitializationSucceeded();
   10543             : 
   10544           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
   10545             :              aCache->GetWrapperPreserveColor() == aReflector);
   10546             :   // If proto != canonicalProto, we have to preserve our wrapper;
   10547             :   // otherwise we won't be able to properly recreate it later, since
   10548             :   // we won't know what proto to use.  Note that we don't check
   10549             :   // aGivenProto here, since it's entirely possible (and even
   10550             :   // somewhat common) to have a non-null aGivenProto which is the
   10551             :   // same as canonicalProto.
   10552           0 :   if (proto != canonicalProto) {
   10553           0 :     PreserveWrapper(aObject);
   10554             :   }
   10555             : 
   10556           0 :   return true;
   10557             : }
   10558             : 
   10559             : const NativePropertyHooks sNativePropertyHooks[] = { {
   10560             :   nullptr,
   10561             :   nullptr,
   10562             :   nullptr,
   10563             :   { sNativeProperties.Upcast(), nullptr },
   10564             :   prototypes::id::SVGPathSegMovetoAbs,
   10565             :   constructors::id::SVGPathSegMovetoAbs,
   10566             :   SVGPathSegBinding::sNativePropertyHooks,
   10567             :   &DefaultXrayExpandoObjectClass
   10568             : } };
   10569             : 
   10570             : void
   10571           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
   10572             : {
   10573           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
   10574           0 :   if (!parentProto) {
   10575           0 :     return;
   10576             :   }
   10577             : 
   10578           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
   10579           0 :   if (!constructorProto) {
   10580           0 :     return;
   10581             :   }
   10582             : 
   10583             :   static bool sIdsInited = false;
   10584           0 :   if (!sIdsInited && NS_IsMainThread()) {
   10585           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
   10586           0 :       return;
   10587             :     }
   10588           0 :     sIdsInited = true;
   10589             :   }
   10590             : 
   10591           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegMovetoAbs);
   10592           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegMovetoAbs);
   10593           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
   10594             :                               &sPrototypeClass.mBase, protoCache,
   10595             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
   10596             :                               interfaceCache,
   10597             :                               sNativeProperties.Upcast(),
   10598             :                               nullptr,
   10599             :                               "SVGPathSegMovetoAbs", aDefineOnGlobal,
   10600             :                               nullptr,
   10601           0 :                               false);
   10602             : }
   10603             : 
   10604             : JS::Handle<JSObject*>
   10605           0 : GetProtoObjectHandle(JSContext* aCx)
   10606             : {
   10607             :   /* Get the interface prototype object for this class.  This will create the
   10608             :      object as needed. */
   10609           0 :   bool aDefineOnGlobal = true;
   10610             : 
   10611             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
   10612           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
   10613           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
   10614           0 :     return nullptr;
   10615             :   }
   10616             : 
   10617             :   /* Check to see whether the interface objects are already installed */
   10618           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
   10619           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegMovetoAbs)) {
   10620           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
   10621           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
   10622             :   }
   10623             : 
   10624             :   /*
   10625             :    * The object might _still_ be null, but that's OK.
   10626             :    *
   10627             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
   10628             :    * traced by TraceProtoAndIfaceCache() and its contents are never
   10629             :    * changed after they have been set.
   10630             :    *
   10631             :    * Calling address() avoids the read read barrier that does gray
   10632             :    * unmarking, but it's not possible for the object to be gray here.
   10633             :    */
   10634             : 
   10635           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegMovetoAbs);
   10636           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
   10637           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
   10638             : }
   10639             : 
   10640             : JS::Handle<JSObject*>
   10641           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
   10642             : {
   10643             :   /* Get the interface object for this class.  This will create the object as
   10644             :      needed. */
   10645             : 
   10646             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
   10647           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
   10648           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
   10649           0 :     return nullptr;
   10650             :   }
   10651             : 
   10652             :   /* Check to see whether the interface objects are already installed */
   10653           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
   10654           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegMovetoAbs)) {
   10655           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
   10656           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
   10657             :   }
   10658             : 
   10659             :   /*
   10660             :    * The object might _still_ be null, but that's OK.
   10661             :    *
   10662             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
   10663             :    * traced by TraceProtoAndIfaceCache() and its contents are never
   10664             :    * changed after they have been set.
   10665             :    *
   10666             :    * Calling address() avoids the read read barrier that does gray
   10667             :    * unmarking, but it's not possible for the object to be gray here.
   10668             :    */
   10669             : 
   10670           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegMovetoAbs);
   10671           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
   10672           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
   10673             : }
   10674             : 
   10675             : JSObject*
   10676           0 : GetConstructorObject(JSContext* aCx)
   10677             : {
   10678           0 :   return GetConstructorObjectHandle(aCx);
   10679             : }
   10680             : 
   10681             : } // namespace SVGPathSegMovetoAbsBinding
   10682             : 
   10683             : 
   10684             : 
   10685             : namespace SVGPathSegMovetoRelBinding {
   10686             : 
   10687             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGPathSegBinding::NativeType>::value,
   10688             :               "Can't inherit from an interface with a different ownership model.");
   10689             : 
   10690             : static bool
   10691           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegMovetoRel* self, JSJitGetterCallArgs args)
   10692             : {
   10693           0 :   float result(self->X());
   10694           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
   10695           0 :   args.rval().set(JS_NumberValue(double(result)));
   10696           0 :   return true;
   10697             : }
   10698             : 
   10699             : static bool
   10700           0 : set_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegMovetoRel* self, JSJitSetterCallArgs args)
   10701             : {
   10702             :   float arg0;
   10703           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
   10704           0 :     return false;
   10705           0 :   } else if (!mozilla::IsFinite(arg0)) {
   10706           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegMovetoRel.x");
   10707           0 :     return false;
   10708             :   }
   10709           0 :   binding_detail::FastErrorResult rv;
   10710           0 :   self->SetX(arg0, rv);
   10711           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
   10712           0 :     return false;
   10713             :   }
   10714           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
   10715             : 
   10716           0 :   return true;
   10717             : }
   10718             : 
   10719             : static const JSJitInfo x_getterinfo = {
   10720             :   { (JSJitGetterOp)get_x },
   10721             :   { prototypes::id::SVGPathSegMovetoRel },
   10722             :   { PrototypeTraits<prototypes::id::SVGPathSegMovetoRel>::Depth },
   10723             :   JSJitInfo::Getter,
   10724             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
   10725             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
   10726             :   true,  /* isInfallible. False in setters. */
   10727             :   false,  /* isMovable.  Not relevant for setters. */
   10728             :   false, /* isEliminatable.  Not relevant for setters. */
   10729             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
   10730             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
   10731             :   false,  /* isTypedMethod.  Only relevant for methods. */
   10732             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
   10733             : };
   10734             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
   10735             : static_assert(0 < 1, "There is no slot for us");
   10736             : static const JSJitInfo x_setterinfo = {
   10737             :   { (JSJitGetterOp)set_x },
   10738             :   { prototypes::id::SVGPathSegMovetoRel },
   10739             :   { PrototypeTraits<prototypes::id::SVGPathSegMovetoRel>::Depth },
   10740             :   JSJitInfo::Setter,
   10741             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
   10742             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
   10743             :   false,  /* isInfallible. False in setters. */
   10744             :   false,  /* isMovable.  Not relevant for setters. */
   10745             :   false, /* isEliminatable.  Not relevant for setters. */
   10746             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
   10747             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
   10748             :   false,  /* isTypedMethod.  Only relevant for methods. */
   10749             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
   10750             : };
   10751             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
   10752             : static_assert(0 < 1, "There is no slot for us");
   10753             : 
   10754             : static bool
   10755           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegMovetoRel* self, JSJitGetterCallArgs args)
   10756             : {
   10757           0 :   float result(self->Y());
   10758           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
   10759           0 :   args.rval().set(JS_NumberValue(double(result)));
   10760           0 :   return true;
   10761             : }
   10762             : 
   10763             : static bool
   10764           0 : set_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::DOMSVGPathSegMovetoRel* self, JSJitSetterCallArgs args)
   10765             : {
   10766             :   float arg0;
   10767           0 :   if (!ValueToPrimitive<float, eDefault>(cx, args[0], &arg0)) {
   10768           0 :     return false;
   10769           0 :   } else if (!mozilla::IsFinite(arg0)) {
   10770           0 :     ThrowErrorMessage(cx, MSG_NOT_FINITE, "Value being assigned to SVGPathSegMovetoRel.y");
   10771           0 :     return false;
   10772             :   }
   10773           0 :   binding_detail::FastErrorResult rv;
   10774           0 :   self->SetY(arg0, rv);
   10775           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
   10776           0 :     return false;
   10777             :   }
   10778           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
   10779             : 
   10780           0 :   return true;
   10781             : }
   10782             : 
   10783             : static const JSJitInfo y_getterinfo = {
   10784             :   { (JSJitGetterOp)get_y },
   10785             :   { prototypes::id::SVGPathSegMovetoRel },
   10786             :   { PrototypeTraits<prototypes::id::SVGPathSegMovetoRel>::Depth },
   10787             :   JSJitInfo::Getter,
   10788             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
   10789             :   JSVAL_TYPE_DOUBLE,  /* returnType.  Not relevant for setters. */
   10790             :   true,  /* isInfallible. False in setters. */
   10791             :   false,  /* isMovable.  Not relevant for setters. */
   10792             :   false, /* isEliminatable.  Not relevant for setters. */
   10793             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
   10794             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
   10795             :   false,  /* isTypedMethod.  Only relevant for methods. */
   10796             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
   10797             : };
   10798             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
   10799             : static_assert(0 < 1, "There is no slot for us");
   10800             : static const JSJitInfo y_setterinfo = {
   10801             :   { (JSJitGetterOp)set_y },
   10802             :   { prototypes::id::SVGPathSegMovetoRel },
   10803             :   { PrototypeTraits<prototypes::id::SVGPathSegMovetoRel>::Depth },
   10804             :   JSJitInfo::Setter,
   10805             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
   10806             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
   10807             :   false,  /* isInfallible. False in setters. */
   10808             :   false,  /* isMovable.  Not relevant for setters. */
   10809             :   false, /* isEliminatable.  Not relevant for setters. */
   10810             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
   10811             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
   10812             :   false,  /* isTypedMethod.  Only relevant for methods. */
   10813             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
   10814             : };
   10815             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
   10816             : static_assert(0 < 1, "There is no slot for us");
   10817             : 
   10818             : static bool
   10819           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
   10820             : {
   10821           0 :   mozilla::DOMSVGPathSegMovetoRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegMovetoRel>(obj);
   10822             :   // We don't want to preserve if we don't have a wrapper, and we
   10823             :   // obviously can't preserve if we're not initialized.
   10824           0 :   if (self && self->GetWrapperPreserveColor()) {
   10825           0 :     PreserveWrapper(self);
   10826             :   }
   10827           0 :   return true;
   10828             : }
   10829             : 
   10830             : static void
   10831           0 : _finalize(js::FreeOp* fop, JSObject* obj)
   10832             : {
   10833           0 :   mozilla::DOMSVGPathSegMovetoRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegMovetoRel>(obj);
   10834           0 :   if (self) {
   10835           0 :     ClearWrapper(self, self, obj);
   10836           0 :     AddForDeferredFinalization<mozilla::DOMSVGPathSegMovetoRel>(self);
   10837             :   }
   10838           0 : }
   10839             : 
   10840             : static void
   10841           0 : _objectMoved(JSObject* obj, const JSObject* old)
   10842             : {
   10843           0 :   mozilla::DOMSVGPathSegMovetoRel* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::DOMSVGPathSegMovetoRel>(obj);
   10844           0 :   if (self) {
   10845           0 :     UpdateWrapper(self, self, obj, old);
   10846             :   }
   10847           0 : }
   10848             : 
   10849             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
   10850             : #if defined(__clang__)
   10851             : #pragma clang diagnostic push
   10852             : #pragma clang diagnostic ignored "-Wmissing-braces"
   10853             : #endif
   10854             : static const JSPropertySpec sAttributes_specs[] = {
   10855             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, GenericBindingSetter, &x_setterinfo },
   10856             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, GenericBindingSetter, &y_setterinfo },
   10857             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
   10858             : };
   10859             : #if defined(__clang__)
   10860             : #pragma clang diagnostic pop
   10861             : #endif
   10862             : 
   10863             : 
   10864             : // Can't be const because the pref-enabled boolean needs to be writable
   10865             : static Prefable<const JSPropertySpec> sAttributes[] = {
   10866             :   { nullptr, &sAttributes_specs[0] },
   10867             :   { nullptr, nullptr }
   10868             : };
   10869             : 
   10870             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
   10871             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
   10872             : static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
   10873             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
   10874             : 
   10875             : 
   10876             : static uint16_t sNativeProperties_sortedPropertyIndices[2];
   10877             : static PropertyInfo sNativeProperties_propertyInfos[2];
   10878             : 
   10879             : static const NativePropertiesN<1> sNativeProperties = {
   10880             :   false, 0,
   10881             :   false, 0,
   10882             :   false, 0,
   10883             :   true,  0 /* sAttributes */,
   10884             :   false, 0,
   10885             :   false, 0,
   10886             :   false, 0,
   10887             :   -1,
   10888             :   2,
   10889             :   sNativeProperties_sortedPropertyIndices,
   10890             :   {
   10891             :     { sAttributes, &sNativeProperties_propertyInfos[0] }
   10892             :   }
   10893             : };
   10894             : static_assert(2 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
   10895             :     "We have a property info count that is oversized");
   10896             : 
   10897             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
   10898             :   {
   10899             :     "Function",
   10900             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
   10901             :     &sBoringInterfaceObjectClassClassOps,
   10902             :     JS_NULL_CLASS_SPEC,
   10903             :     JS_NULL_CLASS_EXT,
   10904             :     &sInterfaceObjectClassObjectOps
   10905             :   },
   10906             :   eInterface,
   10907             :   true,
   10908             :   prototypes::id::SVGPathSegMovetoRel,
   10909             :   PrototypeTraits<prototypes::id::SVGPathSegMovetoRel>::Depth,
   10910             :   sNativePropertyHooks,
   10911             :   "function SVGPathSegMovetoRel() {\n    [native code]\n}",
   10912             :   SVGPathSegBinding::GetConstructorObject
   10913             : };
   10914             : 
   10915             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
   10916             :   {
   10917             :     "SVGPathSegMovetoRelPrototype",
   10918             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
   10919             :     JS_NULL_CLASS_OPS,
   10920             :     JS_NULL_CLASS_SPEC,
   10921             :     JS_NULL_CLASS_EXT,
   10922             :     JS_NULL_OBJECT_OPS
   10923             :   },
   10924             :   eInterfacePrototype,
   10925             :   false,
   10926             :   prototypes::id::SVGPathSegMovetoRel,
   10927             :   PrototypeTraits<prototypes::id::SVGPathSegMovetoRel>::Depth,
   10928             :   sNativePropertyHooks,
   10929             :   "[object SVGPathSegMovetoRelPrototype]",
   10930             :   SVGPathSegBinding::GetProtoObject
   10931             : };
   10932             : 
   10933             : JSObject*
   10934           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
   10935             : {
   10936           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
   10937             : }
   10938             : 
   10939             : static const js::ClassOps sClassOps = {
   10940             :   _addProperty, /* addProperty */
   10941             :   nullptr,               /* delProperty */
   10942             :   nullptr,               /* getProperty */
   10943             :   nullptr,               /* setProperty */
   10944             :   nullptr,               /* enumerate */
   10945             :   nullptr, /* newEnumerate */
   10946             :   nullptr, /* resolve */
   10947             :   nullptr, /* mayResolve */
   10948             :   _finalize, /* finalize */
   10949             :   nullptr, /* call */
   10950             :   nullptr,               /* hasInstance */
   10951             :   nullptr,               /* construct */
   10952             :   nullptr, /* trace */
   10953             : };
   10954             : 
   10955             : static const js::ClassExtension sClassExtension = {
   10956             :   nullptr, /* weakmapKeyDelegateOp */
   10957             :   _objectMoved /* objectMovedOp */
   10958             : };
   10959             : 
   10960             : static const DOMJSClass sClass = {
   10961             :   { "SVGPathSegMovetoRel",
   10962             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
   10963             :     &sClassOps,
   10964             :     JS_NULL_CLASS_SPEC,
   10965             :     &sClassExtension,
   10966             :     JS_NULL_OBJECT_OPS
   10967             :   },
   10968             :   { prototypes::id::SVGPathSeg, prototypes::id::SVGPathSegMovetoRel, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
   10969             :   IsBaseOf<nsISupports, mozilla::DOMSVGPathSegMovetoRel >::value,
   10970             :   sNativePropertyHooks,
   10971             :   FindAssociatedGlobalForNative<mozilla::DOMSVGPathSegMovetoRel>::Get,
   10972             :   GetProtoObjectHandle,
   10973             :   GetCCParticipant<mozilla::DOMSVGPathSegMovetoRel>::Get()
   10974             : };
   10975             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
   10976             :               "Must have the right minimal number of reserved slots.");
   10977             : static_assert(1 >= 1,
   10978             :               "Must have enough reserved slots.");
   10979             : 
   10980             : const JSClass*
   10981           0 : GetJSClass()
   10982             : {
   10983           0 :   return sClass.ToJSClass();
   10984             : }
   10985             : 
   10986             : bool
   10987           0 : Wrap(JSContext* aCx, mozilla::DOMSVGPathSegMovetoRel* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
   10988             : {
   10989             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSegMovetoRel*>(aObject) ==
   10990             :              reinterpret_cast<mozilla::DOMSVGPathSegMovetoRel*>(aObject),
   10991             :              "Multiple inheritance for mozilla::DOMSVGPathSegMovetoRel is broken.");
   10992             :   MOZ_ASSERT(static_cast<mozilla::DOMSVGPathSeg*>(aObject) ==
   10993             :              reinterpret_cast<mozilla::DOMSVGPathSeg*>(aObject),
   10994             :              "Multiple inheritance for mozilla::DOMSVGPathSeg is broken.");
   10995           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
   10996           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
   10997           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
   10998             :              "You should probably not be using Wrap() directly; use "
   10999             :              "GetOrCreateDOMReflector instead");
   11000             : 
   11001           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
   11002             :              "nsISupports must be on our primary inheritance chain");
   11003             : 
   11004           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
   11005           0 :   if (!global) {
   11006           0 :     return false;
   11007             :   }
   11008           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
   11009           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
   11010             : 
   11011             :   // That might have ended up wrapping us already, due to the wonders
   11012             :   // of XBL.  Check for that, and bail out as needed.
   11013           0 :   aReflector.set(aCache->GetWrapper());
   11014           0 :   if (aReflector) {
   11015             : #ifdef DEBUG
   11016           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
   11017             : #endif // DEBUG
   11018           0 :     return true;
   11019             :   }
   11020             : 
   11021           0 :   JSAutoCompartment ac(aCx, global);
   11022           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
   11023           0 :   if (!canonicalProto) {
   11024           0 :     return false;
   11025             :   }
   11026           0 :   JS::Rooted<JSObject*> proto(aCx);
   11027           0 :   if (aGivenProto) {
   11028           0 :     proto = aGivenProto;
   11029             :     // Unfortunately, while aGivenProto was in the compartment of aCx
   11030             :     // coming in, we changed compartments to that of "parent" so may need
   11031             :     // to wrap the proto here.
   11032           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
   11033           0 :       if (!JS_WrapObject(aCx, &proto)) {
   11034           0 :         return false;
   11035             :       }
   11036             :     }
   11037             :   } else {
   11038           0 :     proto = canonicalProto;
   11039             :   }
   11040             : 
   11041           0 :   BindingJSObjectCreator<mozilla::DOMSVGPathSegMovetoRel> creator(aCx);
   11042           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
   11043           0 :   if (!aReflector) {
   11044           0 :     return false;
   11045             :   }
   11046             : 
   11047           0 :   aCache->SetWrapper(aReflector);
   11048           0 :   creator.InitializationSucceeded();
   11049             : 
   11050           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
   11051             :              aCache->GetWrapperPreserveColor() == aReflector);
   11052             :   // If proto != canonicalProto, we have to preserve our wrapper;
   11053             :   // otherwise we won't be able to properly recreate it later, since
   11054             :   // we won't know what proto to use.  Note that we don't check
   11055             :   // aGivenProto here, since it's entirely possible (and even
   11056             :   // somewhat common) to have a non-null aGivenProto which is the
   11057             :   // same as canonicalProto.
   11058           0 :   if (proto != canonicalProto) {
   11059           0 :     PreserveWrapper(aObject);
   11060             :   }
   11061             : 
   11062           0 :   return true;
   11063             : }
   11064             : 
   11065             : const NativePropertyHooks sNativePropertyHooks[] = { {
   11066             :   nullptr,
   11067             :   nullptr,
   11068             :   nullptr,
   11069             :   { sNativeProperties.Upcast(), nullptr },
   11070             :   prototypes::id::SVGPathSegMovetoRel,
   11071             :   constructors::id::SVGPathSegMovetoRel,
   11072             :   SVGPathSegBinding::sNativePropertyHooks,
   11073             :   &DefaultXrayExpandoObjectClass
   11074             : } };
   11075             : 
   11076             : void
   11077           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
   11078             : {
   11079           0 :   JS::Handle<JSObject*> parentProto(SVGPathSegBinding::GetProtoObjectHandle(aCx));
   11080           0 :   if (!parentProto) {
   11081           0 :     return;
   11082             :   }
   11083             : 
   11084           0 :   JS::Handle<JSObject*> constructorProto(SVGPathSegBinding::GetConstructorObjectHandle(aCx));
   11085           0 :   if (!constructorProto) {
   11086           0 :     return;
   11087             :   }
   11088             : 
   11089             :   static bool sIdsInited = false;
   11090           0 :   if (!sIdsInited && NS_IsMainThread()) {
   11091           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
   11092           0 :       return;
   11093             :     }
   11094           0 :     sIdsInited = true;
   11095             :   }
   11096             : 
   11097           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGPathSegMovetoRel);
   11098           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGPathSegMovetoRel);
   11099           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
   11100             :                               &sPrototypeClass.mBase, protoCache,
   11101             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
   11102             :                               interfaceCache,
   11103             :                               sNativeProperties.Upcast(),
   11104             :                               nullptr,
   11105             :                               "SVGPathSegMovetoRel", aDefineOnGlobal,
   11106             :                               nullptr,
   11107           0 :                               false);
   11108             : }
   11109             : 
   11110             : JS::Handle<JSObject*>
   11111           0 : GetProtoObjectHandle(JSContext* aCx)
   11112             : {
   11113             :   /* Get the interface prototype object for this class.  This will create the
   11114             :      object as needed. */
   11115           0 :   bool aDefineOnGlobal = true;
   11116             : 
   11117             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
   11118           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
   11119           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
   11120           0 :     return nullptr;
   11121             :   }
   11122             : 
   11123             :   /* Check to see whether the interface objects are already installed */
   11124           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
   11125           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGPathSegMovetoRel)) {
   11126           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
   11127           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
   11128             :   }
   11129             : 
   11130             :   /*
   11131             :    * The object might _still_ be null, but that's OK.
   11132             :    *
   11133             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
   11134             :    * traced by TraceProtoAndIfaceCache() and its contents are never
   11135             :    * changed after they have been set.
   11136             :    *
   11137             :    * Calling address() avoids the read read barrier that does gray
   11138             :    * unmarking, but it's not possible for the object to be gray here.
   11139             :    */
   11140             : 
   11141           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGPathSegMovetoRel);
   11142           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
   11143           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
   11144             : }
   11145             : 
   11146             : JS::Handle<JSObject*>
   11147           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
   11148             : {
   11149             :   /* Get the interface object for this class.  This will create the object as
   11150             :      needed. */
   11151             : 
   11152             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
   11153           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
   11154           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
   11155           0 :     return nullptr;
   11156             :   }
   11157             : 
   11158             :   /* Check to see whether the interface objects are already installed */
   11159           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
   11160           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGPathSegMovetoRel)) {
   11161           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
   11162           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
   11163             :   }
   11164             : 
   11165             :   /*
   11166             :    * The object might _still_ be null, but that's OK.
   11167             :    *
   11168             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
   11169             :    * traced by TraceProtoAndIfaceCache() and its contents are never
   11170             :    * changed after they have been set.
   11171             :    *
   11172             :    * Calling address() avoids the read read barrier that does gray
   11173             :    * unmarking, but it's not possible for the object to be gray here.
   11174             :    */
   11175             : 
   11176           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGPathSegMovetoRel);
   11177           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
   11178           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
   11179             : }
   11180             : 
   11181             : JSObject*
   11182           0 : GetConstructorObject(JSContext* aCx)
   11183             : {
   11184           0 :   return GetConstructorObjectHandle(aCx);
   11185             : }
   11186             : 
   11187             : } // namespace SVGPathSegMovetoRelBinding
   11188             : 
   11189             : 
   11190             : 
   11191             : } // namespace dom
   11192             : } // namespace mozilla

Generated by: LCOV version 1.13