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

          Line data    Source code
       1             : /* THIS FILE IS AUTOGENERATED FROM TreeContentView.webidl BY Codegen.py - DO NOT EDIT */
       2             : 
       3             : #include "TreeContentViewBinding.h"
       4             : #include "WrapperFactory.h"
       5             : #include "mozilla/OwningNonNull.h"
       6             : #include "mozilla/dom/BindingUtils.h"
       7             : #include "mozilla/dom/DOMJSClass.h"
       8             : #include "mozilla/dom/DataTransfer.h"
       9             : #include "mozilla/dom/Element.h"
      10             : #include "mozilla/dom/NonRefcountedDOMObject.h"
      11             : #include "mozilla/dom/Nullable.h"
      12             : #include "mozilla/dom/PrimitiveConversions.h"
      13             : #include "mozilla/dom/TreeBoxObject.h"
      14             : #include "mozilla/dom/XrayExpandoClass.h"
      15             : #include "nsISupports.h"
      16             : #include "nsITreeSelection.h"
      17             : #include "nsTreeColumns.h"
      18             : #include "nsTreeContentView.h"
      19             : #include "xpcjsid.h"
      20             : 
      21             : namespace mozilla {
      22             : namespace dom {
      23             : 
      24             : namespace TreeContentViewBinding {
      25             : 
      26             : static bool
      27           0 : getItemAtIndex(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
      28             : {
      29           0 :   if (MOZ_UNLIKELY(args.length() < 1)) {
      30           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.getItemAtIndex");
      31             :   }
      32             :   int32_t arg0;
      33           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
      34           0 :     return false;
      35             :   }
      36           0 :   binding_detail::FastErrorResult rv;
      37           0 :   auto result(StrongOrRawPtr<mozilla::dom::Element>(self->GetItemAtIndex(arg0, rv)));
      38           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
      39           0 :     return false;
      40             :   }
      41           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
      42           0 :   if (!result) {
      43           0 :     args.rval().setNull();
      44           0 :     return true;
      45             :   }
      46           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
      47           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
      48           0 :     return false;
      49             :   }
      50           0 :   return true;
      51             : }
      52             : 
      53             : static const JSJitInfo getItemAtIndex_methodinfo = {
      54             :   { (JSJitGetterOp)getItemAtIndex },
      55             :   { prototypes::id::TreeContentView },
      56             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
      57             :   JSJitInfo::Method,
      58             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
      59             :   JSVAL_TYPE_UNKNOWN,  /* returnType.  Not relevant for setters. */
      60             :   false,  /* isInfallible. False in setters. */
      61             :   false,  /* isMovable.  Not relevant for setters. */
      62             :   false, /* isEliminatable.  Not relevant for setters. */
      63             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
      64             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
      65             :   false,  /* isTypedMethod.  Only relevant for methods. */
      66             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
      67             : };
      68             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
      69             : static_assert(0 < 1, "There is no slot for us");
      70             : 
      71             : static bool
      72           0 : getIndexOfItem(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
      73             : {
      74           0 :   if (MOZ_UNLIKELY(args.length() < 1)) {
      75           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.getIndexOfItem");
      76             :   }
      77             :   mozilla::dom::Element* arg0;
      78           0 :   if (args[0].isObject()) {
      79             :     {
      80           0 :       nsresult rv = UnwrapObject<prototypes::id::Element, mozilla::dom::Element>(args[0], arg0);
      81           0 :       if (NS_FAILED(rv)) {
      82           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 1 of TreeContentView.getIndexOfItem", "Element");
      83           0 :         return false;
      84             :       }
      85             :     }
      86           0 :   } else if (args[0].isNullOrUndefined()) {
      87           0 :     arg0 = nullptr;
      88             :   } else {
      89           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 1 of TreeContentView.getIndexOfItem");
      90           0 :     return false;
      91             :   }
      92           0 :   int32_t result(self->GetIndexOfItem(Constify(arg0)));
      93           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
      94           0 :   args.rval().setInt32(int32_t(result));
      95           0 :   return true;
      96             : }
      97             : 
      98             : static const JSJitInfo getIndexOfItem_methodinfo = {
      99             :   { (JSJitGetterOp)getIndexOfItem },
     100             :   { prototypes::id::TreeContentView },
     101             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     102             :   JSJitInfo::Method,
     103             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     104             :   JSVAL_TYPE_INT32,  /* returnType.  Not relevant for setters. */
     105             :   false,  /* isInfallible. False in setters. */
     106             :   false,  /* isMovable.  Not relevant for setters. */
     107             :   false, /* isEliminatable.  Not relevant for setters. */
     108             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     109             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     110             :   false,  /* isTypedMethod.  Only relevant for methods. */
     111             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     112             : };
     113             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     114             : static_assert(0 < 1, "There is no slot for us");
     115             : 
     116             : static bool
     117           0 : get_rowCount(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, JSJitGetterCallArgs args)
     118             : {
     119           0 :   int32_t result(self->RowCount());
     120           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     121           0 :   args.rval().setInt32(int32_t(result));
     122           0 :   return true;
     123             : }
     124             : 
     125             : static const JSJitInfo rowCount_getterinfo = {
     126             :   { (JSJitGetterOp)get_rowCount },
     127             :   { prototypes::id::TreeContentView },
     128             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     129             :   JSJitInfo::Getter,
     130             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     131             :   JSVAL_TYPE_INT32,  /* returnType.  Not relevant for setters. */
     132             :   true,  /* isInfallible. False in setters. */
     133             :   false,  /* isMovable.  Not relevant for setters. */
     134             :   false, /* isEliminatable.  Not relevant for setters. */
     135             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     136             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     137             :   false,  /* isTypedMethod.  Only relevant for methods. */
     138             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     139             : };
     140             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     141             : static_assert(0 < 1, "There is no slot for us");
     142             : 
     143             : static bool
     144           0 : get_selection(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, JSJitGetterCallArgs args)
     145             : {
     146           0 :   auto result(StrongOrRawPtr<nsITreeSelection>(self->GetSelection()));
     147           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     148           0 :   if (!result) {
     149           0 :     args.rval().setNull();
     150           0 :     return true;
     151             :   }
     152           0 :   if (!WrapObject(cx, result, &NS_GET_IID(nsITreeSelection), args.rval())) {
     153           0 :     return false;
     154             :   }
     155           0 :   return true;
     156             : }
     157             : 
     158             : static bool
     159           0 : set_selection(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, JSJitSetterCallArgs args)
     160             : {
     161             :   nsITreeSelection* arg0;
     162           0 :   RefPtr<nsITreeSelection> arg0_holder;
     163           0 :   if (args[0].isObject()) {
     164           0 :     JS::Rooted<JSObject*> source(cx, &args[0].toObject());
     165           0 :     if (NS_FAILED(UnwrapArg<nsITreeSelection>(cx, source, getter_AddRefs(arg0_holder)))) {
     166           0 :       ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Value being assigned to TreeContentView.selection", "nsITreeSelection");
     167           0 :       return false;
     168             :     }
     169           0 :     MOZ_ASSERT(arg0_holder);
     170           0 :     arg0 = arg0_holder;
     171           0 :   } else if (args[0].isNullOrUndefined()) {
     172           0 :     arg0 = nullptr;
     173             :   } else {
     174           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Value being assigned to TreeContentView.selection");
     175           0 :     return false;
     176             :   }
     177           0 :   binding_detail::FastErrorResult rv;
     178           0 :   self->SetSelection(Constify(arg0), rv);
     179           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     180           0 :     return false;
     181             :   }
     182           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     183             : 
     184           0 :   return true;
     185             : }
     186             : 
     187             : static const JSJitInfo selection_getterinfo = {
     188             :   { (JSJitGetterOp)get_selection },
     189             :   { prototypes::id::TreeContentView },
     190             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     191             :   JSJitInfo::Getter,
     192             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     193             :   JSVAL_TYPE_UNKNOWN,  /* returnType.  Not relevant for setters. */
     194             :   false,  /* isInfallible. False in setters. */
     195             :   false,  /* isMovable.  Not relevant for setters. */
     196             :   false, /* isEliminatable.  Not relevant for setters. */
     197             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     198             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     199             :   false,  /* isTypedMethod.  Only relevant for methods. */
     200             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     201             : };
     202             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     203             : static_assert(0 < 1, "There is no slot for us");
     204             : static const JSJitInfo selection_setterinfo = {
     205             :   { (JSJitGetterOp)set_selection },
     206             :   { prototypes::id::TreeContentView },
     207             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     208             :   JSJitInfo::Setter,
     209             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     210             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
     211             :   false,  /* isInfallible. False in setters. */
     212             :   false,  /* isMovable.  Not relevant for setters. */
     213             :   false, /* isEliminatable.  Not relevant for setters. */
     214             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     215             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     216             :   false,  /* isTypedMethod.  Only relevant for methods. */
     217             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     218             : };
     219             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     220             : static_assert(0 < 1, "There is no slot for us");
     221             : 
     222             : static bool
     223           0 : getRowProperties(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     224             : {
     225           0 :   if (MOZ_UNLIKELY(args.length() < 1)) {
     226           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.getRowProperties");
     227             :   }
     228             :   int32_t arg0;
     229           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     230           0 :     return false;
     231             :   }
     232           0 :   binding_detail::FastErrorResult rv;
     233           0 :   DOMString result;
     234           0 :   self->GetRowProperties(arg0, result, rv);
     235           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     236           0 :     return false;
     237             :   }
     238           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     239           0 :   if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
     240           0 :     return false;
     241             :   }
     242           0 :   return true;
     243             : }
     244             : 
     245             : static const JSJitInfo getRowProperties_methodinfo = {
     246             :   { (JSJitGetterOp)getRowProperties },
     247             :   { prototypes::id::TreeContentView },
     248             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     249             :   JSJitInfo::Method,
     250             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     251             :   JSVAL_TYPE_STRING,  /* returnType.  Not relevant for setters. */
     252             :   false,  /* isInfallible. False in setters. */
     253             :   false,  /* isMovable.  Not relevant for setters. */
     254             :   false, /* isEliminatable.  Not relevant for setters. */
     255             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     256             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     257             :   false,  /* isTypedMethod.  Only relevant for methods. */
     258             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     259             : };
     260             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     261             : static_assert(0 < 1, "There is no slot for us");
     262             : 
     263             : static bool
     264           0 : getCellProperties(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     265             : {
     266           0 :   if (MOZ_UNLIKELY(args.length() < 2)) {
     267           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.getCellProperties");
     268             :   }
     269             :   int32_t arg0;
     270           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     271           0 :     return false;
     272             :   }
     273           0 :   NonNull<nsTreeColumn> arg1;
     274           0 :   if (args[1].isObject()) {
     275             :     {
     276           0 :       nsresult rv = UnwrapObject<prototypes::id::TreeColumn, nsTreeColumn>(args[1], arg1);
     277           0 :       if (NS_FAILED(rv)) {
     278           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 2 of TreeContentView.getCellProperties", "TreeColumn");
     279           0 :         return false;
     280             :       }
     281             :     }
     282             :   } else {
     283           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 2 of TreeContentView.getCellProperties");
     284           0 :     return false;
     285             :   }
     286           0 :   binding_detail::FastErrorResult rv;
     287           0 :   DOMString result;
     288           0 :   self->GetCellProperties(arg0, NonNullHelper(arg1), result, rv);
     289           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     290           0 :     return false;
     291             :   }
     292           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     293           0 :   if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
     294           0 :     return false;
     295             :   }
     296           0 :   return true;
     297             : }
     298             : 
     299             : static const JSJitInfo getCellProperties_methodinfo = {
     300             :   { (JSJitGetterOp)getCellProperties },
     301             :   { prototypes::id::TreeContentView },
     302             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     303             :   JSJitInfo::Method,
     304             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     305             :   JSVAL_TYPE_STRING,  /* returnType.  Not relevant for setters. */
     306             :   false,  /* isInfallible. False in setters. */
     307             :   false,  /* isMovable.  Not relevant for setters. */
     308             :   false, /* isEliminatable.  Not relevant for setters. */
     309             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     310             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     311             :   false,  /* isTypedMethod.  Only relevant for methods. */
     312             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     313             : };
     314             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     315             : static_assert(0 < 1, "There is no slot for us");
     316             : 
     317             : static bool
     318           0 : getColumnProperties(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     319             : {
     320           0 :   if (MOZ_UNLIKELY(args.length() < 1)) {
     321           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.getColumnProperties");
     322             :   }
     323           0 :   NonNull<nsTreeColumn> arg0;
     324           0 :   if (args[0].isObject()) {
     325             :     {
     326           0 :       nsresult rv = UnwrapObject<prototypes::id::TreeColumn, nsTreeColumn>(args[0], arg0);
     327           0 :       if (NS_FAILED(rv)) {
     328           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 1 of TreeContentView.getColumnProperties", "TreeColumn");
     329           0 :         return false;
     330             :       }
     331             :     }
     332             :   } else {
     333           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 1 of TreeContentView.getColumnProperties");
     334           0 :     return false;
     335             :   }
     336           0 :   DOMString result;
     337           0 :   self->GetColumnProperties(NonNullHelper(arg0), result);
     338           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     339           0 :   if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
     340           0 :     return false;
     341             :   }
     342           0 :   return true;
     343             : }
     344             : 
     345             : static const JSJitInfo getColumnProperties_methodinfo = {
     346             :   { (JSJitGetterOp)getColumnProperties },
     347             :   { prototypes::id::TreeContentView },
     348             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     349             :   JSJitInfo::Method,
     350             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     351             :   JSVAL_TYPE_STRING,  /* returnType.  Not relevant for setters. */
     352             :   false,  /* isInfallible. False in setters. */
     353             :   false,  /* isMovable.  Not relevant for setters. */
     354             :   false, /* isEliminatable.  Not relevant for setters. */
     355             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     356             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     357             :   false,  /* isTypedMethod.  Only relevant for methods. */
     358             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     359             : };
     360             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     361             : static_assert(0 < 1, "There is no slot for us");
     362             : 
     363             : static bool
     364           0 : isContainer(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     365             : {
     366           0 :   if (MOZ_UNLIKELY(args.length() < 1)) {
     367           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.isContainer");
     368             :   }
     369             :   int32_t arg0;
     370           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     371           0 :     return false;
     372             :   }
     373           0 :   binding_detail::FastErrorResult rv;
     374           0 :   bool result(self->IsContainer(arg0, rv));
     375           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     376           0 :     return false;
     377             :   }
     378           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     379           0 :   args.rval().setBoolean(result);
     380           0 :   return true;
     381             : }
     382             : 
     383             : static const JSJitInfo isContainer_methodinfo = {
     384             :   { (JSJitGetterOp)isContainer },
     385             :   { prototypes::id::TreeContentView },
     386             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     387             :   JSJitInfo::Method,
     388             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     389             :   JSVAL_TYPE_BOOLEAN,  /* returnType.  Not relevant for setters. */
     390             :   false,  /* isInfallible. False in setters. */
     391             :   false,  /* isMovable.  Not relevant for setters. */
     392             :   false, /* isEliminatable.  Not relevant for setters. */
     393             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     394             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     395             :   false,  /* isTypedMethod.  Only relevant for methods. */
     396             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     397             : };
     398             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     399             : static_assert(0 < 1, "There is no slot for us");
     400             : 
     401             : static bool
     402           0 : isContainerOpen(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     403             : {
     404           0 :   if (MOZ_UNLIKELY(args.length() < 1)) {
     405           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.isContainerOpen");
     406             :   }
     407             :   int32_t arg0;
     408           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     409           0 :     return false;
     410             :   }
     411           0 :   binding_detail::FastErrorResult rv;
     412           0 :   bool result(self->IsContainerOpen(arg0, rv));
     413           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     414           0 :     return false;
     415             :   }
     416           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     417           0 :   args.rval().setBoolean(result);
     418           0 :   return true;
     419             : }
     420             : 
     421             : static const JSJitInfo isContainerOpen_methodinfo = {
     422             :   { (JSJitGetterOp)isContainerOpen },
     423             :   { prototypes::id::TreeContentView },
     424             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     425             :   JSJitInfo::Method,
     426             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     427             :   JSVAL_TYPE_BOOLEAN,  /* returnType.  Not relevant for setters. */
     428             :   false,  /* isInfallible. False in setters. */
     429             :   false,  /* isMovable.  Not relevant for setters. */
     430             :   false, /* isEliminatable.  Not relevant for setters. */
     431             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     432             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     433             :   false,  /* isTypedMethod.  Only relevant for methods. */
     434             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     435             : };
     436             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     437             : static_assert(0 < 1, "There is no slot for us");
     438             : 
     439             : static bool
     440           0 : isContainerEmpty(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     441             : {
     442           0 :   if (MOZ_UNLIKELY(args.length() < 1)) {
     443           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.isContainerEmpty");
     444             :   }
     445             :   int32_t arg0;
     446           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     447           0 :     return false;
     448             :   }
     449           0 :   binding_detail::FastErrorResult rv;
     450           0 :   bool result(self->IsContainerEmpty(arg0, rv));
     451           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     452           0 :     return false;
     453             :   }
     454           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     455           0 :   args.rval().setBoolean(result);
     456           0 :   return true;
     457             : }
     458             : 
     459             : static const JSJitInfo isContainerEmpty_methodinfo = {
     460             :   { (JSJitGetterOp)isContainerEmpty },
     461             :   { prototypes::id::TreeContentView },
     462             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     463             :   JSJitInfo::Method,
     464             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     465             :   JSVAL_TYPE_BOOLEAN,  /* returnType.  Not relevant for setters. */
     466             :   false,  /* isInfallible. False in setters. */
     467             :   false,  /* isMovable.  Not relevant for setters. */
     468             :   false, /* isEliminatable.  Not relevant for setters. */
     469             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     470             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     471             :   false,  /* isTypedMethod.  Only relevant for methods. */
     472             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     473             : };
     474             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     475             : static_assert(0 < 1, "There is no slot for us");
     476             : 
     477             : static bool
     478           0 : isSeparator(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     479             : {
     480           0 :   if (MOZ_UNLIKELY(args.length() < 1)) {
     481           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.isSeparator");
     482             :   }
     483             :   int32_t arg0;
     484           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     485           0 :     return false;
     486             :   }
     487           0 :   binding_detail::FastErrorResult rv;
     488           0 :   bool result(self->IsSeparator(arg0, rv));
     489           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     490           0 :     return false;
     491             :   }
     492           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     493           0 :   args.rval().setBoolean(result);
     494           0 :   return true;
     495             : }
     496             : 
     497             : static const JSJitInfo isSeparator_methodinfo = {
     498             :   { (JSJitGetterOp)isSeparator },
     499             :   { prototypes::id::TreeContentView },
     500             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     501             :   JSJitInfo::Method,
     502             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     503             :   JSVAL_TYPE_BOOLEAN,  /* returnType.  Not relevant for setters. */
     504             :   false,  /* isInfallible. False in setters. */
     505             :   false,  /* isMovable.  Not relevant for setters. */
     506             :   false, /* isEliminatable.  Not relevant for setters. */
     507             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     508             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     509             :   false,  /* isTypedMethod.  Only relevant for methods. */
     510             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     511             : };
     512             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     513             : static_assert(0 < 1, "There is no slot for us");
     514             : 
     515             : static bool
     516           0 : isSorted(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     517             : {
     518           0 :   bool result(self->IsSorted());
     519           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     520           0 :   args.rval().setBoolean(result);
     521           0 :   return true;
     522             : }
     523             : 
     524             : static const JSJitInfo isSorted_methodinfo = {
     525             :   { (JSJitGetterOp)isSorted },
     526             :   { prototypes::id::TreeContentView },
     527             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     528             :   JSJitInfo::Method,
     529             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     530             :   JSVAL_TYPE_BOOLEAN,  /* returnType.  Not relevant for setters. */
     531             :   true,  /* isInfallible. False in setters. */
     532             :   false,  /* isMovable.  Not relevant for setters. */
     533             :   false, /* isEliminatable.  Not relevant for setters. */
     534             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     535             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     536             :   false,  /* isTypedMethod.  Only relevant for methods. */
     537             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     538             : };
     539             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     540             : static_assert(0 < 1, "There is no slot for us");
     541             : 
     542             : static bool
     543           0 : canDrop(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     544             : {
     545           0 :   if (MOZ_UNLIKELY(args.length() < 3)) {
     546           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.canDrop");
     547             :   }
     548             :   int32_t arg0;
     549           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     550           0 :     return false;
     551             :   }
     552             :   int32_t arg1;
     553           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[1], &arg1)) {
     554           0 :     return false;
     555             :   }
     556             :   mozilla::dom::DataTransfer* arg2;
     557           0 :   if (args[2].isObject()) {
     558             :     {
     559           0 :       nsresult rv = UnwrapObject<prototypes::id::DataTransfer, mozilla::dom::DataTransfer>(args[2], arg2);
     560           0 :       if (NS_FAILED(rv)) {
     561           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 3 of TreeContentView.canDrop", "DataTransfer");
     562           0 :         return false;
     563             :       }
     564             :     }
     565           0 :   } else if (args[2].isNullOrUndefined()) {
     566           0 :     arg2 = nullptr;
     567             :   } else {
     568           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 3 of TreeContentView.canDrop");
     569           0 :     return false;
     570             :   }
     571           0 :   binding_detail::FastErrorResult rv;
     572           0 :   bool result(self->CanDrop(arg0, arg1, Constify(arg2), rv));
     573           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     574           0 :     return false;
     575             :   }
     576           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     577           0 :   args.rval().setBoolean(result);
     578           0 :   return true;
     579             : }
     580             : 
     581             : static const JSJitInfo canDrop_methodinfo = {
     582             :   { (JSJitGetterOp)canDrop },
     583             :   { prototypes::id::TreeContentView },
     584             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     585             :   JSJitInfo::Method,
     586             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     587             :   JSVAL_TYPE_BOOLEAN,  /* returnType.  Not relevant for setters. */
     588             :   false,  /* isInfallible. False in setters. */
     589             :   false,  /* isMovable.  Not relevant for setters. */
     590             :   false, /* isEliminatable.  Not relevant for setters. */
     591             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     592             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     593             :   false,  /* isTypedMethod.  Only relevant for methods. */
     594             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     595             : };
     596             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     597             : static_assert(0 < 1, "There is no slot for us");
     598             : 
     599             : static bool
     600           0 : drop(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     601             : {
     602           0 :   if (MOZ_UNLIKELY(args.length() < 3)) {
     603           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.drop");
     604             :   }
     605             :   int32_t arg0;
     606           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     607           0 :     return false;
     608             :   }
     609             :   int32_t arg1;
     610           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[1], &arg1)) {
     611           0 :     return false;
     612             :   }
     613             :   mozilla::dom::DataTransfer* arg2;
     614           0 :   if (args[2].isObject()) {
     615             :     {
     616           0 :       nsresult rv = UnwrapObject<prototypes::id::DataTransfer, mozilla::dom::DataTransfer>(args[2], arg2);
     617           0 :       if (NS_FAILED(rv)) {
     618           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 3 of TreeContentView.drop", "DataTransfer");
     619           0 :         return false;
     620             :       }
     621             :     }
     622           0 :   } else if (args[2].isNullOrUndefined()) {
     623           0 :     arg2 = nullptr;
     624             :   } else {
     625           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 3 of TreeContentView.drop");
     626           0 :     return false;
     627             :   }
     628           0 :   binding_detail::FastErrorResult rv;
     629           0 :   self->Drop(arg0, arg1, Constify(arg2), rv);
     630           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     631           0 :     return false;
     632             :   }
     633           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     634           0 :   args.rval().setUndefined();
     635           0 :   return true;
     636             : }
     637             : 
     638             : static const JSJitInfo drop_methodinfo = {
     639             :   { (JSJitGetterOp)drop },
     640             :   { prototypes::id::TreeContentView },
     641             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     642             :   JSJitInfo::Method,
     643             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     644             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
     645             :   false,  /* isInfallible. False in setters. */
     646             :   false,  /* isMovable.  Not relevant for setters. */
     647             :   false, /* isEliminatable.  Not relevant for setters. */
     648             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     649             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     650             :   false,  /* isTypedMethod.  Only relevant for methods. */
     651             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     652             : };
     653             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     654             : static_assert(0 < 1, "There is no slot for us");
     655             : 
     656             : static bool
     657           0 : getParentIndex(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     658             : {
     659           0 :   if (MOZ_UNLIKELY(args.length() < 1)) {
     660           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.getParentIndex");
     661             :   }
     662             :   int32_t arg0;
     663           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     664           0 :     return false;
     665             :   }
     666           0 :   binding_detail::FastErrorResult rv;
     667           0 :   int32_t result(self->GetParentIndex(arg0, rv));
     668           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     669           0 :     return false;
     670             :   }
     671           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     672           0 :   args.rval().setInt32(int32_t(result));
     673           0 :   return true;
     674             : }
     675             : 
     676             : static const JSJitInfo getParentIndex_methodinfo = {
     677             :   { (JSJitGetterOp)getParentIndex },
     678             :   { prototypes::id::TreeContentView },
     679             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     680             :   JSJitInfo::Method,
     681             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     682             :   JSVAL_TYPE_INT32,  /* returnType.  Not relevant for setters. */
     683             :   false,  /* isInfallible. False in setters. */
     684             :   false,  /* isMovable.  Not relevant for setters. */
     685             :   false, /* isEliminatable.  Not relevant for setters. */
     686             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     687             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     688             :   false,  /* isTypedMethod.  Only relevant for methods. */
     689             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     690             : };
     691             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     692             : static_assert(0 < 1, "There is no slot for us");
     693             : 
     694             : static bool
     695           0 : hasNextSibling(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     696             : {
     697           0 :   if (MOZ_UNLIKELY(args.length() < 2)) {
     698           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.hasNextSibling");
     699             :   }
     700             :   int32_t arg0;
     701           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     702           0 :     return false;
     703             :   }
     704             :   int32_t arg1;
     705           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[1], &arg1)) {
     706           0 :     return false;
     707             :   }
     708           0 :   binding_detail::FastErrorResult rv;
     709           0 :   bool result(self->HasNextSibling(arg0, arg1, rv));
     710           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     711           0 :     return false;
     712             :   }
     713           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     714           0 :   args.rval().setBoolean(result);
     715           0 :   return true;
     716             : }
     717             : 
     718             : static const JSJitInfo hasNextSibling_methodinfo = {
     719             :   { (JSJitGetterOp)hasNextSibling },
     720             :   { prototypes::id::TreeContentView },
     721             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     722             :   JSJitInfo::Method,
     723             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     724             :   JSVAL_TYPE_BOOLEAN,  /* returnType.  Not relevant for setters. */
     725             :   false,  /* isInfallible. False in setters. */
     726             :   false,  /* isMovable.  Not relevant for setters. */
     727             :   false, /* isEliminatable.  Not relevant for setters. */
     728             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     729             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     730             :   false,  /* isTypedMethod.  Only relevant for methods. */
     731             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     732             : };
     733             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     734             : static_assert(0 < 1, "There is no slot for us");
     735             : 
     736             : static bool
     737           0 : getLevel(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     738             : {
     739           0 :   if (MOZ_UNLIKELY(args.length() < 1)) {
     740           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.getLevel");
     741             :   }
     742             :   int32_t arg0;
     743           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     744           0 :     return false;
     745             :   }
     746           0 :   binding_detail::FastErrorResult rv;
     747           0 :   int32_t result(self->GetLevel(arg0, rv));
     748           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     749           0 :     return false;
     750             :   }
     751           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     752           0 :   args.rval().setInt32(int32_t(result));
     753           0 :   return true;
     754             : }
     755             : 
     756             : static const JSJitInfo getLevel_methodinfo = {
     757             :   { (JSJitGetterOp)getLevel },
     758             :   { prototypes::id::TreeContentView },
     759             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     760             :   JSJitInfo::Method,
     761             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     762             :   JSVAL_TYPE_INT32,  /* returnType.  Not relevant for setters. */
     763             :   false,  /* isInfallible. False in setters. */
     764             :   false,  /* isMovable.  Not relevant for setters. */
     765             :   false, /* isEliminatable.  Not relevant for setters. */
     766             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     767             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     768             :   false,  /* isTypedMethod.  Only relevant for methods. */
     769             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     770             : };
     771             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     772             : static_assert(0 < 1, "There is no slot for us");
     773             : 
     774             : static bool
     775           0 : getImageSrc(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     776             : {
     777           0 :   if (MOZ_UNLIKELY(args.length() < 2)) {
     778           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.getImageSrc");
     779             :   }
     780             :   int32_t arg0;
     781           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     782           0 :     return false;
     783             :   }
     784           0 :   NonNull<nsTreeColumn> arg1;
     785           0 :   if (args[1].isObject()) {
     786             :     {
     787           0 :       nsresult rv = UnwrapObject<prototypes::id::TreeColumn, nsTreeColumn>(args[1], arg1);
     788           0 :       if (NS_FAILED(rv)) {
     789           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 2 of TreeContentView.getImageSrc", "TreeColumn");
     790           0 :         return false;
     791             :       }
     792             :     }
     793             :   } else {
     794           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 2 of TreeContentView.getImageSrc");
     795           0 :     return false;
     796             :   }
     797           0 :   binding_detail::FastErrorResult rv;
     798           0 :   DOMString result;
     799           0 :   self->GetImageSrc(arg0, NonNullHelper(arg1), result, rv);
     800           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     801           0 :     return false;
     802             :   }
     803           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     804           0 :   if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
     805           0 :     return false;
     806             :   }
     807           0 :   return true;
     808             : }
     809             : 
     810             : static const JSJitInfo getImageSrc_methodinfo = {
     811             :   { (JSJitGetterOp)getImageSrc },
     812             :   { prototypes::id::TreeContentView },
     813             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     814             :   JSJitInfo::Method,
     815             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     816             :   JSVAL_TYPE_STRING,  /* returnType.  Not relevant for setters. */
     817             :   false,  /* isInfallible. False in setters. */
     818             :   false,  /* isMovable.  Not relevant for setters. */
     819             :   false, /* isEliminatable.  Not relevant for setters. */
     820             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     821             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     822             :   false,  /* isTypedMethod.  Only relevant for methods. */
     823             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     824             : };
     825             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     826             : static_assert(0 < 1, "There is no slot for us");
     827             : 
     828             : static bool
     829           0 : getProgressMode(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     830             : {
     831           0 :   if (MOZ_UNLIKELY(args.length() < 2)) {
     832           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.getProgressMode");
     833             :   }
     834             :   int32_t arg0;
     835           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     836           0 :     return false;
     837             :   }
     838           0 :   NonNull<nsTreeColumn> arg1;
     839           0 :   if (args[1].isObject()) {
     840             :     {
     841           0 :       nsresult rv = UnwrapObject<prototypes::id::TreeColumn, nsTreeColumn>(args[1], arg1);
     842           0 :       if (NS_FAILED(rv)) {
     843           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 2 of TreeContentView.getProgressMode", "TreeColumn");
     844           0 :         return false;
     845             :       }
     846             :     }
     847             :   } else {
     848           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 2 of TreeContentView.getProgressMode");
     849           0 :     return false;
     850             :   }
     851           0 :   binding_detail::FastErrorResult rv;
     852           0 :   int32_t result(self->GetProgressMode(arg0, NonNullHelper(arg1), rv));
     853           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     854           0 :     return false;
     855             :   }
     856           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     857           0 :   args.rval().setInt32(int32_t(result));
     858           0 :   return true;
     859             : }
     860             : 
     861             : static const JSJitInfo getProgressMode_methodinfo = {
     862             :   { (JSJitGetterOp)getProgressMode },
     863             :   { prototypes::id::TreeContentView },
     864             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     865             :   JSJitInfo::Method,
     866             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     867             :   JSVAL_TYPE_INT32,  /* returnType.  Not relevant for setters. */
     868             :   false,  /* isInfallible. False in setters. */
     869             :   false,  /* isMovable.  Not relevant for setters. */
     870             :   false, /* isEliminatable.  Not relevant for setters. */
     871             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     872             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     873             :   false,  /* isTypedMethod.  Only relevant for methods. */
     874             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     875             : };
     876             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     877             : static_assert(0 < 1, "There is no slot for us");
     878             : 
     879             : static bool
     880           0 : getCellValue(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     881             : {
     882           0 :   if (MOZ_UNLIKELY(args.length() < 2)) {
     883           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.getCellValue");
     884             :   }
     885             :   int32_t arg0;
     886           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     887           0 :     return false;
     888             :   }
     889           0 :   NonNull<nsTreeColumn> arg1;
     890           0 :   if (args[1].isObject()) {
     891             :     {
     892           0 :       nsresult rv = UnwrapObject<prototypes::id::TreeColumn, nsTreeColumn>(args[1], arg1);
     893           0 :       if (NS_FAILED(rv)) {
     894           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 2 of TreeContentView.getCellValue", "TreeColumn");
     895           0 :         return false;
     896             :       }
     897             :     }
     898             :   } else {
     899           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 2 of TreeContentView.getCellValue");
     900           0 :     return false;
     901             :   }
     902           0 :   binding_detail::FastErrorResult rv;
     903           0 :   DOMString result;
     904           0 :   self->GetCellValue(arg0, NonNullHelper(arg1), result, rv);
     905           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     906           0 :     return false;
     907             :   }
     908           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     909           0 :   if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
     910           0 :     return false;
     911             :   }
     912           0 :   return true;
     913             : }
     914             : 
     915             : static const JSJitInfo getCellValue_methodinfo = {
     916             :   { (JSJitGetterOp)getCellValue },
     917             :   { prototypes::id::TreeContentView },
     918             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     919             :   JSJitInfo::Method,
     920             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     921             :   JSVAL_TYPE_STRING,  /* returnType.  Not relevant for setters. */
     922             :   false,  /* isInfallible. False in setters. */
     923             :   false,  /* isMovable.  Not relevant for setters. */
     924             :   false, /* isEliminatable.  Not relevant for setters. */
     925             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     926             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     927             :   false,  /* isTypedMethod.  Only relevant for methods. */
     928             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     929             : };
     930             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     931             : static_assert(0 < 1, "There is no slot for us");
     932             : 
     933             : static bool
     934           0 : getCellText(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     935             : {
     936           0 :   if (MOZ_UNLIKELY(args.length() < 2)) {
     937           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.getCellText");
     938             :   }
     939             :   int32_t arg0;
     940           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
     941           0 :     return false;
     942             :   }
     943           0 :   NonNull<nsTreeColumn> arg1;
     944           0 :   if (args[1].isObject()) {
     945             :     {
     946           0 :       nsresult rv = UnwrapObject<prototypes::id::TreeColumn, nsTreeColumn>(args[1], arg1);
     947           0 :       if (NS_FAILED(rv)) {
     948           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 2 of TreeContentView.getCellText", "TreeColumn");
     949           0 :         return false;
     950             :       }
     951             :     }
     952             :   } else {
     953           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 2 of TreeContentView.getCellText");
     954           0 :     return false;
     955             :   }
     956           0 :   binding_detail::FastErrorResult rv;
     957           0 :   DOMString result;
     958           0 :   self->GetCellText(arg0, NonNullHelper(arg1), result, rv);
     959           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
     960           0 :     return false;
     961             :   }
     962           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
     963           0 :   if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
     964           0 :     return false;
     965             :   }
     966           0 :   return true;
     967             : }
     968             : 
     969             : static const JSJitInfo getCellText_methodinfo = {
     970             :   { (JSJitGetterOp)getCellText },
     971             :   { prototypes::id::TreeContentView },
     972             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
     973             :   JSJitInfo::Method,
     974             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
     975             :   JSVAL_TYPE_STRING,  /* returnType.  Not relevant for setters. */
     976             :   false,  /* isInfallible. False in setters. */
     977             :   false,  /* isMovable.  Not relevant for setters. */
     978             :   false, /* isEliminatable.  Not relevant for setters. */
     979             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
     980             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
     981             :   false,  /* isTypedMethod.  Only relevant for methods. */
     982             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
     983             : };
     984             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
     985             : static_assert(0 < 1, "There is no slot for us");
     986             : 
     987             : static bool
     988           0 : setTree(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
     989             : {
     990           0 :   if (MOZ_UNLIKELY(args.length() < 1)) {
     991           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.setTree");
     992             :   }
     993             :   mozilla::dom::TreeBoxObject* arg0;
     994           0 :   if (args[0].isObject()) {
     995             :     {
     996           0 :       nsresult rv = UnwrapObject<prototypes::id::TreeBoxObject, mozilla::dom::TreeBoxObject>(args[0], arg0);
     997           0 :       if (NS_FAILED(rv)) {
     998           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 1 of TreeContentView.setTree", "TreeBoxObject");
     999           0 :         return false;
    1000             :       }
    1001             :     }
    1002           0 :   } else if (args[0].isNullOrUndefined()) {
    1003           0 :     arg0 = nullptr;
    1004             :   } else {
    1005           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 1 of TreeContentView.setTree");
    1006           0 :     return false;
    1007             :   }
    1008           0 :   binding_detail::FastErrorResult rv;
    1009           0 :   self->SetTree(Constify(arg0), rv);
    1010           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    1011           0 :     return false;
    1012             :   }
    1013           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1014           0 :   args.rval().setUndefined();
    1015           0 :   return true;
    1016             : }
    1017             : 
    1018             : static const JSJitInfo setTree_methodinfo = {
    1019             :   { (JSJitGetterOp)setTree },
    1020             :   { prototypes::id::TreeContentView },
    1021             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
    1022             :   JSJitInfo::Method,
    1023             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1024             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1025             :   false,  /* isInfallible. False in setters. */
    1026             :   false,  /* isMovable.  Not relevant for setters. */
    1027             :   false, /* isEliminatable.  Not relevant for setters. */
    1028             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1029             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1030             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1031             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1032             : };
    1033             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1034             : static_assert(0 < 1, "There is no slot for us");
    1035             : 
    1036             : static bool
    1037           0 : toggleOpenState(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
    1038             : {
    1039           0 :   if (MOZ_UNLIKELY(args.length() < 1)) {
    1040           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.toggleOpenState");
    1041             :   }
    1042             :   int32_t arg0;
    1043           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
    1044           0 :     return false;
    1045             :   }
    1046           0 :   binding_detail::FastErrorResult rv;
    1047           0 :   self->ToggleOpenState(arg0, rv);
    1048           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    1049           0 :     return false;
    1050             :   }
    1051           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1052           0 :   args.rval().setUndefined();
    1053           0 :   return true;
    1054             : }
    1055             : 
    1056             : static const JSJitInfo toggleOpenState_methodinfo = {
    1057             :   { (JSJitGetterOp)toggleOpenState },
    1058             :   { prototypes::id::TreeContentView },
    1059             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
    1060             :   JSJitInfo::Method,
    1061             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1062             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1063             :   false,  /* isInfallible. False in setters. */
    1064             :   false,  /* isMovable.  Not relevant for setters. */
    1065             :   false, /* isEliminatable.  Not relevant for setters. */
    1066             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1067             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1068             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1069             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1070             : };
    1071             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1072             : static_assert(0 < 1, "There is no slot for us");
    1073             : 
    1074             : static bool
    1075           0 : cycleHeader(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
    1076             : {
    1077           0 :   if (MOZ_UNLIKELY(args.length() < 1)) {
    1078           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.cycleHeader");
    1079             :   }
    1080           0 :   NonNull<nsTreeColumn> arg0;
    1081           0 :   if (args[0].isObject()) {
    1082             :     {
    1083           0 :       nsresult rv = UnwrapObject<prototypes::id::TreeColumn, nsTreeColumn>(args[0], arg0);
    1084           0 :       if (NS_FAILED(rv)) {
    1085           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 1 of TreeContentView.cycleHeader", "TreeColumn");
    1086           0 :         return false;
    1087             :       }
    1088             :     }
    1089             :   } else {
    1090           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 1 of TreeContentView.cycleHeader");
    1091           0 :     return false;
    1092             :   }
    1093           0 :   binding_detail::FastErrorResult rv;
    1094           0 :   self->CycleHeader(NonNullHelper(arg0), rv);
    1095           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    1096           0 :     return false;
    1097             :   }
    1098           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1099           0 :   args.rval().setUndefined();
    1100           0 :   return true;
    1101             : }
    1102             : 
    1103             : static const JSJitInfo cycleHeader_methodinfo = {
    1104             :   { (JSJitGetterOp)cycleHeader },
    1105             :   { prototypes::id::TreeContentView },
    1106             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
    1107             :   JSJitInfo::Method,
    1108             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1109             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1110             :   false,  /* isInfallible. False in setters. */
    1111             :   false,  /* isMovable.  Not relevant for setters. */
    1112             :   false, /* isEliminatable.  Not relevant for setters. */
    1113             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1114             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1115             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1116             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1117             : };
    1118             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1119             : static_assert(0 < 1, "There is no slot for us");
    1120             : 
    1121             : static bool
    1122           0 : selectionChanged(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
    1123             : {
    1124           0 :   self->SelectionChanged();
    1125           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1126           0 :   args.rval().setUndefined();
    1127           0 :   return true;
    1128             : }
    1129             : 
    1130             : static const JSJitInfo selectionChanged_methodinfo = {
    1131             :   { (JSJitGetterOp)selectionChanged },
    1132             :   { prototypes::id::TreeContentView },
    1133             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
    1134             :   JSJitInfo::Method,
    1135             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1136             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1137             :   true,  /* isInfallible. False in setters. */
    1138             :   false,  /* isMovable.  Not relevant for setters. */
    1139             :   false, /* isEliminatable.  Not relevant for setters. */
    1140             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1141             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1142             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1143             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1144             : };
    1145             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1146             : static_assert(0 < 1, "There is no slot for us");
    1147             : 
    1148             : static bool
    1149           0 : cycleCell(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
    1150             : {
    1151           0 :   if (MOZ_UNLIKELY(args.length() < 2)) {
    1152           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.cycleCell");
    1153             :   }
    1154             :   int32_t arg0;
    1155           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
    1156           0 :     return false;
    1157             :   }
    1158           0 :   NonNull<nsTreeColumn> arg1;
    1159           0 :   if (args[1].isObject()) {
    1160             :     {
    1161           0 :       nsresult rv = UnwrapObject<prototypes::id::TreeColumn, nsTreeColumn>(args[1], arg1);
    1162           0 :       if (NS_FAILED(rv)) {
    1163           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 2 of TreeContentView.cycleCell", "TreeColumn");
    1164           0 :         return false;
    1165             :       }
    1166             :     }
    1167             :   } else {
    1168           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 2 of TreeContentView.cycleCell");
    1169           0 :     return false;
    1170             :   }
    1171           0 :   self->CycleCell(arg0, NonNullHelper(arg1));
    1172           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1173           0 :   args.rval().setUndefined();
    1174           0 :   return true;
    1175             : }
    1176             : 
    1177             : static const JSJitInfo cycleCell_methodinfo = {
    1178             :   { (JSJitGetterOp)cycleCell },
    1179             :   { prototypes::id::TreeContentView },
    1180             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
    1181             :   JSJitInfo::Method,
    1182             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1183             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1184             :   false,  /* isInfallible. False in setters. */
    1185             :   false,  /* isMovable.  Not relevant for setters. */
    1186             :   false, /* isEliminatable.  Not relevant for setters. */
    1187             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1188             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1189             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1190             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1191             : };
    1192             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1193             : static_assert(0 < 1, "There is no slot for us");
    1194             : 
    1195             : static bool
    1196           0 : isEditable(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
    1197             : {
    1198           0 :   if (MOZ_UNLIKELY(args.length() < 2)) {
    1199           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.isEditable");
    1200             :   }
    1201             :   int32_t arg0;
    1202           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
    1203           0 :     return false;
    1204             :   }
    1205           0 :   NonNull<nsTreeColumn> arg1;
    1206           0 :   if (args[1].isObject()) {
    1207             :     {
    1208           0 :       nsresult rv = UnwrapObject<prototypes::id::TreeColumn, nsTreeColumn>(args[1], arg1);
    1209           0 :       if (NS_FAILED(rv)) {
    1210           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 2 of TreeContentView.isEditable", "TreeColumn");
    1211           0 :         return false;
    1212             :       }
    1213             :     }
    1214             :   } else {
    1215           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 2 of TreeContentView.isEditable");
    1216           0 :     return false;
    1217             :   }
    1218           0 :   binding_detail::FastErrorResult rv;
    1219           0 :   bool result(self->IsEditable(arg0, NonNullHelper(arg1), rv));
    1220           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    1221           0 :     return false;
    1222             :   }
    1223           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1224           0 :   args.rval().setBoolean(result);
    1225           0 :   return true;
    1226             : }
    1227             : 
    1228             : static const JSJitInfo isEditable_methodinfo = {
    1229             :   { (JSJitGetterOp)isEditable },
    1230             :   { prototypes::id::TreeContentView },
    1231             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
    1232             :   JSJitInfo::Method,
    1233             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1234             :   JSVAL_TYPE_BOOLEAN,  /* returnType.  Not relevant for setters. */
    1235             :   false,  /* isInfallible. False in setters. */
    1236             :   false,  /* isMovable.  Not relevant for setters. */
    1237             :   false, /* isEliminatable.  Not relevant for setters. */
    1238             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1239             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1240             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1241             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1242             : };
    1243             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1244             : static_assert(0 < 1, "There is no slot for us");
    1245             : 
    1246             : static bool
    1247           0 : isSelectable(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
    1248             : {
    1249           0 :   if (MOZ_UNLIKELY(args.length() < 2)) {
    1250           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.isSelectable");
    1251             :   }
    1252             :   int32_t arg0;
    1253           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
    1254           0 :     return false;
    1255             :   }
    1256           0 :   NonNull<nsTreeColumn> arg1;
    1257           0 :   if (args[1].isObject()) {
    1258             :     {
    1259           0 :       nsresult rv = UnwrapObject<prototypes::id::TreeColumn, nsTreeColumn>(args[1], arg1);
    1260           0 :       if (NS_FAILED(rv)) {
    1261           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 2 of TreeContentView.isSelectable", "TreeColumn");
    1262           0 :         return false;
    1263             :       }
    1264             :     }
    1265             :   } else {
    1266           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 2 of TreeContentView.isSelectable");
    1267           0 :     return false;
    1268             :   }
    1269           0 :   binding_detail::FastErrorResult rv;
    1270           0 :   bool result(self->IsSelectable(arg0, NonNullHelper(arg1), rv));
    1271           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    1272           0 :     return false;
    1273             :   }
    1274           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1275           0 :   args.rval().setBoolean(result);
    1276           0 :   return true;
    1277             : }
    1278             : 
    1279             : static const JSJitInfo isSelectable_methodinfo = {
    1280             :   { (JSJitGetterOp)isSelectable },
    1281             :   { prototypes::id::TreeContentView },
    1282             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
    1283             :   JSJitInfo::Method,
    1284             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1285             :   JSVAL_TYPE_BOOLEAN,  /* returnType.  Not relevant for setters. */
    1286             :   false,  /* isInfallible. False in setters. */
    1287             :   false,  /* isMovable.  Not relevant for setters. */
    1288             :   false, /* isEliminatable.  Not relevant for setters. */
    1289             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1290             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1291             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1292             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1293             : };
    1294             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1295             : static_assert(0 < 1, "There is no slot for us");
    1296             : 
    1297             : static bool
    1298           0 : setCellValue(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
    1299             : {
    1300           0 :   if (MOZ_UNLIKELY(args.length() < 3)) {
    1301           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.setCellValue");
    1302             :   }
    1303             :   int32_t arg0;
    1304           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
    1305           0 :     return false;
    1306             :   }
    1307           0 :   NonNull<nsTreeColumn> arg1;
    1308           0 :   if (args[1].isObject()) {
    1309             :     {
    1310           0 :       nsresult rv = UnwrapObject<prototypes::id::TreeColumn, nsTreeColumn>(args[1], arg1);
    1311           0 :       if (NS_FAILED(rv)) {
    1312           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 2 of TreeContentView.setCellValue", "TreeColumn");
    1313           0 :         return false;
    1314             :       }
    1315             :     }
    1316             :   } else {
    1317           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 2 of TreeContentView.setCellValue");
    1318           0 :     return false;
    1319             :   }
    1320           0 :   binding_detail::FakeString arg2;
    1321           0 :   if (!ConvertJSValueToString(cx, args[2], eStringify, eStringify, arg2)) {
    1322           0 :     return false;
    1323             :   }
    1324           0 :   binding_detail::FastErrorResult rv;
    1325           0 :   self->SetCellValue(arg0, NonNullHelper(arg1), NonNullHelper(Constify(arg2)), rv);
    1326           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    1327           0 :     return false;
    1328             :   }
    1329           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1330           0 :   args.rval().setUndefined();
    1331           0 :   return true;
    1332             : }
    1333             : 
    1334             : static const JSJitInfo setCellValue_methodinfo = {
    1335             :   { (JSJitGetterOp)setCellValue },
    1336             :   { prototypes::id::TreeContentView },
    1337             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
    1338             :   JSJitInfo::Method,
    1339             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1340             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1341             :   false,  /* isInfallible. False in setters. */
    1342             :   false,  /* isMovable.  Not relevant for setters. */
    1343             :   false, /* isEliminatable.  Not relevant for setters. */
    1344             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1345             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1346             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1347             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1348             : };
    1349             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1350             : static_assert(0 < 1, "There is no slot for us");
    1351             : 
    1352             : static bool
    1353           0 : setCellText(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
    1354             : {
    1355           0 :   if (MOZ_UNLIKELY(args.length() < 3)) {
    1356           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.setCellText");
    1357             :   }
    1358             :   int32_t arg0;
    1359           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], &arg0)) {
    1360           0 :     return false;
    1361             :   }
    1362           0 :   NonNull<nsTreeColumn> arg1;
    1363           0 :   if (args[1].isObject()) {
    1364             :     {
    1365           0 :       nsresult rv = UnwrapObject<prototypes::id::TreeColumn, nsTreeColumn>(args[1], arg1);
    1366           0 :       if (NS_FAILED(rv)) {
    1367           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 2 of TreeContentView.setCellText", "TreeColumn");
    1368           0 :         return false;
    1369             :       }
    1370             :     }
    1371             :   } else {
    1372           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 2 of TreeContentView.setCellText");
    1373           0 :     return false;
    1374             :   }
    1375           0 :   binding_detail::FakeString arg2;
    1376           0 :   if (!ConvertJSValueToString(cx, args[2], eStringify, eStringify, arg2)) {
    1377           0 :     return false;
    1378             :   }
    1379           0 :   binding_detail::FastErrorResult rv;
    1380           0 :   self->SetCellText(arg0, NonNullHelper(arg1), NonNullHelper(Constify(arg2)), rv);
    1381           0 :   if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
    1382           0 :     return false;
    1383             :   }
    1384           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1385           0 :   args.rval().setUndefined();
    1386           0 :   return true;
    1387             : }
    1388             : 
    1389             : static const JSJitInfo setCellText_methodinfo = {
    1390             :   { (JSJitGetterOp)setCellText },
    1391             :   { prototypes::id::TreeContentView },
    1392             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
    1393             :   JSJitInfo::Method,
    1394             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1395             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1396             :   false,  /* isInfallible. False in setters. */
    1397             :   false,  /* isMovable.  Not relevant for setters. */
    1398             :   false, /* isEliminatable.  Not relevant for setters. */
    1399             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1400             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1401             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1402             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1403             : };
    1404             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1405             : static_assert(0 < 1, "There is no slot for us");
    1406             : 
    1407             : static bool
    1408           0 : performAction(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
    1409             : {
    1410           0 :   if (MOZ_UNLIKELY(args.length() < 1)) {
    1411           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.performAction");
    1412             :   }
    1413           0 :   binding_detail::FakeString arg0;
    1414           0 :   if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
    1415           0 :     return false;
    1416             :   }
    1417           0 :   self->PerformAction(NonNullHelper(Constify(arg0)));
    1418           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1419           0 :   args.rval().setUndefined();
    1420           0 :   return true;
    1421             : }
    1422             : 
    1423             : static const JSJitInfo performAction_methodinfo = {
    1424             :   { (JSJitGetterOp)performAction },
    1425             :   { prototypes::id::TreeContentView },
    1426             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
    1427             :   JSJitInfo::Method,
    1428             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1429             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1430             :   false,  /* isInfallible. False in setters. */
    1431             :   false,  /* isMovable.  Not relevant for setters. */
    1432             :   false, /* isEliminatable.  Not relevant for setters. */
    1433             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1434             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1435             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1436             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1437             : };
    1438             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1439             : static_assert(0 < 1, "There is no slot for us");
    1440             : 
    1441             : static bool
    1442           0 : performActionOnRow(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
    1443             : {
    1444           0 :   if (MOZ_UNLIKELY(args.length() < 2)) {
    1445           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.performActionOnRow");
    1446             :   }
    1447           0 :   binding_detail::FakeString arg0;
    1448           0 :   if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
    1449           0 :     return false;
    1450             :   }
    1451             :   int32_t arg1;
    1452           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[1], &arg1)) {
    1453           0 :     return false;
    1454             :   }
    1455           0 :   self->PerformActionOnRow(NonNullHelper(Constify(arg0)), arg1);
    1456           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1457           0 :   args.rval().setUndefined();
    1458           0 :   return true;
    1459             : }
    1460             : 
    1461             : static const JSJitInfo performActionOnRow_methodinfo = {
    1462             :   { (JSJitGetterOp)performActionOnRow },
    1463             :   { prototypes::id::TreeContentView },
    1464             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
    1465             :   JSJitInfo::Method,
    1466             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1467             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1468             :   false,  /* isInfallible. False in setters. */
    1469             :   false,  /* isMovable.  Not relevant for setters. */
    1470             :   false, /* isEliminatable.  Not relevant for setters. */
    1471             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1472             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1473             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1474             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1475             : };
    1476             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1477             : static_assert(0 < 1, "There is no slot for us");
    1478             : 
    1479             : static bool
    1480           0 : performActionOnCell(JSContext* cx, JS::Handle<JSObject*> obj, nsTreeContentView* self, const JSJitMethodCallArgs& args)
    1481             : {
    1482           0 :   if (MOZ_UNLIKELY(args.length() < 3)) {
    1483           0 :     return ThrowErrorMessage(cx, MSG_MISSING_ARGUMENTS, "TreeContentView.performActionOnCell");
    1484             :   }
    1485           0 :   binding_detail::FakeString arg0;
    1486           0 :   if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
    1487           0 :     return false;
    1488             :   }
    1489             :   int32_t arg1;
    1490           0 :   if (!ValueToPrimitive<int32_t, eDefault>(cx, args[1], &arg1)) {
    1491           0 :     return false;
    1492             :   }
    1493           0 :   NonNull<nsTreeColumn> arg2;
    1494           0 :   if (args[2].isObject()) {
    1495             :     {
    1496           0 :       nsresult rv = UnwrapObject<prototypes::id::TreeColumn, nsTreeColumn>(args[2], arg2);
    1497           0 :       if (NS_FAILED(rv)) {
    1498           0 :         ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 3 of TreeContentView.performActionOnCell", "TreeColumn");
    1499           0 :         return false;
    1500             :       }
    1501             :     }
    1502             :   } else {
    1503           0 :     ThrowErrorMessage(cx, MSG_NOT_OBJECT, "Argument 3 of TreeContentView.performActionOnCell");
    1504           0 :     return false;
    1505             :   }
    1506           0 :   self->PerformActionOnCell(NonNullHelper(Constify(arg0)), arg1, NonNullHelper(arg2));
    1507           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
    1508           0 :   args.rval().setUndefined();
    1509           0 :   return true;
    1510             : }
    1511             : 
    1512             : static const JSJitInfo performActionOnCell_methodinfo = {
    1513             :   { (JSJitGetterOp)performActionOnCell },
    1514             :   { prototypes::id::TreeContentView },
    1515             :   { PrototypeTraits<prototypes::id::TreeContentView>::Depth },
    1516             :   JSJitInfo::Method,
    1517             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
    1518             :   JSVAL_TYPE_UNDEFINED,  /* returnType.  Not relevant for setters. */
    1519             :   false,  /* isInfallible. False in setters. */
    1520             :   false,  /* isMovable.  Not relevant for setters. */
    1521             :   false, /* isEliminatable.  Not relevant for setters. */
    1522             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
    1523             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
    1524             :   false,  /* isTypedMethod.  Only relevant for methods. */
    1525             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
    1526             : };
    1527             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
    1528             : static_assert(0 < 1, "There is no slot for us");
    1529             : 
    1530             : static bool
    1531           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
    1532             : {
    1533           0 :   nsTreeContentView* self = UnwrapPossiblyNotInitializedDOMObject<nsTreeContentView>(obj);
    1534             :   // We don't want to preserve if we don't have a wrapper, and we
    1535             :   // obviously can't preserve if we're not initialized.
    1536           0 :   if (self && self->GetWrapperPreserveColor()) {
    1537           0 :     PreserveWrapper(self);
    1538             :   }
    1539           0 :   return true;
    1540             : }
    1541             : 
    1542             : static void
    1543           0 : _finalize(js::FreeOp* fop, JSObject* obj)
    1544             : {
    1545           0 :   nsTreeContentView* self = UnwrapPossiblyNotInitializedDOMObject<nsTreeContentView>(obj);
    1546           0 :   if (self) {
    1547           0 :     ClearWrapper(self, self, obj);
    1548           0 :     AddForDeferredFinalization<nsTreeContentView>(self);
    1549             :   }
    1550           0 : }
    1551             : 
    1552             : static void
    1553           0 : _objectMoved(JSObject* obj, const JSObject* old)
    1554             : {
    1555           0 :   nsTreeContentView* self = UnwrapPossiblyNotInitializedDOMObject<nsTreeContentView>(obj);
    1556           0 :   if (self) {
    1557           0 :     UpdateWrapper(self, self, obj, old);
    1558             :   }
    1559           0 : }
    1560             : 
    1561             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    1562             : #if defined(__clang__)
    1563             : #pragma clang diagnostic push
    1564             : #pragma clang diagnostic ignored "-Wmissing-braces"
    1565             : #endif
    1566             : static const JSFunctionSpec sMethods_specs[] = {
    1567             :   JS_FNSPEC("getItemAtIndex", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getItemAtIndex_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
    1568             :   JS_FNSPEC("getIndexOfItem", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getIndexOfItem_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
    1569             :   JS_FS_END,
    1570             :   JS_FNSPEC("QueryInterface", QueryInterface, nullptr, 1, 0, nullptr),
    1571             :   JS_FS_END,
    1572             :   JS_FNSPEC("getRowProperties", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getRowProperties_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
    1573             :   JS_FNSPEC("getCellProperties", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getCellProperties_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
    1574             :   JS_FNSPEC("getColumnProperties", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getColumnProperties_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
    1575             :   JS_FNSPEC("isContainer", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&isContainer_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
    1576             :   JS_FNSPEC("isContainerOpen", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&isContainerOpen_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
    1577             :   JS_FNSPEC("isContainerEmpty", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&isContainerEmpty_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
    1578             :   JS_FNSPEC("isSeparator", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&isSeparator_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
    1579             :   JS_FNSPEC("isSorted", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&isSorted_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
    1580             :   JS_FNSPEC("canDrop", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&canDrop_methodinfo), 3, JSPROP_ENUMERATE, nullptr),
    1581             :   JS_FNSPEC("drop", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&drop_methodinfo), 3, JSPROP_ENUMERATE, nullptr),
    1582             :   JS_FNSPEC("getParentIndex", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getParentIndex_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
    1583             :   JS_FNSPEC("hasNextSibling", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&hasNextSibling_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
    1584             :   JS_FNSPEC("getLevel", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getLevel_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
    1585             :   JS_FNSPEC("getImageSrc", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getImageSrc_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
    1586             :   JS_FNSPEC("getProgressMode", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getProgressMode_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
    1587             :   JS_FNSPEC("getCellValue", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getCellValue_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
    1588             :   JS_FNSPEC("getCellText", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&getCellText_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
    1589             :   JS_FNSPEC("setTree", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&setTree_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
    1590             :   JS_FNSPEC("toggleOpenState", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&toggleOpenState_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
    1591             :   JS_FNSPEC("cycleHeader", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&cycleHeader_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
    1592             :   JS_FNSPEC("selectionChanged", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&selectionChanged_methodinfo), 0, JSPROP_ENUMERATE, nullptr),
    1593             :   JS_FNSPEC("cycleCell", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&cycleCell_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
    1594             :   JS_FNSPEC("isEditable", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&isEditable_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
    1595             :   JS_FNSPEC("isSelectable", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&isSelectable_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
    1596             :   JS_FNSPEC("setCellValue", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&setCellValue_methodinfo), 3, JSPROP_ENUMERATE, nullptr),
    1597             :   JS_FNSPEC("setCellText", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&setCellText_methodinfo), 3, JSPROP_ENUMERATE, nullptr),
    1598             :   JS_FNSPEC("performAction", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&performAction_methodinfo), 1, JSPROP_ENUMERATE, nullptr),
    1599             :   JS_FNSPEC("performActionOnRow", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&performActionOnRow_methodinfo), 2, JSPROP_ENUMERATE, nullptr),
    1600             :   JS_FNSPEC("performActionOnCell", GenericBindingMethod, reinterpret_cast<const JSJitInfo*>(&performActionOnCell_methodinfo), 3, JSPROP_ENUMERATE, nullptr),
    1601             :   JS_FS_END
    1602             : };
    1603             : #if defined(__clang__)
    1604             : #pragma clang diagnostic pop
    1605             : #endif
    1606             : 
    1607             : static PrefableDisablers sMethods_disablers3 = {
    1608             :   true, false, 0, &WantsQueryInterface<nsTreeContentView>::Enabled
    1609             : };
    1610             : 
    1611             : // Can't be const because the pref-enabled boolean needs to be writable
    1612             : static Prefable<const JSFunctionSpec> sMethods[] = {
    1613             :   { nullptr, &sMethods_specs[0] },
    1614             :   { &sMethods_disablers3, &sMethods_specs[3] },
    1615             :   { nullptr, &sMethods_specs[5] },
    1616             :   { nullptr, nullptr }
    1617             : };
    1618             : 
    1619             : static_assert(3 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    1620             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    1621             : static_assert(29 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    1622             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    1623             : 
    1624             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    1625             : #if defined(__clang__)
    1626             : #pragma clang diagnostic push
    1627             : #pragma clang diagnostic ignored "-Wmissing-braces"
    1628             : #endif
    1629             : static const JSPropertySpec sAttributes_specs[] = {
    1630             :   { "rowCount", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &rowCount_getterinfo, nullptr, nullptr },
    1631             :   { "selection", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &selection_getterinfo, GenericBindingSetter, &selection_setterinfo },
    1632             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
    1633             : };
    1634             : #if defined(__clang__)
    1635             : #pragma clang diagnostic pop
    1636             : #endif
    1637             : 
    1638             : 
    1639             : // Can't be const because the pref-enabled boolean needs to be writable
    1640             : static Prefable<const JSPropertySpec> sAttributes[] = {
    1641             :   { nullptr, &sAttributes_specs[0] },
    1642             :   { nullptr, nullptr }
    1643             : };
    1644             : 
    1645             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    1646             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    1647             : static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    1648             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    1649             : 
    1650             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
    1651             : #if defined(__clang__)
    1652             : #pragma clang diagnostic push
    1653             : #pragma clang diagnostic ignored "-Wmissing-braces"
    1654             : #endif
    1655             : static const ConstantSpec sConstants_specs[] = {
    1656             :   { "DROP_BEFORE", JS::Int32Value(-1) },
    1657             :   { "DROP_ON", JS::Int32Value(0) },
    1658             :   { "DROP_AFTER", JS::Int32Value(1) },
    1659             :   { "PROGRESS_NORMAL", JS::Int32Value(1) },
    1660             :   { "PROGRESS_UNDETERMINED", JS::Int32Value(2) },
    1661             :   { "PROGRESS_NONE", JS::Int32Value(3) },
    1662             :   { 0, JS::UndefinedValue() }
    1663             : };
    1664             : #if defined(__clang__)
    1665             : #pragma clang diagnostic pop
    1666             : #endif
    1667             : 
    1668             : 
    1669             : // Can't be const because the pref-enabled boolean needs to be writable
    1670             : static Prefable<const ConstantSpec> sConstants[] = {
    1671             :   { nullptr, &sConstants_specs[0] },
    1672             :   { nullptr, nullptr }
    1673             : };
    1674             : 
    1675             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
    1676             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
    1677             : static_assert(6 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
    1678             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
    1679             : 
    1680             : 
    1681             : static uint16_t sNativeProperties_sortedPropertyIndices[40];
    1682             : static PropertyInfo sNativeProperties_propertyInfos[40];
    1683             : 
    1684             : static const NativePropertiesN<3> sNativeProperties = {
    1685             :   false, 0,
    1686             :   false, 0,
    1687             :   true,  0 /* sMethods */,
    1688             :   true,  1 /* sAttributes */,
    1689             :   false, 0,
    1690             :   false, 0,
    1691             :   true,  2 /* sConstants */,
    1692             :   -1,
    1693             :   40,
    1694             :   sNativeProperties_sortedPropertyIndices,
    1695             :   {
    1696             :     { sMethods, &sNativeProperties_propertyInfos[0] },
    1697             :     { sAttributes, &sNativeProperties_propertyInfos[32] },
    1698             :     { sConstants, &sNativeProperties_propertyInfos[34] }
    1699             :   }
    1700             : };
    1701             : static_assert(40 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
    1702             :     "We have a property info count that is oversized");
    1703             : 
    1704             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
    1705             :   {
    1706             :     "Function",
    1707             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
    1708             :     &sBoringInterfaceObjectClassClassOps,
    1709             :     JS_NULL_CLASS_SPEC,
    1710             :     JS_NULL_CLASS_EXT,
    1711             :     &sInterfaceObjectClassObjectOps
    1712             :   },
    1713             :   eInterface,
    1714             :   true,
    1715             :   prototypes::id::TreeContentView,
    1716             :   PrototypeTraits<prototypes::id::TreeContentView>::Depth,
    1717             :   sNativePropertyHooks,
    1718             :   "function TreeContentView() {\n    [native code]\n}",
    1719             :   JS::GetRealmFunctionPrototype
    1720             : };
    1721             : 
    1722             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
    1723             :   {
    1724             :     "TreeContentViewPrototype",
    1725             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
    1726             :     JS_NULL_CLASS_OPS,
    1727             :     JS_NULL_CLASS_SPEC,
    1728             :     JS_NULL_CLASS_EXT,
    1729             :     JS_NULL_OBJECT_OPS
    1730             :   },
    1731             :   eInterfacePrototype,
    1732             :   false,
    1733             :   prototypes::id::TreeContentView,
    1734             :   PrototypeTraits<prototypes::id::TreeContentView>::Depth,
    1735             :   sNativePropertyHooks,
    1736             :   "[object TreeContentViewPrototype]",
    1737             :   JS::GetRealmObjectPrototype
    1738             : };
    1739             : 
    1740             : bool
    1741           0 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj)
    1742             : {
    1743           0 :   return IsChromeOrXBL(aCx, aObj);
    1744             : }
    1745             : 
    1746             : JSObject*
    1747           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
    1748             : {
    1749           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
    1750             : }
    1751             : 
    1752             : static const js::ClassOps sClassOps = {
    1753             :   _addProperty, /* addProperty */
    1754             :   nullptr,               /* delProperty */
    1755             :   nullptr,               /* getProperty */
    1756             :   nullptr,               /* setProperty */
    1757             :   nullptr,               /* enumerate */
    1758             :   nullptr, /* newEnumerate */
    1759             :   nullptr, /* resolve */
    1760             :   nullptr, /* mayResolve */
    1761             :   _finalize, /* finalize */
    1762             :   nullptr, /* call */
    1763             :   nullptr,               /* hasInstance */
    1764             :   nullptr,               /* construct */
    1765             :   nullptr, /* trace */
    1766             : };
    1767             : 
    1768             : static const js::ClassExtension sClassExtension = {
    1769             :   nullptr, /* weakmapKeyDelegateOp */
    1770             :   _objectMoved /* objectMovedOp */
    1771             : };
    1772             : 
    1773             : static const DOMJSClass sClass = {
    1774             :   { "TreeContentView",
    1775             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
    1776             :     &sClassOps,
    1777             :     JS_NULL_CLASS_SPEC,
    1778             :     &sClassExtension,
    1779             :     JS_NULL_OBJECT_OPS
    1780             :   },
    1781             :   { prototypes::id::TreeContentView, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
    1782             :   IsBaseOf<nsISupports, nsTreeContentView >::value,
    1783             :   sNativePropertyHooks,
    1784             :   FindAssociatedGlobalForNative<nsTreeContentView>::Get,
    1785             :   GetProtoObjectHandle,
    1786             :   GetCCParticipant<nsTreeContentView>::Get()
    1787             : };
    1788             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
    1789             :               "Must have the right minimal number of reserved slots.");
    1790             : static_assert(1 >= 1,
    1791             :               "Must have enough reserved slots.");
    1792             : 
    1793             : const JSClass*
    1794           0 : GetJSClass()
    1795             : {
    1796           0 :   return sClass.ToJSClass();
    1797             : }
    1798             : 
    1799             : bool
    1800           0 : Wrap(JSContext* aCx, nsTreeContentView* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
    1801             : {
    1802             :   MOZ_ASSERT(static_cast<nsTreeContentView*>(aObject) ==
    1803             :              reinterpret_cast<nsTreeContentView*>(aObject),
    1804             :              "Multiple inheritance for nsTreeContentView is broken.");
    1805           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
    1806           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
    1807           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
    1808             :              "You should probably not be using Wrap() directly; use "
    1809             :              "GetOrCreateDOMReflector instead");
    1810             : 
    1811           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
    1812             :              "nsISupports must be on our primary inheritance chain");
    1813             : 
    1814           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
    1815           0 :   if (!global) {
    1816           0 :     return false;
    1817             :   }
    1818           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
    1819           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
    1820             : 
    1821             :   // That might have ended up wrapping us already, due to the wonders
    1822             :   // of XBL.  Check for that, and bail out as needed.
    1823           0 :   aReflector.set(aCache->GetWrapper());
    1824           0 :   if (aReflector) {
    1825             : #ifdef DEBUG
    1826           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
    1827             : #endif // DEBUG
    1828           0 :     return true;
    1829             :   }
    1830             : 
    1831           0 :   JSAutoCompartment ac(aCx, global);
    1832           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
    1833           0 :   if (!canonicalProto) {
    1834           0 :     return false;
    1835             :   }
    1836           0 :   JS::Rooted<JSObject*> proto(aCx);
    1837           0 :   if (aGivenProto) {
    1838           0 :     proto = aGivenProto;
    1839             :     // Unfortunately, while aGivenProto was in the compartment of aCx
    1840             :     // coming in, we changed compartments to that of "parent" so may need
    1841             :     // to wrap the proto here.
    1842           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
    1843           0 :       if (!JS_WrapObject(aCx, &proto)) {
    1844           0 :         return false;
    1845             :       }
    1846             :     }
    1847             :   } else {
    1848           0 :     proto = canonicalProto;
    1849             :   }
    1850             : 
    1851           0 :   BindingJSObjectCreator<nsTreeContentView> creator(aCx);
    1852           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
    1853           0 :   if (!aReflector) {
    1854           0 :     return false;
    1855             :   }
    1856             : 
    1857           0 :   aCache->SetWrapper(aReflector);
    1858           0 :   creator.InitializationSucceeded();
    1859             : 
    1860           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
    1861             :              aCache->GetWrapperPreserveColor() == aReflector);
    1862             :   // If proto != canonicalProto, we have to preserve our wrapper;
    1863             :   // otherwise we won't be able to properly recreate it later, since
    1864             :   // we won't know what proto to use.  Note that we don't check
    1865             :   // aGivenProto here, since it's entirely possible (and even
    1866             :   // somewhat common) to have a non-null aGivenProto which is the
    1867             :   // same as canonicalProto.
    1868           0 :   if (proto != canonicalProto) {
    1869           0 :     PreserveWrapper(aObject);
    1870             :   }
    1871             : 
    1872           0 :   return true;
    1873             : }
    1874             : 
    1875             : const NativePropertyHooks sNativePropertyHooks[] = { {
    1876             :   nullptr,
    1877             :   nullptr,
    1878             :   nullptr,
    1879             :   { sNativeProperties.Upcast(), nullptr },
    1880             :   prototypes::id::TreeContentView,
    1881             :   constructors::id::TreeContentView,
    1882             :   nullptr,
    1883             :   &DefaultXrayExpandoObjectClass
    1884             : } };
    1885             : 
    1886             : void
    1887           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
    1888             : {
    1889           0 :   JS::Rooted<JSObject*> parentProto(aCx, JS::GetRealmObjectPrototype(aCx));
    1890           0 :   if (!parentProto) {
    1891           0 :     return;
    1892             :   }
    1893             : 
    1894           0 :   JS::Rooted<JSObject*> constructorProto(aCx, JS::GetRealmFunctionPrototype(aCx));
    1895           0 :   if (!constructorProto) {
    1896           0 :     return;
    1897             :   }
    1898             : 
    1899             :   static bool sIdsInited = false;
    1900           0 :   if (!sIdsInited && NS_IsMainThread()) {
    1901           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
    1902           0 :       return;
    1903             :     }
    1904           0 :     sIdsInited = true;
    1905             :   }
    1906             : 
    1907           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::TreeContentView);
    1908           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::TreeContentView);
    1909           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
    1910             :                               &sPrototypeClass.mBase, protoCache,
    1911             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
    1912             :                               interfaceCache,
    1913             :                               sNativeProperties.Upcast(),
    1914             :                               nullptr,
    1915             :                               "TreeContentView", aDefineOnGlobal,
    1916             :                               nullptr,
    1917           0 :                               false);
    1918             : }
    1919             : 
    1920             : JS::Handle<JSObject*>
    1921           0 : GetProtoObjectHandle(JSContext* aCx)
    1922             : {
    1923             :   /* Get the interface prototype object for this class.  This will create the
    1924             :      object as needed. */
    1925           0 :   bool aDefineOnGlobal = true;
    1926             : 
    1927             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    1928           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    1929           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    1930           0 :     return nullptr;
    1931             :   }
    1932             : 
    1933             :   /* Check to see whether the interface objects are already installed */
    1934           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    1935           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::TreeContentView)) {
    1936           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    1937           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    1938             :   }
    1939             : 
    1940             :   /*
    1941             :    * The object might _still_ be null, but that's OK.
    1942             :    *
    1943             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    1944             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    1945             :    * changed after they have been set.
    1946             :    *
    1947             :    * Calling address() avoids the read read barrier that does gray
    1948             :    * unmarking, but it's not possible for the object to be gray here.
    1949             :    */
    1950             : 
    1951           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::TreeContentView);
    1952           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    1953           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    1954             : }
    1955             : 
    1956             : JS::Handle<JSObject*>
    1957           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
    1958             : {
    1959             :   /* Get the interface object for this class.  This will create the object as
    1960             :      needed. */
    1961             : 
    1962             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
    1963           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
    1964           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
    1965           0 :     return nullptr;
    1966             :   }
    1967             : 
    1968             :   /* Check to see whether the interface objects are already installed */
    1969           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
    1970           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::TreeContentView)) {
    1971           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
    1972           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
    1973             :   }
    1974             : 
    1975             :   /*
    1976             :    * The object might _still_ be null, but that's OK.
    1977             :    *
    1978             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
    1979             :    * traced by TraceProtoAndIfaceCache() and its contents are never
    1980             :    * changed after they have been set.
    1981             :    *
    1982             :    * Calling address() avoids the read read barrier that does gray
    1983             :    * unmarking, but it's not possible for the object to be gray here.
    1984             :    */
    1985             : 
    1986           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::TreeContentView);
    1987           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
    1988           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
    1989             : }
    1990             : 
    1991             : JSObject*
    1992           0 : GetConstructorObject(JSContext* aCx)
    1993             : {
    1994           0 :   return GetConstructorObjectHandle(aCx);
    1995             : }
    1996             : 
    1997             : } // namespace TreeContentViewBinding
    1998             : 
    1999             : 
    2000             : 
    2001             : } // namespace dom
    2002             : } // namespace mozilla

Generated by: LCOV version 1.13