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

          Line data    Source code
       1             : /* THIS FILE IS AUTOGENERATED FROM PaintRequest.webidl BY Codegen.py - DO NOT EDIT */
       2             : 
       3             : #include "PaintRequestBinding.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/DOMRect.h"
       9             : #include "mozilla/dom/NonRefcountedDOMObject.h"
      10             : #include "mozilla/dom/PaintRequest.h"
      11             : #include "mozilla/dom/XrayExpandoClass.h"
      12             : #include "nsISupports.h"
      13             : #include "xpcjsid.h"
      14             : 
      15             : namespace mozilla {
      16             : namespace dom {
      17             : 
      18             : namespace PaintRequestBinding {
      19             : 
      20             : static bool
      21           0 : get_clientRect(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PaintRequest* self, JSJitGetterCallArgs args)
      22             : {
      23           0 :   auto result(StrongOrRawPtr<mozilla::dom::DOMRect>(self->ClientRect()));
      24           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
      25           0 :   if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
      26           0 :     MOZ_ASSERT(true || JS_IsExceptionPending(cx));
      27           0 :     return false;
      28             :   }
      29           0 :   return true;
      30             : }
      31             : 
      32             : static const JSJitInfo clientRect_getterinfo = {
      33             :   { (JSJitGetterOp)get_clientRect },
      34             :   { prototypes::id::PaintRequest },
      35             :   { PrototypeTraits<prototypes::id::PaintRequest>::Depth },
      36             :   JSJitInfo::Getter,
      37             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
      38             :   JSVAL_TYPE_OBJECT,  /* returnType.  Not relevant for setters. */
      39             :   false,  /* isInfallible. False in setters. */
      40             :   false,  /* isMovable.  Not relevant for setters. */
      41             :   false, /* isEliminatable.  Not relevant for setters. */
      42             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
      43             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
      44             :   false,  /* isTypedMethod.  Only relevant for methods. */
      45             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
      46             : };
      47             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
      48             : static_assert(0 < 1, "There is no slot for us");
      49             : 
      50             : static bool
      51           0 : get_reason(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::PaintRequest* self, JSJitGetterCallArgs args)
      52             : {
      53           0 :   DOMString result;
      54           0 :   self->GetReason(result);
      55           0 :   MOZ_ASSERT(!JS_IsExceptionPending(cx));
      56           0 :   if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
      57           0 :     return false;
      58             :   }
      59           0 :   return true;
      60             : }
      61             : 
      62             : static const JSJitInfo reason_getterinfo = {
      63             :   { (JSJitGetterOp)get_reason },
      64             :   { prototypes::id::PaintRequest },
      65             :   { PrototypeTraits<prototypes::id::PaintRequest>::Depth },
      66             :   JSJitInfo::Getter,
      67             :   JSJitInfo::AliasEverything, /* aliasSet.  Not relevant for setters. */
      68             :   JSVAL_TYPE_STRING,  /* returnType.  Not relevant for setters. */
      69             :   false,  /* isInfallible. False in setters. */
      70             :   false,  /* isMovable.  Not relevant for setters. */
      71             :   false, /* isEliminatable.  Not relevant for setters. */
      72             :   false, /* isAlwaysInSlot.  Only relevant for getters. */
      73             :   false, /* isLazilyCachedInSlot.  Only relevant for getters. */
      74             :   false,  /* isTypedMethod.  Only relevant for methods. */
      75             :   0   /* Reserved slot index, if we're stored in a slot, else 0. */
      76             : };
      77             : static_assert(0 <= JSJitInfo::maxSlotIndex, "We won't fit");
      78             : static_assert(0 < 1, "There is no slot for us");
      79             : 
      80             : static bool
      81           0 : _addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
      82             : {
      83           0 :   mozilla::dom::PaintRequest* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::PaintRequest>(obj);
      84             :   // We don't want to preserve if we don't have a wrapper, and we
      85             :   // obviously can't preserve if we're not initialized.
      86           0 :   if (self && self->GetWrapperPreserveColor()) {
      87           0 :     PreserveWrapper(self);
      88             :   }
      89           0 :   return true;
      90             : }
      91             : 
      92             : static void
      93           0 : _finalize(js::FreeOp* fop, JSObject* obj)
      94             : {
      95           0 :   mozilla::dom::PaintRequest* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::PaintRequest>(obj);
      96           0 :   if (self) {
      97           0 :     ClearWrapper(self, self, obj);
      98           0 :     AddForDeferredFinalization<mozilla::dom::PaintRequest>(self);
      99             :   }
     100           0 : }
     101             : 
     102             : static void
     103           0 : _objectMoved(JSObject* obj, const JSObject* old)
     104             : {
     105           0 :   mozilla::dom::PaintRequest* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::PaintRequest>(obj);
     106           0 :   if (self) {
     107           0 :     UpdateWrapper(self, self, obj, old);
     108             :   }
     109           0 : }
     110             : 
     111             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
     112             : #if defined(__clang__)
     113             : #pragma clang diagnostic push
     114             : #pragma clang diagnostic ignored "-Wmissing-braces"
     115             : #endif
     116             : static const JSFunctionSpec sMethods_specs[] = {
     117             :   JS_FNSPEC("QueryInterface", QueryInterface, nullptr, 1, 0, nullptr),
     118             :   JS_FS_END
     119             : };
     120             : #if defined(__clang__)
     121             : #pragma clang diagnostic pop
     122             : #endif
     123             : 
     124             : static PrefableDisablers sMethods_disablers0 = {
     125             :   true, false, 0, &WantsQueryInterface<mozilla::dom::PaintRequest>::Enabled
     126             : };
     127             : 
     128             : // Can't be const because the pref-enabled boolean needs to be writable
     129             : static Prefable<const JSFunctionSpec> sMethods[] = {
     130             :   { &sMethods_disablers0, &sMethods_specs[0] },
     131             :   { nullptr, nullptr }
     132             : };
     133             : 
     134             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
     135             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
     136             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
     137             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
     138             : 
     139             : // We deliberately use brace-elision to make Visual Studio produce better initalization code.
     140             : #if defined(__clang__)
     141             : #pragma clang diagnostic push
     142             : #pragma clang diagnostic ignored "-Wmissing-braces"
     143             : #endif
     144             : static const JSPropertySpec sAttributes_specs[] = {
     145             :   { "clientRect", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &clientRect_getterinfo, nullptr, nullptr },
     146             :   { "reason", JSPROP_SHARED | JSPROP_ENUMERATE, GenericBindingGetter, &reason_getterinfo, nullptr, nullptr },
     147             :   { nullptr, 0, nullptr, nullptr, nullptr, nullptr }
     148             : };
     149             : #if defined(__clang__)
     150             : #pragma clang diagnostic pop
     151             : #endif
     152             : 
     153             : 
     154             : // Can't be const because the pref-enabled boolean needs to be writable
     155             : static Prefable<const JSPropertySpec> sAttributes[] = {
     156             :   { nullptr, &sAttributes_specs[0] },
     157             :   { nullptr, nullptr }
     158             : };
     159             : 
     160             : static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX,
     161             :     "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
     162             : static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX,
     163             :     "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
     164             : 
     165             : 
     166             : static uint16_t sNativeProperties_sortedPropertyIndices[3];
     167             : static PropertyInfo sNativeProperties_propertyInfos[3];
     168             : 
     169             : static const NativePropertiesN<2> sNativeProperties = {
     170             :   false, 0,
     171             :   false, 0,
     172             :   true,  0 /* sMethods */,
     173             :   true,  1 /* sAttributes */,
     174             :   false, 0,
     175             :   false, 0,
     176             :   false, 0,
     177             :   -1,
     178             :   3,
     179             :   sNativeProperties_sortedPropertyIndices,
     180             :   {
     181             :     { sMethods, &sNativeProperties_propertyInfos[0] },
     182             :     { sAttributes, &sNativeProperties_propertyInfos[1] }
     183             :   }
     184             : };
     185             : static_assert(3 < 1ull << CHAR_BIT * sizeof(sNativeProperties.propertyInfoCount),
     186             :     "We have a property info count that is oversized");
     187             : 
     188             : static const DOMIfaceAndProtoJSClass sInterfaceObjectClass = {
     189             :   {
     190             :     "Function",
     191             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_SLOTS_BASE),
     192             :     &sBoringInterfaceObjectClassClassOps,
     193             :     JS_NULL_CLASS_SPEC,
     194             :     JS_NULL_CLASS_EXT,
     195             :     &sInterfaceObjectClassObjectOps
     196             :   },
     197             :   eInterface,
     198             :   true,
     199             :   prototypes::id::PaintRequest,
     200             :   PrototypeTraits<prototypes::id::PaintRequest>::Depth,
     201             :   sNativePropertyHooks,
     202             :   "function PaintRequest() {\n    [native code]\n}",
     203             :   JS::GetRealmFunctionPrototype
     204             : };
     205             : 
     206             : static const DOMIfaceAndProtoJSClass sPrototypeClass = {
     207             :   {
     208             :     "PaintRequestPrototype",
     209             :     JSCLASS_IS_DOMIFACEANDPROTOJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE),
     210             :     JS_NULL_CLASS_OPS,
     211             :     JS_NULL_CLASS_SPEC,
     212             :     JS_NULL_CLASS_EXT,
     213             :     JS_NULL_OBJECT_OPS
     214             :   },
     215             :   eInterfacePrototype,
     216             :   false,
     217             :   prototypes::id::PaintRequest,
     218             :   PrototypeTraits<prototypes::id::PaintRequest>::Depth,
     219             :   sNativePropertyHooks,
     220             :   "[object PaintRequestPrototype]",
     221             :   JS::GetRealmObjectPrototype
     222             : };
     223             : 
     224             : JSObject*
     225           0 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal)
     226             : {
     227           0 :   return GetConstructorObjectHandle(aCx, aDefineOnGlobal);
     228             : }
     229             : 
     230             : static const js::ClassOps sClassOps = {
     231             :   _addProperty, /* addProperty */
     232             :   nullptr,               /* delProperty */
     233             :   nullptr,               /* getProperty */
     234             :   nullptr,               /* setProperty */
     235             :   nullptr,               /* enumerate */
     236             :   nullptr, /* newEnumerate */
     237             :   nullptr, /* resolve */
     238             :   nullptr, /* mayResolve */
     239             :   _finalize, /* finalize */
     240             :   nullptr, /* call */
     241             :   nullptr,               /* hasInstance */
     242             :   nullptr,               /* construct */
     243             :   nullptr, /* trace */
     244             : };
     245             : 
     246             : static const js::ClassExtension sClassExtension = {
     247             :   nullptr, /* weakmapKeyDelegateOp */
     248             :   _objectMoved /* objectMovedOp */
     249             : };
     250             : 
     251             : static const DOMJSClass sClass = {
     252             :   { "PaintRequest",
     253             :     JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
     254             :     &sClassOps,
     255             :     JS_NULL_CLASS_SPEC,
     256             :     &sClassExtension,
     257             :     JS_NULL_OBJECT_OPS
     258             :   },
     259             :   { prototypes::id::PaintRequest, 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 },
     260             :   IsBaseOf<nsISupports, mozilla::dom::PaintRequest >::value,
     261             :   sNativePropertyHooks,
     262             :   FindAssociatedGlobalForNative<mozilla::dom::PaintRequest>::Get,
     263             :   GetProtoObjectHandle,
     264             :   GetCCParticipant<mozilla::dom::PaintRequest>::Get()
     265             : };
     266             : static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS,
     267             :               "Must have the right minimal number of reserved slots.");
     268             : static_assert(1 >= 1,
     269             :               "Must have enough reserved slots.");
     270             : 
     271             : const JSClass*
     272           0 : GetJSClass()
     273             : {
     274           0 :   return sClass.ToJSClass();
     275             : }
     276             : 
     277             : bool
     278           0 : Wrap(JSContext* aCx, mozilla::dom::PaintRequest* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
     279             : {
     280             :   MOZ_ASSERT(static_cast<mozilla::dom::PaintRequest*>(aObject) ==
     281             :              reinterpret_cast<mozilla::dom::PaintRequest*>(aObject),
     282             :              "Multiple inheritance for mozilla::dom::PaintRequest is broken.");
     283           0 :   MOZ_ASSERT(ToSupportsIsCorrect(aObject));
     284           0 :   MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx));
     285           0 :   MOZ_ASSERT(!aCache->GetWrapper(),
     286             :              "You should probably not be using Wrap() directly; use "
     287             :              "GetOrCreateDOMReflector instead");
     288             : 
     289           0 :   MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),
     290             :              "nsISupports must be on our primary inheritance chain");
     291             : 
     292           0 :   JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
     293           0 :   if (!global) {
     294           0 :     return false;
     295             :   }
     296           0 :   MOZ_ASSERT(JS_IsGlobalObject(global));
     297           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(global));
     298             : 
     299             :   // That might have ended up wrapping us already, due to the wonders
     300             :   // of XBL.  Check for that, and bail out as needed.
     301           0 :   aReflector.set(aCache->GetWrapper());
     302           0 :   if (aReflector) {
     303             : #ifdef DEBUG
     304           0 :     binding_detail::AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
     305             : #endif // DEBUG
     306           0 :     return true;
     307             :   }
     308             : 
     309           0 :   JSAutoCompartment ac(aCx, global);
     310           0 :   JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
     311           0 :   if (!canonicalProto) {
     312           0 :     return false;
     313             :   }
     314           0 :   JS::Rooted<JSObject*> proto(aCx);
     315           0 :   if (aGivenProto) {
     316           0 :     proto = aGivenProto;
     317             :     // Unfortunately, while aGivenProto was in the compartment of aCx
     318             :     // coming in, we changed compartments to that of "parent" so may need
     319             :     // to wrap the proto here.
     320           0 :     if (js::GetContextCompartment(aCx) != js::GetObjectCompartment(proto)) {
     321           0 :       if (!JS_WrapObject(aCx, &proto)) {
     322           0 :         return false;
     323             :       }
     324             :     }
     325             :   } else {
     326           0 :     proto = canonicalProto;
     327             :   }
     328             : 
     329           0 :   BindingJSObjectCreator<mozilla::dom::PaintRequest> creator(aCx);
     330           0 :   creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
     331           0 :   if (!aReflector) {
     332           0 :     return false;
     333             :   }
     334             : 
     335           0 :   aCache->SetWrapper(aReflector);
     336           0 :   creator.InitializationSucceeded();
     337             : 
     338           0 :   MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&
     339             :              aCache->GetWrapperPreserveColor() == aReflector);
     340             :   // If proto != canonicalProto, we have to preserve our wrapper;
     341             :   // otherwise we won't be able to properly recreate it later, since
     342             :   // we won't know what proto to use.  Note that we don't check
     343             :   // aGivenProto here, since it's entirely possible (and even
     344             :   // somewhat common) to have a non-null aGivenProto which is the
     345             :   // same as canonicalProto.
     346           0 :   if (proto != canonicalProto) {
     347           0 :     PreserveWrapper(aObject);
     348             :   }
     349             : 
     350           0 :   return true;
     351             : }
     352             : 
     353             : const NativePropertyHooks sNativePropertyHooks[] = { {
     354             :   nullptr,
     355             :   nullptr,
     356             :   nullptr,
     357             :   { sNativeProperties.Upcast(), nullptr },
     358             :   prototypes::id::PaintRequest,
     359             :   constructors::id::PaintRequest,
     360             :   nullptr,
     361             :   &DefaultXrayExpandoObjectClass
     362             : } };
     363             : 
     364             : void
     365           0 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
     366             : {
     367           0 :   JS::Rooted<JSObject*> parentProto(aCx, JS::GetRealmObjectPrototype(aCx));
     368           0 :   if (!parentProto) {
     369           0 :     return;
     370             :   }
     371             : 
     372           0 :   JS::Rooted<JSObject*> constructorProto(aCx, JS::GetRealmFunctionPrototype(aCx));
     373           0 :   if (!constructorProto) {
     374           0 :     return;
     375             :   }
     376             : 
     377             :   static bool sIdsInited = false;
     378           0 :   if (!sIdsInited && NS_IsMainThread()) {
     379           0 :     if (!InitIds(aCx, sNativeProperties.Upcast())) {
     380           0 :       return;
     381             :     }
     382           0 :     sIdsInited = true;
     383             :   }
     384             : 
     385           0 :   JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::PaintRequest);
     386           0 :   JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::PaintRequest);
     387           0 :   dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
     388             :                               &sPrototypeClass.mBase, protoCache,
     389             :                               constructorProto, &sInterfaceObjectClass.mBase, 0, nullptr,
     390             :                               interfaceCache,
     391             :                               sNativeProperties.Upcast(),
     392             :                               nullptr,
     393             :                               "PaintRequest", aDefineOnGlobal,
     394             :                               nullptr,
     395           0 :                               false);
     396             : }
     397             : 
     398             : JS::Handle<JSObject*>
     399           0 : GetProtoObjectHandle(JSContext* aCx)
     400             : {
     401             :   /* Get the interface prototype object for this class.  This will create the
     402             :      object as needed. */
     403           0 :   bool aDefineOnGlobal = true;
     404             : 
     405             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
     406           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
     407           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
     408           0 :     return nullptr;
     409             :   }
     410             : 
     411             :   /* Check to see whether the interface objects are already installed */
     412           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
     413           0 :   if (!protoAndIfaceCache.HasEntryInSlot(prototypes::id::PaintRequest)) {
     414           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
     415           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
     416             :   }
     417             : 
     418             :   /*
     419             :    * The object might _still_ be null, but that's OK.
     420             :    *
     421             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
     422             :    * traced by TraceProtoAndIfaceCache() and its contents are never
     423             :    * changed after they have been set.
     424             :    *
     425             :    * Calling address() avoids the read read barrier that does gray
     426             :    * unmarking, but it's not possible for the object to be gray here.
     427             :    */
     428             : 
     429           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(prototypes::id::PaintRequest);
     430           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
     431           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
     432             : }
     433             : 
     434             : JS::Handle<JSObject*>
     435           0 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal)
     436             : {
     437             :   /* Get the interface object for this class.  This will create the object as
     438             :      needed. */
     439             : 
     440             :   /* Make sure our global is sane.  Hopefully we can remove this sometime */
     441           0 :   JSObject* global = JS::CurrentGlobalOrNull(aCx);
     442           0 :   if (!(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL)) {
     443           0 :     return nullptr;
     444             :   }
     445             : 
     446             :   /* Check to see whether the interface objects are already installed */
     447           0 :   ProtoAndIfaceCache& protoAndIfaceCache = *GetProtoAndIfaceCache(global);
     448           0 :   if (!protoAndIfaceCache.HasEntryInSlot(constructors::id::PaintRequest)) {
     449           0 :     JS::Rooted<JSObject*> rootedGlobal(aCx, global);
     450           0 :     CreateInterfaceObjects(aCx, rootedGlobal, protoAndIfaceCache, aDefineOnGlobal);
     451             :   }
     452             : 
     453             :   /*
     454             :    * The object might _still_ be null, but that's OK.
     455             :    *
     456             :    * Calling fromMarkedLocation() is safe because protoAndIfaceCache is
     457             :    * traced by TraceProtoAndIfaceCache() and its contents are never
     458             :    * changed after they have been set.
     459             :    *
     460             :    * Calling address() avoids the read read barrier that does gray
     461             :    * unmarking, but it's not possible for the object to be gray here.
     462             :    */
     463             : 
     464           0 :   const JS::Heap<JSObject*>& entrySlot = protoAndIfaceCache.EntrySlotMustExist(constructors::id::PaintRequest);
     465           0 :   MOZ_ASSERT(JS::ObjectIsNotGray(entrySlot));
     466           0 :   return JS::Handle<JSObject*>::fromMarkedLocation(entrySlot.address());
     467             : }
     468             : 
     469             : JSObject*
     470           0 : GetConstructorObject(JSContext* aCx)
     471             : {
     472           0 :   return GetConstructorObjectHandle(aCx);
     473             : }
     474             : 
     475             : } // namespace PaintRequestBinding
     476             : 
     477             : 
     478             : 
     479             : } // namespace dom
     480             : } // namespace mozilla

Generated by: LCOV version 1.13