Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM TestInterfaceJSDictionaries.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_TestInterfaceJSDictionariesBinding_h
4 : #define mozilla_dom_TestInterfaceJSDictionariesBinding_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 : #include "mozilla/dom/UnionTypes.h"
12 :
13 : namespace mozilla {
14 : namespace dom {
15 :
16 : struct NativePropertyHooks;
17 : class ObjectOrString;
18 : class OwningObjectOrString;
19 : class ProtoAndIfaceCache;
20 : struct TestInterfaceJSDictionary2;
21 : struct TestInterfaceJSDictionary2Atoms;
22 : struct TestInterfaceJSDictionaryAtoms;
23 :
24 : } // namespace dom
25 : } // namespace mozilla
26 :
27 : namespace mozilla {
28 : namespace dom {
29 :
30 0 : struct TestInterfaceJSDictionary2 : public DictionaryBase
31 : {
32 : MOZ_INIT_OUTSIDE_CTOR Optional<JSObject*> mInnerObject;
33 :
34 : TestInterfaceJSDictionary2();
35 :
36 0 : explicit inline TestInterfaceJSDictionary2(const FastDictionaryInitializer& )
37 0 : {
38 : // Do nothing here; this is used by our "Fast" subclass
39 0 : }
40 :
41 : private:
42 : TestInterfaceJSDictionary2(const TestInterfaceJSDictionary2&) = delete;
43 : TestInterfaceJSDictionary2& operator=(const TestInterfaceJSDictionary2&) = delete;
44 :
45 : static bool
46 : InitIds(JSContext* cx, TestInterfaceJSDictionary2Atoms* 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 FastTestInterfaceJSDictionary2 : public TestInterfaceJSDictionary2
61 : {
62 : inline FastTestInterfaceJSDictionary2()
63 : : TestInterfaceJSDictionary2(FastDictionaryInitializer())
64 : {
65 : // Doesn't matter what int we pass to the parent constructor
66 : }
67 : };
68 : } // namespace binding_detail
69 :
70 :
71 0 : struct TestInterfaceJSDictionary : public DictionaryBase
72 : {
73 : MOZ_INIT_OUTSIDE_CTOR JS::Value mAnyMember;
74 : MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<JS::Value>> mAnySequenceMember;
75 : MOZ_INIT_OUTSIDE_CTOR TestInterfaceJSDictionary2 mInnerDictionary;
76 : MOZ_INIT_OUTSIDE_CTOR Optional<JSObject*> mObjectMember;
77 : MOZ_INIT_OUTSIDE_CTOR Optional<OwningObjectOrString> mObjectOrStringMember;
78 :
79 : TestInterfaceJSDictionary();
80 :
81 0 : explicit inline TestInterfaceJSDictionary(const FastDictionaryInitializer& )
82 0 : : mAnyMember(JS::UndefinedValue()),
83 0 : mInnerDictionary(FastDictionaryInitializer())
84 : {
85 : // Do nothing here; this is used by our "Fast" subclass
86 0 : }
87 :
88 : private:
89 : TestInterfaceJSDictionary(const TestInterfaceJSDictionary&) = delete;
90 : TestInterfaceJSDictionary& operator=(const TestInterfaceJSDictionary&) = delete;
91 :
92 : static bool
93 : InitIds(JSContext* cx, TestInterfaceJSDictionaryAtoms* atomsCache);
94 :
95 : public:
96 : bool
97 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
98 :
99 : bool
100 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
101 :
102 : void
103 : TraceDictionary(JSTracer* trc);
104 : };
105 :
106 : namespace binding_detail {
107 0 : struct FastTestInterfaceJSDictionary : public TestInterfaceJSDictionary
108 : {
109 0 : inline FastTestInterfaceJSDictionary()
110 0 : : TestInterfaceJSDictionary(FastDictionaryInitializer())
111 : {
112 : // Doesn't matter what int we pass to the parent constructor
113 0 : }
114 : };
115 : } // namespace binding_detail
116 :
117 :
118 : } // namespace dom
119 : } // namespace mozilla
120 :
121 : #endif // mozilla_dom_TestInterfaceJSDictionariesBinding_h
|