LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom - ThreadSafeChromeUtilsBinding.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 20 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 8 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* THIS FILE IS AUTOGENERATED FROM ThreadSafeChromeUtils.webidl BY Codegen.py - DO NOT EDIT */
       2             : 
       3             : #ifndef mozilla_dom_ThreadSafeChromeUtilsBinding_h
       4             : #define mozilla_dom_ThreadSafeChromeUtilsBinding_h
       5             : 
       6             : #include "js/RootingAPI.h"
       7             : #include "jspubtd.h"
       8             : #include "mozilla/ErrorResult.h"
       9             : #include "mozilla/dom/BindingDeclarations.h"
      10             : #include "mozilla/dom/Nullable.h"
      11             : 
      12             : namespace mozilla {
      13             : namespace dom {
      14             : 
      15             : struct Base64URLDecodeOptionsAtoms;
      16             : struct Base64URLEncodeOptionsAtoms;
      17             : struct HeapSnapshotBoundariesAtoms;
      18             : struct NativePropertyHooks;
      19             : class ProtoAndIfaceCache;
      20             : class ThreadSafeChromeUtils;
      21             : struct ThreadSafeChromeUtilsAtoms;
      22             : 
      23             : } // namespace dom
      24             : } // namespace mozilla
      25             : 
      26             : namespace mozilla {
      27             : namespace dom {
      28             : 
      29             : enum class Base64URLDecodePadding : uint8_t {
      30             :   Require,
      31             :   Ignore,
      32             :   Reject,
      33             :   EndGuard_
      34             : };
      35             : 
      36             : namespace Base64URLDecodePaddingValues {
      37             : extern const EnumEntry strings[4];
      38             : } // namespace Base64URLDecodePaddingValues
      39             : 
      40             : bool
      41             : ToJSValue(JSContext* aCx, Base64URLDecodePadding aArgument, JS::MutableHandle<JS::Value> aValue);
      42             : 
      43             : 
      44             : struct Base64URLDecodeOptions : public DictionaryBase
      45             : {
      46             :   MOZ_INIT_OUTSIDE_CTOR Base64URLDecodePadding mPadding;
      47             : 
      48             :   Base64URLDecodeOptions();
      49             : 
      50           0 :   explicit inline Base64URLDecodeOptions(const FastDictionaryInitializer& )
      51           0 :   {
      52             :     // Do nothing here; this is used by our "Fast" subclass
      53           0 :   }
      54             : 
      55             :   explicit inline Base64URLDecodeOptions(const Base64URLDecodeOptions& aOther)
      56             :   {
      57             :     *this = aOther;
      58             :   }
      59             : 
      60             :   bool
      61             :   Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
      62             : 
      63             :   bool
      64             :   Init(const nsAString& aJSON);
      65             : 
      66             :   bool
      67             :   ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
      68             : 
      69             :   bool
      70             :   ToJSON(nsAString& aJSON) const;
      71             : 
      72             :   void
      73             :   TraceDictionary(JSTracer* trc);
      74             : 
      75             :   Base64URLDecodeOptions&
      76             :   operator=(const Base64URLDecodeOptions& aOther);
      77             : 
      78             : private:
      79             :   static bool
      80             :   InitIds(JSContext* cx, Base64URLDecodeOptionsAtoms* atomsCache);
      81             : };
      82             : 
      83             : namespace binding_detail {
      84             : struct FastBase64URLDecodeOptions : public Base64URLDecodeOptions
      85             : {
      86           0 :   inline FastBase64URLDecodeOptions()
      87           0 :     : Base64URLDecodeOptions(FastDictionaryInitializer())
      88             :   {
      89             :     // Doesn't matter what int we pass to the parent constructor
      90           0 :   }
      91             : };
      92             : } // namespace binding_detail
      93             : 
      94             : 
      95             : struct Base64URLEncodeOptions : public DictionaryBase
      96             : {
      97             :   MOZ_INIT_OUTSIDE_CTOR bool mPad;
      98             : 
      99             :   Base64URLEncodeOptions();
     100             : 
     101           0 :   explicit inline Base64URLEncodeOptions(const FastDictionaryInitializer& )
     102           0 :   {
     103             :     // Do nothing here; this is used by our "Fast" subclass
     104           0 :   }
     105             : 
     106             :   explicit inline Base64URLEncodeOptions(const Base64URLEncodeOptions& aOther)
     107             :   {
     108             :     *this = aOther;
     109             :   }
     110             : 
     111             :   bool
     112             :   Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
     113             : 
     114             :   bool
     115             :   Init(const nsAString& aJSON);
     116             : 
     117             :   bool
     118             :   ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
     119             : 
     120             :   bool
     121             :   ToJSON(nsAString& aJSON) const;
     122             : 
     123             :   void
     124             :   TraceDictionary(JSTracer* trc);
     125             : 
     126             :   Base64URLEncodeOptions&
     127             :   operator=(const Base64URLEncodeOptions& aOther);
     128             : 
     129             : private:
     130             :   static bool
     131             :   InitIds(JSContext* cx, Base64URLEncodeOptionsAtoms* atomsCache);
     132             : };
     133             : 
     134             : namespace binding_detail {
     135             : struct FastBase64URLEncodeOptions : public Base64URLEncodeOptions
     136             : {
     137           0 :   inline FastBase64URLEncodeOptions()
     138           0 :     : Base64URLEncodeOptions(FastDictionaryInitializer())
     139             :   {
     140             :     // Doesn't matter what int we pass to the parent constructor
     141           0 :   }
     142             : };
     143             : } // namespace binding_detail
     144             : 
     145             : 
     146           0 : struct HeapSnapshotBoundaries : public DictionaryBase
     147             : {
     148             :   MOZ_INIT_OUTSIDE_CTOR Optional<JSObject*> mDebugger;
     149             :   MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<JSObject*>> mGlobals;
     150             :   MOZ_INIT_OUTSIDE_CTOR Optional<bool> mRuntime;
     151             : 
     152             :   HeapSnapshotBoundaries();
     153             : 
     154           0 :   explicit inline HeapSnapshotBoundaries(const FastDictionaryInitializer& )
     155           0 :   {
     156             :     // Do nothing here; this is used by our "Fast" subclass
     157           0 :   }
     158             : 
     159             : private:
     160             :   HeapSnapshotBoundaries(const HeapSnapshotBoundaries&) = delete;
     161             :   HeapSnapshotBoundaries& operator=(const HeapSnapshotBoundaries&) = delete;
     162             : 
     163             :   static bool
     164             :   InitIds(JSContext* cx, HeapSnapshotBoundariesAtoms* atomsCache);
     165             : 
     166             : public:
     167             :   bool
     168             :   Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
     169             : 
     170             :   bool
     171             :   ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
     172             : 
     173             :   void
     174             :   TraceDictionary(JSTracer* trc);
     175             : };
     176             : 
     177             : namespace binding_detail {
     178           0 : struct FastHeapSnapshotBoundaries : public HeapSnapshotBoundaries
     179             : {
     180           0 :   inline FastHeapSnapshotBoundaries()
     181           0 :     : HeapSnapshotBoundaries(FastDictionaryInitializer())
     182             :   {
     183             :     // Doesn't matter what int we pass to the parent constructor
     184           0 :   }
     185             : };
     186             : } // namespace binding_detail
     187             : 
     188             : 
     189             : namespace ThreadSafeChromeUtilsBinding {
     190             : 
     191             :   typedef mozilla::dom::ThreadSafeChromeUtils NativeType;
     192             : 
     193             :   bool
     194             :   ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
     195             : 
     196             :   JSObject*
     197             :   DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
     198             : 
     199             :   // We declare this as an array so that retrieving a pointer to this
     200             :   // binding's property hooks only requires compile/link-time resolvable
     201             :   // address arithmetic.  Declaring it as a pointer instead would require
     202             :   // doing a run-time load to fetch a pointer to this binding's property
     203             :   // hooks.  And then structures which embedded a pointer to this structure
     204             :   // would require a run-time load for proper initialization, which would
     205             :   // then induce static constructors.  Lots of static constructors.
     206             :   extern const NativePropertyHooks sNativePropertyHooks[];
     207             : 
     208             :   void
     209             :   CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
     210             : 
     211             :   JS::Handle<JSObject*>
     212             :   GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
     213             : 
     214             :   JSObject*
     215             :   GetConstructorObject(JSContext* aCx);
     216             : 
     217             : } // namespace ThreadSafeChromeUtilsBinding
     218             : 
     219             : 
     220             : 
     221             : } // namespace dom
     222             : } // namespace mozilla
     223             : 
     224             : #endif // mozilla_dom_ThreadSafeChromeUtilsBinding_h

Generated by: LCOV version 1.13