Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM ErrorEvent.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_ErrorEventBinding_h
4 : #define mozilla_dom_ErrorEventBinding_h
5 :
6 : #include "EventBinding.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 :
13 : namespace mozilla {
14 : namespace dom {
15 :
16 : class ErrorEvent;
17 : struct ErrorEventAtoms;
18 : struct ErrorEventInitAtoms;
19 : struct NativePropertyHooks;
20 : class ProtoAndIfaceCache;
21 :
22 : } // namespace dom
23 : } // namespace mozilla
24 :
25 : namespace mozilla {
26 : namespace dom {
27 :
28 0 : struct ErrorEventInit : public EventInit
29 : {
30 : MOZ_INIT_OUTSIDE_CTOR uint32_t mColno;
31 : MOZ_INIT_OUTSIDE_CTOR JS::Value mError;
32 : MOZ_INIT_OUTSIDE_CTOR nsString mFilename;
33 : MOZ_INIT_OUTSIDE_CTOR uint32_t mLineno;
34 : MOZ_INIT_OUTSIDE_CTOR nsString mMessage;
35 :
36 : ErrorEventInit();
37 :
38 0 : explicit inline ErrorEventInit(const FastDictionaryInitializer& )
39 0 : : EventInit(FastDictionaryInitializer()),
40 0 : mError(JS::UndefinedValue())
41 : {
42 : // Do nothing here; this is used by our "Fast" subclass
43 0 : }
44 :
45 : private:
46 : ErrorEventInit(const ErrorEventInit&) = delete;
47 : ErrorEventInit& operator=(const ErrorEventInit&) = delete;
48 :
49 : static bool
50 : InitIds(JSContext* cx, ErrorEventInitAtoms* atomsCache);
51 :
52 : public:
53 : bool
54 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
55 :
56 : bool
57 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
58 :
59 : void
60 : TraceDictionary(JSTracer* trc);
61 : };
62 :
63 : namespace binding_detail {
64 0 : struct FastErrorEventInit : public ErrorEventInit
65 : {
66 0 : inline FastErrorEventInit()
67 0 : : ErrorEventInit(FastDictionaryInitializer())
68 : {
69 : // Doesn't matter what int we pass to the parent constructor
70 0 : }
71 : };
72 : } // namespace binding_detail
73 :
74 :
75 : namespace ErrorEventBinding {
76 :
77 : typedef mozilla::dom::ErrorEvent NativeType;
78 :
79 : JSObject*
80 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
81 :
82 : const JSClass*
83 : GetJSClass();
84 :
85 : bool
86 : Wrap(JSContext* aCx, mozilla::dom::ErrorEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
87 :
88 : template <class T>
89 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
90 : {
91 0 : JS::Rooted<JSObject*> reflector(aCx);
92 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
93 : }
94 :
95 : // We declare this as an array so that retrieving a pointer to this
96 : // binding's property hooks only requires compile/link-time resolvable
97 : // address arithmetic. Declaring it as a pointer instead would require
98 : // doing a run-time load to fetch a pointer to this binding's property
99 : // hooks. And then structures which embedded a pointer to this structure
100 : // would require a run-time load for proper initialization, which would
101 : // then induce static constructors. Lots of static constructors.
102 : extern const NativePropertyHooks sNativePropertyHooks[];
103 :
104 : void
105 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
106 :
107 : JS::Handle<JSObject*>
108 : GetProtoObjectHandle(JSContext* aCx);
109 :
110 : JS::Handle<JSObject*>
111 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
112 :
113 : JSObject*
114 : GetConstructorObject(JSContext* aCx);
115 :
116 : } // namespace ErrorEventBinding
117 :
118 :
119 :
120 : } // namespace dom
121 : } // namespace mozilla
122 :
123 : #endif // mozilla_dom_ErrorEventBinding_h
|