/work/obj-fuzz/dist/include/mozilla/dom/WebGPUExtrasBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM WebGPUExtras.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_WebGPUExtrasBinding_h |
4 | | #define mozilla_dom_WebGPUExtrasBinding_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/webgpu/Buffer.h" |
13 | | |
14 | | namespace mozilla { |
15 | | |
16 | | namespace dom { |
17 | | |
18 | | struct NativePropertyHooks; |
19 | | class ProtoAndIfaceCache; |
20 | | struct WebGPUBufferBindingAtoms; |
21 | | |
22 | | } // namespace dom |
23 | | |
24 | | namespace webgpu { |
25 | | |
26 | | class Buffer; |
27 | | |
28 | | } // namespace webgpu |
29 | | |
30 | | } // namespace mozilla |
31 | | |
32 | | namespace mozilla { |
33 | | namespace dom { |
34 | | |
35 | | struct WebGPUBufferBinding : public DictionaryBase |
36 | | { |
37 | | MOZ_INIT_OUTSIDE_CTOR Optional<OwningNonNull<mozilla::webgpu::Buffer>> mBuffer; |
38 | | MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mOffset; |
39 | | MOZ_INIT_OUTSIDE_CTOR Optional<uint32_t> mSize; |
40 | | |
41 | | WebGPUBufferBinding(); |
42 | | |
43 | | explicit inline WebGPUBufferBinding(const FastDictionaryInitializer& ) |
44 | 0 | { |
45 | 0 | // Do nothing here; this is used by our "Fast" subclass |
46 | 0 | } |
47 | | |
48 | | explicit inline WebGPUBufferBinding(const WebGPUBufferBinding& 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 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
58 | | |
59 | | void |
60 | | TraceDictionary(JSTracer* trc); |
61 | | |
62 | | inline void |
63 | | TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags) |
64 | 0 | { |
65 | 0 | ImplCycleCollectionTraverse(aCallback, mBuffer, "mBuffer", aFlags); |
66 | 0 | } |
67 | | |
68 | | inline void |
69 | | UnlinkForCC() |
70 | 0 | { |
71 | 0 | ImplCycleCollectionUnlink(mBuffer); |
72 | 0 | } |
73 | | |
74 | | WebGPUBufferBinding& |
75 | | operator=(const WebGPUBufferBinding& aOther); |
76 | | |
77 | | private: |
78 | | static bool |
79 | | InitIds(JSContext* cx, WebGPUBufferBindingAtoms* atomsCache); |
80 | | }; |
81 | | |
82 | | namespace binding_detail { |
83 | | struct FastWebGPUBufferBinding : public WebGPUBufferBinding |
84 | | { |
85 | | inline FastWebGPUBufferBinding() |
86 | | : WebGPUBufferBinding(FastDictionaryInitializer()) |
87 | 0 | { |
88 | 0 | // Doesn't matter what int we pass to the parent constructor |
89 | 0 | } |
90 | | }; |
91 | | } // namespace binding_detail |
92 | | |
93 | | |
94 | | } // namespace dom |
95 | | } // namespace mozilla |
96 | | |
97 | | #endif // mozilla_dom_WebGPUExtrasBinding_h |