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

          Line data    Source code
       1             : /* THIS FILE IS AUTOGENERATED FROM SVGFEConvolveMatrixElement.webidl BY Codegen.py - DO NOT EDIT */
       2             : 
       3             : #include "DOMSVGAnimatedNumberList.h"
       4             : #include "SVGElementBinding.h"
       5             : #include "SVGFEConvolveMatrixElementBinding.h"
       6             : #include "WrapperFactory.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/SVGAnimatedBoolean.h"
      12             : #include "mozilla/dom/SVGAnimatedEnumeration.h"
      13             : #include "mozilla/dom/SVGAnimatedInteger.h"
      14             : #include "mozilla/dom/SVGAnimatedLength.h"
      15             : #include "mozilla/dom/SVGAnimatedNumber.h"
      16             : #include "mozilla/dom/SVGAnimatedString.h"
      17             : #include "mozilla/dom/SVGFEConvolveMatrixElement.h"
      18             : #include "mozilla/dom/XrayExpandoClass.h"
      19             : 
      20             : namespace mozilla {
      21             : namespace dom {
      22             : 
      23             : namespace SVGFEConvolveMatrixElementBinding {
      24             : 
      25             : static_assert(IsRefcounted<NativeType>::value == IsRefcounted<SVGElementBinding::NativeType>::value,
      26             :               "Can't inherit from an interface with a different ownership model.");
      27             : 
      28             : static bool
      29           0 : get_in1(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
      30             : {
      31           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedString>(self->In1()));
      32           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
      33           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
      34           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
      35           0 :     return false;
      36             :   }
      37           0 :   return true;
      38             : }
      39             : 
      40             : static const JSJitInfo in1_getterinfo = {
      41             :   { (JSJitGetterOp)get_in1 },
      42             :   { prototypes::id::SVGFEConvolveMatrixElement },
      43             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
      44             :   JSJitInfo::Getter,
      45             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
      46             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
      47             :   false,  /* isInfallible. False in setters. */
      48             :   true,  /* isMovable.  Not relevant for setters. */
      49             :   true, /* isEliminatable.  Not relevant for setters. */
      50             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
      51             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
      52             :   false,  /* isTypedMethod.  Only relevant for methods. */
      53             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
      54             : };
      55             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
      56             : static_assert(0 < 1, "There is no slot for us");
      57             : 
      58             : static bool
      59           0 : get_orderX(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
      60             : {
      61           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedInteger>(self->OrderX()));
      62           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
      63           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
      64           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
      65           0 :     return false;
      66             :   }
      67           0 :   return true;
      68             : }
      69             : 
      70             : static const JSJitInfo orderX_getterinfo = {
      71             :   { (JSJitGetterOp)get_orderX },
      72             :   { prototypes::id::SVGFEConvolveMatrixElement },
      73             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
      74             :   JSJitInfo::Getter,
      75             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
      76             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
      77             :   false,  /* isInfallible. False in setters. */
      78             :   true,  /* isMovable.  Not relevant for setters. */
      79             :   true, /* isEliminatable.  Not relevant for setters. */
      80             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
      81             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
      82             :   false,  /* isTypedMethod.  Only relevant for methods. */
      83             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
      84             : };
      85             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
      86             : static_assert(0 < 1, "There is no slot for us");
      87             : 
      88             : static bool
      89           0 : get_orderY(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
      90             : {
      91           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedInteger>(self->OrderY()));
      92           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
      93           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
      94           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
      95           0 :     return false;
      96             :   }
      97           0 :   return true;
      98             : }
      99             : 
     100             : static const JSJitInfo orderY_getterinfo = {
     101             :   { (JSJitGetterOp)get_orderY },
     102             :   { prototypes::id::SVGFEConvolveMatrixElement },
     103             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     104             :   JSJitInfo::Getter,
     105             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     106             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     107             :   false,  /* isInfallible. False in setters. */
     108             :   true,  /* isMovable.  Not relevant for setters. */
     109             :   true, /* isEliminatable.  Not relevant for setters. */
     110             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     111             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     112             :   false,  /* isTypedMethod.  Only relevant for methods. */
     113             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     114             : };
     115             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     116             : static_assert(0 < 1, "There is no slot for us");
     117             : 
     118             : static bool
     119           0 : get_kernelMatrix(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
     120             : {
     121           0 :   auto result(StrongOrRawPtr<mozilla::DOMSVGAnimatedNumberList>(self->KernelMatrix()));
     122           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     123           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
     124           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
     125           0 :     return false;
     126             :   }
     127           0 :   return true;
     128             : }
     129             : 
     130             : static const JSJitInfo kernelMatrix_getterinfo = {
     131             :   { (JSJitGetterOp)get_kernelMatrix },
     132             :   { prototypes::id::SVGFEConvolveMatrixElement },
     133             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     134             :   JSJitInfo::Getter,
     135             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     136             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     137             :   false,  /* isInfallible. False in setters. */
     138             :   true,  /* isMovable.  Not relevant for setters. */
     139             :   true, /* isEliminatable.  Not relevant for setters. */
     140             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     141             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     142             :   false,  /* isTypedMethod.  Only relevant for methods. */
     143             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     144             : };
     145             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     146             : static_assert(0 < 1, "There is no slot for us");
     147             : 
     148             : static bool
     149           0 : get_divisor(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
     150             : {
     151           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedNumber>(self->Divisor()));
     152           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     153           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
     154           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
     155           0 :     return false;
     156             :   }
     157           0 :   return true;
     158             : }
     159             : 
     160             : static const JSJitInfo divisor_getterinfo = {
     161             :   { (JSJitGetterOp)get_divisor },
     162             :   { prototypes::id::SVGFEConvolveMatrixElement },
     163             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     164             :   JSJitInfo::Getter,
     165             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     166             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     167             :   false,  /* isInfallible. False in setters. */
     168             :   true,  /* isMovable.  Not relevant for setters. */
     169             :   true, /* isEliminatable.  Not relevant for setters. */
     170             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     171             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     172             :   false,  /* isTypedMethod.  Only relevant for methods. */
     173             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     174             : };
     175             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     176             : static_assert(0 < 1, "There is no slot for us");
     177             : 
     178             : static bool
     179           0 : get_bias(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
     180             : {
     181           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedNumber>(self->Bias()));
     182           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     183           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
     184           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
     185           0 :     return false;
     186             :   }
     187           0 :   return true;
     188             : }
     189             : 
     190             : static const JSJitInfo bias_getterinfo = {
     191             :   { (JSJitGetterOp)get_bias },
     192             :   { prototypes::id::SVGFEConvolveMatrixElement },
     193             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     194             :   JSJitInfo::Getter,
     195             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     196             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     197             :   false,  /* isInfallible. False in setters. */
     198             :   true,  /* isMovable.  Not relevant for setters. */
     199             :   true, /* isEliminatable.  Not relevant for setters. */
     200             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     201             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     202             :   false,  /* isTypedMethod.  Only relevant for methods. */
     203             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     204             : };
     205             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     206             : static_assert(0 < 1, "There is no slot for us");
     207             : 
     208             : static bool
     209           0 : get_targetX(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
     210             : {
     211           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedInteger>(self->TargetX()));
     212           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     213           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
     214           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
     215           0 :     return false;
     216             :   }
     217           0 :   return true;
     218             : }
     219             : 
     220             : static const JSJitInfo targetX_getterinfo = {
     221             :   { (JSJitGetterOp)get_targetX },
     222             :   { prototypes::id::SVGFEConvolveMatrixElement },
     223             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     224             :   JSJitInfo::Getter,
     225             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     226             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     227             :   false,  /* isInfallible. False in setters. */
     228             :   true,  /* isMovable.  Not relevant for setters. */
     229             :   true, /* isEliminatable.  Not relevant for setters. */
     230             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     231             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     232             :   false,  /* isTypedMethod.  Only relevant for methods. */
     233             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     234             : };
     235             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     236             : static_assert(0 < 1, "There is no slot for us");
     237             : 
     238             : static bool
     239           0 : get_targetY(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
     240             : {
     241           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedInteger>(self->TargetY()));
     242           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     243           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
     244           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
     245           0 :     return false;
     246             :   }
     247           0 :   return true;
     248             : }
     249             : 
     250             : static const JSJitInfo targetY_getterinfo = {
     251             :   { (JSJitGetterOp)get_targetY },
     252             :   { prototypes::id::SVGFEConvolveMatrixElement },
     253             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     254             :   JSJitInfo::Getter,
     255             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     256             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     257             :   false,  /* isInfallible. False in setters. */
     258             :   true,  /* isMovable.  Not relevant for setters. */
     259             :   true, /* isEliminatable.  Not relevant for setters. */
     260             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     261             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     262             :   false,  /* isTypedMethod.  Only relevant for methods. */
     263             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     264             : };
     265             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     266             : static_assert(0 < 1, "There is no slot for us");
     267             : 
     268             : static bool
     269           0 : get_edgeMode(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
     270             : {
     271           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedEnumeration>(self->EdgeMode()));
     272           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     273           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
     274           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
     275           0 :     return false;
     276             :   }
     277           0 :   return true;
     278             : }
     279             : 
     280             : static const JSJitInfo edgeMode_getterinfo = {
     281             :   { (JSJitGetterOp)get_edgeMode },
     282             :   { prototypes::id::SVGFEConvolveMatrixElement },
     283             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     284             :   JSJitInfo::Getter,
     285             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     286             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     287             :   false,  /* isInfallible. False in setters. */
     288             :   true,  /* isMovable.  Not relevant for setters. */
     289             :   true, /* isEliminatable.  Not relevant for setters. */
     290             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     291             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     292             :   false,  /* isTypedMethod.  Only relevant for methods. */
     293             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     294             : };
     295             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     296             : static_assert(0 < 1, "There is no slot for us");
     297             : 
     298             : static bool
     299           0 : get_kernelUnitLengthX(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
     300             : {
     301           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedNumber>(self->KernelUnitLengthX()));
     302           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     303           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
     304           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
     305           0 :     return false;
     306             :   }
     307           0 :   return true;
     308             : }
     309             : 
     310             : static const JSJitInfo kernelUnitLengthX_getterinfo = {
     311             :   { (JSJitGetterOp)get_kernelUnitLengthX },
     312             :   { prototypes::id::SVGFEConvolveMatrixElement },
     313             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     314             :   JSJitInfo::Getter,
     315             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     316             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     317             :   false,  /* isInfallible. False in setters. */
     318             :   true,  /* isMovable.  Not relevant for setters. */
     319             :   true, /* isEliminatable.  Not relevant for setters. */
     320             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     321             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     322             :   false,  /* isTypedMethod.  Only relevant for methods. */
     323             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     324             : };
     325             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     326             : static_assert(0 < 1, "There is no slot for us");
     327             : 
     328             : static bool
     329           0 : get_kernelUnitLengthY(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
     330             : {
     331           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedNumber>(self->KernelUnitLengthY()));
     332           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     333           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
     334           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
     335           0 :     return false;
     336             :   }
     337           0 :   return true;
     338             : }
     339             : 
     340             : static const JSJitInfo kernelUnitLengthY_getterinfo = {
     341             :   { (JSJitGetterOp)get_kernelUnitLengthY },
     342             :   { prototypes::id::SVGFEConvolveMatrixElement },
     343             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     344             :   JSJitInfo::Getter,
     345             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     346             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     347             :   false,  /* isInfallible. False in setters. */
     348             :   true,  /* isMovable.  Not relevant for setters. */
     349             :   true, /* isEliminatable.  Not relevant for setters. */
     350             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     351             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     352             :   false,  /* isTypedMethod.  Only relevant for methods. */
     353             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     354             : };
     355             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     356             : static_assert(0 < 1, "There is no slot for us");
     357             : 
     358             : static bool
     359           0 : get_preserveAlpha(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
     360             : {
     361           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedBoolean>(self->PreserveAlpha()));
     362           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     363           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
     364           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
     365           0 :     return false;
     366             :   }
     367           0 :   return true;
     368             : }
     369             : 
     370             : static const JSJitInfo preserveAlpha_getterinfo = {
     371             :   { (JSJitGetterOp)get_preserveAlpha },
     372             :   { prototypes::id::SVGFEConvolveMatrixElement },
     373             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     374             :   JSJitInfo::Getter,
     375             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     376             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     377             :   false,  /* isInfallible. False in setters. */
     378             :   true,  /* isMovable.  Not relevant for setters. */
     379             :   true, /* isEliminatable.  Not relevant for setters. */
     380             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     381             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     382             :   false,  /* isTypedMethod.  Only relevant for methods. */
     383             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     384             : };
     385             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     386             : static_assert(0 < 1, "There is no slot for us");
     387             : 
     388             : static bool
     389           0 : get_x(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
     390             : {
     391           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedLength>(self->X()));
     392           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     393           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
     394           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
     395           0 :     return false;
     396             :   }
     397           0 :   return true;
     398             : }
     399             : 
     400             : static const JSJitInfo x_getterinfo = {
     401             :   { (JSJitGetterOp)get_x },
     402             :   { prototypes::id::SVGFEConvolveMatrixElement },
     403             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     404             :   JSJitInfo::Getter,
     405             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     406             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     407             :   false,  /* isInfallible. False in setters. */
     408             :   true,  /* isMovable.  Not relevant for setters. */
     409             :   true, /* isEliminatable.  Not relevant for setters. */
     410             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     411             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     412             :   false,  /* isTypedMethod.  Only relevant for methods. */
     413             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     414             : };
     415             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     416             : static_assert(0 < 1, "There is no slot for us");
     417             : 
     418             : static bool
     419           0 : get_y(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
     420             : {
     421           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedLength>(self->Y()));
     422           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     423           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
     424           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
     425           0 :     return false;
     426             :   }
     427           0 :   return true;
     428             : }
     429             : 
     430             : static const JSJitInfo y_getterinfo = {
     431             :   { (JSJitGetterOp)get_y },
     432             :   { prototypes::id::SVGFEConvolveMatrixElement },
     433             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     434             :   JSJitInfo::Getter,
     435             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     436             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     437             :   false,  /* isInfallible. False in setters. */
     438             :   true,  /* isMovable.  Not relevant for setters. */
     439             :   true, /* isEliminatable.  Not relevant for setters. */
     440             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     441             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     442             :   false,  /* isTypedMethod.  Only relevant for methods. */
     443             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     444             : };
     445             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     446             : static_assert(0 < 1, "There is no slot for us");
     447             : 
     448             : static bool
     449           0 : get_width(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
     450             : {
     451           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedLength>(self->Width()));
     452           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     453           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
     454           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
     455           0 :     return false;
     456             :   }
     457           0 :   return true;
     458             : }
     459             : 
     460             : static const JSJitInfo width_getterinfo = {
     461             :   { (JSJitGetterOp)get_width },
     462             :   { prototypes::id::SVGFEConvolveMatrixElement },
     463             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     464             :   JSJitInfo::Getter,
     465             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     466             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     467             :   false,  /* isInfallible. False in setters. */
     468             :   true,  /* isMovable.  Not relevant for setters. */
     469             :   true, /* isEliminatable.  Not relevant for setters. */
     470             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     471             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     472             :   false,  /* isTypedMethod.  Only relevant for methods. */
     473             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     474             : };
     475             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     476             : static_assert(0 < 1, "There is no slot for us");
     477             : 
     478             : static bool
     479           0 : get_height(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
     480             : {
     481           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedLength>(self->Height()));
     482           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     483           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
     484           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
     485           0 :     return false;
     486             :   }
     487           0 :   return true;
     488             : }
     489             : 
     490             : static const JSJitInfo height_getterinfo = {
     491             :   { (JSJitGetterOp)get_height },
     492             :   { prototypes::id::SVGFEConvolveMatrixElement },
     493             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     494             :   JSJitInfo::Getter,
     495             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     496             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     497             :   false,  /* isInfallible. False in setters. */
     498             :   true,  /* isMovable.  Not relevant for setters. */
     499             :   true, /* isEliminatable.  Not relevant for setters. */
     500             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     501             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     502             :   false,  /* isTypedMethod.  Only relevant for methods. */
     503             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     504             : };
     505             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     506             : static_assert(0 < 1, "There is no slot for us");
     507             : 
     508             : static bool
     509           0 : get_result(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::SVGFEConvolveMatrixElement* self, JSJitGetterCallArgs args)
     510             : {
     511           0 :   auto result(StrongOrRawPtr<mozilla::dom::SVGAnimatedString>(self->Result()));
     512           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     513           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
     514           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
     515           0 :     return false;
     516             :   }
     517           0 :   return true;
     518             : }
     519             : 
     520             : static const JSJitInfo result_getterinfo = {
     521             :   { (JSJitGetterOp)get_result },
     522             :   { prototypes::id::SVGFEConvolveMatrixElement },
     523             :   { PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth },
     524             :   JSJitInfo::Getter,
     525             :   JSJitInfo::AliasNone, /* aliasSet.  Not relevant for setters. */
     526             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
     527             :   false,  /* isInfallible. False in setters. */
     528             :   true,  /* isMovable.  Not relevant for setters. */
     529             :   true, /* isEliminatable.  Not relevant for setters. */
     530             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     531             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     532             :   false,  /* isTypedMethod.  Only relevant for methods. */
     533             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     534             : };
     535             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     536             : static_assert(0 < 1, "There is no slot for us");
     537             : 
     538             : static bool
     539           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
     540             : {
     541           0 :   mozilla::dom::SVGFEConvolveMatrixElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::SVGFEConvolveMatrixElement>(obj);
     542             :   // We don't want to preserve if we don't have a wrapper, and we
     543             :   // obviously can't preserve if we're not initialized.
     544           0 :   if (self && self->GetWrapperPreserveColor()) {
     545           0 :     PreserveWrapper(self);
     546             :   }
     547           0 :   return true;
     548             : }
     549             : 
     550             : static void
     551           0 : _finalize(js::FreeOp* fop, JSObject* obj)
     552             : {
     553           0 :   mozilla::dom::SVGFEConvolveMatrixElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::SVGFEConvolveMatrixElement>(obj);
     554           0 :   if (self) {
     555           0 :     ClearWrapper(self, self, obj);
     556           0 :     AddForDeferredFinalization<mozilla::dom::SVGFEConvolveMatrixElement>(self);
     557             :   }
     558           0 : }
     559             : 
     560             : static void
     561           0 : _objectMoved(JSObject* obj, const JSObject* old)
     562             : {
     563           0 :   mozilla::dom::SVGFEConvolveMatrixElement* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::SVGFEConvolveMatrixElement>(obj);
     564           0 :   if (self) {
     565           0 :     UpdateWrapper(self, self, obj, old);
     566             :   }
     567           0 : }
     568             : 
     569             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
     570             : #if defined(__clang__)
     571             : #pragma clang diagnostic push
     572             : #pragma clang diagnostic ignored "-Wmissing-braces"
     573             : #endif
     574             : static const JSPropertySpec sAttributes_specs[] = {
     575             :   { "in1", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &in1_getterinfo, nullptr, nullptr },
     576             :   { "orderX", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &orderX_getterinfo, nullptr, nullptr },
     577             :   { "orderY", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &orderY_getterinfo, nullptr, nullptr },
     578             :   { "kernelMatrix", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &kernelMatrix_getterinfo, nullptr, nullptr },
     579             :   { "divisor", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &divisor_getterinfo, nullptr, nullptr },
     580             :   { "bias", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &bias_getterinfo, nullptr, nullptr },
     581             :   { "targetX", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &targetX_getterinfo, nullptr, nullptr },
     582             :   { "targetY", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &targetY_getterinfo, nullptr, nullptr },
     583             :   { "edgeMode", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &edgeMode_getterinfo, nullptr, nullptr },
     584             :   { "kernelUnitLengthX", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &kernelUnitLengthX_getterinfo, nullptr, nullptr },
     585             :   { "kernelUnitLengthY", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &kernelUnitLengthY_getterinfo, nullptr, nullptr },
     586             :   { "preserveAlpha", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &preserveAlpha_getterinfo, nullptr, nullptr },
     587             :   { "x", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &x_getterinfo, nullptr, nullptr },
     588             :   { "y", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &y_getterinfo, nullptr, nullptr },
     589             :   { "width", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &width_getterinfo, nullptr, nullptr },
     590             :   { "height", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &height_getterinfo, nullptr, nullptr },
     591             :   { "result", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &result_getterinfo, nullptr, nullptr },
     592             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
     593             : };
     594             : #if defined(__clang__)
     595             : #pragma clang diagnostic pop
     596             : #endif
     597             : 
     598             : 
     599             : // Can't be const because the pref-enabled boolean needs to be writable
     600             : static Prefable<const JSPropertySpec> sAttributes[] = {
     601             :   { nullptr, &sAttributes_specs[0] },
     602             :   { nullptr, nullptr }
     603             : };
     604             : 
     605             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
     606             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
     607             : static_assert(17 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
     608             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
     609             : 
     610             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
     611             : #if defined(__clang__)
     612             : #pragma clang diagnostic push
     613             : #pragma clang diagnostic ignored "-Wmissing-braces"
     614             : #endif
     615             : static const ConstantSpec sConstants_specs[] = {
     616             :   { "SVG_EDGEMODE_UNKNOWN", JS::Int32Value(0) },
     617             :   { "SVG_EDGEMODE_DUPLICATE", JS::Int32Value(1) },
     618             :   { "SVG_EDGEMODE_WRAP", JS::Int32Value(2) },
     619             :   { "SVG_EDGEMODE_NONE", JS::Int32Value(3) },
     620             :   { 0, JS::UndefinedValue() }
     621             : };
     622             : #if defined(__clang__)
     623             : #pragma clang diagnostic pop
     624             : #endif
     625             : 
     626             : 
     627             : // Can't be const because the pref-enabled boolean needs to be writable
     628             : static Prefable<const ConstantSpec> sConstants[] = {
     629             :   { nullptr, &sConstants_specs[0] },
     630             :   { nullptr, nullptr }
     631             : };
     632             : 
     633             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
     634             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
     635             : static_assert(4 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
     636             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
     637             : 
     638             : 
     639             : static uint16_t sNativeProperties_sortedPropertyIndices[21];
     640             : static PropertyInfo sNativeProperties_propertyInfos[21];
     641             : 
     642             : static const NativePropertiesN<2> sNativeProperties = {
     643             :   false, 0,
     644             :   false, 0,
     645             :   false, 0,
     646             :   true,  0 /* sAttributes */,
     647             :   false, 0,
     648             :   false, 0,
     649             :   true,  1 /* sConstants */,
     650             :   -1,
     651             :   21,
     652             :   sNativeProperties_sortedPropertyIndices,
     653             :   {
     654             :     { sAttributes, &sNativeProperties_propertyInfos[0] },
     655             :     { sConstants, &sNativeProperties_propertyInfos[17] }
     656             :   }
     657             : };
     658             : static_assert(21 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
     659             :     "We have a property info count that is oversized");
     660             : 
     661             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
     662             :   {
     663             :     "Function",
     664             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
     665             :     &sBoringInterfaceObjectClassClassOps,
     666             :     JS_NULL_CLASS_SPEC,
     667             :     JS_NULL_CLASS_EXT,
     668             :     &sInterfaceObjectClassObjectOps
     669             :   },
     670             :   eInterface,
     671             :   true,
     672             :   prototypes::id::SVGFEConvolveMatrixElement,
     673             :   PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth,
     674             :   sNativePropertyHooks,
     675             :   "function SVGFEConvolveMatrixElement() {\n    [native code]\n}",
     676             :   SVGElementBinding::GetConstructorObject
     677             : };
     678             : 
     679             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
     680             :   {
     681             :     "SVGFEConvolveMatrixElementPrototype",
     682             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
     683             :     JS_NULL_CLASS_OPS,
     684             :     JS_NULL_CLASS_SPEC,
     685             :     JS_NULL_CLASS_EXT,
     686             :     JS_NULL_OBJECT_OPS
     687             :   },
     688             :   eInterfacePrototype,
     689             :   false,
     690             :   prototypes::id::SVGFEConvolveMatrixElement,
     691             :   PrototypeTraits<prototypes::id::SVGFEConvolveMatrixElement>::Depth,
     692             :   sNativePropertyHooks,
     693             :   "[object SVGFEConvolveMatrixElementPrototype]",
     694             :   SVGElementBinding::GetProtoObject
     695             : };
     696             : 
     697             : JSObject*
     698           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
     699             : {
     700           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
     701             : }
     702             : 
     703             : static const js::ClassOps sClassOps = {
     704             :   _addProperty, /* addProperty */
     705             :   nullptr,               /* delProperty */
     706             :   nullptr,               /* getProperty */
     707             :   nullptr,               /* setProperty */
     708             :   nullptr,               /* enumerate */
     709             :   nullptr, /* newEnumerate */
     710             :   nullptr, /* resolve */
     711             :   nullptr, /* mayResolve */
     712             :   _finalize, /* finalize */
     713             :   nullptr, /* call */
     714             :   nullptr,               /* hasInstance */
     715             :   nullptr,               /* construct */
     716             :   nullptr, /* trace */
     717             : };
     718             : 
     719             : static const js::ClassExtension sClassExtension = {
     720             :   nullptr, /* weakmapKeyDelegateOp */
     721             :   _objectMoved /* objectMovedOp */
     722             : };
     723             : 
     724             : static const DOMJSClass sClass = {
     725             :   { "SVGFEConvolveMatrixElement",
     726             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
     727             :     &sClassOps,
     728             :     JS_NULL_CLASS_SPEC,
     729             :     &sClassExtension,
     730             :     JS_NULL_OBJECT_OPS
     731             :   },
     732             :   { prototypes::id::EventTarget, prototypes::id::Node, prototypes::id::Element, prototypes::id::SVGElement, prototypes::id::SVGFEConvolveMatrixElement, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
     733             :   IsBaseOf<nsISupports, mozilla::dom::SVGFEConvolveMatrixElement >::value,
     734             :   sNativePropertyHooks,
     735             :   FindAssociatedGlobalForNative<mozilla::dom::SVGFEConvolveMatrixElement>::Get,
     736             :   GetProtoObjectHandle,
     737             :   GetCCParticipant<mozilla::dom::SVGFEConvolveMatrixElement>::Get()
     738             : };
     739             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
     740             :               "Must have the right minimal number of reserved slots.");
     741             : static_assert(1 >= 1,
     742             :               "Must have enough reserved slots.");
     743             : 
     744             : const JSClass*
     745           0 : GetJSClass()
     746             : {
     747           0 :   return sClass.ToJSClass();
     748             : }
     749             : 
     750             : bool
     751           0 : Wrap(JSContext* aCx, mozilla::dom::SVGFEConvolveMatrixElement* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
     752             : {
     753             :   MOZ_ASSERT(static_cast<mozilla::dom::SVGFEConvolveMatrixElement*>(aObject) ==
     754             :              reinterpret_cast<mozilla::dom::SVGFEConvolveMatrixElement*>(aObject),
     755             :              "Multiple inheritance for mozilla::dom::SVGFEConvolveMatrixElement is broken.");
     756             :   MOZ_ASSERT(static_cast<nsSVGElement*>(aObject) ==
     757             :              reinterpret_cast<nsSVGElement*>(aObject),
     758             :              "Multiple inheritance for nsSVGElement is broken.");
     759             :   MOZ_ASSERT(static_cast<mozilla::dom::Element*>(aObject) ==
     760             :              reinterpret_cast<mozilla::dom::Element*>(aObject),
     761             :              "Multiple inheritance for mozilla::dom::Element is broken.");
     762             :   MOZ_ASSERT(static_cast<nsINode*>(aObject) ==
     763             :              reinterpret_cast<nsINode*>(aObject),
     764             :              "Multiple inheritance for nsINode is broken.");
     765             :   MOZ_ASSERT(static_cast<mozilla::dom::EventTarget*>(aObject) ==
     766             :              reinterpret_cast<mozilla::dom::EventTarget*>(aObject),
     767             :              "Multiple inheritance for mozilla::dom::EventTarget is broken.");
     768           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
     769           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
     770           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
     771             :              "You should probably not be using Wrap() directly; use "
     772             :              "GetOrCreateDOMReflector instead");
     773             : 
     774           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
     775             :              "nsISupports must be on our primary inheritance chain");
     776             : 
     777           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
     778           0 :   if (!global) {
     779           0 :     return false;
     780             :   }
     781           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
     782           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
     783             : 
     784             :   // That might have ended up wrapping us already, due to the wonders
     785             :   // of XBL.  Check for that, and bail out as needed.
     786           0 :   aReflector.set(aCache->GetWrapper());
     787           0 :   if (aReflector) {
     788             : #ifdef DEBUG
     789           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
     790             : #endif // DEBUG
     791           0 :     return true;
     792             :   }
     793             : 
     794           0 :   JSAutoCompartment ac(aCx, global);
     795           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
     796           0 :   if (!canonicalProto) {
     797           0 :     return false;
     798             :   }
     799           0 :   JS::Rooted<JSObject*> proto(aCx);
     800           0 :   if (aGivenProto) {
     801           0 :     proto = aGivenProto;
     802             :     // Unfortunately, while aGivenProto was in the compartment of aCx
     803             :     // coming in, we changed compartments to that of "parent" so may need
     804             :     // to wrap the proto here.
     805           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
     806           0 :       if (!JS_WrapObject(aCx, &proto)) {
     807           0 :         return false;
     808             :       }
     809             :     }
     810             :   } else {
     811           0 :     proto = canonicalProto;
     812             :   }
     813             : 
     814           0 :   BindingJSObjectCreator<mozilla::dom::SVGFEConvolveMatrixElement> creator(aCx);
     815           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
     816           0 :   if (!aReflector) {
     817           0 :     return false;
     818             :   }
     819             : 
     820           0 :   aCache->SetWrapper(aReflector);
     821           0 :   creator.InitializationSucceeded();
     822             : 
     823           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
     824             :              aCache->GetWrapperPreserveColor() == aReflector);
     825             :   // If proto != canonicalProto, we have to preserve our wrapper;
     826             :   // otherwise we won't be able to properly recreate it later, since
     827             :   // we won't know what proto to use.  Note that we don't check
     828             :   // aGivenProto here, since it's entirely possible (and even
     829             :   // somewhat common) to have a non-null aGivenProto which is the
     830             :   // same as canonicalProto.
     831           0 :   if (proto != canonicalProto) {
     832           0 :     PreserveWrapper(aObject);
     833             :   }
     834             : 
     835           0 :   return true;
     836             : }
     837             : 
     838             : const NativePropertyHooks sNativePropertyHooks[] = { {
     839             :   nullptr,
     840             :   nullptr,
     841             :   nullptr,
     842             :   { sNativeProperties.Upcast(), nullptr },
     843             :   prototypes::id::SVGFEConvolveMatrixElement,
     844             :   constructors::id::SVGFEConvolveMatrixElement,
     845             :   SVGElementBinding::sNativePropertyHooks,
     846             :   &DefaultXrayExpandoObjectClass
     847             : } };
     848             : 
     849             : void
     850           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
     851             : {
     852           0 :   JS::Handle<JSObject*> parentProto(SVGElementBinding::GetProtoObjectHandle(aCx));
     853           0 :   if (!parentProto) {
     854           0 :     return;
     855             :   }
     856             : 
     857           0 :   JS::Handle<JSObject*> constructorProto(SVGElementBinding::GetConstructorObjectHandle(aCx));
     858           0 :   if (!constructorProto) {
     859           0 :     return;
     860             :   }
     861             : 
     862             :   static bool sIdsInited = false;
     863           0 :   if (!sIdsInited && NS_IsMainThread()) {
     864           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
     865           0 :       return;
     866             :     }
     867           0 :     sIdsInited = true;
     868             :   }
     869             : 
     870           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::SVGFEConvolveMatrixElement);
     871           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::SVGFEConvolveMatrixElement);
     872           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
     873             :                               &sPrototypeClass.mBase, protoCache,
     874             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
     875             :                               interfaceCache,
     876             :                               sNativeProperties.Upcast(),
     877             :                               nullptr,
     878             :                               "SVGFEConvolveMatrixElement", aDefineOnGlobal,
     879             :                               nullptr,
     880           0 :                               false);
     881             : }
     882             : 
     883             : JS::Handle<JSObject*>
     884           0 : GetProtoObjectHandle(JSContext* aCx)
     885             : {
     886             :   /* Get the interface prototype object for this class.  This will create the
     887             :      object as needed. */
     888           0 :   bool aDefineOnGlobal = true;
     889             : 
     890             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
     891           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
     892           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
     893           0 :     return nullptr;
     894             :   }
     895             : 
     896             :   /* Check to see whether the interface objects are already installed */
     897           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
     898           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::SVGFEConvolveMatrixElement)) {
     899           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
     900           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
     901             :   }
     902             : 
     903             :   /*
     904             :    * The object might _still_ be null, but that's OK.
     905             :    *
     906             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
     907             :    * traced by TraceProtoAndIfaceCache() and its contents are never
     908             :    * changed after they have been set.
     909             :    *
     910             :    * Calling address() avoids the read read barrier that does gray
     911             :    * unmarking, but it's not possible for the object to be gray here.
     912             :    */
     913             : 
     914           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::SVGFEConvolveMatrixElement);
     915           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
     916           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
     917             : }
     918             : 
     919             : JS::Handle<JSObject*>
     920           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
     921             : {
     922             :   /* Get the interface object for this class.  This will create the object as
     923             :      needed. */
     924             : 
     925             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
     926           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
     927           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
     928           0 :     return nullptr;
     929             :   }
     930             : 
     931             :   /* Check to see whether the interface objects are already installed */
     932           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
     933           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::SVGFEConvolveMatrixElement)) {
     934           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
     935           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
     936             :   }
     937             : 
     938             :   /*
     939             :    * The object might _still_ be null, but that's OK.
     940             :    *
     941             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
     942             :    * traced by TraceProtoAndIfaceCache() and its contents are never
     943             :    * changed after they have been set.
     944             :    *
     945             :    * Calling address() avoids the read read barrier that does gray
     946             :    * unmarking, but it's not possible for the object to be gray here.
     947             :    */
     948             : 
     949           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::SVGFEConvolveMatrixElement);
     950           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
     951           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
     952             : }
     953             : 
     954             : JSObject*
     955           0 : GetConstructorObject(JSContext* aCx)
     956             : {
     957           0 :   return GetConstructorObjectHandle(aCx);
     958             : }
     959             : 
     960             : } // namespace SVGFEConvolveMatrixElementBinding
     961             : 
     962             : 
     963             : 
     964             : } // namespace dom
     965             : } // namespace mozilla

Generated by: LCOV version 1.13