Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/DocumentL10nBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM DocumentL10n.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_DocumentL10nBinding_h
4
#define mozilla_dom_DocumentL10nBinding_h
5
6
#include "GeckoProfiler.h"
7
#include "js/RootingAPI.h"
8
#include "jspubtd.h"
9
#include "mozilla/ErrorResult.h"
10
#include "mozilla/dom/BindingDeclarations.h"
11
#include "mozilla/dom/Nullable.h"
12
#include "mozilla/dom/PrototypeList.h"
13
14
namespace mozilla {
15
namespace dom {
16
17
class DocumentL10n;
18
struct DocumentL10nAtoms;
19
struct L10nKeyAtoms;
20
struct NativePropertyHooks;
21
class ProtoAndIfaceCache;
22
23
} // namespace dom
24
} // namespace mozilla
25
26
namespace mozilla {
27
namespace dom {
28
29
struct L10nKey : public DictionaryBase
30
{
31
  MOZ_INIT_OUTSIDE_CTOR Optional<JSObject*> mArgs;
32
  MOZ_INIT_OUTSIDE_CTOR nsString mId;
33
34
  L10nKey();
35
36
  explicit inline L10nKey(const FastDictionaryInitializer& )
37
0
  {
38
0
    // Do nothing here; this is used by our "Fast" subclass
39
0
  }
40
41
private:
42
  L10nKey(const L10nKey&) = delete;
43
  L10nKey& operator=(const L10nKey&) = delete;
44
45
  static bool
46
  InitIds(JSContext* cx, L10nKeyAtoms* atomsCache);
47
48
public:
49
  bool
50
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
51
52
  bool
53
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
54
55
  void
56
  TraceDictionary(JSTracer* trc);
57
};
58
59
namespace binding_detail {
60
struct FastL10nKey : public L10nKey
61
{
62
  inline FastL10nKey()
63
    : L10nKey(FastDictionaryInitializer())
64
0
  {
65
0
    // Doesn't matter what int we pass to the parent constructor
66
0
  }
67
};
68
} // namespace binding_detail
69
70
71
namespace DocumentL10n_Binding {
72
73
  typedef mozilla::dom::DocumentL10n NativeType;
74
75
  const JSClass*
76
  GetJSClass();
77
78
  bool
79
  Wrap(JSContext* aCx, mozilla::dom::DocumentL10n* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
80
81
  template <class T>
82
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
83
0
  {
84
0
    JS::Rooted<JSObject*> reflector(aCx);
85
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
86
0
  }
87
88
  // We declare this as an array so that retrieving a pointer to this
89
  // binding's property hooks only requires compile/link-time resolvable
90
  // address arithmetic.  Declaring it as a pointer instead would require
91
  // doing a run-time load to fetch a pointer to this binding's property
92
  // hooks.  And then structures which embedded a pointer to this structure
93
  // would require a run-time load for proper initialization, which would
94
  // then induce static constructors.  Lots of static constructors.
95
  extern const NativePropertyHooks sNativePropertyHooks[];
96
97
  void
98
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
99
100
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
101
0
  {
102
0
    /* Get the interface prototype object for this class.  This will create the
103
0
       object as needed. */
104
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::DocumentL10n,
105
0
                                       &CreateInterfaceObjects,
106
0
                                       /* aDefineOnGlobal = */ true);
107
0
108
0
  }
109
110
} // namespace DocumentL10n_Binding
111
112
113
114
} // namespace dom
115
} // namespace mozilla
116
117
#endif // mozilla_dom_DocumentL10nBinding_h