Coverage Report

Created: 2018-09-25 14:53

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