Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/HTMLObjectElementBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM HTMLObjectElement.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_HTMLObjectElementBinding_h
4
#define mozilla_dom_HTMLObjectElementBinding_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 HTMLObjectElement;
18
struct HTMLObjectElementAtoms;
19
struct MozPluginParameterAtoms;
20
struct NativePropertyHooks;
21
class ProtoAndIfaceCache;
22
23
} // namespace dom
24
} // namespace mozilla
25
26
namespace mozilla {
27
namespace dom {
28
29
struct MozPluginParameter : public DictionaryBase
30
{
31
  MOZ_INIT_OUTSIDE_CTOR nsString mName;
32
  MOZ_INIT_OUTSIDE_CTOR nsString mValue;
33
34
  MozPluginParameter();
35
36
  explicit inline MozPluginParameter(const FastDictionaryInitializer& )
37
0
  {
38
0
    // Do nothing here; this is used by our "Fast" subclass
39
0
  }
40
41
  explicit inline MozPluginParameter(const MozPluginParameter& aOther)
42
0
  {
43
0
    *this = aOther;
44
0
  }
45
46
  bool
47
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
48
49
  bool
50
  Init(const nsAString& aJSON);
51
52
  bool
53
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
54
55
  bool
56
  ToJSON(nsAString& aJSON) const;
57
58
  void
59
  TraceDictionary(JSTracer* trc);
60
61
  MozPluginParameter&
62
  operator=(const MozPluginParameter& aOther);
63
64
private:
65
  static bool
66
  InitIds(JSContext* cx, MozPluginParameterAtoms* atomsCache);
67
};
68
69
namespace binding_detail {
70
struct FastMozPluginParameter : public MozPluginParameter
71
{
72
  inline FastMozPluginParameter()
73
    : MozPluginParameter(FastDictionaryInitializer())
74
0
  {
75
0
    // Doesn't matter what int we pass to the parent constructor
76
0
  }
77
};
78
} // namespace binding_detail
79
80
81
namespace HTMLObjectElement_Binding {
82
83
  typedef mozilla::dom::HTMLObjectElement NativeType;
84
85
  static const int32_t UNKNOWN_REQUEST = -1;
86
  static const int32_t CURRENT_REQUEST = 0;
87
  static const int32_t PENDING_REQUEST = 1;
88
  static const uint32_t TYPE_LOADING = 0;
89
  static const uint32_t TYPE_IMAGE = 1;
90
  static const uint32_t TYPE_PLUGIN = 2;
91
  static const uint32_t TYPE_FAKE_PLUGIN = 3;
92
  static const uint32_t TYPE_DOCUMENT = 4;
93
  static const uint32_t TYPE_NULL = 5;
94
  static const uint32_t PLUGIN_UNSUPPORTED = 0;
95
  static const uint32_t PLUGIN_ALTERNATE = 1;
96
  static const uint32_t PLUGIN_DISABLED = 2;
97
  static const uint32_t PLUGIN_BLOCKLISTED = 3;
98
  static const uint32_t PLUGIN_OUTDATED = 4;
99
  static const uint32_t PLUGIN_CRASHED = 5;
100
  static const uint32_t PLUGIN_SUPPRESSED = 6;
101
  static const uint32_t PLUGIN_USER_DISABLED = 7;
102
  static const uint32_t PLUGIN_CLICK_TO_PLAY = 8;
103
  static const uint32_t PLUGIN_VULNERABLE_UPDATABLE = 9;
104
  static const uint32_t PLUGIN_VULNERABLE_NO_UPDATE = 10;
105
  const JSClass*
106
  GetJSClass();
107
108
  bool
109
  Wrap(JSContext* aCx, mozilla::dom::HTMLObjectElement* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
110
111
  template <class T>
112
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
113
0
  {
114
0
    JS::Rooted<JSObject*> reflector(aCx);
115
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
116
0
  }
117
118
  // We declare this as an array so that retrieving a pointer to this
119
  // binding's property hooks only requires compile/link-time resolvable
120
  // address arithmetic.  Declaring it as a pointer instead would require
121
  // doing a run-time load to fetch a pointer to this binding's property
122
  // hooks.  And then structures which embedded a pointer to this structure
123
  // would require a run-time load for proper initialization, which would
124
  // then induce static constructors.  Lots of static constructors.
125
  extern const NativePropertyHooks sNativePropertyHooks[];
126
127
  void
128
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
129
130
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
131
0
  {
132
0
    /* Get the interface prototype object for this class.  This will create the
133
0
       object as needed. */
134
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::HTMLObjectElement,
135
0
                                       &CreateInterfaceObjects,
136
0
                                       /* aDefineOnGlobal = */ true);
137
0
138
0
  }
139
140
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
141
0
  {
142
0
    /* Get the interface object for this class.  This will create the object as
143
0
       needed. */
144
0
145
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::HTMLObjectElement,
146
0
                                       &CreateInterfaceObjects,
147
0
                                       aDefineOnGlobal);
148
0
  }
149
150
  JSObject*
151
  GetConstructorObject(JSContext* aCx);
152
153
} // namespace HTMLObjectElement_Binding
154
155
156
157
} // namespace dom
158
} // namespace mozilla
159
160
#endif // mozilla_dom_HTMLObjectElementBinding_h