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

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

Generated by: LCOV version 1.13