Bug Summary

File:var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/PrimitiveConversions.h
Warning:line 322, column 11
Assigned value is garbage or undefined

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name TestJSImplGenBinding.cpp -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=cplusplus -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -analyzer-config-compatibility-mode=true -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=all -relaxed-aliasing -ffp-contract=off -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dom/bindings/test -fcoverage-compilation-dir=/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dom/bindings/test -resource-dir /usr/lib/llvm-18/lib/clang/18 -include /var/lib/jenkins/workspace/firefox-scan-build/config/gcc_hidden.h -include /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/mozilla-config.h -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/stl_wrappers -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/system_wrappers -U _FORTIFY_SOURCE -D _FORTIFY_SOURCE=2 -D DEBUG=1 -D IMPL_LIBXUL -D MOZILLA_INTERNAL_API -I /var/lib/jenkins/workspace/firefox-scan-build/dom/bindings/test -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dom/bindings/test -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dom/bindings -I /var/lib/jenkins/workspace/firefox-scan-build/dom/bindings -I /var/lib/jenkins/workspace/firefox-scan-build/js/xpconnect/src -I /var/lib/jenkins/workspace/firefox-scan-build/js/xpconnect/wrappers -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/ipc/ipdl/_ipdlheaders -I /var/lib/jenkins/workspace/firefox-scan-build/ipc/chromium/src -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/nspr -I /var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/nss -D MOZILLA_CLIENT -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/x86_64-linux-gnu/c++/14 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/backward -internal-isystem /usr/lib/llvm-18/lib/clang/18/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -Wno-error=tautological-type-limit-compare -Wno-invalid-offsetof -Wno-range-loop-analysis -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wno-psabi -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -fdeprecated-macro -ferror-limit 19 -stack-protector 2 -fstack-clash-protection -ftrivial-auto-var-init=pattern -fno-rtti -fgnuc-version=4.2.1 -fno-aligned-allocation -analyzer-checker optin.performance.Padding -analyzer-output=html -analyzer-config stable-report-filename=true -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/scan-build-2024-07-21-021012-413605-1 -x c++ ../TestJSImplGenBinding.cpp

../TestJSImplGenBinding.cpp

1/* THIS FILE IS AUTOGENERATED FROM TestJSImplGen.webidl BY Codegen.py - DO NOT EDIT */
2
3#include <type_traits>
4#include "AtomList.h"
5#include "CustomEventBinding.h"
6#include "EventBinding.h"
7#include "EventHandlerBinding.h"
8#include "MainThreadUtils.h"
9#include "TestBindingHeader.h"
10#include "TestCImplementedInterface.h"
11#include "TestCodeGenBinding.h"
12#include "TestDictionaryBinding.h"
13#include "TestJSImplGenBinding.h"
14#include "WrapperFactory.h"
15#include "js/Array.h"
16#include "js/CallAndConstruct.h"
17#include "js/Exception.h"
18#include "js/ForOfIterator.h"
19#include "js/MapAndSet.h"
20#include "js/Object.h"
21#include "js/PropertyAndElement.h"
22#include "js/PropertyDescriptor.h"
23#include "js/experimental/JitInfo.h"
24#include "jsapi.h"
25#include "jsfriendapi.h"
26#include "mozilla/Atomics.h"
27#include "mozilla/FloatingPoint.h"
28#include "mozilla/OwningNonNull.h"
29#include "mozilla/ProfilerLabels.h"
30#include "mozilla/dom/BindingCallContext.h"
31#include "mozilla/dom/BindingUtils.h"
32#include "mozilla/dom/CanvasGradient.h"
33#include "mozilla/dom/CanvasPattern.h"
34#include "mozilla/dom/CustomElementRegistry.h"
35#include "mozilla/dom/DOMJSClass.h"
36#include "mozilla/dom/DocGroup.h"
37#include "mozilla/dom/Document.h"
38#include "mozilla/dom/ImageData.h"
39#include "mozilla/dom/NonRefcountedDOMObject.h"
40#include "mozilla/dom/Nullable.h"
41#include "mozilla/dom/PrimitiveConversions.h"
42#include "mozilla/dom/Promise.h"
43#include "mozilla/dom/RootedDictionary.h"
44#include "mozilla/dom/ToJSValue.h"
45#include "mozilla/dom/UnionTypes.h"
46#include "mozilla/dom/WebIDLPrefs.h"
47#include "mozilla/dom/XrayExpandoClass.h"
48#include "nsContentUtils.h"
49#include "nsGenericHTMLElement.h"
50#include "nsIContent.h"
51#include "nsIGlobalObject.h"
52
53namespace mozilla {
54
55namespace dom {
56
57namespace binding_detail {}; // Just to make sure it's known as a namespace
58using namespace mozilla::dom::binding_detail;
59
60
61namespace binding_detail {
62const nsLiteralCString EnumStrings<MyTestEnum>::Values[2] = {
63 "a"_ns,
64 "b"_ns,
65};
66} // namespace binding_detail
67
68bool
69ToJSValue(JSContext* aCx, MyTestEnum aArgument, JS::MutableHandle<JS::Value> aValue)
70{
71 MOZ_ASSERT(uint32_t(aArgument) < ArrayLength(binding_detail::EnumStrings<MyTestEnum>::Values))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(uint32_t(aArgument) < ArrayLength(binding_detail::
EnumStrings<MyTestEnum>::Values))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(uint32_t(aArgument) < ArrayLength
(binding_detail::EnumStrings<MyTestEnum>::Values)))), 0
))) { do { } while (false); MOZ_ReportAssertionFailure("uint32_t(aArgument) < ArrayLength(binding_detail::EnumStrings<MyTestEnum>::Values)"
, "../TestJSImplGenBinding.cpp", 71); AnnotateMozCrashReason(
"MOZ_ASSERT" "(" "uint32_t(aArgument) < ArrayLength(binding_detail::EnumStrings<MyTestEnum>::Values)"
")"); do { *((volatile int*)__null) = 71; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
72 JSString* resultStr =
73 JS_NewStringCopyN(aCx, binding_detail::EnumStrings<MyTestEnum>::Values[uint32_t(aArgument)].BeginReading(),
74 binding_detail::EnumStrings<MyTestEnum>::Values[uint32_t(aArgument)].Length());
75 if (!resultStr) {
76 return false;
77 }
78 aValue.setString(resultStr);
79 return true;
80}
81
82
83MOZ_CAN_RUN_SCRIPT void
84MyTestCallback::Call(BindingCallContext& cx, JS::Handle<JS::Value> aThisVal, ErrorResult& aRv)
85{
86 JS::Rooted<JS::Value> rval(cx);
87
88 JS::Rooted<JS::Value> callable(cx, JS::ObjectValue(*mCallback));
89 if (!JS::Call(cx, aThisVal, callable,
90 JS::HandleValueArray::empty(), &rval)) {
91 aRv.NoteJSContextException(cx);
92 return;
93 }
94}
95
96
97
98namespace TestCImplementedInterface_Binding {
99
100static_assert(IsRefcounted<NativeType>::value == IsRefcounted<TestJSImplInterface_Binding::NativeType>::value,
101 "Can't inherit from an interface with a different ownership model.");
102
103bool sNativePropertiesInited = false;
104const NativePropertyHooks sNativePropertyHooks = {
105 nullptr,
106 { nullptr, nullptr, &sNativePropertiesInited },
107 prototypes::id::TestCImplementedInterface,
108 constructors::id::TestCImplementedInterface,
109 &DefaultXrayExpandoObjectClass
110};
111
112static const DOMInterfaceInfo sInterfaceObjectInfo = {
113 { ThrowingConstructor, &sNativePropertyHooks },
114 TestJSImplInterface_Binding::GetConstructorObject,
115 prototypes::id::TestCImplementedInterface,
116 PrototypeTraits<prototypes::id::TestCImplementedInterface>::Depth,
117 true,
118};
119
120static const DOMIfaceAndProtoJSClass sPrototypeClass = {
121 {
122 "TestCImplementedInterfacePrototype",
123 JSCLASS_IS_DOMIFACEANDPROTOJSCLASSJSCLASS_USERBIT2 | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE0),
124 JS_NULL_CLASS_OPS,
125 JS_NULL_CLASS_SPEC,
126 JS_NULL_CLASS_EXT,
127 JS_NULL_OBJECT_OPS
128 },
129 eInterfacePrototype,
130 prototypes::id::TestCImplementedInterface,
131 PrototypeTraits<prototypes::id::TestCImplementedInterface>::Depth,
132 &sNativePropertyHooks,
133 TestJSImplInterface_Binding::GetProtoObject
134};
135
136void
137CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
138{
139 JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::TestCImplementedInterface);
140 JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::TestCImplementedInterface);
141
142 JS::Handle<JSObject*> parentProto(TestJSImplInterface_Binding::GetProtoObjectHandle(aCx));
143 if (!parentProto) {
144 return;
145 }
146
147 JS::Handle<JSObject*> constructorProto(TestJSImplInterface_Binding::GetConstructorObjectHandle(aCx));
148 if (!constructorProto) {
149 return;
150 }
151
152 dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
153 &sPrototypeClass, protoCache,
154 constructorProto, &sInterfaceObjectInfo, 0, false, Span<const LegacyFactoryFunction, 0>{},
155 interfaceCache,
156 nullptr,
157 nullptr,
158 "TestCImplementedInterface", aDefineOnGlobal,
159 nullptr,
160 false,
161 nullptr);
162}
163
164JSObject*
165GetProtoObject(JSContext* aCx)
166{
167 return GetProtoObjectHandle(aCx);
168}
169
170JSObject*
171GetConstructorObject(JSContext* aCx)
172{
173 return GetConstructorObjectHandle(aCx);
174}
175
176} // namespace TestCImplementedInterface_Binding
177
178
179
180namespace TestCImplementedInterface2_Binding {
181
182bool sNativePropertiesInited = false;
183const NativePropertyHooks sNativePropertyHooks = {
184 nullptr,
185 { nullptr, nullptr, &sNativePropertiesInited },
186 prototypes::id::TestCImplementedInterface2,
187 constructors::id::TestCImplementedInterface2,
188 &DefaultXrayExpandoObjectClass
189};
190
191static const DOMInterfaceInfo sInterfaceObjectInfo = {
192 { ThrowingConstructor, &sNativePropertyHooks },
193 JS::GetRealmFunctionPrototype,
194 prototypes::id::TestCImplementedInterface2,
195 PrototypeTraits<prototypes::id::TestCImplementedInterface2>::Depth,
196 true,
197};
198
199static const DOMIfaceAndProtoJSClass sPrototypeClass = {
200 {
201 "TestCImplementedInterface2Prototype",
202 JSCLASS_IS_DOMIFACEANDPROTOJSCLASSJSCLASS_USERBIT2 | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE0),
203 JS_NULL_CLASS_OPS,
204 JS_NULL_CLASS_SPEC,
205 JS_NULL_CLASS_EXT,
206 JS_NULL_OBJECT_OPS
207 },
208 eInterfacePrototype,
209 prototypes::id::TestCImplementedInterface2,
210 PrototypeTraits<prototypes::id::TestCImplementedInterface2>::Depth,
211 &sNativePropertyHooks,
212 JS::GetRealmObjectPrototype
213};
214
215void
216CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
217{
218 JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::TestCImplementedInterface2);
219 JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::TestCImplementedInterface2);
220
221 JS::Rooted<JSObject*> parentProto(aCx, JS::GetRealmObjectPrototype(aCx));
222 if (!parentProto) {
223 return;
224 }
225
226 JS::Rooted<JSObject*> constructorProto(aCx, JS::GetRealmFunctionPrototype(aCx));
227 if (!constructorProto) {
228 return;
229 }
230
231 dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
232 &sPrototypeClass, protoCache,
233 constructorProto, &sInterfaceObjectInfo, 0, false, Span<const LegacyFactoryFunction, 0>{},
234 interfaceCache,
235 nullptr,
236 nullptr,
237 "TestCImplementedInterface2", aDefineOnGlobal,
238 nullptr,
239 false,
240 nullptr);
241}
242
243JSObject*
244GetProtoObject(JSContext* aCx)
245{
246 return GetProtoObjectHandle(aCx);
247}
248
249JSObject*
250GetConstructorObject(JSContext* aCx)
251{
252 return GetConstructorObjectHandle(aCx);
253}
254
255} // namespace TestCImplementedInterface2_Binding
256
257
258
259namespace TestJSImplInterface_Binding {
260
261MOZ_CAN_RUN_SCRIPT static bool
262get_readonlyByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
263{
264 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject267( cx, "TestJSImplInterface"
, "readonlyByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
265 "TestJSImplInterface", "readonlyByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject267( cx, "TestJSImplInterface"
, "readonlyByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
266 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject267( cx, "TestJSImplInterface"
, "readonlyByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
267 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject267( cx, "TestJSImplInterface"
, "readonlyByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
268
269 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
270 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
271 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
272 if (objIsXray) {
273 unwrappedObj.emplace(cx, obj);
274 }
275 if (objIsXray) {
276 // Since our object is an Xray, we can just CheckedUnwrapStatic:
277 // we know Xrays have no dynamic unwrap behavior.
278 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
279 if (!unwrappedObj.ref()) {
280 return false;
281 }
282 }
283 FastErrorResult rv;
284 int8_t result(MOZ_KnownLive(self)(self)->GetReadonlyByte(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
285 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyByte getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyByte getter"
)), 0))
) {
286 return false;
287 }
288 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 288); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 288; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
289 args.rval().setInt32(int32_t(result));
290 return true;
291}
292
293static const JSJitInfo readonlyByte_getterinfo = {
294 { get_readonlyByte },
295 { prototypes::id::TestJSImplInterface },
296 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
297 JSJitInfo::Getter,
298 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
299 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
300 false, /* isInfallible. False in setters. */
301 false, /* isMovable. Not relevant for setters. */
302 false, /* isEliminatable. Not relevant for setters. */
303 false, /* isAlwaysInSlot. Only relevant for getters. */
304 false, /* isLazilyCachedInSlot. Only relevant for getters. */
305 false, /* isTypedMethod. Only relevant for methods. */
306 0 /* Reserved slot index, if we're stored in a slot, else 0. */
307};
308
309MOZ_CAN_RUN_SCRIPT static bool
310get_writableByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
311{
312 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject315( cx, "TestJSImplInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
313 "TestJSImplInterface", "writableByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject315( cx, "TestJSImplInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
314 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject315( cx, "TestJSImplInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
315 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject315( cx, "TestJSImplInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
316
317 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
318 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
319 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
320 if (objIsXray) {
321 unwrappedObj.emplace(cx, obj);
322 }
323 if (objIsXray) {
324 // Since our object is an Xray, we can just CheckedUnwrapStatic:
325 // we know Xrays have no dynamic unwrap behavior.
326 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
327 if (!unwrappedObj.ref()) {
328 return false;
329 }
330 }
331 FastErrorResult rv;
332 int8_t result(MOZ_KnownLive(self)(self)->GetWritableByte(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
333 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableByte getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableByte getter"
)), 0))
) {
334 return false;
335 }
336 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 336); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 336; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
337 args.rval().setInt32(int32_t(result));
338 return true;
339}
340
341MOZ_CAN_RUN_SCRIPT static bool
342set_writableByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
343{
344 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject347( cx, "TestJSImplInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
345 "TestJSImplInterface", "writableByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject347( cx, "TestJSImplInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
346 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject347( cx, "TestJSImplInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
347 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject347( cx, "TestJSImplInterface"
, "writableByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
348
349 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
350 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
351 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
352 if (objIsXray) {
353 unwrappedObj.emplace(cx, obj);
354 }
355 int8_t arg0;
356 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
357 return false;
358 }
359 if (objIsXray) {
360 // Since our object is an Xray, we can just CheckedUnwrapStatic:
361 // we know Xrays have no dynamic unwrap behavior.
362 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
363 if (!unwrappedObj.ref()) {
364 return false;
365 }
366 }
367 FastErrorResult rv;
368 // NOTE: This assert does NOT call the function.
369 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableByte(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
370 MOZ_KnownLive(self)(self)->SetWritableByte(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
371 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableByte setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableByte setter"
)), 0))
) {
372 return false;
373 }
374 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 374); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 374; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
375
376 return true;
377}
378
379static const JSJitInfo writableByte_getterinfo = {
380 { get_writableByte },
381 { prototypes::id::TestJSImplInterface },
382 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
383 JSJitInfo::Getter,
384 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
385 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
386 false, /* isInfallible. False in setters. */
387 false, /* isMovable. Not relevant for setters. */
388 false, /* isEliminatable. Not relevant for setters. */
389 false, /* isAlwaysInSlot. Only relevant for getters. */
390 false, /* isLazilyCachedInSlot. Only relevant for getters. */
391 false, /* isTypedMethod. Only relevant for methods. */
392 0 /* Reserved slot index, if we're stored in a slot, else 0. */
393};
394static const JSJitInfo writableByte_setterinfo = {
395 { (JSJitGetterOp)set_writableByte },
396 { prototypes::id::TestJSImplInterface },
397 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
398 JSJitInfo::Setter,
399 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
400 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
401 false, /* isInfallible. False in setters. */
402 false, /* isMovable. Not relevant for setters. */
403 false, /* isEliminatable. Not relevant for setters. */
404 false, /* isAlwaysInSlot. Only relevant for getters. */
405 false, /* isLazilyCachedInSlot. Only relevant for getters. */
406 false, /* isTypedMethod. Only relevant for methods. */
407 0 /* Reserved slot index, if we're stored in a slot, else 0. */
408};
409
410MOZ_CAN_RUN_SCRIPT static bool
411passByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
412{
413 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject416( cx, "TestJSImplInterface"
, "passByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
414 "TestJSImplInterface", "passByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject416( cx, "TestJSImplInterface"
, "passByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
415 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject416( cx, "TestJSImplInterface"
, "passByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
416 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject416( cx, "TestJSImplInterface"
, "passByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
417
418 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
419 if (!args.requireAtLeast(cx, "TestJSImplInterface.passByte", 1)) {
420 return false;
421 }
422 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
423 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
424 if (objIsXray) {
425 unwrappedObj.emplace(cx, obj);
426 }
427 int8_t arg0;
428 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
429 return false;
430 }
431 if (objIsXray) {
432 // Since our object is an Xray, we can just CheckedUnwrapStatic:
433 // we know Xrays have no dynamic unwrap behavior.
434 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
435 if (!unwrappedObj.ref()) {
436 return false;
437 }
438 }
439 FastErrorResult rv;
440 // NOTE: This assert does NOT call the function.
441 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassByte(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
442 MOZ_KnownLive(self)(self)->PassByte(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
443 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passByte"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passByte"
)), 0))
) {
444 return false;
445 }
446 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 446); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 446; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
447 args.rval().setUndefined();
448 return true;
449}
450
451static const JSJitInfo passByte_methodinfo = {
452 { (JSJitGetterOp)passByte },
453 { prototypes::id::TestJSImplInterface },
454 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
455 JSJitInfo::Method,
456 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
457 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
458 false, /* isInfallible. False in setters. */
459 false, /* isMovable. Not relevant for setters. */
460 false, /* isEliminatable. Not relevant for setters. */
461 false, /* isAlwaysInSlot. Only relevant for getters. */
462 false, /* isLazilyCachedInSlot. Only relevant for getters. */
463 false, /* isTypedMethod. Only relevant for methods. */
464 0 /* Reserved slot index, if we're stored in a slot, else 0. */
465};
466
467MOZ_CAN_RUN_SCRIPT static bool
468receiveByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
469{
470 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject473( cx, "TestJSImplInterface"
, "receiveByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
471 "TestJSImplInterface", "receiveByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject473( cx, "TestJSImplInterface"
, "receiveByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
472 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject473( cx, "TestJSImplInterface"
, "receiveByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
473 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject473( cx, "TestJSImplInterface"
, "receiveByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
474
475 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
476 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
477 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
478 if (objIsXray) {
479 unwrappedObj.emplace(cx, obj);
480 }
481 if (objIsXray) {
482 // Since our object is an Xray, we can just CheckedUnwrapStatic:
483 // we know Xrays have no dynamic unwrap behavior.
484 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
485 if (!unwrappedObj.ref()) {
486 return false;
487 }
488 }
489 FastErrorResult rv;
490 int8_t result(MOZ_KnownLive(self)(self)->ReceiveByte(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
491 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveByte"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveByte"
)), 0))
) {
492 return false;
493 }
494 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 494); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 494; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
495 args.rval().setInt32(int32_t(result));
496 return true;
497}
498
499static const JSJitInfo receiveByte_methodinfo = {
500 { (JSJitGetterOp)receiveByte },
501 { prototypes::id::TestJSImplInterface },
502 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
503 JSJitInfo::Method,
504 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
505 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
506 false, /* isInfallible. False in setters. */
507 false, /* isMovable. Not relevant for setters. */
508 false, /* isEliminatable. Not relevant for setters. */
509 false, /* isAlwaysInSlot. Only relevant for getters. */
510 false, /* isLazilyCachedInSlot. Only relevant for getters. */
511 false, /* isTypedMethod. Only relevant for methods. */
512 0 /* Reserved slot index, if we're stored in a slot, else 0. */
513};
514
515MOZ_CAN_RUN_SCRIPT static bool
516passOptionalByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
517{
518 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject521( cx, "TestJSImplInterface"
, "passOptionalByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
519 "TestJSImplInterface", "passOptionalByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject521( cx, "TestJSImplInterface"
, "passOptionalByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
520 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject521( cx, "TestJSImplInterface"
, "passOptionalByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
521 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject521( cx, "TestJSImplInterface"
, "passOptionalByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
522
523 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
524 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
525 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
526 if (objIsXray) {
527 unwrappedObj.emplace(cx, obj);
528 }
529 Optional<int8_t> arg0;
530 if (args.hasDefined(0)) {
531 arg0.Construct();
532 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
533 return false;
534 }
535 }
536 if (objIsXray) {
537 // Since our object is an Xray, we can just CheckedUnwrapStatic:
538 // we know Xrays have no dynamic unwrap behavior.
539 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
540 if (!unwrappedObj.ref()) {
541 return false;
542 }
543 }
544 FastErrorResult rv;
545 // NOTE: This assert does NOT call the function.
546 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalByte(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
547 MOZ_KnownLive(self)(self)->PassOptionalByte(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
548 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalByte"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalByte"
)), 0))
) {
549 return false;
550 }
551 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 551); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 551; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
552 args.rval().setUndefined();
553 return true;
554}
555
556static const JSJitInfo passOptionalByte_methodinfo = {
557 { (JSJitGetterOp)passOptionalByte },
558 { prototypes::id::TestJSImplInterface },
559 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
560 JSJitInfo::Method,
561 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
562 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
563 false, /* isInfallible. False in setters. */
564 false, /* isMovable. Not relevant for setters. */
565 false, /* isEliminatable. Not relevant for setters. */
566 false, /* isAlwaysInSlot. Only relevant for getters. */
567 false, /* isLazilyCachedInSlot. Only relevant for getters. */
568 false, /* isTypedMethod. Only relevant for methods. */
569 0 /* Reserved slot index, if we're stored in a slot, else 0. */
570};
571
572MOZ_CAN_RUN_SCRIPT static bool
573passOptionalByteBeforeRequired(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
574{
575 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject578( cx, "TestJSImplInterface"
, "passOptionalByteBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
576 "TestJSImplInterface", "passOptionalByteBeforeRequired", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject578( cx, "TestJSImplInterface"
, "passOptionalByteBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
577 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject578( cx, "TestJSImplInterface"
, "passOptionalByteBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
578 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject578( cx, "TestJSImplInterface"
, "passOptionalByteBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
579
580 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
581 if (!args.requireAtLeast(cx, "TestJSImplInterface.passOptionalByteBeforeRequired", 2)) {
582 return false;
583 }
584 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
585 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
586 if (objIsXray) {
587 unwrappedObj.emplace(cx, obj);
588 }
589 Optional<int8_t> arg0;
590 if (args.hasDefined(0)) {
591 arg0.Construct();
592 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
593 return false;
594 }
595 }
596 int8_t arg1;
597 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[1], "Argument 2", &arg1)) {
598 return false;
599 }
600 if (objIsXray) {
601 // Since our object is an Xray, we can just CheckedUnwrapStatic:
602 // we know Xrays have no dynamic unwrap behavior.
603 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
604 if (!unwrappedObj.ref()) {
605 return false;
606 }
607 }
608 FastErrorResult rv;
609 // NOTE: This assert does NOT call the function.
610 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalByteBeforeRequired(Constify(arg0), arg1, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
611 MOZ_KnownLive(self)(self)->PassOptionalByteBeforeRequired(Constify(arg0), arg1, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
612 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalByteBeforeRequired"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalByteBeforeRequired"
)), 0))
) {
613 return false;
614 }
615 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 615); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 615; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
616 args.rval().setUndefined();
617 return true;
618}
619
620static const JSJitInfo passOptionalByteBeforeRequired_methodinfo = {
621 { (JSJitGetterOp)passOptionalByteBeforeRequired },
622 { prototypes::id::TestJSImplInterface },
623 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
624 JSJitInfo::Method,
625 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
626 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
627 false, /* isInfallible. False in setters. */
628 false, /* isMovable. Not relevant for setters. */
629 false, /* isEliminatable. Not relevant for setters. */
630 false, /* isAlwaysInSlot. Only relevant for getters. */
631 false, /* isLazilyCachedInSlot. Only relevant for getters. */
632 false, /* isTypedMethod. Only relevant for methods. */
633 0 /* Reserved slot index, if we're stored in a slot, else 0. */
634};
635
636MOZ_CAN_RUN_SCRIPT static bool
637passOptionalByteWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
638{
639 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject642( cx, "TestJSImplInterface"
, "passOptionalByteWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
640 "TestJSImplInterface", "passOptionalByteWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject642( cx, "TestJSImplInterface"
, "passOptionalByteWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
641 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject642( cx, "TestJSImplInterface"
, "passOptionalByteWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
642 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject642( cx, "TestJSImplInterface"
, "passOptionalByteWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
643
644 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
645 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
646 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
647 if (objIsXray) {
648 unwrappedObj.emplace(cx, obj);
649 }
650 int8_t arg0;
651 if (args.hasDefined(0)) {
652 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
653 return false;
654 }
655 } else {
656 arg0 = 0;
657 }
658 if (objIsXray) {
659 // Since our object is an Xray, we can just CheckedUnwrapStatic:
660 // we know Xrays have no dynamic unwrap behavior.
661 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
662 if (!unwrappedObj.ref()) {
663 return false;
664 }
665 }
666 FastErrorResult rv;
667 // NOTE: This assert does NOT call the function.
668 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalByteWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
669 MOZ_KnownLive(self)(self)->PassOptionalByteWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
670 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalByteWithDefault"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalByteWithDefault"
)), 0))
) {
671 return false;
672 }
673 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 673); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 673; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
674 args.rval().setUndefined();
675 return true;
676}
677
678static const JSJitInfo passOptionalByteWithDefault_methodinfo = {
679 { (JSJitGetterOp)passOptionalByteWithDefault },
680 { prototypes::id::TestJSImplInterface },
681 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
682 JSJitInfo::Method,
683 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
684 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
685 false, /* isInfallible. False in setters. */
686 false, /* isMovable. Not relevant for setters. */
687 false, /* isEliminatable. Not relevant for setters. */
688 false, /* isAlwaysInSlot. Only relevant for getters. */
689 false, /* isLazilyCachedInSlot. Only relevant for getters. */
690 false, /* isTypedMethod. Only relevant for methods. */
691 0 /* Reserved slot index, if we're stored in a slot, else 0. */
692};
693
694MOZ_CAN_RUN_SCRIPT static bool
695passOptionalByteWithDefaultBeforeRequired(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
696{
697 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject700( cx, "TestJSImplInterface"
, "passOptionalByteWithDefaultBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
698 "TestJSImplInterface", "passOptionalByteWithDefaultBeforeRequired", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject700( cx, "TestJSImplInterface"
, "passOptionalByteWithDefaultBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
699 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject700( cx, "TestJSImplInterface"
, "passOptionalByteWithDefaultBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
700 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject700( cx, "TestJSImplInterface"
, "passOptionalByteWithDefaultBeforeRequired", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
701
702 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
703 if (!args.requireAtLeast(cx, "TestJSImplInterface.passOptionalByteWithDefaultBeforeRequired", 2)) {
704 return false;
705 }
706 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
707 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
708 if (objIsXray) {
709 unwrappedObj.emplace(cx, obj);
710 }
711 int8_t arg0;
712 if (args.hasDefined(0)) {
713 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
714 return false;
715 }
716 } else {
717 arg0 = 0;
718 }
719 int8_t arg1;
720 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[1], "Argument 2", &arg1)) {
721 return false;
722 }
723 if (objIsXray) {
724 // Since our object is an Xray, we can just CheckedUnwrapStatic:
725 // we know Xrays have no dynamic unwrap behavior.
726 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
727 if (!unwrappedObj.ref()) {
728 return false;
729 }
730 }
731 FastErrorResult rv;
732 // NOTE: This assert does NOT call the function.
733 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalByteWithDefaultBeforeRequired(arg0, arg1, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
734 MOZ_KnownLive(self)(self)->PassOptionalByteWithDefaultBeforeRequired(arg0, arg1, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
735 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalByteWithDefaultBeforeRequired"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalByteWithDefaultBeforeRequired"
)), 0))
) {
736 return false;
737 }
738 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 738); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 738; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
739 args.rval().setUndefined();
740 return true;
741}
742
743static const JSJitInfo passOptionalByteWithDefaultBeforeRequired_methodinfo = {
744 { (JSJitGetterOp)passOptionalByteWithDefaultBeforeRequired },
745 { prototypes::id::TestJSImplInterface },
746 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
747 JSJitInfo::Method,
748 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
749 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
750 false, /* isInfallible. False in setters. */
751 false, /* isMovable. Not relevant for setters. */
752 false, /* isEliminatable. Not relevant for setters. */
753 false, /* isAlwaysInSlot. Only relevant for getters. */
754 false, /* isLazilyCachedInSlot. Only relevant for getters. */
755 false, /* isTypedMethod. Only relevant for methods. */
756 0 /* Reserved slot index, if we're stored in a slot, else 0. */
757};
758
759MOZ_CAN_RUN_SCRIPT static bool
760passNullableByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
761{
762 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject765( cx, "TestJSImplInterface"
, "passNullableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
763 "TestJSImplInterface", "passNullableByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject765( cx, "TestJSImplInterface"
, "passNullableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
764 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject765( cx, "TestJSImplInterface"
, "passNullableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
765 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject765( cx, "TestJSImplInterface"
, "passNullableByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
766
767 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
768 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableByte", 1)) {
769 return false;
770 }
771 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
772 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
773 if (objIsXray) {
774 unwrappedObj.emplace(cx, obj);
775 }
776 Nullable<int8_t> arg0;
777 if (args[0].isNullOrUndefined()) {
778 arg0.SetNull();
779 } else if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0.SetValue())) {
780 return false;
781 }
782 if (objIsXray) {
783 // Since our object is an Xray, we can just CheckedUnwrapStatic:
784 // we know Xrays have no dynamic unwrap behavior.
785 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
786 if (!unwrappedObj.ref()) {
787 return false;
788 }
789 }
790 FastErrorResult rv;
791 // NOTE: This assert does NOT call the function.
792 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableByte(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
793 MOZ_KnownLive(self)(self)->PassNullableByte(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
794 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableByte"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableByte"
)), 0))
) {
795 return false;
796 }
797 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 797); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 797; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
798 args.rval().setUndefined();
799 return true;
800}
801
802static const JSJitInfo passNullableByte_methodinfo = {
803 { (JSJitGetterOp)passNullableByte },
804 { prototypes::id::TestJSImplInterface },
805 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
806 JSJitInfo::Method,
807 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
808 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
809 false, /* isInfallible. False in setters. */
810 false, /* isMovable. Not relevant for setters. */
811 false, /* isEliminatable. Not relevant for setters. */
812 false, /* isAlwaysInSlot. Only relevant for getters. */
813 false, /* isLazilyCachedInSlot. Only relevant for getters. */
814 false, /* isTypedMethod. Only relevant for methods. */
815 0 /* Reserved slot index, if we're stored in a slot, else 0. */
816};
817
818MOZ_CAN_RUN_SCRIPT static bool
819passOptionalNullableByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
820{
821 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject824( cx, "TestJSImplInterface"
, "passOptionalNullableByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
822 "TestJSImplInterface", "passOptionalNullableByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject824( cx, "TestJSImplInterface"
, "passOptionalNullableByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
823 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject824( cx, "TestJSImplInterface"
, "passOptionalNullableByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
824 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject824( cx, "TestJSImplInterface"
, "passOptionalNullableByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
825
826 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
827 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
828 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
829 if (objIsXray) {
830 unwrappedObj.emplace(cx, obj);
831 }
832 Optional<Nullable<int8_t>> arg0;
833 if (args.hasDefined(0)) {
834 arg0.Construct();
835 if (args[0].isNullOrUndefined()) {
836 arg0.Value().SetNull();
837 } else if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value().SetValue())) {
838 return false;
839 }
840 }
841 if (objIsXray) {
842 // Since our object is an Xray, we can just CheckedUnwrapStatic:
843 // we know Xrays have no dynamic unwrap behavior.
844 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
845 if (!unwrappedObj.ref()) {
846 return false;
847 }
848 }
849 FastErrorResult rv;
850 // NOTE: This assert does NOT call the function.
851 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableByte(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
852 MOZ_KnownLive(self)(self)->PassOptionalNullableByte(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
853 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableByte"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableByte"
)), 0))
) {
854 return false;
855 }
856 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 856); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 856; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
857 args.rval().setUndefined();
858 return true;
859}
860
861static const JSJitInfo passOptionalNullableByte_methodinfo = {
862 { (JSJitGetterOp)passOptionalNullableByte },
863 { prototypes::id::TestJSImplInterface },
864 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
865 JSJitInfo::Method,
866 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
867 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
868 false, /* isInfallible. False in setters. */
869 false, /* isMovable. Not relevant for setters. */
870 false, /* isEliminatable. Not relevant for setters. */
871 false, /* isAlwaysInSlot. Only relevant for getters. */
872 false, /* isLazilyCachedInSlot. Only relevant for getters. */
873 false, /* isTypedMethod. Only relevant for methods. */
874 0 /* Reserved slot index, if we're stored in a slot, else 0. */
875};
876
877MOZ_CAN_RUN_SCRIPT static bool
878passVariadicByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
879{
880 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject883( cx, "TestJSImplInterface"
, "passVariadicByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
881 "TestJSImplInterface", "passVariadicByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject883( cx, "TestJSImplInterface"
, "passVariadicByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
882 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject883( cx, "TestJSImplInterface"
, "passVariadicByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
883 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject883( cx, "TestJSImplInterface"
, "passVariadicByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
884
885 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
886 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
887 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
888 if (objIsXray) {
889 unwrappedObj.emplace(cx, obj);
890 }
891 AutoSequence<int8_t> arg0;
892 if (args.length() > 0) {
893 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
894 JS_ReportOutOfMemory(cx);
895 return false;
896 }
897 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
898 // OK to do infallible append here, since we ensured capacity already.
899 int8_t& slot = *arg0.AppendElement();
900 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[variadicArg], "Argument 1", &slot)) {
901 return false;
902 }
903 }
904 }
905 if (objIsXray) {
906 // Since our object is an Xray, we can just CheckedUnwrapStatic:
907 // we know Xrays have no dynamic unwrap behavior.
908 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
909 if (!unwrappedObj.ref()) {
910 return false;
911 }
912 }
913 FastErrorResult rv;
914 // NOTE: This assert does NOT call the function.
915 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicByte(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
916 MOZ_KnownLive(self)(self)->PassVariadicByte(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
917 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicByte"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicByte"
)), 0))
) {
918 return false;
919 }
920 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 920); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 920; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
921 args.rval().setUndefined();
922 return true;
923}
924
925static const JSJitInfo passVariadicByte_methodinfo = {
926 { (JSJitGetterOp)passVariadicByte },
927 { prototypes::id::TestJSImplInterface },
928 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
929 JSJitInfo::Method,
930 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
931 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
932 false, /* isInfallible. False in setters. */
933 false, /* isMovable. Not relevant for setters. */
934 false, /* isEliminatable. Not relevant for setters. */
935 false, /* isAlwaysInSlot. Only relevant for getters. */
936 false, /* isLazilyCachedInSlot. Only relevant for getters. */
937 false, /* isTypedMethod. Only relevant for methods. */
938 0 /* Reserved slot index, if we're stored in a slot, else 0. */
939};
940
941MOZ_CAN_RUN_SCRIPT static bool
942get_sideEffectFreeByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
943{
944 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject947( cx, "TestJSImplInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
945 "TestJSImplInterface", "sideEffectFreeByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject947( cx, "TestJSImplInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
946 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject947( cx, "TestJSImplInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
947 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject947( cx, "TestJSImplInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
948
949 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
950 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
951 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
952 if (objIsXray) {
953 unwrappedObj.emplace(cx, obj);
954 }
955 if (objIsXray) {
956 // Since our object is an Xray, we can just CheckedUnwrapStatic:
957 // we know Xrays have no dynamic unwrap behavior.
958 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
959 if (!unwrappedObj.ref()) {
960 return false;
961 }
962 }
963 FastErrorResult rv;
964 int8_t result(MOZ_KnownLive(self)(self)->GetSideEffectFreeByte(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
965 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.sideEffectFreeByte getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.sideEffectFreeByte getter"
)), 0))
) {
966 return false;
967 }
968 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 968); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 968; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
969 args.rval().setInt32(int32_t(result));
970 return true;
971}
972
973MOZ_CAN_RUN_SCRIPT static bool
974set_sideEffectFreeByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
975{
976 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject979( cx, "TestJSImplInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
977 "TestJSImplInterface", "sideEffectFreeByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject979( cx, "TestJSImplInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
978 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject979( cx, "TestJSImplInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
979 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject979( cx, "TestJSImplInterface"
, "sideEffectFreeByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
980
981 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
982 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
983 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
984 if (objIsXray) {
985 unwrappedObj.emplace(cx, obj);
986 }
987 int8_t arg0;
988 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
989 return false;
990 }
991 if (objIsXray) {
992 // Since our object is an Xray, we can just CheckedUnwrapStatic:
993 // we know Xrays have no dynamic unwrap behavior.
994 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
995 if (!unwrappedObj.ref()) {
996 return false;
997 }
998 }
999 FastErrorResult rv;
1000 // NOTE: This assert does NOT call the function.
1001 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetSideEffectFreeByte(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
1002 MOZ_KnownLive(self)(self)->SetSideEffectFreeByte(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
1003 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.sideEffectFreeByte setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.sideEffectFreeByte setter"
)), 0))
) {
1004 return false;
1005 }
1006 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1006); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1006; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1007
1008 return true;
1009}
1010
1011static const JSJitInfo sideEffectFreeByte_getterinfo = {
1012 { get_sideEffectFreeByte },
1013 { prototypes::id::TestJSImplInterface },
1014 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1015 JSJitInfo::Getter,
1016 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1017 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1018 false, /* isInfallible. False in setters. */
1019 false, /* isMovable. Not relevant for setters. */
1020 false, /* isEliminatable. Not relevant for setters. */
1021 false, /* isAlwaysInSlot. Only relevant for getters. */
1022 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1023 false, /* isTypedMethod. Only relevant for methods. */
1024 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1025};
1026static const JSJitInfo sideEffectFreeByte_setterinfo = {
1027 { (JSJitGetterOp)set_sideEffectFreeByte },
1028 { prototypes::id::TestJSImplInterface },
1029 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1030 JSJitInfo::Setter,
1031 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1032 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1033 false, /* isInfallible. False in setters. */
1034 false, /* isMovable. Not relevant for setters. */
1035 false, /* isEliminatable. Not relevant for setters. */
1036 false, /* isAlwaysInSlot. Only relevant for getters. */
1037 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1038 false, /* isTypedMethod. Only relevant for methods. */
1039 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1040};
1041
1042MOZ_CAN_RUN_SCRIPT static bool
1043get_domDependentByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
1044{
1045 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1048( cx, "TestJSImplInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1046 "TestJSImplInterface", "domDependentByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1048( cx, "TestJSImplInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1047 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject1048( cx, "TestJSImplInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1048 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1048( cx, "TestJSImplInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1049
1050 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1051 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1052 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1053 if (objIsXray) {
1054 unwrappedObj.emplace(cx, obj);
1055 }
1056 if (objIsXray) {
1057 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1058 // we know Xrays have no dynamic unwrap behavior.
1059 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1060 if (!unwrappedObj.ref()) {
1061 return false;
1062 }
1063 }
1064 FastErrorResult rv;
1065 int8_t result(MOZ_KnownLive(self)(self)->GetDomDependentByte(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
1066 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.domDependentByte getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.domDependentByte getter"
)), 0))
) {
1067 return false;
1068 }
1069 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1069); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1069; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1070 args.rval().setInt32(int32_t(result));
1071 return true;
1072}
1073
1074MOZ_CAN_RUN_SCRIPT static bool
1075set_domDependentByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
1076{
1077 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1080( cx, "TestJSImplInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1078 "TestJSImplInterface", "domDependentByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1080( cx, "TestJSImplInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1079 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject1080( cx, "TestJSImplInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1080 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1080( cx, "TestJSImplInterface"
, "domDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1081
1082 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1083 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1084 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1085 if (objIsXray) {
1086 unwrappedObj.emplace(cx, obj);
1087 }
1088 int8_t arg0;
1089 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
1090 return false;
1091 }
1092 if (objIsXray) {
1093 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1094 // we know Xrays have no dynamic unwrap behavior.
1095 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1096 if (!unwrappedObj.ref()) {
1097 return false;
1098 }
1099 }
1100 FastErrorResult rv;
1101 // NOTE: This assert does NOT call the function.
1102 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetDomDependentByte(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
1103 MOZ_KnownLive(self)(self)->SetDomDependentByte(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
1104 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.domDependentByte setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.domDependentByte setter"
)), 0))
) {
1105 return false;
1106 }
1107 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1107); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1107; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1108
1109 return true;
1110}
1111
1112static const JSJitInfo domDependentByte_getterinfo = {
1113 { get_domDependentByte },
1114 { prototypes::id::TestJSImplInterface },
1115 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1116 JSJitInfo::Getter,
1117 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
1118 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1119 false, /* isInfallible. False in setters. */
1120 false, /* isMovable. Not relevant for setters. */
1121 false, /* isEliminatable. Not relevant for setters. */
1122 false, /* isAlwaysInSlot. Only relevant for getters. */
1123 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1124 false, /* isTypedMethod. Only relevant for methods. */
1125 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1126};
1127static const JSJitInfo domDependentByte_setterinfo = {
1128 { (JSJitGetterOp)set_domDependentByte },
1129 { prototypes::id::TestJSImplInterface },
1130 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1131 JSJitInfo::Setter,
1132 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1133 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1134 false, /* isInfallible. False in setters. */
1135 false, /* isMovable. Not relevant for setters. */
1136 false, /* isEliminatable. Not relevant for setters. */
1137 false, /* isAlwaysInSlot. Only relevant for getters. */
1138 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1139 false, /* isTypedMethod. Only relevant for methods. */
1140 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1141};
1142
1143MOZ_CAN_RUN_SCRIPT static bool
1144get_constantByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
1145{
1146 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1149( cx, "TestJSImplInterface"
, "constantByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1147 "TestJSImplInterface", "constantByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1149( cx, "TestJSImplInterface"
, "constantByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1148 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject1149( cx, "TestJSImplInterface"
, "constantByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1149 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1149( cx, "TestJSImplInterface"
, "constantByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1150
1151 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1152 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1153 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1154 if (objIsXray) {
1155 unwrappedObj.emplace(cx, obj);
1156 }
1157 if (objIsXray) {
1158 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1159 // we know Xrays have no dynamic unwrap behavior.
1160 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1161 if (!unwrappedObj.ref()) {
1162 return false;
1163 }
1164 }
1165 FastErrorResult rv;
1166 int8_t result(MOZ_KnownLive(self)(self)->GetConstantByte(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
1167 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.constantByte getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.constantByte getter"
)), 0))
) {
1168 return false;
1169 }
1170 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1170); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1170; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1171 args.rval().setInt32(int32_t(result));
1172 return true;
1173}
1174
1175static const JSJitInfo constantByte_getterinfo = {
1176 { get_constantByte },
1177 { prototypes::id::TestJSImplInterface },
1178 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1179 JSJitInfo::Getter,
1180 JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */
1181 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1182 false, /* isInfallible. False in setters. */
1183 false, /* isMovable. Not relevant for setters. */
1184 false, /* isEliminatable. Not relevant for setters. */
1185 false, /* isAlwaysInSlot. Only relevant for getters. */
1186 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1187 false, /* isTypedMethod. Only relevant for methods. */
1188 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1189};
1190
1191MOZ_CAN_RUN_SCRIPT static bool
1192get_deviceStateDependentByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
1193{
1194 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1197( cx, "TestJSImplInterface"
, "deviceStateDependentByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1195 "TestJSImplInterface", "deviceStateDependentByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1197( cx, "TestJSImplInterface"
, "deviceStateDependentByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1196 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject1197( cx, "TestJSImplInterface"
, "deviceStateDependentByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1197 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1197( cx, "TestJSImplInterface"
, "deviceStateDependentByte", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
1198
1199 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1200 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1201 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1202 if (objIsXray) {
1203 unwrappedObj.emplace(cx, obj);
1204 }
1205 if (objIsXray) {
1206 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1207 // we know Xrays have no dynamic unwrap behavior.
1208 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1209 if (!unwrappedObj.ref()) {
1210 return false;
1211 }
1212 }
1213 FastErrorResult rv;
1214 int8_t result(MOZ_KnownLive(self)(self)->GetDeviceStateDependentByte(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
1215 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.deviceStateDependentByte getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.deviceStateDependentByte getter"
)), 0))
) {
1216 return false;
1217 }
1218 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1218); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1218; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1219 args.rval().setInt32(int32_t(result));
1220 return true;
1221}
1222
1223static const JSJitInfo deviceStateDependentByte_getterinfo = {
1224 { get_deviceStateDependentByte },
1225 { prototypes::id::TestJSImplInterface },
1226 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1227 JSJitInfo::Getter,
1228 JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */
1229 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1230 false, /* isInfallible. False in setters. */
1231 false, /* isMovable. Not relevant for setters. */
1232 false, /* isEliminatable. Not relevant for setters. */
1233 false, /* isAlwaysInSlot. Only relevant for getters. */
1234 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1235 false, /* isTypedMethod. Only relevant for methods. */
1236 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1237};
1238
1239MOZ_CAN_RUN_SCRIPT static bool
1240returnByteSideEffectFree(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1241{
1242 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1245( cx, "TestJSImplInterface"
, "returnByteSideEffectFree", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1243 "TestJSImplInterface", "returnByteSideEffectFree", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1245( cx, "TestJSImplInterface"
, "returnByteSideEffectFree", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1244 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1245( cx, "TestJSImplInterface"
, "returnByteSideEffectFree", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1245 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1245( cx, "TestJSImplInterface"
, "returnByteSideEffectFree", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
1246
1247 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1248 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1249 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1250 if (objIsXray) {
1251 unwrappedObj.emplace(cx, obj);
1252 }
1253 if (objIsXray) {
1254 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1255 // we know Xrays have no dynamic unwrap behavior.
1256 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1257 if (!unwrappedObj.ref()) {
1258 return false;
1259 }
1260 }
1261 FastErrorResult rv;
1262 int8_t result(MOZ_KnownLive(self)(self)->ReturnByteSideEffectFree(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
1263 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.returnByteSideEffectFree"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.returnByteSideEffectFree"
)), 0))
) {
1264 return false;
1265 }
1266 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1266); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1266; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1267 args.rval().setInt32(int32_t(result));
1268 return true;
1269}
1270
1271static const JSJitInfo::ArgType returnByteSideEffectFree_methodinfo_argTypes[] = { JSJitInfo::ArgTypeListEnd };
1272static const JSTypedMethodJitInfo returnByteSideEffectFree_methodinfo = {
1273 {
1274 { (JSJitGetterOp)returnByteSideEffectFree },
1275 { prototypes::id::TestJSImplInterface },
1276 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1277 JSJitInfo::Method,
1278 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1279 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1280 false, /* isInfallible. False in setters. */
1281 false, /* isMovable. Not relevant for setters. */
1282 false, /* isEliminatable. Not relevant for setters. */
1283 false, /* isAlwaysInSlot. Only relevant for getters. */
1284 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1285 true, /* isTypedMethod. Only relevant for methods. */
1286 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1287 },
1288 returnByteSideEffectFree_methodinfo_argTypes
1289};
1290
1291MOZ_CAN_RUN_SCRIPT static bool
1292returnDOMDependentByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1293{
1294 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1297( cx, "TestJSImplInterface"
, "returnDOMDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1295 "TestJSImplInterface", "returnDOMDependentByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1297( cx, "TestJSImplInterface"
, "returnDOMDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1296 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1297( cx, "TestJSImplInterface"
, "returnDOMDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1297 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1297( cx, "TestJSImplInterface"
, "returnDOMDependentByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1298
1299 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1300 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1301 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1302 if (objIsXray) {
1303 unwrappedObj.emplace(cx, obj);
1304 }
1305 if (objIsXray) {
1306 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1307 // we know Xrays have no dynamic unwrap behavior.
1308 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1309 if (!unwrappedObj.ref()) {
1310 return false;
1311 }
1312 }
1313 FastErrorResult rv;
1314 int8_t result(MOZ_KnownLive(self)(self)->ReturnDOMDependentByte(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
1315 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.returnDOMDependentByte"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.returnDOMDependentByte"
)), 0))
) {
1316 return false;
1317 }
1318 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1318); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1318; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1319 args.rval().setInt32(int32_t(result));
1320 return true;
1321}
1322
1323static const JSJitInfo::ArgType returnDOMDependentByte_methodinfo_argTypes[] = { JSJitInfo::ArgTypeListEnd };
1324static const JSTypedMethodJitInfo returnDOMDependentByte_methodinfo = {
1325 {
1326 { (JSJitGetterOp)returnDOMDependentByte },
1327 { prototypes::id::TestJSImplInterface },
1328 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1329 JSJitInfo::Method,
1330 JSJitInfo::AliasDOMSets, /* aliasSet. Not relevant for setters. */
1331 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1332 false, /* isInfallible. False in setters. */
1333 false, /* isMovable. Not relevant for setters. */
1334 false, /* isEliminatable. Not relevant for setters. */
1335 false, /* isAlwaysInSlot. Only relevant for getters. */
1336 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1337 true, /* isTypedMethod. Only relevant for methods. */
1338 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1339 },
1340 returnDOMDependentByte_methodinfo_argTypes
1341};
1342
1343MOZ_CAN_RUN_SCRIPT static bool
1344returnConstantByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1345{
1346 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1349( cx, "TestJSImplInterface"
, "returnConstantByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1347 "TestJSImplInterface", "returnConstantByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1349( cx, "TestJSImplInterface"
, "returnConstantByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1348 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1349( cx, "TestJSImplInterface"
, "returnConstantByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1349 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1349( cx, "TestJSImplInterface"
, "returnConstantByte", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1350
1351 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1352 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1353 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1354 if (objIsXray) {
1355 unwrappedObj.emplace(cx, obj);
1356 }
1357 if (objIsXray) {
1358 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1359 // we know Xrays have no dynamic unwrap behavior.
1360 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1361 if (!unwrappedObj.ref()) {
1362 return false;
1363 }
1364 }
1365 FastErrorResult rv;
1366 int8_t result(MOZ_KnownLive(self)(self)->ReturnConstantByte(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
1367 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.returnConstantByte"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.returnConstantByte"
)), 0))
) {
1368 return false;
1369 }
1370 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1370); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1370; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1371 args.rval().setInt32(int32_t(result));
1372 return true;
1373}
1374
1375static const JSJitInfo::ArgType returnConstantByte_methodinfo_argTypes[] = { JSJitInfo::ArgTypeListEnd };
1376static const JSTypedMethodJitInfo returnConstantByte_methodinfo = {
1377 {
1378 { (JSJitGetterOp)returnConstantByte },
1379 { prototypes::id::TestJSImplInterface },
1380 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1381 JSJitInfo::Method,
1382 JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */
1383 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1384 false, /* isInfallible. False in setters. */
1385 false, /* isMovable. Not relevant for setters. */
1386 false, /* isEliminatable. Not relevant for setters. */
1387 false, /* isAlwaysInSlot. Only relevant for getters. */
1388 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1389 true, /* isTypedMethod. Only relevant for methods. */
1390 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1391 },
1392 returnConstantByte_methodinfo_argTypes
1393};
1394
1395MOZ_CAN_RUN_SCRIPT static bool
1396returnDeviceStateDependentByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1397{
1398 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1401( cx, "TestJSImplInterface"
, "returnDeviceStateDependentByte", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1399 "TestJSImplInterface", "returnDeviceStateDependentByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1401( cx, "TestJSImplInterface"
, "returnDeviceStateDependentByte", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1400 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1401( cx, "TestJSImplInterface"
, "returnDeviceStateDependentByte", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1401 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1401( cx, "TestJSImplInterface"
, "returnDeviceStateDependentByte", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
1402
1403 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1404 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1405 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1406 if (objIsXray) {
1407 unwrappedObj.emplace(cx, obj);
1408 }
1409 if (objIsXray) {
1410 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1411 // we know Xrays have no dynamic unwrap behavior.
1412 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1413 if (!unwrappedObj.ref()) {
1414 return false;
1415 }
1416 }
1417 FastErrorResult rv;
1418 int8_t result(MOZ_KnownLive(self)(self)->ReturnDeviceStateDependentByte(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
1419 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.returnDeviceStateDependentByte"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.returnDeviceStateDependentByte"
)), 0))
) {
1420 return false;
1421 }
1422 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1422); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1422; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1423 args.rval().setInt32(int32_t(result));
1424 return true;
1425}
1426
1427static const JSJitInfo::ArgType returnDeviceStateDependentByte_methodinfo_argTypes[] = { JSJitInfo::ArgTypeListEnd };
1428static const JSTypedMethodJitInfo returnDeviceStateDependentByte_methodinfo = {
1429 {
1430 { (JSJitGetterOp)returnDeviceStateDependentByte },
1431 { prototypes::id::TestJSImplInterface },
1432 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1433 JSJitInfo::Method,
1434 JSJitInfo::AliasNone, /* aliasSet. Not relevant for setters. */
1435 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1436 false, /* isInfallible. False in setters. */
1437 false, /* isMovable. Not relevant for setters. */
1438 false, /* isEliminatable. Not relevant for setters. */
1439 false, /* isAlwaysInSlot. Only relevant for getters. */
1440 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1441 true, /* isTypedMethod. Only relevant for methods. */
1442 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1443 },
1444 returnDeviceStateDependentByte_methodinfo_argTypes
1445};
1446
1447MOZ_CAN_RUN_SCRIPT static bool
1448get_readonlyShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
1449{
1450 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1453( cx, "TestJSImplInterface"
, "readonlyShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1451 "TestJSImplInterface", "readonlyShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1453( cx, "TestJSImplInterface"
, "readonlyShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1452 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject1453( cx, "TestJSImplInterface"
, "readonlyShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1453 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1453( cx, "TestJSImplInterface"
, "readonlyShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1454
1455 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1456 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1457 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1458 if (objIsXray) {
1459 unwrappedObj.emplace(cx, obj);
1460 }
1461 if (objIsXray) {
1462 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1463 // we know Xrays have no dynamic unwrap behavior.
1464 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1465 if (!unwrappedObj.ref()) {
1466 return false;
1467 }
1468 }
1469 FastErrorResult rv;
1470 int16_t result(MOZ_KnownLive(self)(self)->GetReadonlyShort(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
1471 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyShort getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyShort getter"
)), 0))
) {
1472 return false;
1473 }
1474 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1474); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1474; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1475 args.rval().setInt32(int32_t(result));
1476 return true;
1477}
1478
1479static const JSJitInfo readonlyShort_getterinfo = {
1480 { get_readonlyShort },
1481 { prototypes::id::TestJSImplInterface },
1482 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1483 JSJitInfo::Getter,
1484 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1485 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1486 false, /* isInfallible. False in setters. */
1487 false, /* isMovable. Not relevant for setters. */
1488 false, /* isEliminatable. Not relevant for setters. */
1489 false, /* isAlwaysInSlot. Only relevant for getters. */
1490 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1491 false, /* isTypedMethod. Only relevant for methods. */
1492 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1493};
1494
1495MOZ_CAN_RUN_SCRIPT static bool
1496get_writableShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
1497{
1498 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1501( cx, "TestJSImplInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1499 "TestJSImplInterface", "writableShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1501( cx, "TestJSImplInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1500 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject1501( cx, "TestJSImplInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1501 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1501( cx, "TestJSImplInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1502
1503 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1504 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1505 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1506 if (objIsXray) {
1507 unwrappedObj.emplace(cx, obj);
1508 }
1509 if (objIsXray) {
1510 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1511 // we know Xrays have no dynamic unwrap behavior.
1512 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1513 if (!unwrappedObj.ref()) {
1514 return false;
1515 }
1516 }
1517 FastErrorResult rv;
1518 int16_t result(MOZ_KnownLive(self)(self)->GetWritableShort(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
1519 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableShort getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableShort getter"
)), 0))
) {
1520 return false;
1521 }
1522 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1522); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1522; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1523 args.rval().setInt32(int32_t(result));
1524 return true;
1525}
1526
1527MOZ_CAN_RUN_SCRIPT static bool
1528set_writableShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
1529{
1530 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1533( cx, "TestJSImplInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1531 "TestJSImplInterface", "writableShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1533( cx, "TestJSImplInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1532 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject1533( cx, "TestJSImplInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1533 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1533( cx, "TestJSImplInterface"
, "writableShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1534
1535 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1536 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1537 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1538 if (objIsXray) {
1539 unwrappedObj.emplace(cx, obj);
1540 }
1541 int16_t arg0;
1542 if (!ValueToPrimitive<int16_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
1543 return false;
1544 }
1545 if (objIsXray) {
1546 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1547 // we know Xrays have no dynamic unwrap behavior.
1548 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1549 if (!unwrappedObj.ref()) {
1550 return false;
1551 }
1552 }
1553 FastErrorResult rv;
1554 // NOTE: This assert does NOT call the function.
1555 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableShort(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
1556 MOZ_KnownLive(self)(self)->SetWritableShort(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
1557 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableShort setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableShort setter"
)), 0))
) {
1558 return false;
1559 }
1560 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1560); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1560; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1561
1562 return true;
1563}
1564
1565static const JSJitInfo writableShort_getterinfo = {
1566 { get_writableShort },
1567 { prototypes::id::TestJSImplInterface },
1568 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1569 JSJitInfo::Getter,
1570 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1571 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1572 false, /* isInfallible. False in setters. */
1573 false, /* isMovable. Not relevant for setters. */
1574 false, /* isEliminatable. Not relevant for setters. */
1575 false, /* isAlwaysInSlot. Only relevant for getters. */
1576 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1577 false, /* isTypedMethod. Only relevant for methods. */
1578 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1579};
1580static const JSJitInfo writableShort_setterinfo = {
1581 { (JSJitGetterOp)set_writableShort },
1582 { prototypes::id::TestJSImplInterface },
1583 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1584 JSJitInfo::Setter,
1585 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1586 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1587 false, /* isInfallible. False in setters. */
1588 false, /* isMovable. Not relevant for setters. */
1589 false, /* isEliminatable. Not relevant for setters. */
1590 false, /* isAlwaysInSlot. Only relevant for getters. */
1591 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1592 false, /* isTypedMethod. Only relevant for methods. */
1593 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1594};
1595
1596MOZ_CAN_RUN_SCRIPT static bool
1597passShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1598{
1599 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1602( cx, "TestJSImplInterface"
, "passShort", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
1600 "TestJSImplInterface", "passShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1602( cx, "TestJSImplInterface"
, "passShort", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
1601 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1602( cx, "TestJSImplInterface"
, "passShort", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
1602 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1602( cx, "TestJSImplInterface"
, "passShort", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
1603
1604 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1605 if (!args.requireAtLeast(cx, "TestJSImplInterface.passShort", 1)) {
1606 return false;
1607 }
1608 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1609 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1610 if (objIsXray) {
1611 unwrappedObj.emplace(cx, obj);
1612 }
1613 int16_t arg0;
1614 if (!ValueToPrimitive<int16_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
1615 return false;
1616 }
1617 if (objIsXray) {
1618 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1619 // we know Xrays have no dynamic unwrap behavior.
1620 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1621 if (!unwrappedObj.ref()) {
1622 return false;
1623 }
1624 }
1625 FastErrorResult rv;
1626 // NOTE: This assert does NOT call the function.
1627 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassShort(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
1628 MOZ_KnownLive(self)(self)->PassShort(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
1629 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passShort"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passShort"
)), 0))
) {
1630 return false;
1631 }
1632 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1632); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1632; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1633 args.rval().setUndefined();
1634 return true;
1635}
1636
1637static const JSJitInfo passShort_methodinfo = {
1638 { (JSJitGetterOp)passShort },
1639 { prototypes::id::TestJSImplInterface },
1640 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1641 JSJitInfo::Method,
1642 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1643 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1644 false, /* isInfallible. False in setters. */
1645 false, /* isMovable. Not relevant for setters. */
1646 false, /* isEliminatable. Not relevant for setters. */
1647 false, /* isAlwaysInSlot. Only relevant for getters. */
1648 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1649 false, /* isTypedMethod. Only relevant for methods. */
1650 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1651};
1652
1653MOZ_CAN_RUN_SCRIPT static bool
1654receiveShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1655{
1656 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1659( cx, "TestJSImplInterface"
, "receiveShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1657 "TestJSImplInterface", "receiveShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1659( cx, "TestJSImplInterface"
, "receiveShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1658 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1659( cx, "TestJSImplInterface"
, "receiveShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1659 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1659( cx, "TestJSImplInterface"
, "receiveShort", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1660
1661 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1662 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1663 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1664 if (objIsXray) {
1665 unwrappedObj.emplace(cx, obj);
1666 }
1667 if (objIsXray) {
1668 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1669 // we know Xrays have no dynamic unwrap behavior.
1670 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1671 if (!unwrappedObj.ref()) {
1672 return false;
1673 }
1674 }
1675 FastErrorResult rv;
1676 int16_t result(MOZ_KnownLive(self)(self)->ReceiveShort(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
1677 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveShort"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveShort"
)), 0))
) {
1678 return false;
1679 }
1680 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1680); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1680; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1681 args.rval().setInt32(int32_t(result));
1682 return true;
1683}
1684
1685static const JSJitInfo receiveShort_methodinfo = {
1686 { (JSJitGetterOp)receiveShort },
1687 { prototypes::id::TestJSImplInterface },
1688 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1689 JSJitInfo::Method,
1690 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1691 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1692 false, /* isInfallible. False in setters. */
1693 false, /* isMovable. Not relevant for setters. */
1694 false, /* isEliminatable. Not relevant for setters. */
1695 false, /* isAlwaysInSlot. Only relevant for getters. */
1696 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1697 false, /* isTypedMethod. Only relevant for methods. */
1698 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1699};
1700
1701MOZ_CAN_RUN_SCRIPT static bool
1702passOptionalShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1703{
1704 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1707( cx, "TestJSImplInterface"
, "passOptionalShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1705 "TestJSImplInterface", "passOptionalShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1707( cx, "TestJSImplInterface"
, "passOptionalShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1706 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1707( cx, "TestJSImplInterface"
, "passOptionalShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1707 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1707( cx, "TestJSImplInterface"
, "passOptionalShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1708
1709 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1710 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1711 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1712 if (objIsXray) {
1713 unwrappedObj.emplace(cx, obj);
1714 }
1715 Optional<int16_t> arg0;
1716 if (args.hasDefined(0)) {
1717 arg0.Construct();
1718 if (!ValueToPrimitive<int16_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
1719 return false;
1720 }
1721 }
1722 if (objIsXray) {
1723 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1724 // we know Xrays have no dynamic unwrap behavior.
1725 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1726 if (!unwrappedObj.ref()) {
1727 return false;
1728 }
1729 }
1730 FastErrorResult rv;
1731 // NOTE: This assert does NOT call the function.
1732 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalShort(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
1733 MOZ_KnownLive(self)(self)->PassOptionalShort(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
1734 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalShort"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalShort"
)), 0))
) {
1735 return false;
1736 }
1737 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1737); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1737; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1738 args.rval().setUndefined();
1739 return true;
1740}
1741
1742static const JSJitInfo passOptionalShort_methodinfo = {
1743 { (JSJitGetterOp)passOptionalShort },
1744 { prototypes::id::TestJSImplInterface },
1745 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1746 JSJitInfo::Method,
1747 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1748 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1749 false, /* isInfallible. False in setters. */
1750 false, /* isMovable. Not relevant for setters. */
1751 false, /* isEliminatable. Not relevant for setters. */
1752 false, /* isAlwaysInSlot. Only relevant for getters. */
1753 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1754 false, /* isTypedMethod. Only relevant for methods. */
1755 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1756};
1757
1758MOZ_CAN_RUN_SCRIPT static bool
1759passOptionalShortWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1760{
1761 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1764( cx, "TestJSImplInterface"
, "passOptionalShortWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1762 "TestJSImplInterface", "passOptionalShortWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1764( cx, "TestJSImplInterface"
, "passOptionalShortWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1763 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1764( cx, "TestJSImplInterface"
, "passOptionalShortWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
1764 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1764( cx, "TestJSImplInterface"
, "passOptionalShortWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
1765
1766 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1767 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1768 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1769 if (objIsXray) {
1770 unwrappedObj.emplace(cx, obj);
1771 }
1772 int16_t arg0;
1773 if (args.hasDefined(0)) {
1774 if (!ValueToPrimitive<int16_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
1775 return false;
1776 }
1777 } else {
1778 arg0 = 5;
1779 }
1780 if (objIsXray) {
1781 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1782 // we know Xrays have no dynamic unwrap behavior.
1783 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1784 if (!unwrappedObj.ref()) {
1785 return false;
1786 }
1787 }
1788 FastErrorResult rv;
1789 // NOTE: This assert does NOT call the function.
1790 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalShortWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
1791 MOZ_KnownLive(self)(self)->PassOptionalShortWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
1792 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalShortWithDefault"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalShortWithDefault"
)), 0))
) {
1793 return false;
1794 }
1795 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1795); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1795; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1796 args.rval().setUndefined();
1797 return true;
1798}
1799
1800static const JSJitInfo passOptionalShortWithDefault_methodinfo = {
1801 { (JSJitGetterOp)passOptionalShortWithDefault },
1802 { prototypes::id::TestJSImplInterface },
1803 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1804 JSJitInfo::Method,
1805 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1806 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1807 false, /* isInfallible. False in setters. */
1808 false, /* isMovable. Not relevant for setters. */
1809 false, /* isEliminatable. Not relevant for setters. */
1810 false, /* isAlwaysInSlot. Only relevant for getters. */
1811 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1812 false, /* isTypedMethod. Only relevant for methods. */
1813 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1814};
1815
1816MOZ_CAN_RUN_SCRIPT static bool
1817get_readonlyLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
1818{
1819 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1822( cx, "TestJSImplInterface"
, "readonlyLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1820 "TestJSImplInterface", "readonlyLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1822( cx, "TestJSImplInterface"
, "readonlyLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1821 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject1822( cx, "TestJSImplInterface"
, "readonlyLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1822 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1822( cx, "TestJSImplInterface"
, "readonlyLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1823
1824 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1825 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1826 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1827 if (objIsXray) {
1828 unwrappedObj.emplace(cx, obj);
1829 }
1830 if (objIsXray) {
1831 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1832 // we know Xrays have no dynamic unwrap behavior.
1833 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1834 if (!unwrappedObj.ref()) {
1835 return false;
1836 }
1837 }
1838 FastErrorResult rv;
1839 int32_t result(MOZ_KnownLive(self)(self)->GetReadonlyLong(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
1840 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyLong getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyLong getter"
)), 0))
) {
1841 return false;
1842 }
1843 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1843); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1843; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1844 args.rval().setInt32(int32_t(result));
1845 return true;
1846}
1847
1848static const JSJitInfo readonlyLong_getterinfo = {
1849 { get_readonlyLong },
1850 { prototypes::id::TestJSImplInterface },
1851 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1852 JSJitInfo::Getter,
1853 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1854 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1855 false, /* isInfallible. False in setters. */
1856 false, /* isMovable. Not relevant for setters. */
1857 false, /* isEliminatable. Not relevant for setters. */
1858 false, /* isAlwaysInSlot. Only relevant for getters. */
1859 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1860 false, /* isTypedMethod. Only relevant for methods. */
1861 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1862};
1863
1864MOZ_CAN_RUN_SCRIPT static bool
1865get_writableLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
1866{
1867 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1870( cx, "TestJSImplInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1868 "TestJSImplInterface", "writableLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1870( cx, "TestJSImplInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1869 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject1870( cx, "TestJSImplInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1870 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1870( cx, "TestJSImplInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1871
1872 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1873 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1874 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1875 if (objIsXray) {
1876 unwrappedObj.emplace(cx, obj);
1877 }
1878 if (objIsXray) {
1879 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1880 // we know Xrays have no dynamic unwrap behavior.
1881 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1882 if (!unwrappedObj.ref()) {
1883 return false;
1884 }
1885 }
1886 FastErrorResult rv;
1887 int32_t result(MOZ_KnownLive(self)(self)->GetWritableLong(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
1888 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableLong getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableLong getter"
)), 0))
) {
1889 return false;
1890 }
1891 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1891); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1891; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1892 args.rval().setInt32(int32_t(result));
1893 return true;
1894}
1895
1896MOZ_CAN_RUN_SCRIPT static bool
1897set_writableLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
1898{
1899 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1902( cx, "TestJSImplInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1900 "TestJSImplInterface", "writableLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1902( cx, "TestJSImplInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1901 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject1902( cx, "TestJSImplInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
1902 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1902( cx, "TestJSImplInterface"
, "writableLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
1903
1904 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1905 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1906 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1907 if (objIsXray) {
1908 unwrappedObj.emplace(cx, obj);
1909 }
1910 int32_t arg0;
1911 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
1912 return false;
1913 }
1914 if (objIsXray) {
1915 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1916 // we know Xrays have no dynamic unwrap behavior.
1917 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1918 if (!unwrappedObj.ref()) {
1919 return false;
1920 }
1921 }
1922 FastErrorResult rv;
1923 // NOTE: This assert does NOT call the function.
1924 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
1925 MOZ_KnownLive(self)(self)->SetWritableLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
1926 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableLong setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableLong setter"
)), 0))
) {
1927 return false;
1928 }
1929 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 1929); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 1929; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
1930
1931 return true;
1932}
1933
1934static const JSJitInfo writableLong_getterinfo = {
1935 { get_writableLong },
1936 { prototypes::id::TestJSImplInterface },
1937 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1938 JSJitInfo::Getter,
1939 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1940 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
1941 false, /* isInfallible. False in setters. */
1942 false, /* isMovable. Not relevant for setters. */
1943 false, /* isEliminatable. Not relevant for setters. */
1944 false, /* isAlwaysInSlot. Only relevant for getters. */
1945 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1946 false, /* isTypedMethod. Only relevant for methods. */
1947 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1948};
1949static const JSJitInfo writableLong_setterinfo = {
1950 { (JSJitGetterOp)set_writableLong },
1951 { prototypes::id::TestJSImplInterface },
1952 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
1953 JSJitInfo::Setter,
1954 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
1955 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
1956 false, /* isInfallible. False in setters. */
1957 false, /* isMovable. Not relevant for setters. */
1958 false, /* isEliminatable. Not relevant for setters. */
1959 false, /* isAlwaysInSlot. Only relevant for getters. */
1960 false, /* isLazilyCachedInSlot. Only relevant for getters. */
1961 false, /* isTypedMethod. Only relevant for methods. */
1962 0 /* Reserved slot index, if we're stored in a slot, else 0. */
1963};
1964
1965MOZ_CAN_RUN_SCRIPT static bool
1966passLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
1967{
1968 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject1971( cx, "TestJSImplInterface"
, "passLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
1969 "TestJSImplInterface", "passLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject1971( cx, "TestJSImplInterface"
, "passLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
1970 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject1971( cx, "TestJSImplInterface"
, "passLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
1971 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject1971( cx, "TestJSImplInterface"
, "passLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
1972
1973 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
1974 if (!args.requireAtLeast(cx, "TestJSImplInterface.passLong", 1)) {
1975 return false;
1976 }
1977 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
1978 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
1979 if (objIsXray) {
1980 unwrappedObj.emplace(cx, obj);
1981 }
1982 int32_t arg0;
1983 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
1984 return false;
1985 }
1986 if (objIsXray) {
1987 // Since our object is an Xray, we can just CheckedUnwrapStatic:
1988 // we know Xrays have no dynamic unwrap behavior.
1989 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
1990 if (!unwrappedObj.ref()) {
1991 return false;
1992 }
1993 }
1994 FastErrorResult rv;
1995 // NOTE: This assert does NOT call the function.
1996 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
1997 MOZ_KnownLive(self)(self)->PassLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
1998 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passLong"
)), 0))
) {
1999 return false;
2000 }
2001 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2001); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2001; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2002 args.rval().setUndefined();
2003 return true;
2004}
2005
2006static const JSJitInfo passLong_methodinfo = {
2007 { (JSJitGetterOp)passLong },
2008 { prototypes::id::TestJSImplInterface },
2009 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2010 JSJitInfo::Method,
2011 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2012 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2013 false, /* isInfallible. False in setters. */
2014 false, /* isMovable. Not relevant for setters. */
2015 false, /* isEliminatable. Not relevant for setters. */
2016 false, /* isAlwaysInSlot. Only relevant for getters. */
2017 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2018 false, /* isTypedMethod. Only relevant for methods. */
2019 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2020};
2021
2022MOZ_CAN_RUN_SCRIPT static bool
2023receiveLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2024{
2025 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2028( cx, "TestJSImplInterface"
, "receiveLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2026 "TestJSImplInterface", "receiveLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2028( cx, "TestJSImplInterface"
, "receiveLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2027 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2028( cx, "TestJSImplInterface"
, "receiveLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2028 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2028( cx, "TestJSImplInterface"
, "receiveLong", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2029
2030 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2031 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2032 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2033 if (objIsXray) {
2034 unwrappedObj.emplace(cx, obj);
2035 }
2036 if (objIsXray) {
2037 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2038 // we know Xrays have no dynamic unwrap behavior.
2039 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2040 if (!unwrappedObj.ref()) {
2041 return false;
2042 }
2043 }
2044 FastErrorResult rv;
2045 int32_t result(MOZ_KnownLive(self)(self)->ReceiveLong(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
2046 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveLong"
)), 0))
) {
2047 return false;
2048 }
2049 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2049); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2049; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2050 args.rval().setInt32(int32_t(result));
2051 return true;
2052}
2053
2054static const JSJitInfo receiveLong_methodinfo = {
2055 { (JSJitGetterOp)receiveLong },
2056 { prototypes::id::TestJSImplInterface },
2057 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2058 JSJitInfo::Method,
2059 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2060 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2061 false, /* isInfallible. False in setters. */
2062 false, /* isMovable. Not relevant for setters. */
2063 false, /* isEliminatable. Not relevant for setters. */
2064 false, /* isAlwaysInSlot. Only relevant for getters. */
2065 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2066 false, /* isTypedMethod. Only relevant for methods. */
2067 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2068};
2069
2070MOZ_CAN_RUN_SCRIPT static bool
2071passOptionalLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2072{
2073 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2076( cx, "TestJSImplInterface"
, "passOptionalLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2074 "TestJSImplInterface", "passOptionalLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2076( cx, "TestJSImplInterface"
, "passOptionalLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2075 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2076( cx, "TestJSImplInterface"
, "passOptionalLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2076 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2076( cx, "TestJSImplInterface"
, "passOptionalLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2077
2078 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2079 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2080 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2081 if (objIsXray) {
2082 unwrappedObj.emplace(cx, obj);
2083 }
2084 Optional<int32_t> arg0;
2085 if (args.hasDefined(0)) {
2086 arg0.Construct();
2087 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
2088 return false;
2089 }
2090 }
2091 if (objIsXray) {
2092 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2093 // we know Xrays have no dynamic unwrap behavior.
2094 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2095 if (!unwrappedObj.ref()) {
2096 return false;
2097 }
2098 }
2099 FastErrorResult rv;
2100 // NOTE: This assert does NOT call the function.
2101 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalLong(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
2102 MOZ_KnownLive(self)(self)->PassOptionalLong(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
2103 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalLong"
)), 0))
) {
2104 return false;
2105 }
2106 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2106); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2106; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2107 args.rval().setUndefined();
2108 return true;
2109}
2110
2111static const JSJitInfo passOptionalLong_methodinfo = {
2112 { (JSJitGetterOp)passOptionalLong },
2113 { prototypes::id::TestJSImplInterface },
2114 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2115 JSJitInfo::Method,
2116 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2117 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2118 false, /* isInfallible. False in setters. */
2119 false, /* isMovable. Not relevant for setters. */
2120 false, /* isEliminatable. Not relevant for setters. */
2121 false, /* isAlwaysInSlot. Only relevant for getters. */
2122 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2123 false, /* isTypedMethod. Only relevant for methods. */
2124 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2125};
2126
2127MOZ_CAN_RUN_SCRIPT static bool
2128passOptionalLongWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2129{
2130 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2133( cx, "TestJSImplInterface"
, "passOptionalLongWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2131 "TestJSImplInterface", "passOptionalLongWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2133( cx, "TestJSImplInterface"
, "passOptionalLongWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2132 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2133( cx, "TestJSImplInterface"
, "passOptionalLongWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2133 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2133( cx, "TestJSImplInterface"
, "passOptionalLongWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
2134
2135 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2136 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2137 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2138 if (objIsXray) {
2139 unwrappedObj.emplace(cx, obj);
2140 }
2141 int32_t arg0;
2142 if (args.hasDefined(0)) {
2143 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
2144 return false;
2145 }
2146 } else {
2147 arg0 = 7;
2148 }
2149 if (objIsXray) {
2150 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2151 // we know Xrays have no dynamic unwrap behavior.
2152 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2153 if (!unwrappedObj.ref()) {
2154 return false;
2155 }
2156 }
2157 FastErrorResult rv;
2158 // NOTE: This assert does NOT call the function.
2159 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalLongWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
2160 MOZ_KnownLive(self)(self)->PassOptionalLongWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
2161 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalLongWithDefault"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalLongWithDefault"
)), 0))
) {
2162 return false;
2163 }
2164 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2164); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2164; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2165 args.rval().setUndefined();
2166 return true;
2167}
2168
2169static const JSJitInfo passOptionalLongWithDefault_methodinfo = {
2170 { (JSJitGetterOp)passOptionalLongWithDefault },
2171 { prototypes::id::TestJSImplInterface },
2172 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2173 JSJitInfo::Method,
2174 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2175 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2176 false, /* isInfallible. False in setters. */
2177 false, /* isMovable. Not relevant for setters. */
2178 false, /* isEliminatable. Not relevant for setters. */
2179 false, /* isAlwaysInSlot. Only relevant for getters. */
2180 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2181 false, /* isTypedMethod. Only relevant for methods. */
2182 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2183};
2184
2185MOZ_CAN_RUN_SCRIPT static bool
2186get_readonlyLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2187{
2188 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2191( cx, "TestJSImplInterface"
, "readonlyLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2189 "TestJSImplInterface", "readonlyLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2191( cx, "TestJSImplInterface"
, "readonlyLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2190 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2191( cx, "TestJSImplInterface"
, "readonlyLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2191 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2191( cx, "TestJSImplInterface"
, "readonlyLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2192
2193 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2194 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2195 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2196 if (objIsXray) {
2197 unwrappedObj.emplace(cx, obj);
2198 }
2199 if (objIsXray) {
2200 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2201 // we know Xrays have no dynamic unwrap behavior.
2202 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2203 if (!unwrappedObj.ref()) {
2204 return false;
2205 }
2206 }
2207 FastErrorResult rv;
2208 int64_t result(MOZ_KnownLive(self)(self)->GetReadonlyLongLong(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
2209 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyLongLong getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyLongLong getter"
)), 0))
) {
2210 return false;
2211 }
2212 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2212); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2212; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2213 args.rval().set(JS_NumberValue(double(result)));
2214 return true;
2215}
2216
2217static const JSJitInfo readonlyLongLong_getterinfo = {
2218 { get_readonlyLongLong },
2219 { prototypes::id::TestJSImplInterface },
2220 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2221 JSJitInfo::Getter,
2222 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2223 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
2224 false, /* isInfallible. False in setters. */
2225 false, /* isMovable. Not relevant for setters. */
2226 false, /* isEliminatable. Not relevant for setters. */
2227 false, /* isAlwaysInSlot. Only relevant for getters. */
2228 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2229 false, /* isTypedMethod. Only relevant for methods. */
2230 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2231};
2232
2233MOZ_CAN_RUN_SCRIPT static bool
2234get_writableLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2235{
2236 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2239( cx, "TestJSImplInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2237 "TestJSImplInterface", "writableLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2239( cx, "TestJSImplInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2238 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2239( cx, "TestJSImplInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2239 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2239( cx, "TestJSImplInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2240
2241 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2242 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2243 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2244 if (objIsXray) {
2245 unwrappedObj.emplace(cx, obj);
2246 }
2247 if (objIsXray) {
2248 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2249 // we know Xrays have no dynamic unwrap behavior.
2250 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2251 if (!unwrappedObj.ref()) {
2252 return false;
2253 }
2254 }
2255 FastErrorResult rv;
2256 int64_t result(MOZ_KnownLive(self)(self)->GetWritableLongLong(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
2257 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableLongLong getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableLongLong getter"
)), 0))
) {
2258 return false;
2259 }
2260 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2260); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2260; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2261 args.rval().set(JS_NumberValue(double(result)));
2262 return true;
2263}
2264
2265MOZ_CAN_RUN_SCRIPT static bool
2266set_writableLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
2267{
2268 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2271( cx, "TestJSImplInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2269 "TestJSImplInterface", "writableLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2271( cx, "TestJSImplInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2270 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject2271( cx, "TestJSImplInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2271 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2271( cx, "TestJSImplInterface"
, "writableLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2272
2273 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2274 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2275 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2276 if (objIsXray) {
2277 unwrappedObj.emplace(cx, obj);
2278 }
2279 int64_t arg0;
2280 if (!ValueToPrimitive<int64_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
2281 return false;
2282 }
2283 if (objIsXray) {
2284 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2285 // we know Xrays have no dynamic unwrap behavior.
2286 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2287 if (!unwrappedObj.ref()) {
2288 return false;
2289 }
2290 }
2291 FastErrorResult rv;
2292 // NOTE: This assert does NOT call the function.
2293 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableLongLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
2294 MOZ_KnownLive(self)(self)->SetWritableLongLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
2295 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableLongLong setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableLongLong setter"
)), 0))
) {
2296 return false;
2297 }
2298 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2298); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2298; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2299
2300 return true;
2301}
2302
2303static const JSJitInfo writableLongLong_getterinfo = {
2304 { get_writableLongLong },
2305 { prototypes::id::TestJSImplInterface },
2306 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2307 JSJitInfo::Getter,
2308 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2309 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
2310 false, /* isInfallible. False in setters. */
2311 false, /* isMovable. Not relevant for setters. */
2312 false, /* isEliminatable. Not relevant for setters. */
2313 false, /* isAlwaysInSlot. Only relevant for getters. */
2314 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2315 false, /* isTypedMethod. Only relevant for methods. */
2316 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2317};
2318static const JSJitInfo writableLongLong_setterinfo = {
2319 { (JSJitGetterOp)set_writableLongLong },
2320 { prototypes::id::TestJSImplInterface },
2321 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2322 JSJitInfo::Setter,
2323 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2324 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2325 false, /* isInfallible. False in setters. */
2326 false, /* isMovable. Not relevant for setters. */
2327 false, /* isEliminatable. Not relevant for setters. */
2328 false, /* isAlwaysInSlot. Only relevant for getters. */
2329 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2330 false, /* isTypedMethod. Only relevant for methods. */
2331 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2332};
2333
2334MOZ_CAN_RUN_SCRIPT static bool
2335passLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2336{
2337 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2340( cx, "TestJSImplInterface"
, "passLongLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2338 "TestJSImplInterface", "passLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2340( cx, "TestJSImplInterface"
, "passLongLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2339 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2340( cx, "TestJSImplInterface"
, "passLongLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2340 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2340( cx, "TestJSImplInterface"
, "passLongLong", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2341
2342 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2343 if (!args.requireAtLeast(cx, "TestJSImplInterface.passLongLong", 1)) {
2344 return false;
2345 }
2346 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2347 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2348 if (objIsXray) {
2349 unwrappedObj.emplace(cx, obj);
2350 }
2351 int64_t arg0;
2352 if (!ValueToPrimitive<int64_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
2353 return false;
2354 }
2355 if (objIsXray) {
2356 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2357 // we know Xrays have no dynamic unwrap behavior.
2358 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2359 if (!unwrappedObj.ref()) {
2360 return false;
2361 }
2362 }
2363 FastErrorResult rv;
2364 // NOTE: This assert does NOT call the function.
2365 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassLongLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
2366 MOZ_KnownLive(self)(self)->PassLongLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
2367 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passLongLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passLongLong"
)), 0))
) {
2368 return false;
2369 }
2370 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2370); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2370; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2371 args.rval().setUndefined();
2372 return true;
2373}
2374
2375static const JSJitInfo passLongLong_methodinfo = {
2376 { (JSJitGetterOp)passLongLong },
2377 { prototypes::id::TestJSImplInterface },
2378 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2379 JSJitInfo::Method,
2380 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2381 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2382 false, /* isInfallible. False in setters. */
2383 false, /* isMovable. Not relevant for setters. */
2384 false, /* isEliminatable. Not relevant for setters. */
2385 false, /* isAlwaysInSlot. Only relevant for getters. */
2386 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2387 false, /* isTypedMethod. Only relevant for methods. */
2388 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2389};
2390
2391MOZ_CAN_RUN_SCRIPT static bool
2392receiveLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2393{
2394 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2397( cx, "TestJSImplInterface"
, "receiveLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2395 "TestJSImplInterface", "receiveLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2397( cx, "TestJSImplInterface"
, "receiveLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2396 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2397( cx, "TestJSImplInterface"
, "receiveLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2397 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2397( cx, "TestJSImplInterface"
, "receiveLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2398
2399 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2400 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2401 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2402 if (objIsXray) {
2403 unwrappedObj.emplace(cx, obj);
2404 }
2405 if (objIsXray) {
2406 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2407 // we know Xrays have no dynamic unwrap behavior.
2408 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2409 if (!unwrappedObj.ref()) {
2410 return false;
2411 }
2412 }
2413 FastErrorResult rv;
2414 int64_t result(MOZ_KnownLive(self)(self)->ReceiveLongLong(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
2415 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveLongLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveLongLong"
)), 0))
) {
2416 return false;
2417 }
2418 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2418); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2418; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2419 args.rval().set(JS_NumberValue(double(result)));
2420 return true;
2421}
2422
2423static const JSJitInfo receiveLongLong_methodinfo = {
2424 { (JSJitGetterOp)receiveLongLong },
2425 { prototypes::id::TestJSImplInterface },
2426 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2427 JSJitInfo::Method,
2428 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2429 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
2430 false, /* isInfallible. False in setters. */
2431 false, /* isMovable. Not relevant for setters. */
2432 false, /* isEliminatable. Not relevant for setters. */
2433 false, /* isAlwaysInSlot. Only relevant for getters. */
2434 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2435 false, /* isTypedMethod. Only relevant for methods. */
2436 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2437};
2438
2439MOZ_CAN_RUN_SCRIPT static bool
2440passOptionalLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2441{
2442 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2445( cx, "TestJSImplInterface"
, "passOptionalLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2443 "TestJSImplInterface", "passOptionalLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2445( cx, "TestJSImplInterface"
, "passOptionalLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2444 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2445( cx, "TestJSImplInterface"
, "passOptionalLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2445 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2445( cx, "TestJSImplInterface"
, "passOptionalLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2446
2447 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2448 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2449 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2450 if (objIsXray) {
2451 unwrappedObj.emplace(cx, obj);
2452 }
2453 Optional<int64_t> arg0;
2454 if (args.hasDefined(0)) {
2455 arg0.Construct();
2456 if (!ValueToPrimitive<int64_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
2457 return false;
2458 }
2459 }
2460 if (objIsXray) {
2461 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2462 // we know Xrays have no dynamic unwrap behavior.
2463 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2464 if (!unwrappedObj.ref()) {
2465 return false;
2466 }
2467 }
2468 FastErrorResult rv;
2469 // NOTE: This assert does NOT call the function.
2470 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalLongLong(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
2471 MOZ_KnownLive(self)(self)->PassOptionalLongLong(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
2472 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalLongLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalLongLong"
)), 0))
) {
2473 return false;
2474 }
2475 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2475); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2475; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2476 args.rval().setUndefined();
2477 return true;
2478}
2479
2480static const JSJitInfo passOptionalLongLong_methodinfo = {
2481 { (JSJitGetterOp)passOptionalLongLong },
2482 { prototypes::id::TestJSImplInterface },
2483 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2484 JSJitInfo::Method,
2485 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2486 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2487 false, /* isInfallible. False in setters. */
2488 false, /* isMovable. Not relevant for setters. */
2489 false, /* isEliminatable. Not relevant for setters. */
2490 false, /* isAlwaysInSlot. Only relevant for getters. */
2491 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2492 false, /* isTypedMethod. Only relevant for methods. */
2493 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2494};
2495
2496MOZ_CAN_RUN_SCRIPT static bool
2497passOptionalLongLongWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2498{
2499 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2502( cx, "TestJSImplInterface"
, "passOptionalLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2500 "TestJSImplInterface", "passOptionalLongLongWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2502( cx, "TestJSImplInterface"
, "passOptionalLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2501 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2502( cx, "TestJSImplInterface"
, "passOptionalLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2502 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2502( cx, "TestJSImplInterface"
, "passOptionalLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
2503
2504 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2505 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2506 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2507 if (objIsXray) {
2508 unwrappedObj.emplace(cx, obj);
2509 }
2510 int64_t arg0;
2511 if (args.hasDefined(0)) {
2512 if (!ValueToPrimitive<int64_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
2513 return false;
2514 }
2515 } else {
2516 arg0 = -12LL;
2517 }
2518 if (objIsXray) {
2519 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2520 // we know Xrays have no dynamic unwrap behavior.
2521 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2522 if (!unwrappedObj.ref()) {
2523 return false;
2524 }
2525 }
2526 FastErrorResult rv;
2527 // NOTE: This assert does NOT call the function.
2528 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalLongLongWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
2529 MOZ_KnownLive(self)(self)->PassOptionalLongLongWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
2530 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalLongLongWithDefault"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalLongLongWithDefault"
)), 0))
) {
2531 return false;
2532 }
2533 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2533); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2533; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2534 args.rval().setUndefined();
2535 return true;
2536}
2537
2538static const JSJitInfo passOptionalLongLongWithDefault_methodinfo = {
2539 { (JSJitGetterOp)passOptionalLongLongWithDefault },
2540 { prototypes::id::TestJSImplInterface },
2541 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2542 JSJitInfo::Method,
2543 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2544 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2545 false, /* isInfallible. False in setters. */
2546 false, /* isMovable. Not relevant for setters. */
2547 false, /* isEliminatable. Not relevant for setters. */
2548 false, /* isAlwaysInSlot. Only relevant for getters. */
2549 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2550 false, /* isTypedMethod. Only relevant for methods. */
2551 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2552};
2553
2554MOZ_CAN_RUN_SCRIPT static bool
2555get_readonlyOctet(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2556{
2557 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2560( cx, "TestJSImplInterface"
, "readonlyOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2558 "TestJSImplInterface", "readonlyOctet", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2560( cx, "TestJSImplInterface"
, "readonlyOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2559 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2560( cx, "TestJSImplInterface"
, "readonlyOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2560 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2560( cx, "TestJSImplInterface"
, "readonlyOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2561
2562 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2563 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2564 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2565 if (objIsXray) {
2566 unwrappedObj.emplace(cx, obj);
2567 }
2568 if (objIsXray) {
2569 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2570 // we know Xrays have no dynamic unwrap behavior.
2571 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2572 if (!unwrappedObj.ref()) {
2573 return false;
2574 }
2575 }
2576 FastErrorResult rv;
2577 uint8_t result(MOZ_KnownLive(self)(self)->GetReadonlyOctet(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
2578 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyOctet getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyOctet getter"
)), 0))
) {
2579 return false;
2580 }
2581 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2581); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2581; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2582 args.rval().setInt32(int32_t(result));
2583 return true;
2584}
2585
2586static const JSJitInfo readonlyOctet_getterinfo = {
2587 { get_readonlyOctet },
2588 { prototypes::id::TestJSImplInterface },
2589 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2590 JSJitInfo::Getter,
2591 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2592 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2593 false, /* isInfallible. False in setters. */
2594 false, /* isMovable. Not relevant for setters. */
2595 false, /* isEliminatable. Not relevant for setters. */
2596 false, /* isAlwaysInSlot. Only relevant for getters. */
2597 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2598 false, /* isTypedMethod. Only relevant for methods. */
2599 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2600};
2601
2602MOZ_CAN_RUN_SCRIPT static bool
2603get_writableOctet(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2604{
2605 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2608( cx, "TestJSImplInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2606 "TestJSImplInterface", "writableOctet", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2608( cx, "TestJSImplInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2607 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2608( cx, "TestJSImplInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2608 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2608( cx, "TestJSImplInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2609
2610 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2611 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2612 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2613 if (objIsXray) {
2614 unwrappedObj.emplace(cx, obj);
2615 }
2616 if (objIsXray) {
2617 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2618 // we know Xrays have no dynamic unwrap behavior.
2619 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2620 if (!unwrappedObj.ref()) {
2621 return false;
2622 }
2623 }
2624 FastErrorResult rv;
2625 uint8_t result(MOZ_KnownLive(self)(self)->GetWritableOctet(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
2626 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableOctet getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableOctet getter"
)), 0))
) {
2627 return false;
2628 }
2629 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2629); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2629; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2630 args.rval().setInt32(int32_t(result));
2631 return true;
2632}
2633
2634MOZ_CAN_RUN_SCRIPT static bool
2635set_writableOctet(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
2636{
2637 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2640( cx, "TestJSImplInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2638 "TestJSImplInterface", "writableOctet", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2640( cx, "TestJSImplInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2639 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject2640( cx, "TestJSImplInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2640 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2640( cx, "TestJSImplInterface"
, "writableOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2641
2642 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2643 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2644 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2645 if (objIsXray) {
2646 unwrappedObj.emplace(cx, obj);
2647 }
2648 uint8_t arg0;
2649 if (!ValueToPrimitive<uint8_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
2650 return false;
2651 }
2652 if (objIsXray) {
2653 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2654 // we know Xrays have no dynamic unwrap behavior.
2655 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2656 if (!unwrappedObj.ref()) {
2657 return false;
2658 }
2659 }
2660 FastErrorResult rv;
2661 // NOTE: This assert does NOT call the function.
2662 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableOctet(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
2663 MOZ_KnownLive(self)(self)->SetWritableOctet(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
2664 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableOctet setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableOctet setter"
)), 0))
) {
2665 return false;
2666 }
2667 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2667); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2667; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2668
2669 return true;
2670}
2671
2672static const JSJitInfo writableOctet_getterinfo = {
2673 { get_writableOctet },
2674 { prototypes::id::TestJSImplInterface },
2675 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2676 JSJitInfo::Getter,
2677 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2678 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2679 false, /* isInfallible. False in setters. */
2680 false, /* isMovable. Not relevant for setters. */
2681 false, /* isEliminatable. Not relevant for setters. */
2682 false, /* isAlwaysInSlot. Only relevant for getters. */
2683 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2684 false, /* isTypedMethod. Only relevant for methods. */
2685 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2686};
2687static const JSJitInfo writableOctet_setterinfo = {
2688 { (JSJitGetterOp)set_writableOctet },
2689 { prototypes::id::TestJSImplInterface },
2690 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2691 JSJitInfo::Setter,
2692 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2693 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2694 false, /* isInfallible. False in setters. */
2695 false, /* isMovable. Not relevant for setters. */
2696 false, /* isEliminatable. Not relevant for setters. */
2697 false, /* isAlwaysInSlot. Only relevant for getters. */
2698 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2699 false, /* isTypedMethod. Only relevant for methods. */
2700 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2701};
2702
2703MOZ_CAN_RUN_SCRIPT static bool
2704passOctet(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2705{
2706 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2709( cx, "TestJSImplInterface"
, "passOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
2707 "TestJSImplInterface", "passOctet", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2709( cx, "TestJSImplInterface"
, "passOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
2708 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2709( cx, "TestJSImplInterface"
, "passOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
2709 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2709( cx, "TestJSImplInterface"
, "passOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
2710
2711 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2712 if (!args.requireAtLeast(cx, "TestJSImplInterface.passOctet", 1)) {
2713 return false;
2714 }
2715 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2716 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2717 if (objIsXray) {
2718 unwrappedObj.emplace(cx, obj);
2719 }
2720 uint8_t arg0;
2721 if (!ValueToPrimitive<uint8_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
2722 return false;
2723 }
2724 if (objIsXray) {
2725 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2726 // we know Xrays have no dynamic unwrap behavior.
2727 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2728 if (!unwrappedObj.ref()) {
2729 return false;
2730 }
2731 }
2732 FastErrorResult rv;
2733 // NOTE: This assert does NOT call the function.
2734 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOctet(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
2735 MOZ_KnownLive(self)(self)->PassOctet(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
2736 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOctet"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOctet"
)), 0))
) {
2737 return false;
2738 }
2739 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2739); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2739; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2740 args.rval().setUndefined();
2741 return true;
2742}
2743
2744static const JSJitInfo passOctet_methodinfo = {
2745 { (JSJitGetterOp)passOctet },
2746 { prototypes::id::TestJSImplInterface },
2747 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2748 JSJitInfo::Method,
2749 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2750 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2751 false, /* isInfallible. False in setters. */
2752 false, /* isMovable. Not relevant for setters. */
2753 false, /* isEliminatable. Not relevant for setters. */
2754 false, /* isAlwaysInSlot. Only relevant for getters. */
2755 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2756 false, /* isTypedMethod. Only relevant for methods. */
2757 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2758};
2759
2760MOZ_CAN_RUN_SCRIPT static bool
2761receiveOctet(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2762{
2763 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2766( cx, "TestJSImplInterface"
, "receiveOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2764 "TestJSImplInterface", "receiveOctet", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2766( cx, "TestJSImplInterface"
, "receiveOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2765 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2766( cx, "TestJSImplInterface"
, "receiveOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2766 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2766( cx, "TestJSImplInterface"
, "receiveOctet", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2767
2768 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2769 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2770 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2771 if (objIsXray) {
2772 unwrappedObj.emplace(cx, obj);
2773 }
2774 if (objIsXray) {
2775 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2776 // we know Xrays have no dynamic unwrap behavior.
2777 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2778 if (!unwrappedObj.ref()) {
2779 return false;
2780 }
2781 }
2782 FastErrorResult rv;
2783 uint8_t result(MOZ_KnownLive(self)(self)->ReceiveOctet(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
2784 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveOctet"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveOctet"
)), 0))
) {
2785 return false;
2786 }
2787 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2787); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2787; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2788 args.rval().setInt32(int32_t(result));
2789 return true;
2790}
2791
2792static const JSJitInfo receiveOctet_methodinfo = {
2793 { (JSJitGetterOp)receiveOctet },
2794 { prototypes::id::TestJSImplInterface },
2795 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2796 JSJitInfo::Method,
2797 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2798 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2799 false, /* isInfallible. False in setters. */
2800 false, /* isMovable. Not relevant for setters. */
2801 false, /* isEliminatable. Not relevant for setters. */
2802 false, /* isAlwaysInSlot. Only relevant for getters. */
2803 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2804 false, /* isTypedMethod. Only relevant for methods. */
2805 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2806};
2807
2808MOZ_CAN_RUN_SCRIPT static bool
2809passOptionalOctet(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2810{
2811 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2814( cx, "TestJSImplInterface"
, "passOptionalOctet", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2812 "TestJSImplInterface", "passOptionalOctet", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2814( cx, "TestJSImplInterface"
, "passOptionalOctet", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2813 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2814( cx, "TestJSImplInterface"
, "passOptionalOctet", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2814 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2814( cx, "TestJSImplInterface"
, "passOptionalOctet", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2815
2816 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2817 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2818 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2819 if (objIsXray) {
2820 unwrappedObj.emplace(cx, obj);
2821 }
2822 Optional<uint8_t> arg0;
2823 if (args.hasDefined(0)) {
2824 arg0.Construct();
2825 if (!ValueToPrimitive<uint8_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
2826 return false;
2827 }
2828 }
2829 if (objIsXray) {
2830 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2831 // we know Xrays have no dynamic unwrap behavior.
2832 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2833 if (!unwrappedObj.ref()) {
2834 return false;
2835 }
2836 }
2837 FastErrorResult rv;
2838 // NOTE: This assert does NOT call the function.
2839 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalOctet(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
2840 MOZ_KnownLive(self)(self)->PassOptionalOctet(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
2841 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalOctet"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalOctet"
)), 0))
) {
2842 return false;
2843 }
2844 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2844); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2844; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2845 args.rval().setUndefined();
2846 return true;
2847}
2848
2849static const JSJitInfo passOptionalOctet_methodinfo = {
2850 { (JSJitGetterOp)passOptionalOctet },
2851 { prototypes::id::TestJSImplInterface },
2852 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2853 JSJitInfo::Method,
2854 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2855 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2856 false, /* isInfallible. False in setters. */
2857 false, /* isMovable. Not relevant for setters. */
2858 false, /* isEliminatable. Not relevant for setters. */
2859 false, /* isAlwaysInSlot. Only relevant for getters. */
2860 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2861 false, /* isTypedMethod. Only relevant for methods. */
2862 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2863};
2864
2865MOZ_CAN_RUN_SCRIPT static bool
2866passOptionalOctetWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
2867{
2868 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2871( cx, "TestJSImplInterface"
, "passOptionalOctetWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2869 "TestJSImplInterface", "passOptionalOctetWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2871( cx, "TestJSImplInterface"
, "passOptionalOctetWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2870 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject2871( cx, "TestJSImplInterface"
, "passOptionalOctetWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
2871 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2871( cx, "TestJSImplInterface"
, "passOptionalOctetWithDefault", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
2872
2873 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2874 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2875 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2876 if (objIsXray) {
2877 unwrappedObj.emplace(cx, obj);
2878 }
2879 uint8_t arg0;
2880 if (args.hasDefined(0)) {
2881 if (!ValueToPrimitive<uint8_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
2882 return false;
2883 }
2884 } else {
2885 arg0 = 19;
2886 }
2887 if (objIsXray) {
2888 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2889 // we know Xrays have no dynamic unwrap behavior.
2890 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2891 if (!unwrappedObj.ref()) {
2892 return false;
2893 }
2894 }
2895 FastErrorResult rv;
2896 // NOTE: This assert does NOT call the function.
2897 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalOctetWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
2898 MOZ_KnownLive(self)(self)->PassOptionalOctetWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
2899 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalOctetWithDefault"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalOctetWithDefault"
)), 0))
) {
2900 return false;
2901 }
2902 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2902); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2902; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2903 args.rval().setUndefined();
2904 return true;
2905}
2906
2907static const JSJitInfo passOptionalOctetWithDefault_methodinfo = {
2908 { (JSJitGetterOp)passOptionalOctetWithDefault },
2909 { prototypes::id::TestJSImplInterface },
2910 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2911 JSJitInfo::Method,
2912 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2913 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
2914 false, /* isInfallible. False in setters. */
2915 false, /* isMovable. Not relevant for setters. */
2916 false, /* isEliminatable. Not relevant for setters. */
2917 false, /* isAlwaysInSlot. Only relevant for getters. */
2918 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2919 false, /* isTypedMethod. Only relevant for methods. */
2920 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2921};
2922
2923MOZ_CAN_RUN_SCRIPT static bool
2924get_readonlyUnsignedShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2925{
2926 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2929( cx, "TestJSImplInterface"
, "readonlyUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2927 "TestJSImplInterface", "readonlyUnsignedShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2929( cx, "TestJSImplInterface"
, "readonlyUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2928 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2929( cx, "TestJSImplInterface"
, "readonlyUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2929 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2929( cx, "TestJSImplInterface"
, "readonlyUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2930
2931 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2932 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2933 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2934 if (objIsXray) {
2935 unwrappedObj.emplace(cx, obj);
2936 }
2937 if (objIsXray) {
2938 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2939 // we know Xrays have no dynamic unwrap behavior.
2940 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2941 if (!unwrappedObj.ref()) {
2942 return false;
2943 }
2944 }
2945 FastErrorResult rv;
2946 uint16_t result(MOZ_KnownLive(self)(self)->GetReadonlyUnsignedShort(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
2947 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyUnsignedShort getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyUnsignedShort getter"
)), 0))
) {
2948 return false;
2949 }
2950 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2950); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2950; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2951 args.rval().setInt32(int32_t(result));
2952 return true;
2953}
2954
2955static const JSJitInfo readonlyUnsignedShort_getterinfo = {
2956 { get_readonlyUnsignedShort },
2957 { prototypes::id::TestJSImplInterface },
2958 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
2959 JSJitInfo::Getter,
2960 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
2961 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
2962 false, /* isInfallible. False in setters. */
2963 false, /* isMovable. Not relevant for setters. */
2964 false, /* isEliminatable. Not relevant for setters. */
2965 false, /* isAlwaysInSlot. Only relevant for getters. */
2966 false, /* isLazilyCachedInSlot. Only relevant for getters. */
2967 false, /* isTypedMethod. Only relevant for methods. */
2968 0 /* Reserved slot index, if we're stored in a slot, else 0. */
2969};
2970
2971MOZ_CAN_RUN_SCRIPT static bool
2972get_writableUnsignedShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
2973{
2974 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject2977( cx, "TestJSImplInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2975 "TestJSImplInterface", "writableUnsignedShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject2977( cx, "TestJSImplInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2976 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject2977( cx, "TestJSImplInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
2977 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject2977( cx, "TestJSImplInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
2978
2979 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
2980 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
2981 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
2982 if (objIsXray) {
2983 unwrappedObj.emplace(cx, obj);
2984 }
2985 if (objIsXray) {
2986 // Since our object is an Xray, we can just CheckedUnwrapStatic:
2987 // we know Xrays have no dynamic unwrap behavior.
2988 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
2989 if (!unwrappedObj.ref()) {
2990 return false;
2991 }
2992 }
2993 FastErrorResult rv;
2994 uint16_t result(MOZ_KnownLive(self)(self)->GetWritableUnsignedShort(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
2995 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnsignedShort getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnsignedShort getter"
)), 0))
) {
2996 return false;
2997 }
2998 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 2998); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 2998; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
2999 args.rval().setInt32(int32_t(result));
3000 return true;
3001}
3002
3003MOZ_CAN_RUN_SCRIPT static bool
3004set_writableUnsignedShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
3005{
3006 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3009( cx, "TestJSImplInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3007 "TestJSImplInterface", "writableUnsignedShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3009( cx, "TestJSImplInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3008 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject3009( cx, "TestJSImplInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3009 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3009( cx, "TestJSImplInterface"
, "writableUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3010
3011 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3012 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3013 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3014 if (objIsXray) {
3015 unwrappedObj.emplace(cx, obj);
3016 }
3017 uint16_t arg0;
3018 if (!ValueToPrimitive<uint16_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
3019 return false;
3020 }
3021 if (objIsXray) {
3022 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3023 // we know Xrays have no dynamic unwrap behavior.
3024 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3025 if (!unwrappedObj.ref()) {
3026 return false;
3027 }
3028 }
3029 FastErrorResult rv;
3030 // NOTE: This assert does NOT call the function.
3031 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnsignedShort(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
3032 MOZ_KnownLive(self)(self)->SetWritableUnsignedShort(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
3033 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnsignedShort setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnsignedShort setter"
)), 0))
) {
3034 return false;
3035 }
3036 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3036); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3036; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3037
3038 return true;
3039}
3040
3041static const JSJitInfo writableUnsignedShort_getterinfo = {
3042 { get_writableUnsignedShort },
3043 { prototypes::id::TestJSImplInterface },
3044 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3045 JSJitInfo::Getter,
3046 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3047 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
3048 false, /* isInfallible. False in setters. */
3049 false, /* isMovable. Not relevant for setters. */
3050 false, /* isEliminatable. Not relevant for setters. */
3051 false, /* isAlwaysInSlot. Only relevant for getters. */
3052 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3053 false, /* isTypedMethod. Only relevant for methods. */
3054 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3055};
3056static const JSJitInfo writableUnsignedShort_setterinfo = {
3057 { (JSJitGetterOp)set_writableUnsignedShort },
3058 { prototypes::id::TestJSImplInterface },
3059 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3060 JSJitInfo::Setter,
3061 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3062 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3063 false, /* isInfallible. False in setters. */
3064 false, /* isMovable. Not relevant for setters. */
3065 false, /* isEliminatable. Not relevant for setters. */
3066 false, /* isAlwaysInSlot. Only relevant for getters. */
3067 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3068 false, /* isTypedMethod. Only relevant for methods. */
3069 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3070};
3071
3072MOZ_CAN_RUN_SCRIPT static bool
3073passUnsignedShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3074{
3075 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3078( cx, "TestJSImplInterface"
, "passUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3076 "TestJSImplInterface", "passUnsignedShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3078( cx, "TestJSImplInterface"
, "passUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3077 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3078( cx, "TestJSImplInterface"
, "passUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3078 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3078( cx, "TestJSImplInterface"
, "passUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3079
3080 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3081 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnsignedShort", 1)) {
3082 return false;
3083 }
3084 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3085 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3086 if (objIsXray) {
3087 unwrappedObj.emplace(cx, obj);
3088 }
3089 uint16_t arg0;
3090 if (!ValueToPrimitive<uint16_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
3091 return false;
3092 }
3093 if (objIsXray) {
3094 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3095 // we know Xrays have no dynamic unwrap behavior.
3096 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3097 if (!unwrappedObj.ref()) {
3098 return false;
3099 }
3100 }
3101 FastErrorResult rv;
3102 // NOTE: This assert does NOT call the function.
3103 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnsignedShort(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
3104 MOZ_KnownLive(self)(self)->PassUnsignedShort(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
3105 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnsignedShort"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnsignedShort"
)), 0))
) {
3106 return false;
3107 }
3108 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3108); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3108; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3109 args.rval().setUndefined();
3110 return true;
3111}
3112
3113static const JSJitInfo passUnsignedShort_methodinfo = {
3114 { (JSJitGetterOp)passUnsignedShort },
3115 { prototypes::id::TestJSImplInterface },
3116 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3117 JSJitInfo::Method,
3118 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3119 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3120 false, /* isInfallible. False in setters. */
3121 false, /* isMovable. Not relevant for setters. */
3122 false, /* isEliminatable. Not relevant for setters. */
3123 false, /* isAlwaysInSlot. Only relevant for getters. */
3124 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3125 false, /* isTypedMethod. Only relevant for methods. */
3126 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3127};
3128
3129MOZ_CAN_RUN_SCRIPT static bool
3130receiveUnsignedShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3131{
3132 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3135( cx, "TestJSImplInterface"
, "receiveUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3133 "TestJSImplInterface", "receiveUnsignedShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3135( cx, "TestJSImplInterface"
, "receiveUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3134 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3135( cx, "TestJSImplInterface"
, "receiveUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3135 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3135( cx, "TestJSImplInterface"
, "receiveUnsignedShort", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3136
3137 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3138 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3139 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3140 if (objIsXray) {
3141 unwrappedObj.emplace(cx, obj);
3142 }
3143 if (objIsXray) {
3144 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3145 // we know Xrays have no dynamic unwrap behavior.
3146 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3147 if (!unwrappedObj.ref()) {
3148 return false;
3149 }
3150 }
3151 FastErrorResult rv;
3152 uint16_t result(MOZ_KnownLive(self)(self)->ReceiveUnsignedShort(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
3153 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUnsignedShort"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUnsignedShort"
)), 0))
) {
3154 return false;
3155 }
3156 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3156); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3156; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3157 args.rval().setInt32(int32_t(result));
3158 return true;
3159}
3160
3161static const JSJitInfo receiveUnsignedShort_methodinfo = {
3162 { (JSJitGetterOp)receiveUnsignedShort },
3163 { prototypes::id::TestJSImplInterface },
3164 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3165 JSJitInfo::Method,
3166 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3167 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
3168 false, /* isInfallible. False in setters. */
3169 false, /* isMovable. Not relevant for setters. */
3170 false, /* isEliminatable. Not relevant for setters. */
3171 false, /* isAlwaysInSlot. Only relevant for getters. */
3172 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3173 false, /* isTypedMethod. Only relevant for methods. */
3174 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3175};
3176
3177MOZ_CAN_RUN_SCRIPT static bool
3178passOptionalUnsignedShort(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3179{
3180 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3183( cx, "TestJSImplInterface"
, "passOptionalUnsignedShort", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3181 "TestJSImplInterface", "passOptionalUnsignedShort", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3183( cx, "TestJSImplInterface"
, "passOptionalUnsignedShort", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3182 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3183( cx, "TestJSImplInterface"
, "passOptionalUnsignedShort", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3183 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3183( cx, "TestJSImplInterface"
, "passOptionalUnsignedShort", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3184
3185 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3186 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3187 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3188 if (objIsXray) {
3189 unwrappedObj.emplace(cx, obj);
3190 }
3191 Optional<uint16_t> arg0;
3192 if (args.hasDefined(0)) {
3193 arg0.Construct();
3194 if (!ValueToPrimitive<uint16_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
3195 return false;
3196 }
3197 }
3198 if (objIsXray) {
3199 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3200 // we know Xrays have no dynamic unwrap behavior.
3201 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3202 if (!unwrappedObj.ref()) {
3203 return false;
3204 }
3205 }
3206 FastErrorResult rv;
3207 // NOTE: This assert does NOT call the function.
3208 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnsignedShort(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
3209 MOZ_KnownLive(self)(self)->PassOptionalUnsignedShort(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
3210 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnsignedShort"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnsignedShort"
)), 0))
) {
3211 return false;
3212 }
3213 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3213); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3213; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3214 args.rval().setUndefined();
3215 return true;
3216}
3217
3218static const JSJitInfo passOptionalUnsignedShort_methodinfo = {
3219 { (JSJitGetterOp)passOptionalUnsignedShort },
3220 { prototypes::id::TestJSImplInterface },
3221 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3222 JSJitInfo::Method,
3223 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3224 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3225 false, /* isInfallible. False in setters. */
3226 false, /* isMovable. Not relevant for setters. */
3227 false, /* isEliminatable. Not relevant for setters. */
3228 false, /* isAlwaysInSlot. Only relevant for getters. */
3229 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3230 false, /* isTypedMethod. Only relevant for methods. */
3231 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3232};
3233
3234MOZ_CAN_RUN_SCRIPT static bool
3235passOptionalUnsignedShortWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3236{
3237 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3240( cx, "TestJSImplInterface"
, "passOptionalUnsignedShortWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3238 "TestJSImplInterface", "passOptionalUnsignedShortWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3240( cx, "TestJSImplInterface"
, "passOptionalUnsignedShortWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3239 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3240( cx, "TestJSImplInterface"
, "passOptionalUnsignedShortWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3240 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3240( cx, "TestJSImplInterface"
, "passOptionalUnsignedShortWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3241
3242 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3243 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3244 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3245 if (objIsXray) {
3246 unwrappedObj.emplace(cx, obj);
3247 }
3248 uint16_t arg0;
3249 if (args.hasDefined(0)) {
3250 if (!ValueToPrimitive<uint16_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
3251 return false;
3252 }
3253 } else {
3254 arg0 = 2;
3255 }
3256 if (objIsXray) {
3257 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3258 // we know Xrays have no dynamic unwrap behavior.
3259 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3260 if (!unwrappedObj.ref()) {
3261 return false;
3262 }
3263 }
3264 FastErrorResult rv;
3265 // NOTE: This assert does NOT call the function.
3266 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnsignedShortWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
3267 MOZ_KnownLive(self)(self)->PassOptionalUnsignedShortWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
3268 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnsignedShortWithDefault"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnsignedShortWithDefault"
)), 0))
) {
3269 return false;
3270 }
3271 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3271); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3271; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3272 args.rval().setUndefined();
3273 return true;
3274}
3275
3276static const JSJitInfo passOptionalUnsignedShortWithDefault_methodinfo = {
3277 { (JSJitGetterOp)passOptionalUnsignedShortWithDefault },
3278 { prototypes::id::TestJSImplInterface },
3279 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3280 JSJitInfo::Method,
3281 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3282 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3283 false, /* isInfallible. False in setters. */
3284 false, /* isMovable. Not relevant for setters. */
3285 false, /* isEliminatable. Not relevant for setters. */
3286 false, /* isAlwaysInSlot. Only relevant for getters. */
3287 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3288 false, /* isTypedMethod. Only relevant for methods. */
3289 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3290};
3291
3292MOZ_CAN_RUN_SCRIPT static bool
3293get_readonlyUnsignedLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
3294{
3295 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3298( cx, "TestJSImplInterface"
, "readonlyUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3296 "TestJSImplInterface", "readonlyUnsignedLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3298( cx, "TestJSImplInterface"
, "readonlyUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3297 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject3298( cx, "TestJSImplInterface"
, "readonlyUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3298 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3298( cx, "TestJSImplInterface"
, "readonlyUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3299
3300 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3301 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3302 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3303 if (objIsXray) {
3304 unwrappedObj.emplace(cx, obj);
3305 }
3306 if (objIsXray) {
3307 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3308 // we know Xrays have no dynamic unwrap behavior.
3309 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3310 if (!unwrappedObj.ref()) {
3311 return false;
3312 }
3313 }
3314 FastErrorResult rv;
3315 uint32_t result(MOZ_KnownLive(self)(self)->GetReadonlyUnsignedLong(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
3316 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyUnsignedLong getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyUnsignedLong getter"
)), 0))
) {
3317 return false;
3318 }
3319 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3319); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3319; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3320 args.rval().setNumber(result);
3321 return true;
3322}
3323
3324static const JSJitInfo readonlyUnsignedLong_getterinfo = {
3325 { get_readonlyUnsignedLong },
3326 { prototypes::id::TestJSImplInterface },
3327 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3328 JSJitInfo::Getter,
3329 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3330 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
3331 false, /* isInfallible. False in setters. */
3332 false, /* isMovable. Not relevant for setters. */
3333 false, /* isEliminatable. Not relevant for setters. */
3334 false, /* isAlwaysInSlot. Only relevant for getters. */
3335 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3336 false, /* isTypedMethod. Only relevant for methods. */
3337 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3338};
3339
3340MOZ_CAN_RUN_SCRIPT static bool
3341get_writableUnsignedLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
3342{
3343 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3346( cx, "TestJSImplInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3344 "TestJSImplInterface", "writableUnsignedLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3346( cx, "TestJSImplInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3345 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject3346( cx, "TestJSImplInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3346 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3346( cx, "TestJSImplInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3347
3348 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3349 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3350 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3351 if (objIsXray) {
3352 unwrappedObj.emplace(cx, obj);
3353 }
3354 if (objIsXray) {
3355 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3356 // we know Xrays have no dynamic unwrap behavior.
3357 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3358 if (!unwrappedObj.ref()) {
3359 return false;
3360 }
3361 }
3362 FastErrorResult rv;
3363 uint32_t result(MOZ_KnownLive(self)(self)->GetWritableUnsignedLong(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
3364 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnsignedLong getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnsignedLong getter"
)), 0))
) {
3365 return false;
3366 }
3367 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3367); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3367; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3368 args.rval().setNumber(result);
3369 return true;
3370}
3371
3372MOZ_CAN_RUN_SCRIPT static bool
3373set_writableUnsignedLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
3374{
3375 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3378( cx, "TestJSImplInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3376 "TestJSImplInterface", "writableUnsignedLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3378( cx, "TestJSImplInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3377 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject3378( cx, "TestJSImplInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3378 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3378( cx, "TestJSImplInterface"
, "writableUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3379
3380 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3381 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3382 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3383 if (objIsXray) {
3384 unwrappedObj.emplace(cx, obj);
3385 }
3386 uint32_t arg0;
3387 if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
3388 return false;
3389 }
3390 if (objIsXray) {
3391 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3392 // we know Xrays have no dynamic unwrap behavior.
3393 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3394 if (!unwrappedObj.ref()) {
3395 return false;
3396 }
3397 }
3398 FastErrorResult rv;
3399 // NOTE: This assert does NOT call the function.
3400 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnsignedLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
3401 MOZ_KnownLive(self)(self)->SetWritableUnsignedLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
3402 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnsignedLong setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnsignedLong setter"
)), 0))
) {
3403 return false;
3404 }
3405 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3405); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3405; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3406
3407 return true;
3408}
3409
3410static const JSJitInfo writableUnsignedLong_getterinfo = {
3411 { get_writableUnsignedLong },
3412 { prototypes::id::TestJSImplInterface },
3413 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3414 JSJitInfo::Getter,
3415 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3416 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
3417 false, /* isInfallible. False in setters. */
3418 false, /* isMovable. Not relevant for setters. */
3419 false, /* isEliminatable. Not relevant for setters. */
3420 false, /* isAlwaysInSlot. Only relevant for getters. */
3421 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3422 false, /* isTypedMethod. Only relevant for methods. */
3423 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3424};
3425static const JSJitInfo writableUnsignedLong_setterinfo = {
3426 { (JSJitGetterOp)set_writableUnsignedLong },
3427 { prototypes::id::TestJSImplInterface },
3428 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3429 JSJitInfo::Setter,
3430 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3431 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3432 false, /* isInfallible. False in setters. */
3433 false, /* isMovable. Not relevant for setters. */
3434 false, /* isEliminatable. Not relevant for setters. */
3435 false, /* isAlwaysInSlot. Only relevant for getters. */
3436 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3437 false, /* isTypedMethod. Only relevant for methods. */
3438 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3439};
3440
3441MOZ_CAN_RUN_SCRIPT static bool
3442passUnsignedLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3443{
3444 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3447( cx, "TestJSImplInterface"
, "passUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3445 "TestJSImplInterface", "passUnsignedLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3447( cx, "TestJSImplInterface"
, "passUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3446 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3447( cx, "TestJSImplInterface"
, "passUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3447 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3447( cx, "TestJSImplInterface"
, "passUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3448
3449 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3450 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnsignedLong", 1)) {
3451 return false;
3452 }
3453 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3454 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3455 if (objIsXray) {
3456 unwrappedObj.emplace(cx, obj);
3457 }
3458 uint32_t arg0;
3459 if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
3460 return false;
3461 }
3462 if (objIsXray) {
3463 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3464 // we know Xrays have no dynamic unwrap behavior.
3465 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3466 if (!unwrappedObj.ref()) {
3467 return false;
3468 }
3469 }
3470 FastErrorResult rv;
3471 // NOTE: This assert does NOT call the function.
3472 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnsignedLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
3473 MOZ_KnownLive(self)(self)->PassUnsignedLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
3474 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnsignedLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnsignedLong"
)), 0))
) {
3475 return false;
3476 }
3477 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3477); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3477; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3478 args.rval().setUndefined();
3479 return true;
3480}
3481
3482static const JSJitInfo passUnsignedLong_methodinfo = {
3483 { (JSJitGetterOp)passUnsignedLong },
3484 { prototypes::id::TestJSImplInterface },
3485 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3486 JSJitInfo::Method,
3487 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3488 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3489 false, /* isInfallible. False in setters. */
3490 false, /* isMovable. Not relevant for setters. */
3491 false, /* isEliminatable. Not relevant for setters. */
3492 false, /* isAlwaysInSlot. Only relevant for getters. */
3493 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3494 false, /* isTypedMethod. Only relevant for methods. */
3495 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3496};
3497
3498MOZ_CAN_RUN_SCRIPT static bool
3499receiveUnsignedLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3500{
3501 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3504( cx, "TestJSImplInterface"
, "receiveUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3502 "TestJSImplInterface", "receiveUnsignedLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3504( cx, "TestJSImplInterface"
, "receiveUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3503 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3504( cx, "TestJSImplInterface"
, "receiveUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3504 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3504( cx, "TestJSImplInterface"
, "receiveUnsignedLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3505
3506 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3507 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3508 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3509 if (objIsXray) {
3510 unwrappedObj.emplace(cx, obj);
3511 }
3512 if (objIsXray) {
3513 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3514 // we know Xrays have no dynamic unwrap behavior.
3515 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3516 if (!unwrappedObj.ref()) {
3517 return false;
3518 }
3519 }
3520 FastErrorResult rv;
3521 uint32_t result(MOZ_KnownLive(self)(self)->ReceiveUnsignedLong(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
3522 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUnsignedLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUnsignedLong"
)), 0))
) {
3523 return false;
3524 }
3525 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3525); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3525; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3526 args.rval().setNumber(result);
3527 return true;
3528}
3529
3530static const JSJitInfo receiveUnsignedLong_methodinfo = {
3531 { (JSJitGetterOp)receiveUnsignedLong },
3532 { prototypes::id::TestJSImplInterface },
3533 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3534 JSJitInfo::Method,
3535 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3536 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
3537 false, /* isInfallible. False in setters. */
3538 false, /* isMovable. Not relevant for setters. */
3539 false, /* isEliminatable. Not relevant for setters. */
3540 false, /* isAlwaysInSlot. Only relevant for getters. */
3541 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3542 false, /* isTypedMethod. Only relevant for methods. */
3543 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3544};
3545
3546MOZ_CAN_RUN_SCRIPT static bool
3547passOptionalUnsignedLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3548{
3549 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3552( cx, "TestJSImplInterface"
, "passOptionalUnsignedLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3550 "TestJSImplInterface", "passOptionalUnsignedLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3552( cx, "TestJSImplInterface"
, "passOptionalUnsignedLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3551 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3552( cx, "TestJSImplInterface"
, "passOptionalUnsignedLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3552 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3552( cx, "TestJSImplInterface"
, "passOptionalUnsignedLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3553
3554 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3555 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3556 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3557 if (objIsXray) {
3558 unwrappedObj.emplace(cx, obj);
3559 }
3560 Optional<uint32_t> arg0;
3561 if (args.hasDefined(0)) {
3562 arg0.Construct();
3563 if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
3564 return false;
3565 }
3566 }
3567 if (objIsXray) {
3568 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3569 // we know Xrays have no dynamic unwrap behavior.
3570 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3571 if (!unwrappedObj.ref()) {
3572 return false;
3573 }
3574 }
3575 FastErrorResult rv;
3576 // NOTE: This assert does NOT call the function.
3577 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnsignedLong(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
3578 MOZ_KnownLive(self)(self)->PassOptionalUnsignedLong(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
3579 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnsignedLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnsignedLong"
)), 0))
) {
3580 return false;
3581 }
3582 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3582); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3582; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3583 args.rval().setUndefined();
3584 return true;
3585}
3586
3587static const JSJitInfo passOptionalUnsignedLong_methodinfo = {
3588 { (JSJitGetterOp)passOptionalUnsignedLong },
3589 { prototypes::id::TestJSImplInterface },
3590 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3591 JSJitInfo::Method,
3592 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3593 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3594 false, /* isInfallible. False in setters. */
3595 false, /* isMovable. Not relevant for setters. */
3596 false, /* isEliminatable. Not relevant for setters. */
3597 false, /* isAlwaysInSlot. Only relevant for getters. */
3598 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3599 false, /* isTypedMethod. Only relevant for methods. */
3600 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3601};
3602
3603MOZ_CAN_RUN_SCRIPT static bool
3604passOptionalUnsignedLongWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3605{
3606 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3609( cx, "TestJSImplInterface"
, "passOptionalUnsignedLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3607 "TestJSImplInterface", "passOptionalUnsignedLongWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3609( cx, "TestJSImplInterface"
, "passOptionalUnsignedLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3608 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3609( cx, "TestJSImplInterface"
, "passOptionalUnsignedLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3609 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3609( cx, "TestJSImplInterface"
, "passOptionalUnsignedLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3610
3611 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3612 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3613 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3614 if (objIsXray) {
3615 unwrappedObj.emplace(cx, obj);
3616 }
3617 uint32_t arg0;
3618 if (args.hasDefined(0)) {
3619 if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
3620 return false;
3621 }
3622 } else {
3623 arg0 = 6U;
3624 }
3625 if (objIsXray) {
3626 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3627 // we know Xrays have no dynamic unwrap behavior.
3628 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3629 if (!unwrappedObj.ref()) {
3630 return false;
3631 }
3632 }
3633 FastErrorResult rv;
3634 // NOTE: This assert does NOT call the function.
3635 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnsignedLongWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
3636 MOZ_KnownLive(self)(self)->PassOptionalUnsignedLongWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
3637 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnsignedLongWithDefault"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnsignedLongWithDefault"
)), 0))
) {
3638 return false;
3639 }
3640 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3640); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3640; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3641 args.rval().setUndefined();
3642 return true;
3643}
3644
3645static const JSJitInfo passOptionalUnsignedLongWithDefault_methodinfo = {
3646 { (JSJitGetterOp)passOptionalUnsignedLongWithDefault },
3647 { prototypes::id::TestJSImplInterface },
3648 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3649 JSJitInfo::Method,
3650 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3651 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3652 false, /* isInfallible. False in setters. */
3653 false, /* isMovable. Not relevant for setters. */
3654 false, /* isEliminatable. Not relevant for setters. */
3655 false, /* isAlwaysInSlot. Only relevant for getters. */
3656 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3657 false, /* isTypedMethod. Only relevant for methods. */
3658 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3659};
3660
3661MOZ_CAN_RUN_SCRIPT static bool
3662get_readonlyUnsignedLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
3663{
3664 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3667( cx, "TestJSImplInterface"
, "readonlyUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3665 "TestJSImplInterface", "readonlyUnsignedLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3667( cx, "TestJSImplInterface"
, "readonlyUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3666 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject3667( cx, "TestJSImplInterface"
, "readonlyUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3667 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3667( cx, "TestJSImplInterface"
, "readonlyUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3668
3669 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3670 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3671 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3672 if (objIsXray) {
3673 unwrappedObj.emplace(cx, obj);
3674 }
3675 if (objIsXray) {
3676 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3677 // we know Xrays have no dynamic unwrap behavior.
3678 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3679 if (!unwrappedObj.ref()) {
3680 return false;
3681 }
3682 }
3683 FastErrorResult rv;
3684 uint64_t result(MOZ_KnownLive(self)(self)->GetReadonlyUnsignedLongLong(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
3685 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyUnsignedLongLong getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyUnsignedLongLong getter"
)), 0))
) {
3686 return false;
3687 }
3688 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3688); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3688; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3689 args.rval().set(JS_NumberValue(double(result)));
3690 return true;
3691}
3692
3693static const JSJitInfo readonlyUnsignedLongLong_getterinfo = {
3694 { get_readonlyUnsignedLongLong },
3695 { prototypes::id::TestJSImplInterface },
3696 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3697 JSJitInfo::Getter,
3698 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3699 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
3700 false, /* isInfallible. False in setters. */
3701 false, /* isMovable. Not relevant for setters. */
3702 false, /* isEliminatable. Not relevant for setters. */
3703 false, /* isAlwaysInSlot. Only relevant for getters. */
3704 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3705 false, /* isTypedMethod. Only relevant for methods. */
3706 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3707};
3708
3709MOZ_CAN_RUN_SCRIPT static bool
3710get_writableUnsignedLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
3711{
3712 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3715( cx, "TestJSImplInterface"
, "writableUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3713 "TestJSImplInterface", "writableUnsignedLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3715( cx, "TestJSImplInterface"
, "writableUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3714 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject3715( cx, "TestJSImplInterface"
, "writableUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3715 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3715( cx, "TestJSImplInterface"
, "writableUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3716
3717 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3718 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3719 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3720 if (objIsXray) {
3721 unwrappedObj.emplace(cx, obj);
3722 }
3723 if (objIsXray) {
3724 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3725 // we know Xrays have no dynamic unwrap behavior.
3726 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3727 if (!unwrappedObj.ref()) {
3728 return false;
3729 }
3730 }
3731 FastErrorResult rv;
3732 uint64_t result(MOZ_KnownLive(self)(self)->GetWritableUnsignedLongLong(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
3733 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnsignedLongLong getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnsignedLongLong getter"
)), 0))
) {
3734 return false;
3735 }
3736 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3736); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3736; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3737 args.rval().set(JS_NumberValue(double(result)));
3738 return true;
3739}
3740
3741MOZ_CAN_RUN_SCRIPT static bool
3742set_writableUnsignedLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
3743{
3744 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3747( cx, "TestJSImplInterface"
, "writableUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3745 "TestJSImplInterface", "writableUnsignedLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3747( cx, "TestJSImplInterface"
, "writableUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3746 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject3747( cx, "TestJSImplInterface"
, "writableUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3747 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3747( cx, "TestJSImplInterface"
, "writableUnsignedLongLong", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3748
3749 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3750 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3751 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3752 if (objIsXray) {
3753 unwrappedObj.emplace(cx, obj);
3754 }
3755 uint64_t arg0;
3756 if (!ValueToPrimitive<uint64_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
3757 return false;
3758 }
3759 if (objIsXray) {
3760 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3761 // we know Xrays have no dynamic unwrap behavior.
3762 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3763 if (!unwrappedObj.ref()) {
3764 return false;
3765 }
3766 }
3767 FastErrorResult rv;
3768 // NOTE: This assert does NOT call the function.
3769 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnsignedLongLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
3770 MOZ_KnownLive(self)(self)->SetWritableUnsignedLongLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
3771 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnsignedLongLong setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnsignedLongLong setter"
)), 0))
) {
3772 return false;
3773 }
3774 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3774); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3774; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3775
3776 return true;
3777}
3778
3779static const JSJitInfo writableUnsignedLongLong_getterinfo = {
3780 { get_writableUnsignedLongLong },
3781 { prototypes::id::TestJSImplInterface },
3782 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3783 JSJitInfo::Getter,
3784 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3785 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
3786 false, /* isInfallible. False in setters. */
3787 false, /* isMovable. Not relevant for setters. */
3788 false, /* isEliminatable. Not relevant for setters. */
3789 false, /* isAlwaysInSlot. Only relevant for getters. */
3790 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3791 false, /* isTypedMethod. Only relevant for methods. */
3792 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3793};
3794static const JSJitInfo writableUnsignedLongLong_setterinfo = {
3795 { (JSJitGetterOp)set_writableUnsignedLongLong },
3796 { prototypes::id::TestJSImplInterface },
3797 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3798 JSJitInfo::Setter,
3799 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3800 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3801 false, /* isInfallible. False in setters. */
3802 false, /* isMovable. Not relevant for setters. */
3803 false, /* isEliminatable. Not relevant for setters. */
3804 false, /* isAlwaysInSlot. Only relevant for getters. */
3805 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3806 false, /* isTypedMethod. Only relevant for methods. */
3807 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3808};
3809
3810MOZ_CAN_RUN_SCRIPT static bool
3811passUnsignedLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3812{
3813 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3816( cx, "TestJSImplInterface"
, "passUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3814 "TestJSImplInterface", "passUnsignedLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3816( cx, "TestJSImplInterface"
, "passUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3815 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3816( cx, "TestJSImplInterface"
, "passUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3816 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3816( cx, "TestJSImplInterface"
, "passUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3817
3818 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3819 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnsignedLongLong", 1)) {
3820 return false;
3821 }
3822 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3823 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3824 if (objIsXray) {
3825 unwrappedObj.emplace(cx, obj);
3826 }
3827 uint64_t arg0;
3828 if (!ValueToPrimitive<uint64_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
3829 return false;
3830 }
3831 if (objIsXray) {
3832 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3833 // we know Xrays have no dynamic unwrap behavior.
3834 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3835 if (!unwrappedObj.ref()) {
3836 return false;
3837 }
3838 }
3839 FastErrorResult rv;
3840 // NOTE: This assert does NOT call the function.
3841 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnsignedLongLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
3842 MOZ_KnownLive(self)(self)->PassUnsignedLongLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
3843 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnsignedLongLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnsignedLongLong"
)), 0))
) {
3844 return false;
3845 }
3846 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3846); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3846; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3847 args.rval().setUndefined();
3848 return true;
3849}
3850
3851static const JSJitInfo passUnsignedLongLong_methodinfo = {
3852 { (JSJitGetterOp)passUnsignedLongLong },
3853 { prototypes::id::TestJSImplInterface },
3854 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3855 JSJitInfo::Method,
3856 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3857 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3858 false, /* isInfallible. False in setters. */
3859 false, /* isMovable. Not relevant for setters. */
3860 false, /* isEliminatable. Not relevant for setters. */
3861 false, /* isAlwaysInSlot. Only relevant for getters. */
3862 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3863 false, /* isTypedMethod. Only relevant for methods. */
3864 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3865};
3866
3867MOZ_CAN_RUN_SCRIPT static bool
3868receiveUnsignedLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3869{
3870 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3873( cx, "TestJSImplInterface"
, "receiveUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3871 "TestJSImplInterface", "receiveUnsignedLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3873( cx, "TestJSImplInterface"
, "receiveUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3872 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3873( cx, "TestJSImplInterface"
, "receiveUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
3873 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3873( cx, "TestJSImplInterface"
, "receiveUnsignedLongLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
3874
3875 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3876 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3877 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3878 if (objIsXray) {
3879 unwrappedObj.emplace(cx, obj);
3880 }
3881 if (objIsXray) {
3882 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3883 // we know Xrays have no dynamic unwrap behavior.
3884 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3885 if (!unwrappedObj.ref()) {
3886 return false;
3887 }
3888 }
3889 FastErrorResult rv;
3890 uint64_t result(MOZ_KnownLive(self)(self)->ReceiveUnsignedLongLong(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
3891 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUnsignedLongLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUnsignedLongLong"
)), 0))
) {
3892 return false;
3893 }
3894 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3894); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3894; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3895 args.rval().set(JS_NumberValue(double(result)));
3896 return true;
3897}
3898
3899static const JSJitInfo receiveUnsignedLongLong_methodinfo = {
3900 { (JSJitGetterOp)receiveUnsignedLongLong },
3901 { prototypes::id::TestJSImplInterface },
3902 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3903 JSJitInfo::Method,
3904 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3905 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
3906 false, /* isInfallible. False in setters. */
3907 false, /* isMovable. Not relevant for setters. */
3908 false, /* isEliminatable. Not relevant for setters. */
3909 false, /* isAlwaysInSlot. Only relevant for getters. */
3910 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3911 false, /* isTypedMethod. Only relevant for methods. */
3912 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3913};
3914
3915MOZ_CAN_RUN_SCRIPT static bool
3916passOptionalUnsignedLongLong(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3917{
3918 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3921( cx, "TestJSImplInterface"
, "passOptionalUnsignedLongLong", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3919 "TestJSImplInterface", "passOptionalUnsignedLongLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3921( cx, "TestJSImplInterface"
, "passOptionalUnsignedLongLong", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3920 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3921( cx, "TestJSImplInterface"
, "passOptionalUnsignedLongLong", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3921 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3921( cx, "TestJSImplInterface"
, "passOptionalUnsignedLongLong", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3922
3923 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3924 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3925 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3926 if (objIsXray) {
3927 unwrappedObj.emplace(cx, obj);
3928 }
3929 Optional<uint64_t> arg0;
3930 if (args.hasDefined(0)) {
3931 arg0.Construct();
3932 if (!ValueToPrimitive<uint64_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
3933 return false;
3934 }
3935 }
3936 if (objIsXray) {
3937 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3938 // we know Xrays have no dynamic unwrap behavior.
3939 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3940 if (!unwrappedObj.ref()) {
3941 return false;
3942 }
3943 }
3944 FastErrorResult rv;
3945 // NOTE: This assert does NOT call the function.
3946 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnsignedLongLong(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
3947 MOZ_KnownLive(self)(self)->PassOptionalUnsignedLongLong(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
3948 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnsignedLongLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnsignedLongLong"
)), 0))
) {
3949 return false;
3950 }
3951 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 3951); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 3951; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
3952 args.rval().setUndefined();
3953 return true;
3954}
3955
3956static const JSJitInfo passOptionalUnsignedLongLong_methodinfo = {
3957 { (JSJitGetterOp)passOptionalUnsignedLongLong },
3958 { prototypes::id::TestJSImplInterface },
3959 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
3960 JSJitInfo::Method,
3961 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
3962 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
3963 false, /* isInfallible. False in setters. */
3964 false, /* isMovable. Not relevant for setters. */
3965 false, /* isEliminatable. Not relevant for setters. */
3966 false, /* isAlwaysInSlot. Only relevant for getters. */
3967 false, /* isLazilyCachedInSlot. Only relevant for getters. */
3968 false, /* isTypedMethod. Only relevant for methods. */
3969 0 /* Reserved slot index, if we're stored in a slot, else 0. */
3970};
3971
3972MOZ_CAN_RUN_SCRIPT static bool
3973passOptionalUnsignedLongLongWithDefault(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
3974{
3975 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject3978( cx, "TestJSImplInterface"
, "passOptionalUnsignedLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3976 "TestJSImplInterface", "passOptionalUnsignedLongLongWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject3978( cx, "TestJSImplInterface"
, "passOptionalUnsignedLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3977 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject3978( cx, "TestJSImplInterface"
, "passOptionalUnsignedLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
3978 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject3978( cx, "TestJSImplInterface"
, "passOptionalUnsignedLongLongWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
3979
3980 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
3981 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
3982 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
3983 if (objIsXray) {
3984 unwrappedObj.emplace(cx, obj);
3985 }
3986 uint64_t arg0;
3987 if (args.hasDefined(0)) {
3988 if (!ValueToPrimitive<uint64_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
3989 return false;
3990 }
3991 } else {
3992 arg0 = 17ULL;
3993 }
3994 if (objIsXray) {
3995 // Since our object is an Xray, we can just CheckedUnwrapStatic:
3996 // we know Xrays have no dynamic unwrap behavior.
3997 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
3998 if (!unwrappedObj.ref()) {
3999 return false;
4000 }
4001 }
4002 FastErrorResult rv;
4003 // NOTE: This assert does NOT call the function.
4004 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnsignedLongLongWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
4005 MOZ_KnownLive(self)(self)->PassOptionalUnsignedLongLongWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
4006 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnsignedLongLongWithDefault"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnsignedLongLongWithDefault"
)), 0))
) {
4007 return false;
4008 }
4009 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4009); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4009; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4010 args.rval().setUndefined();
4011 return true;
4012}
4013
4014static const JSJitInfo passOptionalUnsignedLongLongWithDefault_methodinfo = {
4015 { (JSJitGetterOp)passOptionalUnsignedLongLongWithDefault },
4016 { prototypes::id::TestJSImplInterface },
4017 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4018 JSJitInfo::Method,
4019 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4020 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4021 false, /* isInfallible. False in setters. */
4022 false, /* isMovable. Not relevant for setters. */
4023 false, /* isEliminatable. Not relevant for setters. */
4024 false, /* isAlwaysInSlot. Only relevant for getters. */
4025 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4026 false, /* isTypedMethod. Only relevant for methods. */
4027 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4028};
4029
4030MOZ_CAN_RUN_SCRIPT static bool
4031get_writableFloat(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4032{
4033 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4036( cx, "TestJSImplInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4034 "TestJSImplInterface", "writableFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4036( cx, "TestJSImplInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4035 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4036( cx, "TestJSImplInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4036 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4036( cx, "TestJSImplInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4037
4038 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4039 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4040 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4041 if (objIsXray) {
4042 unwrappedObj.emplace(cx, obj);
4043 }
4044 if (objIsXray) {
4045 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4046 // we know Xrays have no dynamic unwrap behavior.
4047 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4048 if (!unwrappedObj.ref()) {
4049 return false;
4050 }
4051 }
4052 FastErrorResult rv;
4053 float result(MOZ_KnownLive(self)(self)->GetWritableFloat(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
4054 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableFloat getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableFloat getter"
)), 0))
) {
4055 return false;
4056 }
4057 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4057); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4057; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4058 args.rval().set(JS_NumberValue(double(result)));
4059 return true;
4060}
4061
4062MOZ_CAN_RUN_SCRIPT static bool
4063set_writableFloat(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4064{
4065 BindingCallContext cx(cx_, "TestJSImplInterface.writableFloat setter");
4066 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4069( cx, "TestJSImplInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4067 "TestJSImplInterface", "writableFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4069( cx, "TestJSImplInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4068 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4069( cx, "TestJSImplInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4069 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4069( cx, "TestJSImplInterface"
, "writableFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4070
4071 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4072 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4073 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4074 if (objIsXray) {
4075 unwrappedObj.emplace(cx, obj);
4076 }
4077 float arg0;
4078 if (!ValueToPrimitive<float, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
4079 return false;
4080 } else if (!std::isfinite(arg0)) {
4081 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Value being assigned");
4082 return false;
4083 }
4084 if (objIsXray) {
4085 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4086 // we know Xrays have no dynamic unwrap behavior.
4087 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4088 if (!unwrappedObj.ref()) {
4089 return false;
4090 }
4091 }
4092 FastErrorResult rv;
4093 // NOTE: This assert does NOT call the function.
4094 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableFloat(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
4095 MOZ_KnownLive(self)(self)->SetWritableFloat(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
4096 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableFloat setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableFloat setter"
)), 0))
) {
4097 return false;
4098 }
4099 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4099); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4099; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4100
4101 return true;
4102}
4103
4104static const JSJitInfo writableFloat_getterinfo = {
4105 { get_writableFloat },
4106 { prototypes::id::TestJSImplInterface },
4107 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4108 JSJitInfo::Getter,
4109 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4110 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
4111 false, /* isInfallible. False in setters. */
4112 false, /* isMovable. Not relevant for setters. */
4113 false, /* isEliminatable. Not relevant for setters. */
4114 false, /* isAlwaysInSlot. Only relevant for getters. */
4115 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4116 false, /* isTypedMethod. Only relevant for methods. */
4117 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4118};
4119static const JSJitInfo writableFloat_setterinfo = {
4120 { (JSJitGetterOp)set_writableFloat },
4121 { prototypes::id::TestJSImplInterface },
4122 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4123 JSJitInfo::Setter,
4124 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4125 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4126 false, /* isInfallible. False in setters. */
4127 false, /* isMovable. Not relevant for setters. */
4128 false, /* isEliminatable. Not relevant for setters. */
4129 false, /* isAlwaysInSlot. Only relevant for getters. */
4130 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4131 false, /* isTypedMethod. Only relevant for methods. */
4132 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4133};
4134
4135MOZ_CAN_RUN_SCRIPT static bool
4136get_writableUnrestrictedFloat(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4137{
4138 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4141( cx, "TestJSImplInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4139 "TestJSImplInterface", "writableUnrestrictedFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4141( cx, "TestJSImplInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4140 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4141( cx, "TestJSImplInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4141 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4141( cx, "TestJSImplInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4142
4143 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4144 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4145 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4146 if (objIsXray) {
4147 unwrappedObj.emplace(cx, obj);
4148 }
4149 if (objIsXray) {
4150 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4151 // we know Xrays have no dynamic unwrap behavior.
4152 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4153 if (!unwrappedObj.ref()) {
4154 return false;
4155 }
4156 }
4157 FastErrorResult rv;
4158 float result(MOZ_KnownLive(self)(self)->GetWritableUnrestrictedFloat(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
4159 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnrestrictedFloat getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnrestrictedFloat getter"
)), 0))
) {
4160 return false;
4161 }
4162 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4162); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4162; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4163 args.rval().set(JS_NumberValue(double(result)));
4164 return true;
4165}
4166
4167MOZ_CAN_RUN_SCRIPT static bool
4168set_writableUnrestrictedFloat(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4169{
4170 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4173( cx, "TestJSImplInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4171 "TestJSImplInterface", "writableUnrestrictedFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4173( cx, "TestJSImplInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4172 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4173( cx, "TestJSImplInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4173 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4173( cx, "TestJSImplInterface"
, "writableUnrestrictedFloat", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4174
4175 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4176 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4177 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4178 if (objIsXray) {
4179 unwrappedObj.emplace(cx, obj);
4180 }
4181 float arg0;
4182 if (!ValueToPrimitive<float, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
4183 return false;
4184 }
4185 if (objIsXray) {
4186 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4187 // we know Xrays have no dynamic unwrap behavior.
4188 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4189 if (!unwrappedObj.ref()) {
4190 return false;
4191 }
4192 }
4193 FastErrorResult rv;
4194 // NOTE: This assert does NOT call the function.
4195 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnrestrictedFloat(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
4196 MOZ_KnownLive(self)(self)->SetWritableUnrestrictedFloat(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
4197 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnrestrictedFloat setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnrestrictedFloat setter"
)), 0))
) {
4198 return false;
4199 }
4200 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4200); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4200; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4201
4202 return true;
4203}
4204
4205static const JSJitInfo writableUnrestrictedFloat_getterinfo = {
4206 { get_writableUnrestrictedFloat },
4207 { prototypes::id::TestJSImplInterface },
4208 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4209 JSJitInfo::Getter,
4210 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4211 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
4212 false, /* isInfallible. False in setters. */
4213 false, /* isMovable. Not relevant for setters. */
4214 false, /* isEliminatable. Not relevant for setters. */
4215 false, /* isAlwaysInSlot. Only relevant for getters. */
4216 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4217 false, /* isTypedMethod. Only relevant for methods. */
4218 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4219};
4220static const JSJitInfo writableUnrestrictedFloat_setterinfo = {
4221 { (JSJitGetterOp)set_writableUnrestrictedFloat },
4222 { prototypes::id::TestJSImplInterface },
4223 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4224 JSJitInfo::Setter,
4225 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4226 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4227 false, /* isInfallible. False in setters. */
4228 false, /* isMovable. Not relevant for setters. */
4229 false, /* isEliminatable. Not relevant for setters. */
4230 false, /* isAlwaysInSlot. Only relevant for getters. */
4231 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4232 false, /* isTypedMethod. Only relevant for methods. */
4233 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4234};
4235
4236MOZ_CAN_RUN_SCRIPT static bool
4237get_writableNullableFloat(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4238{
4239 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4242( cx, "TestJSImplInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4240 "TestJSImplInterface", "writableNullableFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4242( cx, "TestJSImplInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4241 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4242( cx, "TestJSImplInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4242 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4242( cx, "TestJSImplInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4243
4244 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4245 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4246 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4247 if (objIsXray) {
4248 unwrappedObj.emplace(cx, obj);
4249 }
4250 if (objIsXray) {
4251 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4252 // we know Xrays have no dynamic unwrap behavior.
4253 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4254 if (!unwrappedObj.ref()) {
4255 return false;
4256 }
4257 }
4258 FastErrorResult rv;
4259 Nullable<float> result(MOZ_KnownLive(self)(self)->GetWritableNullableFloat(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
4260 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableFloat getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableFloat getter"
)), 0))
) {
4261 return false;
4262 }
4263 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4263); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4263; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4264 if (result.IsNull()) {
4265 args.rval().setNull();
4266 return true;
4267 }
4268 args.rval().set(JS_NumberValue(double(result.Value())));
4269 return true;
4270}
4271
4272MOZ_CAN_RUN_SCRIPT static bool
4273set_writableNullableFloat(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4274{
4275 BindingCallContext cx(cx_, "TestJSImplInterface.writableNullableFloat setter");
4276 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4279( cx, "TestJSImplInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4277 "TestJSImplInterface", "writableNullableFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4279( cx, "TestJSImplInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4278 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4279( cx, "TestJSImplInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4279 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4279( cx, "TestJSImplInterface"
, "writableNullableFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4280
4281 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4282 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4283 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4284 if (objIsXray) {
4285 unwrappedObj.emplace(cx, obj);
4286 }
4287 Nullable<float> arg0;
4288 if (args[0].isNullOrUndefined()) {
4289 arg0.SetNull();
4290 } else if (!ValueToPrimitive<float, eDefault>(cx, args[0], "Value being assigned", &arg0.SetValue())) {
4291 return false;
4292 } else if (!std::isfinite(arg0.Value())) {
4293 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Value being assigned");
4294 return false;
4295 }
4296 if (objIsXray) {
4297 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4298 // we know Xrays have no dynamic unwrap behavior.
4299 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4300 if (!unwrappedObj.ref()) {
4301 return false;
4302 }
4303 }
4304 FastErrorResult rv;
4305 // NOTE: This assert does NOT call the function.
4306 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableNullableFloat(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
4307 MOZ_KnownLive(self)(self)->SetWritableNullableFloat(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
4308 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableFloat setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableFloat setter"
)), 0))
) {
4309 return false;
4310 }
4311 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4311); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4311; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4312
4313 return true;
4314}
4315
4316static const JSJitInfo writableNullableFloat_getterinfo = {
4317 { get_writableNullableFloat },
4318 { prototypes::id::TestJSImplInterface },
4319 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4320 JSJitInfo::Getter,
4321 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4322 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
4323 false, /* isInfallible. False in setters. */
4324 false, /* isMovable. Not relevant for setters. */
4325 false, /* isEliminatable. Not relevant for setters. */
4326 false, /* isAlwaysInSlot. Only relevant for getters. */
4327 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4328 false, /* isTypedMethod. Only relevant for methods. */
4329 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4330};
4331static const JSJitInfo writableNullableFloat_setterinfo = {
4332 { (JSJitGetterOp)set_writableNullableFloat },
4333 { prototypes::id::TestJSImplInterface },
4334 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4335 JSJitInfo::Setter,
4336 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4337 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4338 false, /* isInfallible. False in setters. */
4339 false, /* isMovable. Not relevant for setters. */
4340 false, /* isEliminatable. Not relevant for setters. */
4341 false, /* isAlwaysInSlot. Only relevant for getters. */
4342 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4343 false, /* isTypedMethod. Only relevant for methods. */
4344 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4345};
4346
4347MOZ_CAN_RUN_SCRIPT static bool
4348get_writableNullableUnrestrictedFloat(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4349{
4350 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4353( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4351 "TestJSImplInterface", "writableNullableUnrestrictedFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4353( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4352 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4353( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4353 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4353( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4354
4355 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4356 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4357 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4358 if (objIsXray) {
4359 unwrappedObj.emplace(cx, obj);
4360 }
4361 if (objIsXray) {
4362 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4363 // we know Xrays have no dynamic unwrap behavior.
4364 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4365 if (!unwrappedObj.ref()) {
4366 return false;
4367 }
4368 }
4369 FastErrorResult rv;
4370 Nullable<float> result(MOZ_KnownLive(self)(self)->GetWritableNullableUnrestrictedFloat(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
4371 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableUnrestrictedFloat getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableUnrestrictedFloat getter"
)), 0))
) {
4372 return false;
4373 }
4374 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4374); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4374; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4375 if (result.IsNull()) {
4376 args.rval().setNull();
4377 return true;
4378 }
4379 args.rval().set(JS_NumberValue(double(result.Value())));
4380 return true;
4381}
4382
4383MOZ_CAN_RUN_SCRIPT static bool
4384set_writableNullableUnrestrictedFloat(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4385{
4386 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4389( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4387 "TestJSImplInterface", "writableNullableUnrestrictedFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4389( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4388 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4389( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4389 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4389( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedFloat", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4390
4391 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4392 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4393 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4394 if (objIsXray) {
4395 unwrappedObj.emplace(cx, obj);
4396 }
4397 Nullable<float> arg0;
4398 if (args[0].isNullOrUndefined()) {
4399 arg0.SetNull();
4400 } else if (!ValueToPrimitive<float, eDefault>(cx, args[0], "Value being assigned", &arg0.SetValue())) {
4401 return false;
4402 }
4403 if (objIsXray) {
4404 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4405 // we know Xrays have no dynamic unwrap behavior.
4406 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4407 if (!unwrappedObj.ref()) {
4408 return false;
4409 }
4410 }
4411 FastErrorResult rv;
4412 // NOTE: This assert does NOT call the function.
4413 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableNullableUnrestrictedFloat(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
4414 MOZ_KnownLive(self)(self)->SetWritableNullableUnrestrictedFloat(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
4415 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableUnrestrictedFloat setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableUnrestrictedFloat setter"
)), 0))
) {
4416 return false;
4417 }
4418 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4418); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4418; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4419
4420 return true;
4421}
4422
4423static const JSJitInfo writableNullableUnrestrictedFloat_getterinfo = {
4424 { get_writableNullableUnrestrictedFloat },
4425 { prototypes::id::TestJSImplInterface },
4426 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4427 JSJitInfo::Getter,
4428 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4429 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
4430 false, /* isInfallible. False in setters. */
4431 false, /* isMovable. Not relevant for setters. */
4432 false, /* isEliminatable. Not relevant for setters. */
4433 false, /* isAlwaysInSlot. Only relevant for getters. */
4434 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4435 false, /* isTypedMethod. Only relevant for methods. */
4436 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4437};
4438static const JSJitInfo writableNullableUnrestrictedFloat_setterinfo = {
4439 { (JSJitGetterOp)set_writableNullableUnrestrictedFloat },
4440 { prototypes::id::TestJSImplInterface },
4441 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4442 JSJitInfo::Setter,
4443 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4444 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4445 false, /* isInfallible. False in setters. */
4446 false, /* isMovable. Not relevant for setters. */
4447 false, /* isEliminatable. Not relevant for setters. */
4448 false, /* isAlwaysInSlot. Only relevant for getters. */
4449 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4450 false, /* isTypedMethod. Only relevant for methods. */
4451 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4452};
4453
4454MOZ_CAN_RUN_SCRIPT static bool
4455get_writableDouble(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4456{
4457 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4460( cx, "TestJSImplInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4458 "TestJSImplInterface", "writableDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4460( cx, "TestJSImplInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4459 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4460( cx, "TestJSImplInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4460 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4460( cx, "TestJSImplInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4461
4462 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4463 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4464 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4465 if (objIsXray) {
4466 unwrappedObj.emplace(cx, obj);
4467 }
4468 if (objIsXray) {
4469 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4470 // we know Xrays have no dynamic unwrap behavior.
4471 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4472 if (!unwrappedObj.ref()) {
4473 return false;
4474 }
4475 }
4476 FastErrorResult rv;
4477 double result(MOZ_KnownLive(self)(self)->GetWritableDouble(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
4478 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableDouble getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableDouble getter"
)), 0))
) {
4479 return false;
4480 }
4481 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4481); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4481; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4482 args.rval().set(JS_NumberValue(double(result)));
4483 return true;
4484}
4485
4486MOZ_CAN_RUN_SCRIPT static bool
4487set_writableDouble(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4488{
4489 BindingCallContext cx(cx_, "TestJSImplInterface.writableDouble setter");
4490 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4493( cx, "TestJSImplInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4491 "TestJSImplInterface", "writableDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4493( cx, "TestJSImplInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4492 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4493( cx, "TestJSImplInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4493 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4493( cx, "TestJSImplInterface"
, "writableDouble", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4494
4495 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4496 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4497 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4498 if (objIsXray) {
4499 unwrappedObj.emplace(cx, obj);
4500 }
4501 double arg0;
4502 if (!ValueToPrimitive<double, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
4503 return false;
4504 } else if (!std::isfinite(arg0)) {
4505 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Value being assigned");
4506 return false;
4507 }
4508 if (objIsXray) {
4509 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4510 // we know Xrays have no dynamic unwrap behavior.
4511 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4512 if (!unwrappedObj.ref()) {
4513 return false;
4514 }
4515 }
4516 FastErrorResult rv;
4517 // NOTE: This assert does NOT call the function.
4518 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableDouble(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
4519 MOZ_KnownLive(self)(self)->SetWritableDouble(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
4520 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableDouble setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableDouble setter"
)), 0))
) {
4521 return false;
4522 }
4523 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4523); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4523; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4524
4525 return true;
4526}
4527
4528static const JSJitInfo writableDouble_getterinfo = {
4529 { get_writableDouble },
4530 { prototypes::id::TestJSImplInterface },
4531 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4532 JSJitInfo::Getter,
4533 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4534 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
4535 false, /* isInfallible. False in setters. */
4536 false, /* isMovable. Not relevant for setters. */
4537 false, /* isEliminatable. Not relevant for setters. */
4538 false, /* isAlwaysInSlot. Only relevant for getters. */
4539 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4540 false, /* isTypedMethod. Only relevant for methods. */
4541 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4542};
4543static const JSJitInfo writableDouble_setterinfo = {
4544 { (JSJitGetterOp)set_writableDouble },
4545 { prototypes::id::TestJSImplInterface },
4546 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4547 JSJitInfo::Setter,
4548 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4549 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4550 false, /* isInfallible. False in setters. */
4551 false, /* isMovable. Not relevant for setters. */
4552 false, /* isEliminatable. Not relevant for setters. */
4553 false, /* isAlwaysInSlot. Only relevant for getters. */
4554 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4555 false, /* isTypedMethod. Only relevant for methods. */
4556 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4557};
4558
4559MOZ_CAN_RUN_SCRIPT static bool
4560get_writableUnrestrictedDouble(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4561{
4562 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4565( cx, "TestJSImplInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4563 "TestJSImplInterface", "writableUnrestrictedDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4565( cx, "TestJSImplInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4564 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4565( cx, "TestJSImplInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4565 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4565( cx, "TestJSImplInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4566
4567 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4568 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4569 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4570 if (objIsXray) {
4571 unwrappedObj.emplace(cx, obj);
4572 }
4573 if (objIsXray) {
4574 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4575 // we know Xrays have no dynamic unwrap behavior.
4576 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4577 if (!unwrappedObj.ref()) {
4578 return false;
4579 }
4580 }
4581 FastErrorResult rv;
4582 double result(MOZ_KnownLive(self)(self)->GetWritableUnrestrictedDouble(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
4583 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnrestrictedDouble getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnrestrictedDouble getter"
)), 0))
) {
4584 return false;
4585 }
4586 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4586); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4586; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4587 args.rval().set(JS_NumberValue(double(result)));
4588 return true;
4589}
4590
4591MOZ_CAN_RUN_SCRIPT static bool
4592set_writableUnrestrictedDouble(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4593{
4594 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4597( cx, "TestJSImplInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4595 "TestJSImplInterface", "writableUnrestrictedDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4597( cx, "TestJSImplInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4596 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4597( cx, "TestJSImplInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4597 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4597( cx, "TestJSImplInterface"
, "writableUnrestrictedDouble", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4598
4599 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4600 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4601 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4602 if (objIsXray) {
4603 unwrappedObj.emplace(cx, obj);
4604 }
4605 double arg0;
4606 if (!ValueToPrimitive<double, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
4607 return false;
4608 }
4609 if (objIsXray) {
4610 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4611 // we know Xrays have no dynamic unwrap behavior.
4612 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4613 if (!unwrappedObj.ref()) {
4614 return false;
4615 }
4616 }
4617 FastErrorResult rv;
4618 // NOTE: This assert does NOT call the function.
4619 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnrestrictedDouble(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
4620 MOZ_KnownLive(self)(self)->SetWritableUnrestrictedDouble(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
4621 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnrestrictedDouble setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnrestrictedDouble setter"
)), 0))
) {
4622 return false;
4623 }
4624 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4624); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4624; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4625
4626 return true;
4627}
4628
4629static const JSJitInfo writableUnrestrictedDouble_getterinfo = {
4630 { get_writableUnrestrictedDouble },
4631 { prototypes::id::TestJSImplInterface },
4632 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4633 JSJitInfo::Getter,
4634 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4635 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
4636 false, /* isInfallible. False in setters. */
4637 false, /* isMovable. Not relevant for setters. */
4638 false, /* isEliminatable. Not relevant for setters. */
4639 false, /* isAlwaysInSlot. Only relevant for getters. */
4640 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4641 false, /* isTypedMethod. Only relevant for methods. */
4642 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4643};
4644static const JSJitInfo writableUnrestrictedDouble_setterinfo = {
4645 { (JSJitGetterOp)set_writableUnrestrictedDouble },
4646 { prototypes::id::TestJSImplInterface },
4647 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4648 JSJitInfo::Setter,
4649 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4650 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4651 false, /* isInfallible. False in setters. */
4652 false, /* isMovable. Not relevant for setters. */
4653 false, /* isEliminatable. Not relevant for setters. */
4654 false, /* isAlwaysInSlot. Only relevant for getters. */
4655 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4656 false, /* isTypedMethod. Only relevant for methods. */
4657 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4658};
4659
4660MOZ_CAN_RUN_SCRIPT static bool
4661get_writableNullableDouble(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4662{
4663 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4666( cx, "TestJSImplInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4664 "TestJSImplInterface", "writableNullableDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4666( cx, "TestJSImplInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4665 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4666( cx, "TestJSImplInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4666 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4666( cx, "TestJSImplInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4667
4668 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4669 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4670 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4671 if (objIsXray) {
4672 unwrappedObj.emplace(cx, obj);
4673 }
4674 if (objIsXray) {
4675 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4676 // we know Xrays have no dynamic unwrap behavior.
4677 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4678 if (!unwrappedObj.ref()) {
4679 return false;
4680 }
4681 }
4682 FastErrorResult rv;
4683 Nullable<double> result(MOZ_KnownLive(self)(self)->GetWritableNullableDouble(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
4684 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableDouble getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableDouble getter"
)), 0))
) {
4685 return false;
4686 }
4687 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4687); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4687; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4688 if (result.IsNull()) {
4689 args.rval().setNull();
4690 return true;
4691 }
4692 args.rval().set(JS_NumberValue(double(result.Value())));
4693 return true;
4694}
4695
4696MOZ_CAN_RUN_SCRIPT static bool
4697set_writableNullableDouble(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4698{
4699 BindingCallContext cx(cx_, "TestJSImplInterface.writableNullableDouble setter");
4700 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4703( cx, "TestJSImplInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4701 "TestJSImplInterface", "writableNullableDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4703( cx, "TestJSImplInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4702 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4703( cx, "TestJSImplInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
4703 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4703( cx, "TestJSImplInterface"
, "writableNullableDouble", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
4704
4705 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4706 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4707 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4708 if (objIsXray) {
4709 unwrappedObj.emplace(cx, obj);
4710 }
4711 Nullable<double> arg0;
4712 if (args[0].isNullOrUndefined()) {
4713 arg0.SetNull();
4714 } else if (!ValueToPrimitive<double, eDefault>(cx, args[0], "Value being assigned", &arg0.SetValue())) {
4715 return false;
4716 } else if (!std::isfinite(arg0.Value())) {
4717 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Value being assigned");
4718 return false;
4719 }
4720 if (objIsXray) {
4721 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4722 // we know Xrays have no dynamic unwrap behavior.
4723 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4724 if (!unwrappedObj.ref()) {
4725 return false;
4726 }
4727 }
4728 FastErrorResult rv;
4729 // NOTE: This assert does NOT call the function.
4730 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableNullableDouble(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
4731 MOZ_KnownLive(self)(self)->SetWritableNullableDouble(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
4732 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableDouble setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableDouble setter"
)), 0))
) {
4733 return false;
4734 }
4735 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4735); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4735; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4736
4737 return true;
4738}
4739
4740static const JSJitInfo writableNullableDouble_getterinfo = {
4741 { get_writableNullableDouble },
4742 { prototypes::id::TestJSImplInterface },
4743 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4744 JSJitInfo::Getter,
4745 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4746 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
4747 false, /* isInfallible. False in setters. */
4748 false, /* isMovable. Not relevant for setters. */
4749 false, /* isEliminatable. Not relevant for setters. */
4750 false, /* isAlwaysInSlot. Only relevant for getters. */
4751 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4752 false, /* isTypedMethod. Only relevant for methods. */
4753 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4754};
4755static const JSJitInfo writableNullableDouble_setterinfo = {
4756 { (JSJitGetterOp)set_writableNullableDouble },
4757 { prototypes::id::TestJSImplInterface },
4758 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4759 JSJitInfo::Setter,
4760 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4761 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4762 false, /* isInfallible. False in setters. */
4763 false, /* isMovable. Not relevant for setters. */
4764 false, /* isEliminatable. Not relevant for setters. */
4765 false, /* isAlwaysInSlot. Only relevant for getters. */
4766 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4767 false, /* isTypedMethod. Only relevant for methods. */
4768 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4769};
4770
4771MOZ_CAN_RUN_SCRIPT static bool
4772get_writableNullableUnrestrictedDouble(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
4773{
4774 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4777( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4775 "TestJSImplInterface", "writableNullableUnrestrictedDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4777( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4776 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject4777( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4777 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4777( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4778
4779 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4780 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4781 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4782 if (objIsXray) {
4783 unwrappedObj.emplace(cx, obj);
4784 }
4785 if (objIsXray) {
4786 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4787 // we know Xrays have no dynamic unwrap behavior.
4788 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4789 if (!unwrappedObj.ref()) {
4790 return false;
4791 }
4792 }
4793 FastErrorResult rv;
4794 Nullable<double> result(MOZ_KnownLive(self)(self)->GetWritableNullableUnrestrictedDouble(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
4795 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableUnrestrictedDouble getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableUnrestrictedDouble getter"
)), 0))
) {
4796 return false;
4797 }
4798 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4798); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4798; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4799 if (result.IsNull()) {
4800 args.rval().setNull();
4801 return true;
4802 }
4803 args.rval().set(JS_NumberValue(double(result.Value())));
4804 return true;
4805}
4806
4807MOZ_CAN_RUN_SCRIPT static bool
4808set_writableNullableUnrestrictedDouble(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
4809{
4810 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4813( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4811 "TestJSImplInterface", "writableNullableUnrestrictedDouble", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4813( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4812 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject4813( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
4813 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4813( cx, "TestJSImplInterface"
, "writableNullableUnrestrictedDouble", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
4814
4815 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4816 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4817 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4818 if (objIsXray) {
4819 unwrappedObj.emplace(cx, obj);
4820 }
4821 Nullable<double> arg0;
4822 if (args[0].isNullOrUndefined()) {
4823 arg0.SetNull();
4824 } else if (!ValueToPrimitive<double, eDefault>(cx, args[0], "Value being assigned", &arg0.SetValue())) {
4825 return false;
4826 }
4827 if (objIsXray) {
4828 // Since our object is an Xray, we can just CheckedUnwrapStatic:
4829 // we know Xrays have no dynamic unwrap behavior.
4830 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
4831 if (!unwrappedObj.ref()) {
4832 return false;
4833 }
4834 }
4835 FastErrorResult rv;
4836 // NOTE: This assert does NOT call the function.
4837 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableNullableUnrestrictedDouble(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
4838 MOZ_KnownLive(self)(self)->SetWritableNullableUnrestrictedDouble(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
4839 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableUnrestrictedDouble setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableUnrestrictedDouble setter"
)), 0))
) {
4840 return false;
4841 }
4842 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 4842); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 4842; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
4843
4844 return true;
4845}
4846
4847static const JSJitInfo writableNullableUnrestrictedDouble_getterinfo = {
4848 { get_writableNullableUnrestrictedDouble },
4849 { prototypes::id::TestJSImplInterface },
4850 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4851 JSJitInfo::Getter,
4852 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4853 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
4854 false, /* isInfallible. False in setters. */
4855 false, /* isMovable. Not relevant for setters. */
4856 false, /* isEliminatable. Not relevant for setters. */
4857 false, /* isAlwaysInSlot. Only relevant for getters. */
4858 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4859 false, /* isTypedMethod. Only relevant for methods. */
4860 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4861};
4862static const JSJitInfo writableNullableUnrestrictedDouble_setterinfo = {
4863 { (JSJitGetterOp)set_writableNullableUnrestrictedDouble },
4864 { prototypes::id::TestJSImplInterface },
4865 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
4866 JSJitInfo::Setter,
4867 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
4868 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
4869 false, /* isInfallible. False in setters. */
4870 false, /* isMovable. Not relevant for setters. */
4871 false, /* isEliminatable. Not relevant for setters. */
4872 false, /* isAlwaysInSlot. Only relevant for getters. */
4873 false, /* isLazilyCachedInSlot. Only relevant for getters. */
4874 false, /* isTypedMethod. Only relevant for methods. */
4875 0 /* Reserved slot index, if we're stored in a slot, else 0. */
4876};
4877
4878MOZ_CAN_RUN_SCRIPT static bool
4879passFloat(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
4880{
4881 BindingCallContext cx(cx_, "TestJSImplInterface.passFloat");
4882 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject4885( cx, "TestJSImplInterface"
, "passFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
4883 "TestJSImplInterface", "passFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject4885( cx, "TestJSImplInterface"
, "passFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
4884 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject4885( cx, "TestJSImplInterface"
, "passFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
4885 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject4885( cx, "TestJSImplInterface"
, "passFloat", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
4886
4887 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
4888 if (!args.requireAtLeast(cx, "TestJSImplInterface.passFloat", 16)) {
4889 return false;
4890 }
4891 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
4892 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
4893 if (objIsXray) {
4894 unwrappedObj.emplace(cx, obj);
4895 }
4896 float arg0;
4897 if (!ValueToPrimitive<float, eDefault>(cx, args[0], "Argument 1", &arg0)) {
4898 return false;
4899 } else if (!std::isfinite(arg0)) {
4900 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Argument 1");
4901 return false;
4902 }
4903 float arg1;
4904 if (!ValueToPrimitive<float, eDefault>(cx, args[1], "Argument 2", &arg1)) {
4905 return false;
4906 }
4907 Nullable<float> arg2;
4908 if (args[2].isNullOrUndefined()) {
4909 arg2.SetNull();
4910 } else if (!ValueToPrimitive<float, eDefault>(cx, args[2], "Argument 3", &arg2.SetValue())) {
4911 return false;
4912 } else if (!std::isfinite(arg2.Value())) {
4913 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Argument 3");
4914 return false;
4915 }
4916 Nullable<float> arg3;
4917 if (args[3].isNullOrUndefined()) {
4918 arg3.SetNull();
4919 } else if (!ValueToPrimitive<float, eDefault>(cx, args[3], "Argument 4", &arg3.SetValue())) {
4920 return false;
4921 }
4922 double arg4;
4923 if (!ValueToPrimitive<double, eDefault>(cx, args[4], "Argument 5", &arg4)) {
4924 return false;
4925 } else if (!std::isfinite(arg4)) {
4926 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Argument 5");
4927 return false;
4928 }
4929 double arg5;
4930 if (!ValueToPrimitive<double, eDefault>(cx, args[5], "Argument 6", &arg5)) {
4931 return false;
4932 }
4933 Nullable<double> arg6;
4934 if (args[6].isNullOrUndefined()) {
4935 arg6.SetNull();
4936 } else if (!ValueToPrimitive<double, eDefault>(cx, args[6], "Argument 7", &arg6.SetValue())) {
4937 return false;
4938 } else if (!std::isfinite(arg6.Value())) {
4939 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Argument 7");
4940 return false;
4941 }
4942 Nullable<double> arg7;
4943 if (args[7].isNullOrUndefined()) {
4944 arg7.SetNull();
4945 } else if (!ValueToPrimitive<double, eDefault>(cx, args[7], "Argument 8", &arg7.SetValue())) {
4946 return false;
4947 }
4948 binding_detail::AutoSequence<float> arg8;
4949 if (args[8].isObject()) {
4950 JS::ForOfIterator iter(cx);
4951 if (!iter.init(args[8], JS::ForOfIterator::AllowNonIterable)) {
4952 return false;
4953 }
4954 if (!iter.valueIsIterable()) {
4955 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 9", "sequence");
4956 return false;
4957 }
4958 binding_detail::AutoSequence<float> &arr = arg8;
4959 JS::Rooted<JS::Value> temp(cx);
4960 while (true) {
4961 bool done;
4962 if (!iter.next(&temp, &done)) {
4963 return false;
4964 }
4965 if (done) {
4966 break;
4967 }
4968 float* slotPtr = arr.AppendElement(mozilla::fallible);
4969 if (!slotPtr) {
4970 JS_ReportOutOfMemory(cx);
4971 return false;
4972 }
4973 float& slot = *slotPtr;
4974 if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 9", &slot)) {
4975 return false;
4976 } else if (!std::isfinite(slot)) {
4977 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Element of argument 9");
4978 return false;
4979 }
4980 }
4981 } else {
4982 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 9", "sequence");
4983 return false;
4984 }
4985 binding_detail::AutoSequence<float> arg9;
4986 if (args[9].isObject()) {
4987 JS::ForOfIterator iter(cx);
4988 if (!iter.init(args[9], JS::ForOfIterator::AllowNonIterable)) {
4989 return false;
4990 }
4991 if (!iter.valueIsIterable()) {
4992 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 10", "sequence");
4993 return false;
4994 }
4995 binding_detail::AutoSequence<float> &arr = arg9;
4996 JS::Rooted<JS::Value> temp(cx);
4997 while (true) {
4998 bool done;
4999 if (!iter.next(&temp, &done)) {
5000 return false;
5001 }
5002 if (done) {
5003 break;
5004 }
5005 float* slotPtr = arr.AppendElement(mozilla::fallible);
5006 if (!slotPtr) {
5007 JS_ReportOutOfMemory(cx);
5008 return false;
5009 }
5010 float& slot = *slotPtr;
5011 if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 10", &slot)) {
5012 return false;
5013 }
5014 }
5015 } else {
5016 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 10", "sequence");
5017 return false;
5018 }
5019 binding_detail::AutoSequence<Nullable<float>> arg10;
5020 if (args[10].isObject()) {
5021 JS::ForOfIterator iter(cx);
5022 if (!iter.init(args[10], JS::ForOfIterator::AllowNonIterable)) {
5023 return false;
5024 }
5025 if (!iter.valueIsIterable()) {
5026 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 11", "sequence");
5027 return false;
5028 }
5029 binding_detail::AutoSequence<Nullable<float>> &arr = arg10;
5030 JS::Rooted<JS::Value> temp(cx);
5031 while (true) {
5032 bool done;
5033 if (!iter.next(&temp, &done)) {
5034 return false;
5035 }
5036 if (done) {
5037 break;
5038 }
5039 Nullable<float>* slotPtr = arr.AppendElement(mozilla::fallible);
5040 if (!slotPtr) {
5041 JS_ReportOutOfMemory(cx);
5042 return false;
5043 }
5044 Nullable<float>& slot = *slotPtr;
5045 if (temp.isNullOrUndefined()) {
5046 slot.SetNull();
5047 } else if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 11", &slot.SetValue())) {
5048 return false;
5049 } else if (!std::isfinite(slot.Value())) {
5050 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Element of argument 11");
5051 return false;
5052 }
5053 }
5054 } else {
5055 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 11", "sequence");
5056 return false;
5057 }
5058 binding_detail::AutoSequence<Nullable<float>> arg11;
5059 if (args[11].isObject()) {
5060 JS::ForOfIterator iter(cx);
5061 if (!iter.init(args[11], JS::ForOfIterator::AllowNonIterable)) {
5062 return false;
5063 }
5064 if (!iter.valueIsIterable()) {
5065 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 12", "sequence");
5066 return false;
5067 }
5068 binding_detail::AutoSequence<Nullable<float>> &arr = arg11;
5069 JS::Rooted<JS::Value> temp(cx);
5070 while (true) {
5071 bool done;
5072 if (!iter.next(&temp, &done)) {
5073 return false;
5074 }
5075 if (done) {
5076 break;
5077 }
5078 Nullable<float>* slotPtr = arr.AppendElement(mozilla::fallible);
5079 if (!slotPtr) {
5080 JS_ReportOutOfMemory(cx);
5081 return false;
5082 }
5083 Nullable<float>& slot = *slotPtr;
5084 if (temp.isNullOrUndefined()) {
5085 slot.SetNull();
5086 } else if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 12", &slot.SetValue())) {
5087 return false;
5088 }
5089 }
5090 } else {
5091 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 12", "sequence");
5092 return false;
5093 }
5094 binding_detail::AutoSequence<double> arg12;
5095 if (args[12].isObject()) {
5096 JS::ForOfIterator iter(cx);
5097 if (!iter.init(args[12], JS::ForOfIterator::AllowNonIterable)) {
5098 return false;
5099 }
5100 if (!iter.valueIsIterable()) {
5101 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 13", "sequence");
5102 return false;
5103 }
5104 binding_detail::AutoSequence<double> &arr = arg12;
5105 JS::Rooted<JS::Value> temp(cx);
5106 while (true) {
5107 bool done;
5108 if (!iter.next(&temp, &done)) {
5109 return false;
5110 }
5111 if (done) {
5112 break;
5113 }
5114 double* slotPtr = arr.AppendElement(mozilla::fallible);
5115 if (!slotPtr) {
5116 JS_ReportOutOfMemory(cx);
5117 return false;
5118 }
5119 double& slot = *slotPtr;
5120 if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 13", &slot)) {
5121 return false;
5122 } else if (!std::isfinite(slot)) {
5123 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Element of argument 13");
5124 return false;
5125 }
5126 }
5127 } else {
5128 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 13", "sequence");
5129 return false;
5130 }
5131 binding_detail::AutoSequence<double> arg13;
5132 if (args[13].isObject()) {
5133 JS::ForOfIterator iter(cx);
5134 if (!iter.init(args[13], JS::ForOfIterator::AllowNonIterable)) {
5135 return false;
5136 }
5137 if (!iter.valueIsIterable()) {
5138 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 14", "sequence");
5139 return false;
5140 }
5141 binding_detail::AutoSequence<double> &arr = arg13;
5142 JS::Rooted<JS::Value> temp(cx);
5143 while (true) {
5144 bool done;
5145 if (!iter.next(&temp, &done)) {
5146 return false;
5147 }
5148 if (done) {
5149 break;
5150 }
5151 double* slotPtr = arr.AppendElement(mozilla::fallible);
5152 if (!slotPtr) {
5153 JS_ReportOutOfMemory(cx);
5154 return false;
5155 }
5156 double& slot = *slotPtr;
5157 if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 14", &slot)) {
5158 return false;
5159 }
5160 }
5161 } else {
5162 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 14", "sequence");
5163 return false;
5164 }
5165 binding_detail::AutoSequence<Nullable<double>> arg14;
5166 if (args[14].isObject()) {
5167 JS::ForOfIterator iter(cx);
5168 if (!iter.init(args[14], JS::ForOfIterator::AllowNonIterable)) {
5169 return false;
5170 }
5171 if (!iter.valueIsIterable()) {
5172 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 15", "sequence");
5173 return false;
5174 }
5175 binding_detail::AutoSequence<Nullable<double>> &arr = arg14;
5176 JS::Rooted<JS::Value> temp(cx);
5177 while (true) {
5178 bool done;
5179 if (!iter.next(&temp, &done)) {
5180 return false;
5181 }
5182 if (done) {
5183 break;
5184 }
5185 Nullable<double>* slotPtr = arr.AppendElement(mozilla::fallible);
5186 if (!slotPtr) {
5187 JS_ReportOutOfMemory(cx);
5188 return false;
5189 }
5190 Nullable<double>& slot = *slotPtr;
5191 if (temp.isNullOrUndefined()) {
5192 slot.SetNull();
5193 } else if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 15", &slot.SetValue())) {
5194 return false;
5195 } else if (!std::isfinite(slot.Value())) {
5196 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Element of argument 15");
5197 return false;
5198 }
5199 }
5200 } else {
5201 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 15", "sequence");
5202 return false;
5203 }
5204 binding_detail::AutoSequence<Nullable<double>> arg15;
5205 if (args[15].isObject()) {
5206 JS::ForOfIterator iter(cx);
5207 if (!iter.init(args[15], JS::ForOfIterator::AllowNonIterable)) {
5208 return false;
5209 }
5210 if (!iter.valueIsIterable()) {
5211 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 16", "sequence");
5212 return false;
5213 }
5214 binding_detail::AutoSequence<Nullable<double>> &arr = arg15;
5215 JS::Rooted<JS::Value> temp(cx);
5216 while (true) {
5217 bool done;
5218 if (!iter.next(&temp, &done)) {
5219 return false;
5220 }
5221 if (done) {
5222 break;
5223 }
5224 Nullable<double>* slotPtr = arr.AppendElement(mozilla::fallible);
5225 if (!slotPtr) {
5226 JS_ReportOutOfMemory(cx);
5227 return false;
5228 }
5229 Nullable<double>& slot = *slotPtr;
5230 if (temp.isNullOrUndefined()) {
5231 slot.SetNull();
5232 } else if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 16", &slot.SetValue())) {
5233 return false;
5234 }
5235 }
5236 } else {
5237 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 16", "sequence");
5238 return false;
5239 }
5240 if (objIsXray) {
5241 // Since our object is an Xray, we can just CheckedUnwrapStatic:
5242 // we know Xrays have no dynamic unwrap behavior.
5243 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
5244 if (!unwrappedObj.ref()) {
5245 return false;
5246 }
5247 }
5248 FastErrorResult rv;
5249 // NOTE: This assert does NOT call the function.
5250 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassFloat(arg0, arg1, Constify(arg2), Constify(arg3), arg4, arg5, Constify(arg6), Constify(arg7), Constify(arg8), Constify(arg9), Constify(arg10), Constify(arg11), Constify(arg12), Constify(arg13), Constify(arg14), Constify(arg15), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
5251 MOZ_KnownLive(self)(self)->PassFloat(arg0, arg1, Constify(arg2), Constify(arg3), arg4, arg5, Constify(arg6), Constify(arg7), Constify(arg8), Constify(arg9), Constify(arg10), Constify(arg11), Constify(arg12), Constify(arg13), Constify(arg14), Constify(arg15), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
5252 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passFloat"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passFloat"
)), 0))
) {
5253 return false;
5254 }
5255 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 5255); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5255; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5256 args.rval().setUndefined();
5257 return true;
5258}
5259
5260static const JSJitInfo passFloat_methodinfo = {
5261 { (JSJitGetterOp)passFloat },
5262 { prototypes::id::TestJSImplInterface },
5263 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
5264 JSJitInfo::Method,
5265 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5266 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
5267 false, /* isInfallible. False in setters. */
5268 false, /* isMovable. Not relevant for setters. */
5269 false, /* isEliminatable. Not relevant for setters. */
5270 false, /* isAlwaysInSlot. Only relevant for getters. */
5271 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5272 false, /* isTypedMethod. Only relevant for methods. */
5273 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5274};
5275
5276MOZ_CAN_RUN_SCRIPT static bool
5277passLenientFloat(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
5278{
5279 BindingCallContext cx(cx_, "TestJSImplInterface.passLenientFloat");
5280 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5283( cx, "TestJSImplInterface"
, "passLenientFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5281 "TestJSImplInterface", "passLenientFloat", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5283( cx, "TestJSImplInterface"
, "passLenientFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5282 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject5283( cx, "TestJSImplInterface"
, "passLenientFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5283 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5283( cx, "TestJSImplInterface"
, "passLenientFloat", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5284
5285 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
5286 if (!args.requireAtLeast(cx, "TestJSImplInterface.passLenientFloat", 16)) {
5287 return false;
5288 }
5289 bool foundNonFiniteFloat = false;
5290 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
5291 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
5292 if (objIsXray) {
5293 unwrappedObj.emplace(cx, obj);
5294 }
5295 float arg0;
5296 if (!ValueToPrimitive<float, eDefault>(cx, args[0], "Argument 1", &arg0)) {
5297 return false;
5298 } else if (!std::isfinite(arg0)) {
5299 foundNonFiniteFloat = true;
5300 }
5301 float arg1;
5302 if (!ValueToPrimitive<float, eDefault>(cx, args[1], "Argument 2", &arg1)) {
5303 return false;
5304 }
5305 Nullable<float> arg2;
5306 if (args[2].isNullOrUndefined()) {
5307 arg2.SetNull();
5308 } else if (!ValueToPrimitive<float, eDefault>(cx, args[2], "Argument 3", &arg2.SetValue())) {
5309 return false;
5310 } else if (!std::isfinite(arg2.Value())) {
5311 foundNonFiniteFloat = true;
5312 }
5313 Nullable<float> arg3;
5314 if (args[3].isNullOrUndefined()) {
5315 arg3.SetNull();
5316 } else if (!ValueToPrimitive<float, eDefault>(cx, args[3], "Argument 4", &arg3.SetValue())) {
5317 return false;
5318 }
5319 double arg4;
5320 if (!ValueToPrimitive<double, eDefault>(cx, args[4], "Argument 5", &arg4)) {
5321 return false;
5322 } else if (!std::isfinite(arg4)) {
5323 foundNonFiniteFloat = true;
5324 }
5325 double arg5;
5326 if (!ValueToPrimitive<double, eDefault>(cx, args[5], "Argument 6", &arg5)) {
5327 return false;
5328 }
5329 Nullable<double> arg6;
5330 if (args[6].isNullOrUndefined()) {
5331 arg6.SetNull();
5332 } else if (!ValueToPrimitive<double, eDefault>(cx, args[6], "Argument 7", &arg6.SetValue())) {
5333 return false;
5334 } else if (!std::isfinite(arg6.Value())) {
5335 foundNonFiniteFloat = true;
5336 }
5337 Nullable<double> arg7;
5338 if (args[7].isNullOrUndefined()) {
5339 arg7.SetNull();
5340 } else if (!ValueToPrimitive<double, eDefault>(cx, args[7], "Argument 8", &arg7.SetValue())) {
5341 return false;
5342 }
5343 binding_detail::AutoSequence<float> arg8;
5344 if (args[8].isObject()) {
5345 JS::ForOfIterator iter(cx);
5346 if (!iter.init(args[8], JS::ForOfIterator::AllowNonIterable)) {
5347 return false;
5348 }
5349 if (!iter.valueIsIterable()) {
5350 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 9", "sequence");
5351 return false;
5352 }
5353 binding_detail::AutoSequence<float> &arr = arg8;
5354 JS::Rooted<JS::Value> temp(cx);
5355 while (true) {
5356 bool done;
5357 if (!iter.next(&temp, &done)) {
5358 return false;
5359 }
5360 if (done) {
5361 break;
5362 }
5363 float* slotPtr = arr.AppendElement(mozilla::fallible);
5364 if (!slotPtr) {
5365 JS_ReportOutOfMemory(cx);
5366 return false;
5367 }
5368 float& slot = *slotPtr;
5369 if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 9", &slot)) {
5370 return false;
5371 } else if (!std::isfinite(slot)) {
5372 foundNonFiniteFloat = true;
5373 }
5374 }
5375 } else {
5376 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 9", "sequence");
5377 return false;
5378 }
5379 binding_detail::AutoSequence<float> arg9;
5380 if (args[9].isObject()) {
5381 JS::ForOfIterator iter(cx);
5382 if (!iter.init(args[9], JS::ForOfIterator::AllowNonIterable)) {
5383 return false;
5384 }
5385 if (!iter.valueIsIterable()) {
5386 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 10", "sequence");
5387 return false;
5388 }
5389 binding_detail::AutoSequence<float> &arr = arg9;
5390 JS::Rooted<JS::Value> temp(cx);
5391 while (true) {
5392 bool done;
5393 if (!iter.next(&temp, &done)) {
5394 return false;
5395 }
5396 if (done) {
5397 break;
5398 }
5399 float* slotPtr = arr.AppendElement(mozilla::fallible);
5400 if (!slotPtr) {
5401 JS_ReportOutOfMemory(cx);
5402 return false;
5403 }
5404 float& slot = *slotPtr;
5405 if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 10", &slot)) {
5406 return false;
5407 }
5408 }
5409 } else {
5410 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 10", "sequence");
5411 return false;
5412 }
5413 binding_detail::AutoSequence<Nullable<float>> arg10;
5414 if (args[10].isObject()) {
5415 JS::ForOfIterator iter(cx);
5416 if (!iter.init(args[10], JS::ForOfIterator::AllowNonIterable)) {
5417 return false;
5418 }
5419 if (!iter.valueIsIterable()) {
5420 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 11", "sequence");
5421 return false;
5422 }
5423 binding_detail::AutoSequence<Nullable<float>> &arr = arg10;
5424 JS::Rooted<JS::Value> temp(cx);
5425 while (true) {
5426 bool done;
5427 if (!iter.next(&temp, &done)) {
5428 return false;
5429 }
5430 if (done) {
5431 break;
5432 }
5433 Nullable<float>* slotPtr = arr.AppendElement(mozilla::fallible);
5434 if (!slotPtr) {
5435 JS_ReportOutOfMemory(cx);
5436 return false;
5437 }
5438 Nullable<float>& slot = *slotPtr;
5439 if (temp.isNullOrUndefined()) {
5440 slot.SetNull();
5441 } else if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 11", &slot.SetValue())) {
5442 return false;
5443 } else if (!std::isfinite(slot.Value())) {
5444 foundNonFiniteFloat = true;
5445 }
5446 }
5447 } else {
5448 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 11", "sequence");
5449 return false;
5450 }
5451 binding_detail::AutoSequence<Nullable<float>> arg11;
5452 if (args[11].isObject()) {
5453 JS::ForOfIterator iter(cx);
5454 if (!iter.init(args[11], JS::ForOfIterator::AllowNonIterable)) {
5455 return false;
5456 }
5457 if (!iter.valueIsIterable()) {
5458 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 12", "sequence");
5459 return false;
5460 }
5461 binding_detail::AutoSequence<Nullable<float>> &arr = arg11;
5462 JS::Rooted<JS::Value> temp(cx);
5463 while (true) {
5464 bool done;
5465 if (!iter.next(&temp, &done)) {
5466 return false;
5467 }
5468 if (done) {
5469 break;
5470 }
5471 Nullable<float>* slotPtr = arr.AppendElement(mozilla::fallible);
5472 if (!slotPtr) {
5473 JS_ReportOutOfMemory(cx);
5474 return false;
5475 }
5476 Nullable<float>& slot = *slotPtr;
5477 if (temp.isNullOrUndefined()) {
5478 slot.SetNull();
5479 } else if (!ValueToPrimitive<float, eDefault>(cx, temp, "Element of argument 12", &slot.SetValue())) {
5480 return false;
5481 }
5482 }
5483 } else {
5484 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 12", "sequence");
5485 return false;
5486 }
5487 binding_detail::AutoSequence<double> arg12;
5488 if (args[12].isObject()) {
5489 JS::ForOfIterator iter(cx);
5490 if (!iter.init(args[12], JS::ForOfIterator::AllowNonIterable)) {
5491 return false;
5492 }
5493 if (!iter.valueIsIterable()) {
5494 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 13", "sequence");
5495 return false;
5496 }
5497 binding_detail::AutoSequence<double> &arr = arg12;
5498 JS::Rooted<JS::Value> temp(cx);
5499 while (true) {
5500 bool done;
5501 if (!iter.next(&temp, &done)) {
5502 return false;
5503 }
5504 if (done) {
5505 break;
5506 }
5507 double* slotPtr = arr.AppendElement(mozilla::fallible);
5508 if (!slotPtr) {
5509 JS_ReportOutOfMemory(cx);
5510 return false;
5511 }
5512 double& slot = *slotPtr;
5513 if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 13", &slot)) {
5514 return false;
5515 } else if (!std::isfinite(slot)) {
5516 foundNonFiniteFloat = true;
5517 }
5518 }
5519 } else {
5520 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 13", "sequence");
5521 return false;
5522 }
5523 binding_detail::AutoSequence<double> arg13;
5524 if (args[13].isObject()) {
5525 JS::ForOfIterator iter(cx);
5526 if (!iter.init(args[13], JS::ForOfIterator::AllowNonIterable)) {
5527 return false;
5528 }
5529 if (!iter.valueIsIterable()) {
5530 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 14", "sequence");
5531 return false;
5532 }
5533 binding_detail::AutoSequence<double> &arr = arg13;
5534 JS::Rooted<JS::Value> temp(cx);
5535 while (true) {
5536 bool done;
5537 if (!iter.next(&temp, &done)) {
5538 return false;
5539 }
5540 if (done) {
5541 break;
5542 }
5543 double* slotPtr = arr.AppendElement(mozilla::fallible);
5544 if (!slotPtr) {
5545 JS_ReportOutOfMemory(cx);
5546 return false;
5547 }
5548 double& slot = *slotPtr;
5549 if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 14", &slot)) {
5550 return false;
5551 }
5552 }
5553 } else {
5554 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 14", "sequence");
5555 return false;
5556 }
5557 binding_detail::AutoSequence<Nullable<double>> arg14;
5558 if (args[14].isObject()) {
5559 JS::ForOfIterator iter(cx);
5560 if (!iter.init(args[14], JS::ForOfIterator::AllowNonIterable)) {
5561 return false;
5562 }
5563 if (!iter.valueIsIterable()) {
5564 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 15", "sequence");
5565 return false;
5566 }
5567 binding_detail::AutoSequence<Nullable<double>> &arr = arg14;
5568 JS::Rooted<JS::Value> temp(cx);
5569 while (true) {
5570 bool done;
5571 if (!iter.next(&temp, &done)) {
5572 return false;
5573 }
5574 if (done) {
5575 break;
5576 }
5577 Nullable<double>* slotPtr = arr.AppendElement(mozilla::fallible);
5578 if (!slotPtr) {
5579 JS_ReportOutOfMemory(cx);
5580 return false;
5581 }
5582 Nullable<double>& slot = *slotPtr;
5583 if (temp.isNullOrUndefined()) {
5584 slot.SetNull();
5585 } else if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 15", &slot.SetValue())) {
5586 return false;
5587 } else if (!std::isfinite(slot.Value())) {
5588 foundNonFiniteFloat = true;
5589 }
5590 }
5591 } else {
5592 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 15", "sequence");
5593 return false;
5594 }
5595 binding_detail::AutoSequence<Nullable<double>> arg15;
5596 if (args[15].isObject()) {
5597 JS::ForOfIterator iter(cx);
5598 if (!iter.init(args[15], JS::ForOfIterator::AllowNonIterable)) {
5599 return false;
5600 }
5601 if (!iter.valueIsIterable()) {
5602 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 16", "sequence");
5603 return false;
5604 }
5605 binding_detail::AutoSequence<Nullable<double>> &arr = arg15;
5606 JS::Rooted<JS::Value> temp(cx);
5607 while (true) {
5608 bool done;
5609 if (!iter.next(&temp, &done)) {
5610 return false;
5611 }
5612 if (done) {
5613 break;
5614 }
5615 Nullable<double>* slotPtr = arr.AppendElement(mozilla::fallible);
5616 if (!slotPtr) {
5617 JS_ReportOutOfMemory(cx);
5618 return false;
5619 }
5620 Nullable<double>& slot = *slotPtr;
5621 if (temp.isNullOrUndefined()) {
5622 slot.SetNull();
5623 } else if (!ValueToPrimitive<double, eDefault>(cx, temp, "Element of argument 16", &slot.SetValue())) {
5624 return false;
5625 }
5626 }
5627 } else {
5628 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 16", "sequence");
5629 return false;
5630 }
5631 if (foundNonFiniteFloat) {
5632 args.rval().setUndefined();
5633 return true;
5634 }
5635 if (objIsXray) {
5636 // Since our object is an Xray, we can just CheckedUnwrapStatic:
5637 // we know Xrays have no dynamic unwrap behavior.
5638 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
5639 if (!unwrappedObj.ref()) {
5640 return false;
5641 }
5642 }
5643 FastErrorResult rv;
5644 // NOTE: This assert does NOT call the function.
5645 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassLenientFloat(arg0, arg1, Constify(arg2), Constify(arg3), arg4, arg5, Constify(arg6), Constify(arg7), Constify(arg8), Constify(arg9), Constify(arg10), Constify(arg11), Constify(arg12), Constify(arg13), Constify(arg14), Constify(arg15), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
5646 MOZ_KnownLive(self)(self)->PassLenientFloat(arg0, arg1, Constify(arg2), Constify(arg3), arg4, arg5, Constify(arg6), Constify(arg7), Constify(arg8), Constify(arg9), Constify(arg10), Constify(arg11), Constify(arg12), Constify(arg13), Constify(arg14), Constify(arg15), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
5647 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passLenientFloat"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passLenientFloat"
)), 0))
) {
5648 return false;
5649 }
5650 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 5650); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5650; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5651 args.rval().setUndefined();
5652 return true;
5653}
5654
5655static const JSJitInfo passLenientFloat_methodinfo = {
5656 { (JSJitGetterOp)passLenientFloat },
5657 { prototypes::id::TestJSImplInterface },
5658 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
5659 JSJitInfo::Method,
5660 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5661 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
5662 false, /* isInfallible. False in setters. */
5663 false, /* isMovable. Not relevant for setters. */
5664 false, /* isEliminatable. Not relevant for setters. */
5665 false, /* isAlwaysInSlot. Only relevant for getters. */
5666 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5667 false, /* isTypedMethod. Only relevant for methods. */
5668 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5669};
5670
5671MOZ_CAN_RUN_SCRIPT static bool
5672get_lenientFloatAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
5673{
5674 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5677( cx, "TestJSImplInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5675 "TestJSImplInterface", "lenientFloatAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5677( cx, "TestJSImplInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5676 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject5677( cx, "TestJSImplInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5677 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5677( cx, "TestJSImplInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5678
5679 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
5680 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
5681 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
5682 if (objIsXray) {
5683 unwrappedObj.emplace(cx, obj);
5684 }
5685 if (objIsXray) {
5686 // Since our object is an Xray, we can just CheckedUnwrapStatic:
5687 // we know Xrays have no dynamic unwrap behavior.
5688 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
5689 if (!unwrappedObj.ref()) {
5690 return false;
5691 }
5692 }
5693 FastErrorResult rv;
5694 float result(MOZ_KnownLive(self)(self)->GetLenientFloatAttr(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
5695 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.lenientFloatAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.lenientFloatAttr getter"
)), 0))
) {
5696 return false;
5697 }
5698 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 5698); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5698; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5699 args.rval().set(JS_NumberValue(double(result)));
5700 return true;
5701}
5702
5703MOZ_CAN_RUN_SCRIPT static bool
5704set_lenientFloatAttr(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
5705{
5706 BindingCallContext cx(cx_, "TestJSImplInterface.lenientFloatAttr setter");
5707 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5710( cx, "TestJSImplInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5708 "TestJSImplInterface", "lenientFloatAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5710( cx, "TestJSImplInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5709 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject5710( cx, "TestJSImplInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5710 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5710( cx, "TestJSImplInterface"
, "lenientFloatAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5711
5712 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
5713 bool foundNonFiniteFloat = false;
5714 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
5715 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
5716 if (objIsXray) {
5717 unwrappedObj.emplace(cx, obj);
5718 }
5719 float arg0;
5720 if (!ValueToPrimitive<float, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
5721 return false;
5722 } else if (!std::isfinite(arg0)) {
5723 foundNonFiniteFloat = true;
5724 }
5725 if (foundNonFiniteFloat) {
5726 return true;
5727 }
5728 if (objIsXray) {
5729 // Since our object is an Xray, we can just CheckedUnwrapStatic:
5730 // we know Xrays have no dynamic unwrap behavior.
5731 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
5732 if (!unwrappedObj.ref()) {
5733 return false;
5734 }
5735 }
5736 FastErrorResult rv;
5737 // NOTE: This assert does NOT call the function.
5738 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetLenientFloatAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
5739 MOZ_KnownLive(self)(self)->SetLenientFloatAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
5740 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.lenientFloatAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.lenientFloatAttr setter"
)), 0))
) {
5741 return false;
5742 }
5743 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 5743); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5743; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5744
5745 return true;
5746}
5747
5748static const JSJitInfo lenientFloatAttr_getterinfo = {
5749 { get_lenientFloatAttr },
5750 { prototypes::id::TestJSImplInterface },
5751 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
5752 JSJitInfo::Getter,
5753 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5754 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
5755 false, /* isInfallible. False in setters. */
5756 false, /* isMovable. Not relevant for setters. */
5757 false, /* isEliminatable. Not relevant for setters. */
5758 false, /* isAlwaysInSlot. Only relevant for getters. */
5759 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5760 false, /* isTypedMethod. Only relevant for methods. */
5761 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5762};
5763static const JSJitInfo lenientFloatAttr_setterinfo = {
5764 { (JSJitGetterOp)set_lenientFloatAttr },
5765 { prototypes::id::TestJSImplInterface },
5766 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
5767 JSJitInfo::Setter,
5768 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5769 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
5770 false, /* isInfallible. False in setters. */
5771 false, /* isMovable. Not relevant for setters. */
5772 false, /* isEliminatable. Not relevant for setters. */
5773 false, /* isAlwaysInSlot. Only relevant for getters. */
5774 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5775 false, /* isTypedMethod. Only relevant for methods. */
5776 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5777};
5778
5779MOZ_CAN_RUN_SCRIPT static bool
5780get_lenientDoubleAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
5781{
5782 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5785( cx, "TestJSImplInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5783 "TestJSImplInterface", "lenientDoubleAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5785( cx, "TestJSImplInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5784 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject5785( cx, "TestJSImplInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5785 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5785( cx, "TestJSImplInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5786
5787 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
5788 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
5789 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
5790 if (objIsXray) {
5791 unwrappedObj.emplace(cx, obj);
5792 }
5793 if (objIsXray) {
5794 // Since our object is an Xray, we can just CheckedUnwrapStatic:
5795 // we know Xrays have no dynamic unwrap behavior.
5796 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
5797 if (!unwrappedObj.ref()) {
5798 return false;
5799 }
5800 }
5801 FastErrorResult rv;
5802 double result(MOZ_KnownLive(self)(self)->GetLenientDoubleAttr(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
5803 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.lenientDoubleAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.lenientDoubleAttr getter"
)), 0))
) {
5804 return false;
5805 }
5806 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 5806); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5806; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5807 args.rval().set(JS_NumberValue(double(result)));
5808 return true;
5809}
5810
5811MOZ_CAN_RUN_SCRIPT static bool
5812set_lenientDoubleAttr(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
5813{
5814 BindingCallContext cx(cx_, "TestJSImplInterface.lenientDoubleAttr setter");
5815 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5818( cx, "TestJSImplInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5816 "TestJSImplInterface", "lenientDoubleAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5818( cx, "TestJSImplInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5817 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject5818( cx, "TestJSImplInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5818 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5818( cx, "TestJSImplInterface"
, "lenientDoubleAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5819
5820 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
5821 bool foundNonFiniteFloat = false;
5822 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
5823 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
5824 if (objIsXray) {
5825 unwrappedObj.emplace(cx, obj);
5826 }
5827 double arg0;
5828 if (!ValueToPrimitive<double, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
5829 return false;
5830 } else if (!std::isfinite(arg0)) {
5831 foundNonFiniteFloat = true;
5832 }
5833 if (foundNonFiniteFloat) {
5834 return true;
5835 }
5836 if (objIsXray) {
5837 // Since our object is an Xray, we can just CheckedUnwrapStatic:
5838 // we know Xrays have no dynamic unwrap behavior.
5839 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
5840 if (!unwrappedObj.ref()) {
5841 return false;
5842 }
5843 }
5844 FastErrorResult rv;
5845 // NOTE: This assert does NOT call the function.
5846 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetLenientDoubleAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
5847 MOZ_KnownLive(self)(self)->SetLenientDoubleAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
5848 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.lenientDoubleAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.lenientDoubleAttr setter"
)), 0))
) {
5849 return false;
5850 }
5851 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 5851); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5851; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5852
5853 return true;
5854}
5855
5856static const JSJitInfo lenientDoubleAttr_getterinfo = {
5857 { get_lenientDoubleAttr },
5858 { prototypes::id::TestJSImplInterface },
5859 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
5860 JSJitInfo::Getter,
5861 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5862 JSVAL_TYPE_DOUBLE, /* returnType. Not relevant for setters. */
5863 false, /* isInfallible. False in setters. */
5864 false, /* isMovable. Not relevant for setters. */
5865 false, /* isEliminatable. Not relevant for setters. */
5866 false, /* isAlwaysInSlot. Only relevant for getters. */
5867 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5868 false, /* isTypedMethod. Only relevant for methods. */
5869 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5870};
5871static const JSJitInfo lenientDoubleAttr_setterinfo = {
5872 { (JSJitGetterOp)set_lenientDoubleAttr },
5873 { prototypes::id::TestJSImplInterface },
5874 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
5875 JSJitInfo::Setter,
5876 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5877 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
5878 false, /* isInfallible. False in setters. */
5879 false, /* isMovable. Not relevant for setters. */
5880 false, /* isEliminatable. Not relevant for setters. */
5881 false, /* isAlwaysInSlot. Only relevant for getters. */
5882 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5883 false, /* isTypedMethod. Only relevant for methods. */
5884 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5885};
5886
5887MOZ_CAN_RUN_SCRIPT static bool
5888receiveSelf(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
5889{
5890 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5893( cx, "TestJSImplInterface"
, "receiveSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5891 "TestJSImplInterface", "receiveSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5893( cx, "TestJSImplInterface"
, "receiveSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5892 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject5893( cx, "TestJSImplInterface"
, "receiveSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5893 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5893( cx, "TestJSImplInterface"
, "receiveSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5894
5895 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
5896 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
5897 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
5898 if (objIsXray) {
5899 unwrappedObj.emplace(cx, obj);
5900 }
5901 if (objIsXray) {
5902 // Since our object is an Xray, we can just CheckedUnwrapStatic:
5903 // we know Xrays have no dynamic unwrap behavior.
5904 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
5905 if (!unwrappedObj.ref()) {
5906 return false;
5907 }
5908 }
5909 FastErrorResult rv;
5910 auto result(StrongOrRawPtr<mozilla::dom::TestJSImplInterface>(MOZ_KnownLive(self)(self)->ReceiveSelf(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
5911 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveSelf"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveSelf"
)), 0))
) {
5912 return false;
5913 }
5914 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 5914); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5914; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5915 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
5916 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 5916); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 5916; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
5917 return false;
5918 }
5919 return true;
5920}
5921
5922static const JSJitInfo receiveSelf_methodinfo = {
5923 { (JSJitGetterOp)receiveSelf },
5924 { prototypes::id::TestJSImplInterface },
5925 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
5926 JSJitInfo::Method,
5927 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5928 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
5929 false, /* isInfallible. False in setters. */
5930 false, /* isMovable. Not relevant for setters. */
5931 false, /* isEliminatable. Not relevant for setters. */
5932 false, /* isAlwaysInSlot. Only relevant for getters. */
5933 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5934 false, /* isTypedMethod. Only relevant for methods. */
5935 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5936};
5937
5938MOZ_CAN_RUN_SCRIPT static bool
5939receiveNullableSelf(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
5940{
5941 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5944( cx, "TestJSImplInterface"
, "receiveNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5942 "TestJSImplInterface", "receiveNullableSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5944( cx, "TestJSImplInterface"
, "receiveNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5943 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject5944( cx, "TestJSImplInterface"
, "receiveNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5944 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5944( cx, "TestJSImplInterface"
, "receiveNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
5945
5946 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
5947 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
5948 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
5949 if (objIsXray) {
5950 unwrappedObj.emplace(cx, obj);
5951 }
5952 if (objIsXray) {
5953 // Since our object is an Xray, we can just CheckedUnwrapStatic:
5954 // we know Xrays have no dynamic unwrap behavior.
5955 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
5956 if (!unwrappedObj.ref()) {
5957 return false;
5958 }
5959 }
5960 FastErrorResult rv;
5961 auto result(StrongOrRawPtr<mozilla::dom::TestJSImplInterface>(MOZ_KnownLive(self)(self)->ReceiveNullableSelf(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
5962 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableSelf"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableSelf"
)), 0))
) {
5963 return false;
5964 }
5965 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 5965); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 5965; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
5966 if (!result) {
5967 args.rval().setNull();
5968 return true;
5969 }
5970 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
5971 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 5971); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 5971; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
5972 return false;
5973 }
5974 return true;
5975}
5976
5977static const JSJitInfo receiveNullableSelf_methodinfo = {
5978 { (JSJitGetterOp)receiveNullableSelf },
5979 { prototypes::id::TestJSImplInterface },
5980 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
5981 JSJitInfo::Method,
5982 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
5983 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
5984 false, /* isInfallible. False in setters. */
5985 false, /* isMovable. Not relevant for setters. */
5986 false, /* isEliminatable. Not relevant for setters. */
5987 false, /* isAlwaysInSlot. Only relevant for getters. */
5988 false, /* isLazilyCachedInSlot. Only relevant for getters. */
5989 false, /* isTypedMethod. Only relevant for methods. */
5990 0 /* Reserved slot index, if we're stored in a slot, else 0. */
5991};
5992
5993MOZ_CAN_RUN_SCRIPT static bool
5994receiveWeakSelf(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
5995{
5996 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject5999( cx, "TestJSImplInterface"
, "receiveWeakSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5997 "TestJSImplInterface", "receiveWeakSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject5999( cx, "TestJSImplInterface"
, "receiveWeakSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5998 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject5999( cx, "TestJSImplInterface"
, "receiveWeakSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
5999 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject5999( cx, "TestJSImplInterface"
, "receiveWeakSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6000
6001 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6002 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6003 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6004 if (objIsXray) {
6005 unwrappedObj.emplace(cx, obj);
6006 }
6007 if (objIsXray) {
6008 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6009 // we know Xrays have no dynamic unwrap behavior.
6010 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6011 if (!unwrappedObj.ref()) {
6012 return false;
6013 }
6014 }
6015 FastErrorResult rv;
6016 auto result(StrongOrRawPtr<mozilla::dom::TestJSImplInterface>(MOZ_KnownLive(self)(self)->ReceiveWeakSelf(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
6017 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakSelf"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakSelf"
)), 0))
) {
6018 return false;
6019 }
6020 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6020); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6020; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6021 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
6022 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6022); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6022; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6023 return false;
6024 }
6025 return true;
6026}
6027
6028static const JSJitInfo receiveWeakSelf_methodinfo = {
6029 { (JSJitGetterOp)receiveWeakSelf },
6030 { prototypes::id::TestJSImplInterface },
6031 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6032 JSJitInfo::Method,
6033 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6034 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
6035 false, /* isInfallible. False in setters. */
6036 false, /* isMovable. Not relevant for setters. */
6037 false, /* isEliminatable. Not relevant for setters. */
6038 false, /* isAlwaysInSlot. Only relevant for getters. */
6039 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6040 false, /* isTypedMethod. Only relevant for methods. */
6041 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6042};
6043
6044MOZ_CAN_RUN_SCRIPT static bool
6045receiveWeakNullableSelf(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6046{
6047 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6050( cx, "TestJSImplInterface"
, "receiveWeakNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6048 "TestJSImplInterface", "receiveWeakNullableSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6050( cx, "TestJSImplInterface"
, "receiveWeakNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6049 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6050( cx, "TestJSImplInterface"
, "receiveWeakNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6050 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6050( cx, "TestJSImplInterface"
, "receiveWeakNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6051
6052 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6053 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6054 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6055 if (objIsXray) {
6056 unwrappedObj.emplace(cx, obj);
6057 }
6058 if (objIsXray) {
6059 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6060 // we know Xrays have no dynamic unwrap behavior.
6061 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6062 if (!unwrappedObj.ref()) {
6063 return false;
6064 }
6065 }
6066 FastErrorResult rv;
6067 auto result(StrongOrRawPtr<mozilla::dom::TestJSImplInterface>(MOZ_KnownLive(self)(self)->ReceiveWeakNullableSelf(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
6068 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakNullableSelf"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakNullableSelf"
)), 0))
) {
6069 return false;
6070 }
6071 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6071); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6071; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6072 if (!result) {
6073 args.rval().setNull();
6074 return true;
6075 }
6076 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
6077 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6077); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6077; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6078 return false;
6079 }
6080 return true;
6081}
6082
6083static const JSJitInfo receiveWeakNullableSelf_methodinfo = {
6084 { (JSJitGetterOp)receiveWeakNullableSelf },
6085 { prototypes::id::TestJSImplInterface },
6086 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6087 JSJitInfo::Method,
6088 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6089 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
6090 false, /* isInfallible. False in setters. */
6091 false, /* isMovable. Not relevant for setters. */
6092 false, /* isEliminatable. Not relevant for setters. */
6093 false, /* isAlwaysInSlot. Only relevant for getters. */
6094 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6095 false, /* isTypedMethod. Only relevant for methods. */
6096 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6097};
6098
6099MOZ_CAN_RUN_SCRIPT static bool
6100passSelf(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6101{
6102 BindingCallContext cx(cx_, "TestJSImplInterface.passSelf");
6103 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6106( cx, "TestJSImplInterface"
, "passSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
6104 "TestJSImplInterface", "passSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6106( cx, "TestJSImplInterface"
, "passSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
6105 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6106( cx, "TestJSImplInterface"
, "passSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
6106 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6106( cx, "TestJSImplInterface"
, "passSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
6107
6108 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6109 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSelf", 1)) {
6110 return false;
6111 }
6112 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6113 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6114 if (objIsXray) {
6115 unwrappedObj.emplace(cx, obj);
6116 }
6117 NonNull<mozilla::dom::TestJSImplInterface> arg0;
6118 if (args[0].isObject()) {
6119 {
6120 // Our JSContext should be in the right global to do unwrapping in.
6121 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0, cx);
6122 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
6123 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestJSImplInterface");
6124 return false;
6125 }
6126 }
6127 } else {
6128 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
6129 return false;
6130 }
6131 if (objIsXray) {
6132 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6133 // we know Xrays have no dynamic unwrap behavior.
6134 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6135 if (!unwrappedObj.ref()) {
6136 return false;
6137 }
6138 }
6139 FastErrorResult rv;
6140 // NOTE: This assert does NOT call the function.
6141 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSelf(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
6142 MOZ_KnownLive(self)(self)->PassSelf(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
6143 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSelf"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSelf"
)), 0))
) {
6144 return false;
6145 }
6146 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6146); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6146; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6147 args.rval().setUndefined();
6148 return true;
6149}
6150
6151static const JSJitInfo passSelf_methodinfo = {
6152 { (JSJitGetterOp)passSelf },
6153 { prototypes::id::TestJSImplInterface },
6154 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6155 JSJitInfo::Method,
6156 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6157 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
6158 false, /* isInfallible. False in setters. */
6159 false, /* isMovable. Not relevant for setters. */
6160 false, /* isEliminatable. Not relevant for setters. */
6161 false, /* isAlwaysInSlot. Only relevant for getters. */
6162 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6163 false, /* isTypedMethod. Only relevant for methods. */
6164 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6165};
6166
6167MOZ_CAN_RUN_SCRIPT static bool
6168passNullableSelf(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6169{
6170 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableSelf");
6171 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6174( cx, "TestJSImplInterface"
, "passNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6172 "TestJSImplInterface", "passNullableSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6174( cx, "TestJSImplInterface"
, "passNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6173 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6174( cx, "TestJSImplInterface"
, "passNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6174 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6174( cx, "TestJSImplInterface"
, "passNullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6175
6176 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6177 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableSelf", 1)) {
6178 return false;
6179 }
6180 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6181 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6182 if (objIsXray) {
6183 unwrappedObj.emplace(cx, obj);
6184 }
6185 mozilla::dom::TestJSImplInterface* arg0;
6186 if (args[0].isObject()) {
6187 {
6188 // Our JSContext should be in the right global to do unwrapping in.
6189 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0, cx);
6190 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
6191 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestJSImplInterface");
6192 return false;
6193 }
6194 }
6195 } else if (args[0].isNullOrUndefined()) {
6196 arg0 = nullptr;
6197 } else {
6198 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
6199 return false;
6200 }
6201 if (objIsXray) {
6202 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6203 // we know Xrays have no dynamic unwrap behavior.
6204 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6205 if (!unwrappedObj.ref()) {
6206 return false;
6207 }
6208 }
6209 FastErrorResult rv;
6210 // NOTE: This assert does NOT call the function.
6211 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableSelf(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
6212 MOZ_KnownLive(self)(self)->PassNullableSelf(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
6213 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableSelf"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableSelf"
)), 0))
) {
6214 return false;
6215 }
6216 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6216); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6216; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6217 args.rval().setUndefined();
6218 return true;
6219}
6220
6221static const JSJitInfo passNullableSelf_methodinfo = {
6222 { (JSJitGetterOp)passNullableSelf },
6223 { prototypes::id::TestJSImplInterface },
6224 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6225 JSJitInfo::Method,
6226 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6227 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
6228 false, /* isInfallible. False in setters. */
6229 false, /* isMovable. Not relevant for setters. */
6230 false, /* isEliminatable. Not relevant for setters. */
6231 false, /* isAlwaysInSlot. Only relevant for getters. */
6232 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6233 false, /* isTypedMethod. Only relevant for methods. */
6234 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6235};
6236
6237MOZ_CAN_RUN_SCRIPT static bool
6238get_nonNullSelf(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
6239{
6240 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6243( cx, "TestJSImplInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6241 "TestJSImplInterface", "nonNullSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6243( cx, "TestJSImplInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6242 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject6243( cx, "TestJSImplInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6243 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6243( cx, "TestJSImplInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6244
6245 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6246 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6247 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6248 if (objIsXray) {
6249 unwrappedObj.emplace(cx, obj);
6250 }
6251 if (objIsXray) {
6252 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6253 // we know Xrays have no dynamic unwrap behavior.
6254 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6255 if (!unwrappedObj.ref()) {
6256 return false;
6257 }
6258 }
6259 FastErrorResult rv;
6260 auto result(StrongOrRawPtr<mozilla::dom::TestJSImplInterface>(MOZ_KnownLive(self)(self)->GetNonNullSelf(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
6261 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonNullSelf getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonNullSelf getter"
)), 0))
) {
6262 return false;
6263 }
6264 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6264); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6264; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6265 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
6266 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6266); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6266; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6267 return false;
6268 }
6269 return true;
6270}
6271
6272MOZ_CAN_RUN_SCRIPT static bool
6273set_nonNullSelf(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
6274{
6275 BindingCallContext cx(cx_, "TestJSImplInterface.nonNullSelf setter");
6276 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6279( cx, "TestJSImplInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6277 "TestJSImplInterface", "nonNullSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6279( cx, "TestJSImplInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6278 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject6279( cx, "TestJSImplInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6279 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6279( cx, "TestJSImplInterface"
, "nonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6280
6281 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6282 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6283 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6284 if (objIsXray) {
6285 unwrappedObj.emplace(cx, obj);
6286 }
6287 NonNull<mozilla::dom::TestJSImplInterface> arg0;
6288 if (args[0].isObject()) {
6289 {
6290 // Our JSContext should be in the right global to do unwrapping in.
6291 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0, cx);
6292 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
6293 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "TestJSImplInterface");
6294 return false;
6295 }
6296 }
6297 } else {
6298 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
6299 return false;
6300 }
6301 if (objIsXray) {
6302 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6303 // we know Xrays have no dynamic unwrap behavior.
6304 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6305 if (!unwrappedObj.ref()) {
6306 return false;
6307 }
6308 }
6309 FastErrorResult rv;
6310 // NOTE: This assert does NOT call the function.
6311 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNonNullSelf(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
6312 MOZ_KnownLive(self)(self)->SetNonNullSelf(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
6313 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonNullSelf setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonNullSelf setter"
)), 0))
) {
6314 return false;
6315 }
6316 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6316); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6316; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6317
6318 return true;
6319}
6320
6321static const JSJitInfo nonNullSelf_getterinfo = {
6322 { get_nonNullSelf },
6323 { prototypes::id::TestJSImplInterface },
6324 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6325 JSJitInfo::Getter,
6326 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6327 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
6328 false, /* isInfallible. False in setters. */
6329 false, /* isMovable. Not relevant for setters. */
6330 false, /* isEliminatable. Not relevant for setters. */
6331 false, /* isAlwaysInSlot. Only relevant for getters. */
6332 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6333 false, /* isTypedMethod. Only relevant for methods. */
6334 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6335};
6336static const JSJitInfo nonNullSelf_setterinfo = {
6337 { (JSJitGetterOp)set_nonNullSelf },
6338 { prototypes::id::TestJSImplInterface },
6339 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6340 JSJitInfo::Setter,
6341 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6342 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
6343 false, /* isInfallible. False in setters. */
6344 false, /* isMovable. Not relevant for setters. */
6345 false, /* isEliminatable. Not relevant for setters. */
6346 false, /* isAlwaysInSlot. Only relevant for getters. */
6347 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6348 false, /* isTypedMethod. Only relevant for methods. */
6349 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6350};
6351
6352MOZ_CAN_RUN_SCRIPT static bool
6353get_nullableSelf(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
6354{
6355 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6358( cx, "TestJSImplInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6356 "TestJSImplInterface", "nullableSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6358( cx, "TestJSImplInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6357 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject6358( cx, "TestJSImplInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6358 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6358( cx, "TestJSImplInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6359
6360 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6361 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6362 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6363 if (objIsXray) {
6364 unwrappedObj.emplace(cx, obj);
6365 }
6366 if (objIsXray) {
6367 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6368 // we know Xrays have no dynamic unwrap behavior.
6369 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6370 if (!unwrappedObj.ref()) {
6371 return false;
6372 }
6373 }
6374 FastErrorResult rv;
6375 auto result(StrongOrRawPtr<mozilla::dom::TestJSImplInterface>(MOZ_KnownLive(self)(self)->GetNullableSelf(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
6376 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nullableSelf getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nullableSelf getter"
)), 0))
) {
6377 return false;
6378 }
6379 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6379); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6379; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6380 if (!result) {
6381 args.rval().setNull();
6382 return true;
6383 }
6384 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
6385 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6385); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6385; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6386 return false;
6387 }
6388 return true;
6389}
6390
6391MOZ_CAN_RUN_SCRIPT static bool
6392set_nullableSelf(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
6393{
6394 BindingCallContext cx(cx_, "TestJSImplInterface.nullableSelf setter");
6395 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6398( cx, "TestJSImplInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6396 "TestJSImplInterface", "nullableSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6398( cx, "TestJSImplInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6397 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject6398( cx, "TestJSImplInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6398 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6398( cx, "TestJSImplInterface"
, "nullableSelf", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6399
6400 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6401 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6402 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6403 if (objIsXray) {
6404 unwrappedObj.emplace(cx, obj);
6405 }
6406 mozilla::dom::TestJSImplInterface* arg0;
6407 if (args[0].isObject()) {
6408 {
6409 // Our JSContext should be in the right global to do unwrapping in.
6410 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0, cx);
6411 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
6412 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "TestJSImplInterface");
6413 return false;
6414 }
6415 }
6416 } else if (args[0].isNullOrUndefined()) {
6417 arg0 = nullptr;
6418 } else {
6419 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
6420 return false;
6421 }
6422 if (objIsXray) {
6423 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6424 // we know Xrays have no dynamic unwrap behavior.
6425 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6426 if (!unwrappedObj.ref()) {
6427 return false;
6428 }
6429 }
6430 FastErrorResult rv;
6431 // NOTE: This assert does NOT call the function.
6432 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNullableSelf(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
6433 MOZ_KnownLive(self)(self)->SetNullableSelf(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
6434 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nullableSelf setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nullableSelf setter"
)), 0))
) {
6435 return false;
6436 }
6437 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6437); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6437; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6438
6439 return true;
6440}
6441
6442static const JSJitInfo nullableSelf_getterinfo = {
6443 { get_nullableSelf },
6444 { prototypes::id::TestJSImplInterface },
6445 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6446 JSJitInfo::Getter,
6447 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6448 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
6449 false, /* isInfallible. False in setters. */
6450 false, /* isMovable. Not relevant for setters. */
6451 false, /* isEliminatable. Not relevant for setters. */
6452 false, /* isAlwaysInSlot. Only relevant for getters. */
6453 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6454 false, /* isTypedMethod. Only relevant for methods. */
6455 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6456};
6457static const JSJitInfo nullableSelf_setterinfo = {
6458 { (JSJitGetterOp)set_nullableSelf },
6459 { prototypes::id::TestJSImplInterface },
6460 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6461 JSJitInfo::Setter,
6462 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6463 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
6464 false, /* isInfallible. False in setters. */
6465 false, /* isMovable. Not relevant for setters. */
6466 false, /* isEliminatable. Not relevant for setters. */
6467 false, /* isAlwaysInSlot. Only relevant for getters. */
6468 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6469 false, /* isTypedMethod. Only relevant for methods. */
6470 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6471};
6472
6473MOZ_CAN_RUN_SCRIPT static bool
6474passOptionalSelf(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6475{
6476 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalSelf");
6477 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6480( cx, "TestJSImplInterface"
, "passOptionalSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6478 "TestJSImplInterface", "passOptionalSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6480( cx, "TestJSImplInterface"
, "passOptionalSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6479 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6480( cx, "TestJSImplInterface"
, "passOptionalSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6480 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6480( cx, "TestJSImplInterface"
, "passOptionalSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6481
6482 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6483 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6484 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6485 if (objIsXray) {
6486 unwrappedObj.emplace(cx, obj);
6487 }
6488 Optional<mozilla::dom::TestJSImplInterface*> arg0;
6489 if (args.hasDefined(0)) {
6490 arg0.Construct();
6491 if (args[0].isObject()) {
6492 {
6493 // Our JSContext should be in the right global to do unwrapping in.
6494 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0.Value(), cx);
6495 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
6496 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestJSImplInterface");
6497 return false;
6498 }
6499 }
6500 } else if (args[0].isNullOrUndefined()) {
6501 arg0.Value() = nullptr;
6502 } else {
6503 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
6504 return false;
6505 }
6506 }
6507 if (objIsXray) {
6508 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6509 // we know Xrays have no dynamic unwrap behavior.
6510 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6511 if (!unwrappedObj.ref()) {
6512 return false;
6513 }
6514 }
6515 FastErrorResult rv;
6516 // NOTE: This assert does NOT call the function.
6517 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSelf(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
6518 MOZ_KnownLive(self)(self)->PassOptionalSelf(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
6519 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSelf"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSelf"
)), 0))
) {
6520 return false;
6521 }
6522 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6522); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6522; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6523 args.rval().setUndefined();
6524 return true;
6525}
6526
6527static const JSJitInfo passOptionalSelf_methodinfo = {
6528 { (JSJitGetterOp)passOptionalSelf },
6529 { prototypes::id::TestJSImplInterface },
6530 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6531 JSJitInfo::Method,
6532 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6533 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
6534 false, /* isInfallible. False in setters. */
6535 false, /* isMovable. Not relevant for setters. */
6536 false, /* isEliminatable. Not relevant for setters. */
6537 false, /* isAlwaysInSlot. Only relevant for getters. */
6538 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6539 false, /* isTypedMethod. Only relevant for methods. */
6540 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6541};
6542
6543MOZ_CAN_RUN_SCRIPT static bool
6544passOptionalNonNullSelf(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6545{
6546 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNonNullSelf");
6547 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6550( cx, "TestJSImplInterface"
, "passOptionalNonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6548 "TestJSImplInterface", "passOptionalNonNullSelf", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6550( cx, "TestJSImplInterface"
, "passOptionalNonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6549 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6550( cx, "TestJSImplInterface"
, "passOptionalNonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
6550 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6550( cx, "TestJSImplInterface"
, "passOptionalNonNullSelf", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
6551
6552 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6553 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6554 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6555 if (objIsXray) {
6556 unwrappedObj.emplace(cx, obj);
6557 }
6558 Optional<NonNull<mozilla::dom::TestJSImplInterface>> arg0;
6559 if (args.hasDefined(0)) {
6560 arg0.Construct();
6561 if (args[0].isObject()) {
6562 {
6563 // Our JSContext should be in the right global to do unwrapping in.
6564 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0.Value(), cx);
6565 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
6566 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestJSImplInterface");
6567 return false;
6568 }
6569 }
6570 } else {
6571 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
6572 return false;
6573 }
6574 }
6575 if (objIsXray) {
6576 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6577 // we know Xrays have no dynamic unwrap behavior.
6578 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6579 if (!unwrappedObj.ref()) {
6580 return false;
6581 }
6582 }
6583 FastErrorResult rv;
6584 // NOTE: This assert does NOT call the function.
6585 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNonNullSelf(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
6586 MOZ_KnownLive(self)(self)->PassOptionalNonNullSelf(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
6587 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNonNullSelf"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNonNullSelf"
)), 0))
) {
6588 return false;
6589 }
6590 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6590); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6590; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6591 args.rval().setUndefined();
6592 return true;
6593}
6594
6595static const JSJitInfo passOptionalNonNullSelf_methodinfo = {
6596 { (JSJitGetterOp)passOptionalNonNullSelf },
6597 { prototypes::id::TestJSImplInterface },
6598 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6599 JSJitInfo::Method,
6600 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6601 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
6602 false, /* isInfallible. False in setters. */
6603 false, /* isMovable. Not relevant for setters. */
6604 false, /* isEliminatable. Not relevant for setters. */
6605 false, /* isAlwaysInSlot. Only relevant for getters. */
6606 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6607 false, /* isTypedMethod. Only relevant for methods. */
6608 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6609};
6610
6611MOZ_CAN_RUN_SCRIPT static bool
6612passOptionalSelfWithDefault(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6613{
6614 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalSelfWithDefault");
6615 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6618( cx, "TestJSImplInterface"
, "passOptionalSelfWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6616 "TestJSImplInterface", "passOptionalSelfWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6618( cx, "TestJSImplInterface"
, "passOptionalSelfWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6617 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6618( cx, "TestJSImplInterface"
, "passOptionalSelfWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6618 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6618( cx, "TestJSImplInterface"
, "passOptionalSelfWithDefault", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
6619
6620 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6621 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6622 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6623 if (objIsXray) {
6624 unwrappedObj.emplace(cx, obj);
6625 }
6626 mozilla::dom::TestJSImplInterface* arg0;
6627 if (args.hasDefined(0)) {
6628 if (args[0].isObject()) {
6629 {
6630 // Our JSContext should be in the right global to do unwrapping in.
6631 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0, cx);
6632 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
6633 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestJSImplInterface");
6634 return false;
6635 }
6636 }
6637 } else if (args[0].isNullOrUndefined()) {
6638 arg0 = nullptr;
6639 } else {
6640 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
6641 return false;
6642 }
6643 } else {
6644 arg0 = nullptr;
6645 }
6646 if (objIsXray) {
6647 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6648 // we know Xrays have no dynamic unwrap behavior.
6649 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6650 if (!unwrappedObj.ref()) {
6651 return false;
6652 }
6653 }
6654 FastErrorResult rv;
6655 // NOTE: This assert does NOT call the function.
6656 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSelfWithDefault(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
6657 MOZ_KnownLive(self)(self)->PassOptionalSelfWithDefault(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
6658 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSelfWithDefault"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSelfWithDefault"
)), 0))
) {
6659 return false;
6660 }
6661 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6661); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6661; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6662 args.rval().setUndefined();
6663 return true;
6664}
6665
6666static const JSJitInfo passOptionalSelfWithDefault_methodinfo = {
6667 { (JSJitGetterOp)passOptionalSelfWithDefault },
6668 { prototypes::id::TestJSImplInterface },
6669 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6670 JSJitInfo::Method,
6671 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6672 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
6673 false, /* isInfallible. False in setters. */
6674 false, /* isMovable. Not relevant for setters. */
6675 false, /* isEliminatable. Not relevant for setters. */
6676 false, /* isAlwaysInSlot. Only relevant for getters. */
6677 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6678 false, /* isTypedMethod. Only relevant for methods. */
6679 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6680};
6681
6682MOZ_CAN_RUN_SCRIPT static bool
6683receiveNonWrapperCacheInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6684{
6685 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6688( cx, "TestJSImplInterface"
, "receiveNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6686 "TestJSImplInterface", "receiveNonWrapperCacheInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6688( cx, "TestJSImplInterface"
, "receiveNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6687 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6688( cx, "TestJSImplInterface"
, "receiveNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6688 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6688( cx, "TestJSImplInterface"
, "receiveNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
6689
6690 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6691 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6692 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6693 if (objIsXray) {
6694 unwrappedObj.emplace(cx, obj);
6695 }
6696 if (objIsXray) {
6697 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6698 // we know Xrays have no dynamic unwrap behavior.
6699 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6700 if (!unwrappedObj.ref()) {
6701 return false;
6702 }
6703 }
6704 FastErrorResult rv;
6705 auto result(StrongOrRawPtr<mozilla::dom::TestNonWrapperCacheInterface>(MOZ_KnownLive(self)(self)->ReceiveNonWrapperCacheInterface(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
6706 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNonWrapperCacheInterface"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNonWrapperCacheInterface"
)), 0))
) {
6707 return false;
6708 }
6709 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6709); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6709; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6710 static_assert(!std::is_pointer_v<decltype(result)>,
6711 "NewObject implies that we need to keep the object alive with a strong reference.");
6712 if (!WrapNewBindingNonWrapperCachedObject(cx, obj, result, args.rval())) {
6713 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6713); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6713; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6714 return false;
6715 }
6716 return true;
6717}
6718
6719static const JSJitInfo receiveNonWrapperCacheInterface_methodinfo = {
6720 { (JSJitGetterOp)receiveNonWrapperCacheInterface },
6721 { prototypes::id::TestJSImplInterface },
6722 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6723 JSJitInfo::Method,
6724 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6725 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
6726 false, /* isInfallible. False in setters. */
6727 false, /* isMovable. Not relevant for setters. */
6728 false, /* isEliminatable. Not relevant for setters. */
6729 false, /* isAlwaysInSlot. Only relevant for getters. */
6730 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6731 false, /* isTypedMethod. Only relevant for methods. */
6732 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6733};
6734
6735MOZ_CAN_RUN_SCRIPT static bool
6736receiveNullableNonWrapperCacheInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6737{
6738 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6741( cx, "TestJSImplInterface"
, "receiveNullableNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6739 "TestJSImplInterface", "receiveNullableNonWrapperCacheInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6741( cx, "TestJSImplInterface"
, "receiveNullableNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6740 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6741( cx, "TestJSImplInterface"
, "receiveNullableNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6741 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6741( cx, "TestJSImplInterface"
, "receiveNullableNonWrapperCacheInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
6742
6743 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6744 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6745 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6746 if (objIsXray) {
6747 unwrappedObj.emplace(cx, obj);
6748 }
6749 if (objIsXray) {
6750 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6751 // we know Xrays have no dynamic unwrap behavior.
6752 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6753 if (!unwrappedObj.ref()) {
6754 return false;
6755 }
6756 }
6757 FastErrorResult rv;
6758 auto result(StrongOrRawPtr<mozilla::dom::TestNonWrapperCacheInterface>(MOZ_KnownLive(self)(self)->ReceiveNullableNonWrapperCacheInterface(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
6759 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableNonWrapperCacheInterface"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableNonWrapperCacheInterface"
)), 0))
) {
6760 return false;
6761 }
6762 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6762); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6762; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6763 static_assert(!std::is_pointer_v<decltype(result)>,
6764 "NewObject implies that we need to keep the object alive with a strong reference.");
6765 if (!result) {
6766 args.rval().setNull();
6767 return true;
6768 }
6769 if (!WrapNewBindingNonWrapperCachedObject(cx, obj, result, args.rval())) {
6770 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6770); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6770; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6771 return false;
6772 }
6773 return true;
6774}
6775
6776static const JSJitInfo receiveNullableNonWrapperCacheInterface_methodinfo = {
6777 { (JSJitGetterOp)receiveNullableNonWrapperCacheInterface },
6778 { prototypes::id::TestJSImplInterface },
6779 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6780 JSJitInfo::Method,
6781 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6782 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
6783 false, /* isInfallible. False in setters. */
6784 false, /* isMovable. Not relevant for setters. */
6785 false, /* isEliminatable. Not relevant for setters. */
6786 false, /* isAlwaysInSlot. Only relevant for getters. */
6787 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6788 false, /* isTypedMethod. Only relevant for methods. */
6789 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6790};
6791
6792MOZ_CAN_RUN_SCRIPT static bool
6793receiveNonWrapperCacheInterfaceSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6794{
6795 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6798( cx, "TestJSImplInterface"
, "receiveNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6796 "TestJSImplInterface", "receiveNonWrapperCacheInterfaceSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6798( cx, "TestJSImplInterface"
, "receiveNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6797 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6798( cx, "TestJSImplInterface"
, "receiveNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6798 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6798( cx, "TestJSImplInterface"
, "receiveNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
6799
6800 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6801 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6802 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6803 if (objIsXray) {
6804 unwrappedObj.emplace(cx, obj);
6805 }
6806 if (objIsXray) {
6807 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6808 // we know Xrays have no dynamic unwrap behavior.
6809 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6810 if (!unwrappedObj.ref()) {
6811 return false;
6812 }
6813 }
6814 FastErrorResult rv;
6815 nsTArray<StrongPtrForMember<mozilla::dom::TestNonWrapperCacheInterface>> result;
6816 // NOTE: This assert does NOT call the function.
6817 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNonWrapperCacheInterfaceSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
6818 MOZ_KnownLive(self)(self)->ReceiveNonWrapperCacheInterfaceSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
6819 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNonWrapperCacheInterfaceSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNonWrapperCacheInterfaceSequence"
)), 0))
) {
6820 return false;
6821 }
6822 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6822); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6822; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6823
6824 uint32_t length = result.Length();
6825 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
6826 if (!returnArray) {
6827 return false;
6828 }
6829 // Scope for 'tmp'
6830 {
6831 JS::Rooted<JS::Value> tmp(cx);
6832 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
6833 // Control block to let us common up the JS_DefineElement calls when there
6834 // are different ways to succeed at wrapping the object.
6835 do {
6836 if (!WrapNewBindingNonWrapperCachedObject(cx, returnArray, result[sequenceIdx0], &tmp)) {
6837 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6837); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6837; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6838 return false;
6839 }
6840 break;
6841 } while (false);
6842 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
6843 JSPROP_ENUMERATE)) {
6844 return false;
6845 }
6846 }
6847 }
6848 args.rval().setObject(*returnArray);
6849 return true;
6850}
6851
6852static const JSJitInfo receiveNonWrapperCacheInterfaceSequence_methodinfo = {
6853 { (JSJitGetterOp)receiveNonWrapperCacheInterfaceSequence },
6854 { prototypes::id::TestJSImplInterface },
6855 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6856 JSJitInfo::Method,
6857 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6858 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
6859 false, /* isInfallible. False in setters. */
6860 false, /* isMovable. Not relevant for setters. */
6861 false, /* isEliminatable. Not relevant for setters. */
6862 false, /* isAlwaysInSlot. Only relevant for getters. */
6863 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6864 false, /* isTypedMethod. Only relevant for methods. */
6865 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6866};
6867
6868MOZ_CAN_RUN_SCRIPT static bool
6869receiveNullableNonWrapperCacheInterfaceSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6870{
6871 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6874( cx, "TestJSImplInterface"
, "receiveNullableNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6872 "TestJSImplInterface", "receiveNullableNonWrapperCacheInterfaceSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6874( cx, "TestJSImplInterface"
, "receiveNullableNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6873 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6874( cx, "TestJSImplInterface"
, "receiveNullableNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6874 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6874( cx, "TestJSImplInterface"
, "receiveNullableNonWrapperCacheInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
6875
6876 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6877 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6878 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6879 if (objIsXray) {
6880 unwrappedObj.emplace(cx, obj);
6881 }
6882 if (objIsXray) {
6883 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6884 // we know Xrays have no dynamic unwrap behavior.
6885 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6886 if (!unwrappedObj.ref()) {
6887 return false;
6888 }
6889 }
6890 FastErrorResult rv;
6891 nsTArray<StrongPtrForMember<mozilla::dom::TestNonWrapperCacheInterface>> result;
6892 // NOTE: This assert does NOT call the function.
6893 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableNonWrapperCacheInterfaceSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
6894 MOZ_KnownLive(self)(self)->ReceiveNullableNonWrapperCacheInterfaceSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
6895 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableNonWrapperCacheInterfaceSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableNonWrapperCacheInterfaceSequence"
)), 0))
) {
6896 return false;
6897 }
6898 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6898); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6898; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6899
6900 uint32_t length = result.Length();
6901 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
6902 if (!returnArray) {
6903 return false;
6904 }
6905 // Scope for 'tmp'
6906 {
6907 JS::Rooted<JS::Value> tmp(cx);
6908 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
6909 // Control block to let us common up the JS_DefineElement calls when there
6910 // are different ways to succeed at wrapping the object.
6911 do {
6912 if (!result[sequenceIdx0]) {
6913 tmp.setNull();
6914 break;
6915 }
6916 if (!WrapNewBindingNonWrapperCachedObject(cx, returnArray, result[sequenceIdx0], &tmp)) {
6917 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6917); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6917; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6918 return false;
6919 }
6920 break;
6921 } while (false);
6922 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
6923 JSPROP_ENUMERATE)) {
6924 return false;
6925 }
6926 }
6927 }
6928 args.rval().setObject(*returnArray);
6929 return true;
6930}
6931
6932static const JSJitInfo receiveNullableNonWrapperCacheInterfaceSequence_methodinfo = {
6933 { (JSJitGetterOp)receiveNullableNonWrapperCacheInterfaceSequence },
6934 { prototypes::id::TestJSImplInterface },
6935 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
6936 JSJitInfo::Method,
6937 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
6938 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
6939 false, /* isInfallible. False in setters. */
6940 false, /* isMovable. Not relevant for setters. */
6941 false, /* isEliminatable. Not relevant for setters. */
6942 false, /* isAlwaysInSlot. Only relevant for getters. */
6943 false, /* isLazilyCachedInSlot. Only relevant for getters. */
6944 false, /* isTypedMethod. Only relevant for methods. */
6945 0 /* Reserved slot index, if we're stored in a slot, else 0. */
6946};
6947
6948MOZ_CAN_RUN_SCRIPT static bool
6949receiveNonWrapperCacheInterfaceNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
6950{
6951 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject6954( cx, "TestJSImplInterface"
, "receiveNonWrapperCacheInterfaceNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6952 "TestJSImplInterface", "receiveNonWrapperCacheInterfaceNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject6954( cx, "TestJSImplInterface"
, "receiveNonWrapperCacheInterfaceNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6953 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject6954( cx, "TestJSImplInterface"
, "receiveNonWrapperCacheInterfaceNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
6954 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject6954( cx, "TestJSImplInterface"
, "receiveNonWrapperCacheInterfaceNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
6955
6956 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
6957 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
6958 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
6959 if (objIsXray) {
6960 unwrappedObj.emplace(cx, obj);
6961 }
6962 if (objIsXray) {
6963 // Since our object is an Xray, we can just CheckedUnwrapStatic:
6964 // we know Xrays have no dynamic unwrap behavior.
6965 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
6966 if (!unwrappedObj.ref()) {
6967 return false;
6968 }
6969 }
6970 FastErrorResult rv;
6971 Nullable<nsTArray<StrongPtrForMember<mozilla::dom::TestNonWrapperCacheInterface>>> result;
6972 // NOTE: This assert does NOT call the function.
6973 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNonWrapperCacheInterfaceNullableSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
6974 MOZ_KnownLive(self)(self)->ReceiveNonWrapperCacheInterfaceNullableSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
6975 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNonWrapperCacheInterfaceNullableSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNonWrapperCacheInterfaceNullableSequence"
)), 0))
) {
6976 return false;
6977 }
6978 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6978); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 6978; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
6979
6980 if (result.IsNull()) {
6981 args.rval().setNull();
6982 return true;
6983 }
6984
6985 uint32_t length = result.Value().Length();
6986 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
6987 if (!returnArray) {
6988 return false;
6989 }
6990 // Scope for 'tmp'
6991 {
6992 JS::Rooted<JS::Value> tmp(cx);
6993 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
6994 // Control block to let us common up the JS_DefineElement calls when there
6995 // are different ways to succeed at wrapping the object.
6996 do {
6997 if (!WrapNewBindingNonWrapperCachedObject(cx, returnArray, result.Value()[sequenceIdx0], &tmp)) {
6998 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 6998); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 6998; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
6999 return false;
7000 }
7001 break;
7002 } while (false);
7003 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
7004 JSPROP_ENUMERATE)) {
7005 return false;
7006 }
7007 }
7008 }
7009 args.rval().setObject(*returnArray);
7010 return true;
7011}
7012
7013static const JSJitInfo receiveNonWrapperCacheInterfaceNullableSequence_methodinfo = {
7014 { (JSJitGetterOp)receiveNonWrapperCacheInterfaceNullableSequence },
7015 { prototypes::id::TestJSImplInterface },
7016 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7017 JSJitInfo::Method,
7018 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7019 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
7020 false, /* isInfallible. False in setters. */
7021 false, /* isMovable. Not relevant for setters. */
7022 false, /* isEliminatable. Not relevant for setters. */
7023 false, /* isAlwaysInSlot. Only relevant for getters. */
7024 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7025 false, /* isTypedMethod. Only relevant for methods. */
7026 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7027};
7028
7029MOZ_CAN_RUN_SCRIPT static bool
7030receiveNullableNonWrapperCacheInterfaceNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7031{
7032 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7035( cx, "TestJSImplInterface"
, "receiveNullableNonWrapperCacheInterfaceNullableSequence", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
7033 "TestJSImplInterface", "receiveNullableNonWrapperCacheInterfaceNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7035( cx, "TestJSImplInterface"
, "receiveNullableNonWrapperCacheInterfaceNullableSequence", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
7034 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7035( cx, "TestJSImplInterface"
, "receiveNullableNonWrapperCacheInterfaceNullableSequence", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
7035 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7035( cx, "TestJSImplInterface"
, "receiveNullableNonWrapperCacheInterfaceNullableSequence", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
7036
7037 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7038 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7039 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7040 if (objIsXray) {
7041 unwrappedObj.emplace(cx, obj);
7042 }
7043 if (objIsXray) {
7044 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7045 // we know Xrays have no dynamic unwrap behavior.
7046 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7047 if (!unwrappedObj.ref()) {
7048 return false;
7049 }
7050 }
7051 FastErrorResult rv;
7052 Nullable<nsTArray<StrongPtrForMember<mozilla::dom::TestNonWrapperCacheInterface>>> result;
7053 // NOTE: This assert does NOT call the function.
7054 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableNonWrapperCacheInterfaceNullableSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
7055 MOZ_KnownLive(self)(self)->ReceiveNullableNonWrapperCacheInterfaceNullableSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
7056 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableNonWrapperCacheInterfaceNullableSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableNonWrapperCacheInterfaceNullableSequence"
)), 0))
) {
7057 return false;
7058 }
7059 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7059); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7059; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7060
7061 if (result.IsNull()) {
7062 args.rval().setNull();
7063 return true;
7064 }
7065
7066 uint32_t length = result.Value().Length();
7067 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
7068 if (!returnArray) {
7069 return false;
7070 }
7071 // Scope for 'tmp'
7072 {
7073 JS::Rooted<JS::Value> tmp(cx);
7074 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
7075 // Control block to let us common up the JS_DefineElement calls when there
7076 // are different ways to succeed at wrapping the object.
7077 do {
7078 if (!result.Value()[sequenceIdx0]) {
7079 tmp.setNull();
7080 break;
7081 }
7082 if (!WrapNewBindingNonWrapperCachedObject(cx, returnArray, result.Value()[sequenceIdx0], &tmp)) {
7083 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7083); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 7083; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
7084 return false;
7085 }
7086 break;
7087 } while (false);
7088 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
7089 JSPROP_ENUMERATE)) {
7090 return false;
7091 }
7092 }
7093 }
7094 args.rval().setObject(*returnArray);
7095 return true;
7096}
7097
7098static const JSJitInfo receiveNullableNonWrapperCacheInterfaceNullableSequence_methodinfo = {
7099 { (JSJitGetterOp)receiveNullableNonWrapperCacheInterfaceNullableSequence },
7100 { prototypes::id::TestJSImplInterface },
7101 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7102 JSJitInfo::Method,
7103 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7104 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
7105 false, /* isInfallible. False in setters. */
7106 false, /* isMovable. Not relevant for setters. */
7107 false, /* isEliminatable. Not relevant for setters. */
7108 false, /* isAlwaysInSlot. Only relevant for getters. */
7109 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7110 false, /* isTypedMethod. Only relevant for methods. */
7111 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7112};
7113
7114MOZ_CAN_RUN_SCRIPT static bool
7115receiveExternal(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7116{
7117 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7120( cx, "TestJSImplInterface"
, "receiveExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7118 "TestJSImplInterface", "receiveExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7120( cx, "TestJSImplInterface"
, "receiveExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7119 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7120( cx, "TestJSImplInterface"
, "receiveExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7120 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7120( cx, "TestJSImplInterface"
, "receiveExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7121
7122 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7123 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7124 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7125 if (objIsXray) {
7126 unwrappedObj.emplace(cx, obj);
7127 }
7128 if (objIsXray) {
7129 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7130 // we know Xrays have no dynamic unwrap behavior.
7131 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7132 if (!unwrappedObj.ref()) {
7133 return false;
7134 }
7135 }
7136 FastErrorResult rv;
7137 auto result(StrongOrRawPtr<mozilla::dom::TestExternalInterface>(MOZ_KnownLive(self)(self)->ReceiveExternal(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
7138 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveExternal"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveExternal"
)), 0))
) {
7139 return false;
7140 }
7141 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7141); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7141; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7142 if (!WrapObject(cx, result, args.rval())) {
7143 return false;
7144 }
7145 return true;
7146}
7147
7148static const JSJitInfo receiveExternal_methodinfo = {
7149 { (JSJitGetterOp)receiveExternal },
7150 { prototypes::id::TestJSImplInterface },
7151 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7152 JSJitInfo::Method,
7153 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7154 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
7155 false, /* isInfallible. False in setters. */
7156 false, /* isMovable. Not relevant for setters. */
7157 false, /* isEliminatable. Not relevant for setters. */
7158 false, /* isAlwaysInSlot. Only relevant for getters. */
7159 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7160 false, /* isTypedMethod. Only relevant for methods. */
7161 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7162};
7163
7164MOZ_CAN_RUN_SCRIPT static bool
7165receiveNullableExternal(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7166{
7167 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7170( cx, "TestJSImplInterface"
, "receiveNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7168 "TestJSImplInterface", "receiveNullableExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7170( cx, "TestJSImplInterface"
, "receiveNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7169 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7170( cx, "TestJSImplInterface"
, "receiveNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7170 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7170( cx, "TestJSImplInterface"
, "receiveNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7171
7172 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7173 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7174 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7175 if (objIsXray) {
7176 unwrappedObj.emplace(cx, obj);
7177 }
7178 if (objIsXray) {
7179 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7180 // we know Xrays have no dynamic unwrap behavior.
7181 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7182 if (!unwrappedObj.ref()) {
7183 return false;
7184 }
7185 }
7186 FastErrorResult rv;
7187 auto result(StrongOrRawPtr<mozilla::dom::TestExternalInterface>(MOZ_KnownLive(self)(self)->ReceiveNullableExternal(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
7188 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableExternal"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableExternal"
)), 0))
) {
7189 return false;
7190 }
7191 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7191); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7191; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7192 if (!result) {
7193 args.rval().setNull();
7194 return true;
7195 }
7196 if (!WrapObject(cx, result, args.rval())) {
7197 return false;
7198 }
7199 return true;
7200}
7201
7202static const JSJitInfo receiveNullableExternal_methodinfo = {
7203 { (JSJitGetterOp)receiveNullableExternal },
7204 { prototypes::id::TestJSImplInterface },
7205 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7206 JSJitInfo::Method,
7207 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7208 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
7209 false, /* isInfallible. False in setters. */
7210 false, /* isMovable. Not relevant for setters. */
7211 false, /* isEliminatable. Not relevant for setters. */
7212 false, /* isAlwaysInSlot. Only relevant for getters. */
7213 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7214 false, /* isTypedMethod. Only relevant for methods. */
7215 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7216};
7217
7218MOZ_CAN_RUN_SCRIPT static bool
7219receiveWeakExternal(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7220{
7221 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7224( cx, "TestJSImplInterface"
, "receiveWeakExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7222 "TestJSImplInterface", "receiveWeakExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7224( cx, "TestJSImplInterface"
, "receiveWeakExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7223 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7224( cx, "TestJSImplInterface"
, "receiveWeakExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7224 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7224( cx, "TestJSImplInterface"
, "receiveWeakExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7225
7226 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7227 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7228 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7229 if (objIsXray) {
7230 unwrappedObj.emplace(cx, obj);
7231 }
7232 if (objIsXray) {
7233 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7234 // we know Xrays have no dynamic unwrap behavior.
7235 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7236 if (!unwrappedObj.ref()) {
7237 return false;
7238 }
7239 }
7240 FastErrorResult rv;
7241 auto result(StrongOrRawPtr<mozilla::dom::TestExternalInterface>(MOZ_KnownLive(self)(self)->ReceiveWeakExternal(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
7242 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakExternal"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakExternal"
)), 0))
) {
7243 return false;
7244 }
7245 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7245); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7245; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7246 if (!WrapObject(cx, result, args.rval())) {
7247 return false;
7248 }
7249 return true;
7250}
7251
7252static const JSJitInfo receiveWeakExternal_methodinfo = {
7253 { (JSJitGetterOp)receiveWeakExternal },
7254 { prototypes::id::TestJSImplInterface },
7255 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7256 JSJitInfo::Method,
7257 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7258 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
7259 false, /* isInfallible. False in setters. */
7260 false, /* isMovable. Not relevant for setters. */
7261 false, /* isEliminatable. Not relevant for setters. */
7262 false, /* isAlwaysInSlot. Only relevant for getters. */
7263 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7264 false, /* isTypedMethod. Only relevant for methods. */
7265 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7266};
7267
7268MOZ_CAN_RUN_SCRIPT static bool
7269receiveWeakNullableExternal(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7270{
7271 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7274( cx, "TestJSImplInterface"
, "receiveWeakNullableExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7272 "TestJSImplInterface", "receiveWeakNullableExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7274( cx, "TestJSImplInterface"
, "receiveWeakNullableExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7273 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7274( cx, "TestJSImplInterface"
, "receiveWeakNullableExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7274 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7274( cx, "TestJSImplInterface"
, "receiveWeakNullableExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7275
7276 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7277 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7278 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7279 if (objIsXray) {
7280 unwrappedObj.emplace(cx, obj);
7281 }
7282 if (objIsXray) {
7283 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7284 // we know Xrays have no dynamic unwrap behavior.
7285 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7286 if (!unwrappedObj.ref()) {
7287 return false;
7288 }
7289 }
7290 FastErrorResult rv;
7291 auto result(StrongOrRawPtr<mozilla::dom::TestExternalInterface>(MOZ_KnownLive(self)(self)->ReceiveWeakNullableExternal(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
7292 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakNullableExternal"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakNullableExternal"
)), 0))
) {
7293 return false;
7294 }
7295 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7295); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7295; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7296 if (!result) {
7297 args.rval().setNull();
7298 return true;
7299 }
7300 if (!WrapObject(cx, result, args.rval())) {
7301 return false;
7302 }
7303 return true;
7304}
7305
7306static const JSJitInfo receiveWeakNullableExternal_methodinfo = {
7307 { (JSJitGetterOp)receiveWeakNullableExternal },
7308 { prototypes::id::TestJSImplInterface },
7309 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7310 JSJitInfo::Method,
7311 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7312 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
7313 false, /* isInfallible. False in setters. */
7314 false, /* isMovable. Not relevant for setters. */
7315 false, /* isEliminatable. Not relevant for setters. */
7316 false, /* isAlwaysInSlot. Only relevant for getters. */
7317 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7318 false, /* isTypedMethod. Only relevant for methods. */
7319 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7320};
7321
7322MOZ_CAN_RUN_SCRIPT static bool
7323passExternal(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7324{
7325 BindingCallContext cx(cx_, "TestJSImplInterface.passExternal");
7326 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7329( cx, "TestJSImplInterface"
, "passExternal", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7327 "TestJSImplInterface", "passExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7329( cx, "TestJSImplInterface"
, "passExternal", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7328 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7329( cx, "TestJSImplInterface"
, "passExternal", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7329 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7329( cx, "TestJSImplInterface"
, "passExternal", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7330
7331 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7332 if (!args.requireAtLeast(cx, "TestJSImplInterface.passExternal", 1)) {
7333 return false;
7334 }
7335 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7336 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7337 if (objIsXray) {
7338 unwrappedObj.emplace(cx, obj);
7339 }
7340 mozilla::dom::TestExternalInterface* arg0;
7341 RefPtr<mozilla::dom::TestExternalInterface> arg0_holder;
7342 if (args[0].isObject()) {
7343 JS::Rooted<JSObject*> source(cx, &args[0].toObject());
7344 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(arg0_holder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(arg0_holder
)))), 0)))
) {
7345 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestExternalInterface");
7346 return false;
7347 }
7348 MOZ_ASSERT(arg0_holder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(arg0_holder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(arg0_holder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("arg0_holder", "../TestJSImplGenBinding.cpp"
, 7348); AnnotateMozCrashReason("MOZ_ASSERT" "(" "arg0_holder"
")"); do { *((volatile int*)__null) = 7348; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
7349 arg0 = arg0_holder;
7350 } else {
7351 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
7352 return false;
7353 }
7354 if (objIsXray) {
7355 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7356 // we know Xrays have no dynamic unwrap behavior.
7357 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7358 if (!unwrappedObj.ref()) {
7359 return false;
7360 }
7361 }
7362 FastErrorResult rv;
7363 // NOTE: This assert does NOT call the function.
7364 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassExternal(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
7365 MOZ_KnownLive(self)(self)->PassExternal(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
7366 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passExternal"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passExternal"
)), 0))
) {
7367 return false;
7368 }
7369 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7369); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7369; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7370 args.rval().setUndefined();
7371 return true;
7372}
7373
7374static const JSJitInfo passExternal_methodinfo = {
7375 { (JSJitGetterOp)passExternal },
7376 { prototypes::id::TestJSImplInterface },
7377 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7378 JSJitInfo::Method,
7379 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7380 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7381 false, /* isInfallible. False in setters. */
7382 false, /* isMovable. Not relevant for setters. */
7383 false, /* isEliminatable. Not relevant for setters. */
7384 false, /* isAlwaysInSlot. Only relevant for getters. */
7385 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7386 false, /* isTypedMethod. Only relevant for methods. */
7387 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7388};
7389
7390MOZ_CAN_RUN_SCRIPT static bool
7391passNullableExternal(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7392{
7393 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableExternal");
7394 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7397( cx, "TestJSImplInterface"
, "passNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7395 "TestJSImplInterface", "passNullableExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7397( cx, "TestJSImplInterface"
, "passNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7396 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7397( cx, "TestJSImplInterface"
, "passNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7397 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7397( cx, "TestJSImplInterface"
, "passNullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7398
7399 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7400 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableExternal", 1)) {
7401 return false;
7402 }
7403 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7404 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7405 if (objIsXray) {
7406 unwrappedObj.emplace(cx, obj);
7407 }
7408 mozilla::dom::TestExternalInterface* arg0;
7409 RefPtr<mozilla::dom::TestExternalInterface> arg0_holder;
7410 if (args[0].isObject()) {
7411 JS::Rooted<JSObject*> source(cx, &args[0].toObject());
7412 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(arg0_holder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(arg0_holder
)))), 0)))
) {
7413 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestExternalInterface");
7414 return false;
7415 }
7416 MOZ_ASSERT(arg0_holder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(arg0_holder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(arg0_holder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("arg0_holder", "../TestJSImplGenBinding.cpp"
, 7416); AnnotateMozCrashReason("MOZ_ASSERT" "(" "arg0_holder"
")"); do { *((volatile int*)__null) = 7416; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
7417 arg0 = arg0_holder;
7418 } else if (args[0].isNullOrUndefined()) {
7419 arg0 = nullptr;
7420 } else {
7421 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
7422 return false;
7423 }
7424 if (objIsXray) {
7425 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7426 // we know Xrays have no dynamic unwrap behavior.
7427 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7428 if (!unwrappedObj.ref()) {
7429 return false;
7430 }
7431 }
7432 FastErrorResult rv;
7433 // NOTE: This assert does NOT call the function.
7434 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableExternal(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
7435 MOZ_KnownLive(self)(self)->PassNullableExternal(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
7436 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableExternal"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableExternal"
)), 0))
) {
7437 return false;
7438 }
7439 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7439); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7439; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7440 args.rval().setUndefined();
7441 return true;
7442}
7443
7444static const JSJitInfo passNullableExternal_methodinfo = {
7445 { (JSJitGetterOp)passNullableExternal },
7446 { prototypes::id::TestJSImplInterface },
7447 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7448 JSJitInfo::Method,
7449 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7450 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7451 false, /* isInfallible. False in setters. */
7452 false, /* isMovable. Not relevant for setters. */
7453 false, /* isEliminatable. Not relevant for setters. */
7454 false, /* isAlwaysInSlot. Only relevant for getters. */
7455 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7456 false, /* isTypedMethod. Only relevant for methods. */
7457 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7458};
7459
7460MOZ_CAN_RUN_SCRIPT static bool
7461get_nonNullExternal(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
7462{
7463 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7466( cx, "TestJSImplInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7464 "TestJSImplInterface", "nonNullExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7466( cx, "TestJSImplInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7465 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject7466( cx, "TestJSImplInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7466 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7466( cx, "TestJSImplInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7467
7468 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7469 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7470 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7471 if (objIsXray) {
7472 unwrappedObj.emplace(cx, obj);
7473 }
7474 if (objIsXray) {
7475 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7476 // we know Xrays have no dynamic unwrap behavior.
7477 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7478 if (!unwrappedObj.ref()) {
7479 return false;
7480 }
7481 }
7482 FastErrorResult rv;
7483 auto result(StrongOrRawPtr<mozilla::dom::TestExternalInterface>(MOZ_KnownLive(self)(self)->GetNonNullExternal(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
7484 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonNullExternal getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonNullExternal getter"
)), 0))
) {
7485 return false;
7486 }
7487 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7487); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7487; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7488 if (!WrapObject(cx, result, args.rval())) {
7489 return false;
7490 }
7491 return true;
7492}
7493
7494MOZ_CAN_RUN_SCRIPT static bool
7495set_nonNullExternal(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
7496{
7497 BindingCallContext cx(cx_, "TestJSImplInterface.nonNullExternal setter");
7498 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7501( cx, "TestJSImplInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7499 "TestJSImplInterface", "nonNullExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7501( cx, "TestJSImplInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7500 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject7501( cx, "TestJSImplInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7501 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7501( cx, "TestJSImplInterface"
, "nonNullExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7502
7503 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7504 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7505 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7506 if (objIsXray) {
7507 unwrappedObj.emplace(cx, obj);
7508 }
7509 mozilla::dom::TestExternalInterface* arg0;
7510 RefPtr<mozilla::dom::TestExternalInterface> arg0_holder;
7511 if (args[0].isObject()) {
7512 JS::Rooted<JSObject*> source(cx, &args[0].toObject());
7513 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(arg0_holder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(arg0_holder
)))), 0)))
) {
7514 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "TestExternalInterface");
7515 return false;
7516 }
7517 MOZ_ASSERT(arg0_holder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(arg0_holder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(arg0_holder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("arg0_holder", "../TestJSImplGenBinding.cpp"
, 7517); AnnotateMozCrashReason("MOZ_ASSERT" "(" "arg0_holder"
")"); do { *((volatile int*)__null) = 7517; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
7518 arg0 = arg0_holder;
7519 } else {
7520 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
7521 return false;
7522 }
7523 if (objIsXray) {
7524 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7525 // we know Xrays have no dynamic unwrap behavior.
7526 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7527 if (!unwrappedObj.ref()) {
7528 return false;
7529 }
7530 }
7531 FastErrorResult rv;
7532 // NOTE: This assert does NOT call the function.
7533 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNonNullExternal(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
7534 MOZ_KnownLive(self)(self)->SetNonNullExternal(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
7535 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonNullExternal setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonNullExternal setter"
)), 0))
) {
7536 return false;
7537 }
7538 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7538); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7538; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7539
7540 return true;
7541}
7542
7543static const JSJitInfo nonNullExternal_getterinfo = {
7544 { get_nonNullExternal },
7545 { prototypes::id::TestJSImplInterface },
7546 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7547 JSJitInfo::Getter,
7548 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7549 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
7550 false, /* isInfallible. False in setters. */
7551 false, /* isMovable. Not relevant for setters. */
7552 false, /* isEliminatable. Not relevant for setters. */
7553 false, /* isAlwaysInSlot. Only relevant for getters. */
7554 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7555 false, /* isTypedMethod. Only relevant for methods. */
7556 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7557};
7558static const JSJitInfo nonNullExternal_setterinfo = {
7559 { (JSJitGetterOp)set_nonNullExternal },
7560 { prototypes::id::TestJSImplInterface },
7561 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7562 JSJitInfo::Setter,
7563 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7564 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7565 false, /* isInfallible. False in setters. */
7566 false, /* isMovable. Not relevant for setters. */
7567 false, /* isEliminatable. Not relevant for setters. */
7568 false, /* isAlwaysInSlot. Only relevant for getters. */
7569 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7570 false, /* isTypedMethod. Only relevant for methods. */
7571 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7572};
7573
7574MOZ_CAN_RUN_SCRIPT static bool
7575get_nullableExternal(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
7576{
7577 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7580( cx, "TestJSImplInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7578 "TestJSImplInterface", "nullableExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7580( cx, "TestJSImplInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7579 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject7580( cx, "TestJSImplInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7580 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7580( cx, "TestJSImplInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7581
7582 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7583 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7584 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7585 if (objIsXray) {
7586 unwrappedObj.emplace(cx, obj);
7587 }
7588 if (objIsXray) {
7589 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7590 // we know Xrays have no dynamic unwrap behavior.
7591 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7592 if (!unwrappedObj.ref()) {
7593 return false;
7594 }
7595 }
7596 FastErrorResult rv;
7597 auto result(StrongOrRawPtr<mozilla::dom::TestExternalInterface>(MOZ_KnownLive(self)(self)->GetNullableExternal(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
7598 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nullableExternal getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nullableExternal getter"
)), 0))
) {
7599 return false;
7600 }
7601 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7601); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7601; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7602 if (!result) {
7603 args.rval().setNull();
7604 return true;
7605 }
7606 if (!WrapObject(cx, result, args.rval())) {
7607 return false;
7608 }
7609 return true;
7610}
7611
7612MOZ_CAN_RUN_SCRIPT static bool
7613set_nullableExternal(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
7614{
7615 BindingCallContext cx(cx_, "TestJSImplInterface.nullableExternal setter");
7616 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7619( cx, "TestJSImplInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7617 "TestJSImplInterface", "nullableExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7619( cx, "TestJSImplInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7618 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject7619( cx, "TestJSImplInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7619 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7619( cx, "TestJSImplInterface"
, "nullableExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7620
7621 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7622 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7623 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7624 if (objIsXray) {
7625 unwrappedObj.emplace(cx, obj);
7626 }
7627 mozilla::dom::TestExternalInterface* arg0;
7628 RefPtr<mozilla::dom::TestExternalInterface> arg0_holder;
7629 if (args[0].isObject()) {
7630 JS::Rooted<JSObject*> source(cx, &args[0].toObject());
7631 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(arg0_holder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(arg0_holder
)))), 0)))
) {
7632 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "TestExternalInterface");
7633 return false;
7634 }
7635 MOZ_ASSERT(arg0_holder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(arg0_holder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(arg0_holder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("arg0_holder", "../TestJSImplGenBinding.cpp"
, 7635); AnnotateMozCrashReason("MOZ_ASSERT" "(" "arg0_holder"
")"); do { *((volatile int*)__null) = 7635; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
7636 arg0 = arg0_holder;
7637 } else if (args[0].isNullOrUndefined()) {
7638 arg0 = nullptr;
7639 } else {
7640 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
7641 return false;
7642 }
7643 if (objIsXray) {
7644 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7645 // we know Xrays have no dynamic unwrap behavior.
7646 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7647 if (!unwrappedObj.ref()) {
7648 return false;
7649 }
7650 }
7651 FastErrorResult rv;
7652 // NOTE: This assert does NOT call the function.
7653 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNullableExternal(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
7654 MOZ_KnownLive(self)(self)->SetNullableExternal(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
7655 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nullableExternal setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nullableExternal setter"
)), 0))
) {
7656 return false;
7657 }
7658 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7658); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7658; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7659
7660 return true;
7661}
7662
7663static const JSJitInfo nullableExternal_getterinfo = {
7664 { get_nullableExternal },
7665 { prototypes::id::TestJSImplInterface },
7666 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7667 JSJitInfo::Getter,
7668 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7669 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
7670 false, /* isInfallible. False in setters. */
7671 false, /* isMovable. Not relevant for setters. */
7672 false, /* isEliminatable. Not relevant for setters. */
7673 false, /* isAlwaysInSlot. Only relevant for getters. */
7674 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7675 false, /* isTypedMethod. Only relevant for methods. */
7676 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7677};
7678static const JSJitInfo nullableExternal_setterinfo = {
7679 { (JSJitGetterOp)set_nullableExternal },
7680 { prototypes::id::TestJSImplInterface },
7681 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7682 JSJitInfo::Setter,
7683 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7684 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7685 false, /* isInfallible. False in setters. */
7686 false, /* isMovable. Not relevant for setters. */
7687 false, /* isEliminatable. Not relevant for setters. */
7688 false, /* isAlwaysInSlot. Only relevant for getters. */
7689 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7690 false, /* isTypedMethod. Only relevant for methods. */
7691 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7692};
7693
7694MOZ_CAN_RUN_SCRIPT static bool
7695passOptionalExternal(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7696{
7697 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalExternal");
7698 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7701( cx, "TestJSImplInterface"
, "passOptionalExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7699 "TestJSImplInterface", "passOptionalExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7701( cx, "TestJSImplInterface"
, "passOptionalExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7700 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7701( cx, "TestJSImplInterface"
, "passOptionalExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
7701 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7701( cx, "TestJSImplInterface"
, "passOptionalExternal", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
7702
7703 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7704 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7705 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7706 if (objIsXray) {
7707 unwrappedObj.emplace(cx, obj);
7708 }
7709 Optional<mozilla::dom::TestExternalInterface*> arg0;
7710 Maybe<RefPtr<mozilla::dom::TestExternalInterface>> arg0_holder;
7711 if (args.hasDefined(0)) {
7712 arg0.Construct();
7713 arg0_holder.emplace();
7714 if (args[0].isObject()) {
7715 JS::Rooted<JSObject*> source(cx, &args[0].toObject());
7716 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(arg0_holder.ref())))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(arg0_holder
.ref())))), 0)))
) {
7717 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestExternalInterface");
7718 return false;
7719 }
7720 MOZ_ASSERT(arg0_holder.ref())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(arg0_holder.ref())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(arg0_holder.ref()))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("arg0_holder.ref()"
, "../TestJSImplGenBinding.cpp", 7720); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "arg0_holder.ref()" ")"); do { *((volatile int
*)__null) = 7720; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
7721 arg0.Value() = arg0_holder.ref();
7722 } else if (args[0].isNullOrUndefined()) {
7723 arg0.Value() = nullptr;
7724 } else {
7725 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
7726 return false;
7727 }
7728 }
7729 if (objIsXray) {
7730 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7731 // we know Xrays have no dynamic unwrap behavior.
7732 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7733 if (!unwrappedObj.ref()) {
7734 return false;
7735 }
7736 }
7737 FastErrorResult rv;
7738 // NOTE: This assert does NOT call the function.
7739 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalExternal(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
7740 MOZ_KnownLive(self)(self)->PassOptionalExternal(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
7741 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalExternal"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalExternal"
)), 0))
) {
7742 return false;
7743 }
7744 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7744); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7744; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7745 args.rval().setUndefined();
7746 return true;
7747}
7748
7749static const JSJitInfo passOptionalExternal_methodinfo = {
7750 { (JSJitGetterOp)passOptionalExternal },
7751 { prototypes::id::TestJSImplInterface },
7752 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7753 JSJitInfo::Method,
7754 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7755 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7756 false, /* isInfallible. False in setters. */
7757 false, /* isMovable. Not relevant for setters. */
7758 false, /* isEliminatable. Not relevant for setters. */
7759 false, /* isAlwaysInSlot. Only relevant for getters. */
7760 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7761 false, /* isTypedMethod. Only relevant for methods. */
7762 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7763};
7764
7765MOZ_CAN_RUN_SCRIPT static bool
7766passOptionalNonNullExternal(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7767{
7768 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNonNullExternal");
7769 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7772( cx, "TestJSImplInterface"
, "passOptionalNonNullExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7770 "TestJSImplInterface", "passOptionalNonNullExternal", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7772( cx, "TestJSImplInterface"
, "passOptionalNonNullExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7771 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7772( cx, "TestJSImplInterface"
, "passOptionalNonNullExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7772 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7772( cx, "TestJSImplInterface"
, "passOptionalNonNullExternal", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7773
7774 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7775 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7776 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7777 if (objIsXray) {
7778 unwrappedObj.emplace(cx, obj);
7779 }
7780 Optional<mozilla::dom::TestExternalInterface*> arg0;
7781 Maybe<RefPtr<mozilla::dom::TestExternalInterface>> arg0_holder;
7782 if (args.hasDefined(0)) {
7783 arg0.Construct();
7784 arg0_holder.emplace();
7785 if (args[0].isObject()) {
7786 JS::Rooted<JSObject*> source(cx, &args[0].toObject());
7787 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(arg0_holder.ref())))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(arg0_holder
.ref())))), 0)))
) {
7788 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestExternalInterface");
7789 return false;
7790 }
7791 MOZ_ASSERT(arg0_holder.ref())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(arg0_holder.ref())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(arg0_holder.ref()))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("arg0_holder.ref()"
, "../TestJSImplGenBinding.cpp", 7791); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "arg0_holder.ref()" ")"); do { *((volatile int
*)__null) = 7791; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
7792 arg0.Value() = arg0_holder.ref();
7793 } else {
7794 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
7795 return false;
7796 }
7797 }
7798 if (objIsXray) {
7799 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7800 // we know Xrays have no dynamic unwrap behavior.
7801 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7802 if (!unwrappedObj.ref()) {
7803 return false;
7804 }
7805 }
7806 FastErrorResult rv;
7807 // NOTE: This assert does NOT call the function.
7808 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNonNullExternal(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
7809 MOZ_KnownLive(self)(self)->PassOptionalNonNullExternal(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
7810 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNonNullExternal"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNonNullExternal"
)), 0))
) {
7811 return false;
7812 }
7813 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7813); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7813; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7814 args.rval().setUndefined();
7815 return true;
7816}
7817
7818static const JSJitInfo passOptionalNonNullExternal_methodinfo = {
7819 { (JSJitGetterOp)passOptionalNonNullExternal },
7820 { prototypes::id::TestJSImplInterface },
7821 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7822 JSJitInfo::Method,
7823 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7824 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7825 false, /* isInfallible. False in setters. */
7826 false, /* isMovable. Not relevant for setters. */
7827 false, /* isEliminatable. Not relevant for setters. */
7828 false, /* isAlwaysInSlot. Only relevant for getters. */
7829 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7830 false, /* isTypedMethod. Only relevant for methods. */
7831 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7832};
7833
7834MOZ_CAN_RUN_SCRIPT static bool
7835passOptionalExternalWithDefault(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7836{
7837 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalExternalWithDefault");
7838 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7841( cx, "TestJSImplInterface"
, "passOptionalExternalWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7839 "TestJSImplInterface", "passOptionalExternalWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7841( cx, "TestJSImplInterface"
, "passOptionalExternalWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7840 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7841( cx, "TestJSImplInterface"
, "passOptionalExternalWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7841 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7841( cx, "TestJSImplInterface"
, "passOptionalExternalWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7842
7843 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7844 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7845 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7846 if (objIsXray) {
7847 unwrappedObj.emplace(cx, obj);
7848 }
7849 mozilla::dom::TestExternalInterface* arg0;
7850 RefPtr<mozilla::dom::TestExternalInterface> arg0_holder;
7851 if (args.hasDefined(0)) {
7852 if (args[0].isObject()) {
7853 JS::Rooted<JSObject*> source(cx, &args[0].toObject());
7854 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(arg0_holder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(arg0_holder
)))), 0)))
) {
7855 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestExternalInterface");
7856 return false;
7857 }
7858 MOZ_ASSERT(arg0_holder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(arg0_holder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(arg0_holder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("arg0_holder", "../TestJSImplGenBinding.cpp"
, 7858); AnnotateMozCrashReason("MOZ_ASSERT" "(" "arg0_holder"
")"); do { *((volatile int*)__null) = 7858; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
7859 arg0 = arg0_holder;
7860 } else if (args[0].isNullOrUndefined()) {
7861 arg0 = nullptr;
7862 } else {
7863 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
7864 return false;
7865 }
7866 } else {
7867 arg0 = nullptr;
7868 }
7869 if (objIsXray) {
7870 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7871 // we know Xrays have no dynamic unwrap behavior.
7872 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7873 if (!unwrappedObj.ref()) {
7874 return false;
7875 }
7876 }
7877 FastErrorResult rv;
7878 // NOTE: This assert does NOT call the function.
7879 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalExternalWithDefault(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
7880 MOZ_KnownLive(self)(self)->PassOptionalExternalWithDefault(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
7881 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalExternalWithDefault"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalExternalWithDefault"
)), 0))
) {
7882 return false;
7883 }
7884 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7884); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7884; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7885 args.rval().setUndefined();
7886 return true;
7887}
7888
7889static const JSJitInfo passOptionalExternalWithDefault_methodinfo = {
7890 { (JSJitGetterOp)passOptionalExternalWithDefault },
7891 { prototypes::id::TestJSImplInterface },
7892 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7893 JSJitInfo::Method,
7894 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7895 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
7896 false, /* isInfallible. False in setters. */
7897 false, /* isMovable. Not relevant for setters. */
7898 false, /* isEliminatable. Not relevant for setters. */
7899 false, /* isAlwaysInSlot. Only relevant for getters. */
7900 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7901 false, /* isTypedMethod. Only relevant for methods. */
7902 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7903};
7904
7905MOZ_CAN_RUN_SCRIPT static bool
7906receiveCallbackInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7907{
7908 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7911( cx, "TestJSImplInterface"
, "receiveCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7909 "TestJSImplInterface", "receiveCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7911( cx, "TestJSImplInterface"
, "receiveCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7910 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7911( cx, "TestJSImplInterface"
, "receiveCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7911 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7911( cx, "TestJSImplInterface"
, "receiveCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7912
7913 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7914 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7915 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7916 if (objIsXray) {
7917 unwrappedObj.emplace(cx, obj);
7918 }
7919 if (objIsXray) {
7920 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7921 // we know Xrays have no dynamic unwrap behavior.
7922 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7923 if (!unwrappedObj.ref()) {
7924 return false;
7925 }
7926 }
7927 FastErrorResult rv;
7928 auto result(StrongOrRawPtr<mozilla::dom::TestCallbackInterface>(MOZ_KnownLive(self)(self)->ReceiveCallbackInterface(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
7929 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveCallbackInterface"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveCallbackInterface"
)), 0))
) {
7930 return false;
7931 }
7932 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7932); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7932; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7933 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
7934 if (!MaybeWrapObjectValue(cx, args.rval())) {
7935 return false;
7936 }
7937 return true;
7938}
7939
7940static const JSJitInfo receiveCallbackInterface_methodinfo = {
7941 { (JSJitGetterOp)receiveCallbackInterface },
7942 { prototypes::id::TestJSImplInterface },
7943 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
7944 JSJitInfo::Method,
7945 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
7946 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
7947 false, /* isInfallible. False in setters. */
7948 false, /* isMovable. Not relevant for setters. */
7949 false, /* isEliminatable. Not relevant for setters. */
7950 false, /* isAlwaysInSlot. Only relevant for getters. */
7951 false, /* isLazilyCachedInSlot. Only relevant for getters. */
7952 false, /* isTypedMethod. Only relevant for methods. */
7953 0 /* Reserved slot index, if we're stored in a slot, else 0. */
7954};
7955
7956MOZ_CAN_RUN_SCRIPT static bool
7957receiveNullableCallbackInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
7958{
7959 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject7962( cx, "TestJSImplInterface"
, "receiveNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7960 "TestJSImplInterface", "receiveNullableCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject7962( cx, "TestJSImplInterface"
, "receiveNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7961 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject7962( cx, "TestJSImplInterface"
, "receiveNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
7962 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject7962( cx, "TestJSImplInterface"
, "receiveNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
7963
7964 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
7965 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
7966 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
7967 if (objIsXray) {
7968 unwrappedObj.emplace(cx, obj);
7969 }
7970 if (objIsXray) {
7971 // Since our object is an Xray, we can just CheckedUnwrapStatic:
7972 // we know Xrays have no dynamic unwrap behavior.
7973 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
7974 if (!unwrappedObj.ref()) {
7975 return false;
7976 }
7977 }
7978 FastErrorResult rv;
7979 auto result(StrongOrRawPtr<mozilla::dom::TestCallbackInterface>(MOZ_KnownLive(self)(self)->ReceiveNullableCallbackInterface(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
7980 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableCallbackInterface"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableCallbackInterface"
)), 0))
) {
7981 return false;
7982 }
7983 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 7983); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 7983; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
7984 if (result) {
7985 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
7986 if (!MaybeWrapObjectOrNullValue(cx, args.rval())) {
7987 return false;
7988 }
7989 return true;
7990 } else {
7991 args.rval().setNull();
7992 return true;
7993 }
7994}
7995
7996static const JSJitInfo receiveNullableCallbackInterface_methodinfo = {
7997 { (JSJitGetterOp)receiveNullableCallbackInterface },
7998 { prototypes::id::TestJSImplInterface },
7999 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8000 JSJitInfo::Method,
8001 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8002 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
8003 false, /* isInfallible. False in setters. */
8004 false, /* isMovable. Not relevant for setters. */
8005 false, /* isEliminatable. Not relevant for setters. */
8006 false, /* isAlwaysInSlot. Only relevant for getters. */
8007 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8008 false, /* isTypedMethod. Only relevant for methods. */
8009 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8010};
8011
8012MOZ_CAN_RUN_SCRIPT static bool
8013receiveWeakCallbackInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8014{
8015 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8018( cx, "TestJSImplInterface"
, "receiveWeakCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8016 "TestJSImplInterface", "receiveWeakCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8018( cx, "TestJSImplInterface"
, "receiveWeakCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8017 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8018( cx, "TestJSImplInterface"
, "receiveWeakCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8018 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8018( cx, "TestJSImplInterface"
, "receiveWeakCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8019
8020 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8021 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8022 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8023 if (objIsXray) {
8024 unwrappedObj.emplace(cx, obj);
8025 }
8026 if (objIsXray) {
8027 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8028 // we know Xrays have no dynamic unwrap behavior.
8029 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8030 if (!unwrappedObj.ref()) {
8031 return false;
8032 }
8033 }
8034 FastErrorResult rv;
8035 auto result(StrongOrRawPtr<mozilla::dom::TestCallbackInterface>(MOZ_KnownLive(self)(self)->ReceiveWeakCallbackInterface(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
8036 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakCallbackInterface"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakCallbackInterface"
)), 0))
) {
8037 return false;
8038 }
8039 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8039); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8039; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8040 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
8041 if (!MaybeWrapObjectValue(cx, args.rval())) {
8042 return false;
8043 }
8044 return true;
8045}
8046
8047static const JSJitInfo receiveWeakCallbackInterface_methodinfo = {
8048 { (JSJitGetterOp)receiveWeakCallbackInterface },
8049 { prototypes::id::TestJSImplInterface },
8050 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8051 JSJitInfo::Method,
8052 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8053 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
8054 false, /* isInfallible. False in setters. */
8055 false, /* isMovable. Not relevant for setters. */
8056 false, /* isEliminatable. Not relevant for setters. */
8057 false, /* isAlwaysInSlot. Only relevant for getters. */
8058 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8059 false, /* isTypedMethod. Only relevant for methods. */
8060 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8061};
8062
8063MOZ_CAN_RUN_SCRIPT static bool
8064receiveWeakNullableCallbackInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8065{
8066 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8069( cx, "TestJSImplInterface"
, "receiveWeakNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8067 "TestJSImplInterface", "receiveWeakNullableCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8069( cx, "TestJSImplInterface"
, "receiveWeakNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8068 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8069( cx, "TestJSImplInterface"
, "receiveWeakNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8069 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8069( cx, "TestJSImplInterface"
, "receiveWeakNullableCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8070
8071 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8072 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8073 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8074 if (objIsXray) {
8075 unwrappedObj.emplace(cx, obj);
8076 }
8077 if (objIsXray) {
8078 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8079 // we know Xrays have no dynamic unwrap behavior.
8080 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8081 if (!unwrappedObj.ref()) {
8082 return false;
8083 }
8084 }
8085 FastErrorResult rv;
8086 auto result(StrongOrRawPtr<mozilla::dom::TestCallbackInterface>(MOZ_KnownLive(self)(self)->ReceiveWeakNullableCallbackInterface(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
8087 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakNullableCallbackInterface"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakNullableCallbackInterface"
)), 0))
) {
8088 return false;
8089 }
8090 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8090); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8090; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8091 if (result) {
8092 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
8093 if (!MaybeWrapObjectOrNullValue(cx, args.rval())) {
8094 return false;
8095 }
8096 return true;
8097 } else {
8098 args.rval().setNull();
8099 return true;
8100 }
8101}
8102
8103static const JSJitInfo receiveWeakNullableCallbackInterface_methodinfo = {
8104 { (JSJitGetterOp)receiveWeakNullableCallbackInterface },
8105 { prototypes::id::TestJSImplInterface },
8106 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8107 JSJitInfo::Method,
8108 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8109 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
8110 false, /* isInfallible. False in setters. */
8111 false, /* isMovable. Not relevant for setters. */
8112 false, /* isEliminatable. Not relevant for setters. */
8113 false, /* isAlwaysInSlot. Only relevant for getters. */
8114 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8115 false, /* isTypedMethod. Only relevant for methods. */
8116 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8117};
8118
8119MOZ_CAN_RUN_SCRIPT static bool
8120passCallbackInterface(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8121{
8122 BindingCallContext cx(cx_, "TestJSImplInterface.passCallbackInterface");
8123 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8126( cx, "TestJSImplInterface"
, "passCallbackInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8124 "TestJSImplInterface", "passCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8126( cx, "TestJSImplInterface"
, "passCallbackInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8125 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8126( cx, "TestJSImplInterface"
, "passCallbackInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8126 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8126( cx, "TestJSImplInterface"
, "passCallbackInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
8127
8128 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8129 if (!args.requireAtLeast(cx, "TestJSImplInterface.passCallbackInterface", 1)) {
8130 return false;
8131 }
8132 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8133 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8134 if (objIsXray) {
8135 unwrappedObj.emplace(cx, obj);
8136 }
8137 RootedCallback<OwningNonNull<binding_detail::FastTestCallbackInterface>> arg0(cx);
8138 if (args[0].isObject()) {
8139 { // scope for tempRoot and tempGlobalRoot if needed
8140 arg0 = new binding_detail::FastTestCallbackInterface(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
8141 }
8142 } else {
8143 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
8144 return false;
8145 }
8146 if (objIsXray) {
8147 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8148 // we know Xrays have no dynamic unwrap behavior.
8149 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8150 if (!unwrappedObj.ref()) {
8151 return false;
8152 }
8153 }
8154 FastErrorResult rv;
8155 // NOTE: This assert does NOT call the function.
8156 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassCallbackInterface(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
8157 MOZ_KnownLive(self)(self)->PassCallbackInterface(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
8158 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passCallbackInterface"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passCallbackInterface"
)), 0))
) {
8159 return false;
8160 }
8161 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8161); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8161; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8162 args.rval().setUndefined();
8163 return true;
8164}
8165
8166static const JSJitInfo passCallbackInterface_methodinfo = {
8167 { (JSJitGetterOp)passCallbackInterface },
8168 { prototypes::id::TestJSImplInterface },
8169 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8170 JSJitInfo::Method,
8171 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8172 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
8173 false, /* isInfallible. False in setters. */
8174 false, /* isMovable. Not relevant for setters. */
8175 false, /* isEliminatable. Not relevant for setters. */
8176 false, /* isAlwaysInSlot. Only relevant for getters. */
8177 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8178 false, /* isTypedMethod. Only relevant for methods. */
8179 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8180};
8181
8182MOZ_CAN_RUN_SCRIPT static bool
8183passNullableCallbackInterface(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8184{
8185 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableCallbackInterface");
8186 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8189( cx, "TestJSImplInterface"
, "passNullableCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8187 "TestJSImplInterface", "passNullableCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8189( cx, "TestJSImplInterface"
, "passNullableCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8188 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8189( cx, "TestJSImplInterface"
, "passNullableCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8189 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8189( cx, "TestJSImplInterface"
, "passNullableCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8190
8191 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8192 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableCallbackInterface", 1)) {
8193 return false;
8194 }
8195 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8196 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8197 if (objIsXray) {
8198 unwrappedObj.emplace(cx, obj);
8199 }
8200 RootedCallback<RefPtr<binding_detail::FastTestCallbackInterface>> arg0(cx);
8201 if (args[0].isObject()) {
8202 { // scope for tempRoot and tempGlobalRoot if needed
8203 arg0 = new binding_detail::FastTestCallbackInterface(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
8204 }
8205 } else if (args[0].isNullOrUndefined()) {
8206 arg0 = nullptr;
8207 } else {
8208 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
8209 return false;
8210 }
8211 if (objIsXray) {
8212 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8213 // we know Xrays have no dynamic unwrap behavior.
8214 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8215 if (!unwrappedObj.ref()) {
8216 return false;
8217 }
8218 }
8219 FastErrorResult rv;
8220 // NOTE: This assert does NOT call the function.
8221 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableCallbackInterface(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
8222 MOZ_KnownLive(self)(self)->PassNullableCallbackInterface(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
8223 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableCallbackInterface"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableCallbackInterface"
)), 0))
) {
8224 return false;
8225 }
8226 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8226); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8226; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8227 args.rval().setUndefined();
8228 return true;
8229}
8230
8231static const JSJitInfo passNullableCallbackInterface_methodinfo = {
8232 { (JSJitGetterOp)passNullableCallbackInterface },
8233 { prototypes::id::TestJSImplInterface },
8234 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8235 JSJitInfo::Method,
8236 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8237 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
8238 false, /* isInfallible. False in setters. */
8239 false, /* isMovable. Not relevant for setters. */
8240 false, /* isEliminatable. Not relevant for setters. */
8241 false, /* isAlwaysInSlot. Only relevant for getters. */
8242 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8243 false, /* isTypedMethod. Only relevant for methods. */
8244 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8245};
8246
8247MOZ_CAN_RUN_SCRIPT static bool
8248get_nonNullCallbackInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
8249{
8250 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8253( cx, "TestJSImplInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8251 "TestJSImplInterface", "nonNullCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8253( cx, "TestJSImplInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8252 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject8253( cx, "TestJSImplInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8253 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8253( cx, "TestJSImplInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8254
8255 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8256 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8257 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8258 if (objIsXray) {
8259 unwrappedObj.emplace(cx, obj);
8260 }
8261 if (objIsXray) {
8262 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8263 // we know Xrays have no dynamic unwrap behavior.
8264 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8265 if (!unwrappedObj.ref()) {
8266 return false;
8267 }
8268 }
8269 FastErrorResult rv;
8270 auto result(StrongOrRawPtr<mozilla::dom::TestCallbackInterface>(MOZ_KnownLive(self)(self)->GetNonNullCallbackInterface(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
8271 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonNullCallbackInterface getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonNullCallbackInterface getter"
)), 0))
) {
8272 return false;
8273 }
8274 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8274); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8274; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8275 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
8276 if (!MaybeWrapObjectValue(cx, args.rval())) {
8277 return false;
8278 }
8279 return true;
8280}
8281
8282MOZ_CAN_RUN_SCRIPT static bool
8283set_nonNullCallbackInterface(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
8284{
8285 BindingCallContext cx(cx_, "TestJSImplInterface.nonNullCallbackInterface setter");
8286 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8289( cx, "TestJSImplInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8287 "TestJSImplInterface", "nonNullCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8289( cx, "TestJSImplInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8288 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject8289( cx, "TestJSImplInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8289 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8289( cx, "TestJSImplInterface"
, "nonNullCallbackInterface", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8290
8291 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8292 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8293 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8294 if (objIsXray) {
8295 unwrappedObj.emplace(cx, obj);
8296 }
8297 RootedCallback<OwningNonNull<binding_detail::FastTestCallbackInterface>> arg0(cx);
8298 if (args[0].isObject()) {
8299 { // scope for tempRoot and tempGlobalRoot if needed
8300 arg0 = new binding_detail::FastTestCallbackInterface(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
8301 }
8302 } else {
8303 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
8304 return false;
8305 }
8306 if (objIsXray) {
8307 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8308 // we know Xrays have no dynamic unwrap behavior.
8309 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8310 if (!unwrappedObj.ref()) {
8311 return false;
8312 }
8313 }
8314 FastErrorResult rv;
8315 // NOTE: This assert does NOT call the function.
8316 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNonNullCallbackInterface(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
8317 MOZ_KnownLive(self)(self)->SetNonNullCallbackInterface(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
8318 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonNullCallbackInterface setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonNullCallbackInterface setter"
)), 0))
) {
8319 return false;
8320 }
8321 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8321); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8321; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8322
8323 return true;
8324}
8325
8326static const JSJitInfo nonNullCallbackInterface_getterinfo = {
8327 { get_nonNullCallbackInterface },
8328 { prototypes::id::TestJSImplInterface },
8329 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8330 JSJitInfo::Getter,
8331 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8332 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
8333 false, /* isInfallible. False in setters. */
8334 false, /* isMovable. Not relevant for setters. */
8335 false, /* isEliminatable. Not relevant for setters. */
8336 false, /* isAlwaysInSlot. Only relevant for getters. */
8337 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8338 false, /* isTypedMethod. Only relevant for methods. */
8339 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8340};
8341static const JSJitInfo nonNullCallbackInterface_setterinfo = {
8342 { (JSJitGetterOp)set_nonNullCallbackInterface },
8343 { prototypes::id::TestJSImplInterface },
8344 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8345 JSJitInfo::Setter,
8346 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8347 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
8348 false, /* isInfallible. False in setters. */
8349 false, /* isMovable. Not relevant for setters. */
8350 false, /* isEliminatable. Not relevant for setters. */
8351 false, /* isAlwaysInSlot. Only relevant for getters. */
8352 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8353 false, /* isTypedMethod. Only relevant for methods. */
8354 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8355};
8356
8357MOZ_CAN_RUN_SCRIPT static bool
8358get_nullableCallbackInterface(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
8359{
8360 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8363( cx, "TestJSImplInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8361 "TestJSImplInterface", "nullableCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8363( cx, "TestJSImplInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8362 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject8363( cx, "TestJSImplInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8363 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8363( cx, "TestJSImplInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8364
8365 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8366 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8367 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8368 if (objIsXray) {
8369 unwrappedObj.emplace(cx, obj);
8370 }
8371 if (objIsXray) {
8372 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8373 // we know Xrays have no dynamic unwrap behavior.
8374 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8375 if (!unwrappedObj.ref()) {
8376 return false;
8377 }
8378 }
8379 FastErrorResult rv;
8380 auto result(StrongOrRawPtr<mozilla::dom::TestCallbackInterface>(MOZ_KnownLive(self)(self)->GetNullableCallbackInterface(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
8381 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nullableCallbackInterface getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nullableCallbackInterface getter"
)), 0))
) {
8382 return false;
8383 }
8384 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8384); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8384; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8385 if (result) {
8386 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
8387 if (!MaybeWrapObjectOrNullValue(cx, args.rval())) {
8388 return false;
8389 }
8390 return true;
8391 } else {
8392 args.rval().setNull();
8393 return true;
8394 }
8395}
8396
8397MOZ_CAN_RUN_SCRIPT static bool
8398set_nullableCallbackInterface(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
8399{
8400 BindingCallContext cx(cx_, "TestJSImplInterface.nullableCallbackInterface setter");
8401 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8404( cx, "TestJSImplInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8402 "TestJSImplInterface", "nullableCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8404( cx, "TestJSImplInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8403 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject8404( cx, "TestJSImplInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8404 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8404( cx, "TestJSImplInterface"
, "nullableCallbackInterface", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8405
8406 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8407 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8408 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8409 if (objIsXray) {
8410 unwrappedObj.emplace(cx, obj);
8411 }
8412 RootedCallback<RefPtr<binding_detail::FastTestCallbackInterface>> arg0(cx);
8413 if (args[0].isObject()) {
8414 { // scope for tempRoot and tempGlobalRoot if needed
8415 arg0 = new binding_detail::FastTestCallbackInterface(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
8416 }
8417 } else if (args[0].isNullOrUndefined()) {
8418 arg0 = nullptr;
8419 } else {
8420 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
8421 return false;
8422 }
8423 if (objIsXray) {
8424 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8425 // we know Xrays have no dynamic unwrap behavior.
8426 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8427 if (!unwrappedObj.ref()) {
8428 return false;
8429 }
8430 }
8431 FastErrorResult rv;
8432 // NOTE: This assert does NOT call the function.
8433 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNullableCallbackInterface(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
8434 MOZ_KnownLive(self)(self)->SetNullableCallbackInterface(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
8435 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nullableCallbackInterface setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nullableCallbackInterface setter"
)), 0))
) {
8436 return false;
8437 }
8438 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8438); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8438; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8439
8440 return true;
8441}
8442
8443static const JSJitInfo nullableCallbackInterface_getterinfo = {
8444 { get_nullableCallbackInterface },
8445 { prototypes::id::TestJSImplInterface },
8446 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8447 JSJitInfo::Getter,
8448 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8449 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
8450 false, /* isInfallible. False in setters. */
8451 false, /* isMovable. Not relevant for setters. */
8452 false, /* isEliminatable. Not relevant for setters. */
8453 false, /* isAlwaysInSlot. Only relevant for getters. */
8454 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8455 false, /* isTypedMethod. Only relevant for methods. */
8456 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8457};
8458static const JSJitInfo nullableCallbackInterface_setterinfo = {
8459 { (JSJitGetterOp)set_nullableCallbackInterface },
8460 { prototypes::id::TestJSImplInterface },
8461 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8462 JSJitInfo::Setter,
8463 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8464 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
8465 false, /* isInfallible. False in setters. */
8466 false, /* isMovable. Not relevant for setters. */
8467 false, /* isEliminatable. Not relevant for setters. */
8468 false, /* isAlwaysInSlot. Only relevant for getters. */
8469 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8470 false, /* isTypedMethod. Only relevant for methods. */
8471 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8472};
8473
8474MOZ_CAN_RUN_SCRIPT static bool
8475passOptionalCallbackInterface(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8476{
8477 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalCallbackInterface");
8478 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8481( cx, "TestJSImplInterface"
, "passOptionalCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8479 "TestJSImplInterface", "passOptionalCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8481( cx, "TestJSImplInterface"
, "passOptionalCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8480 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8481( cx, "TestJSImplInterface"
, "passOptionalCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8481 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8481( cx, "TestJSImplInterface"
, "passOptionalCallbackInterface", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8482
8483 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8484 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8485 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8486 if (objIsXray) {
8487 unwrappedObj.emplace(cx, obj);
8488 }
8489 Optional<RefPtr<TestCallbackInterface>> arg0;
8490 if (args.hasDefined(0)) {
8491 arg0.Construct();
8492 if (args[0].isObject()) {
8493 { // scope for tempRoot and tempGlobalRoot if needed
8494 JS::Rooted<JSObject*> tempRoot(cx, &args[0].toObject());
8495 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
8496 arg0.Value() = new TestCallbackInterface(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
8497 }
8498 } else if (args[0].isNullOrUndefined()) {
8499 arg0.Value() = nullptr;
8500 } else {
8501 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
8502 return false;
8503 }
8504 }
8505 if (objIsXray) {
8506 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8507 // we know Xrays have no dynamic unwrap behavior.
8508 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8509 if (!unwrappedObj.ref()) {
8510 return false;
8511 }
8512 }
8513 FastErrorResult rv;
8514 // NOTE: This assert does NOT call the function.
8515 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalCallbackInterface(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
8516 MOZ_KnownLive(self)(self)->PassOptionalCallbackInterface(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
8517 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalCallbackInterface"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalCallbackInterface"
)), 0))
) {
8518 return false;
8519 }
8520 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8520); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8520; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8521 args.rval().setUndefined();
8522 return true;
8523}
8524
8525static const JSJitInfo passOptionalCallbackInterface_methodinfo = {
8526 { (JSJitGetterOp)passOptionalCallbackInterface },
8527 { prototypes::id::TestJSImplInterface },
8528 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8529 JSJitInfo::Method,
8530 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8531 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
8532 false, /* isInfallible. False in setters. */
8533 false, /* isMovable. Not relevant for setters. */
8534 false, /* isEliminatable. Not relevant for setters. */
8535 false, /* isAlwaysInSlot. Only relevant for getters. */
8536 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8537 false, /* isTypedMethod. Only relevant for methods. */
8538 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8539};
8540
8541MOZ_CAN_RUN_SCRIPT static bool
8542passOptionalNonNullCallbackInterface(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8543{
8544 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNonNullCallbackInterface");
8545 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8548( cx, "TestJSImplInterface"
, "passOptionalNonNullCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8546 "TestJSImplInterface", "passOptionalNonNullCallbackInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8548( cx, "TestJSImplInterface"
, "passOptionalNonNullCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8547 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8548( cx, "TestJSImplInterface"
, "passOptionalNonNullCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8548 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8548( cx, "TestJSImplInterface"
, "passOptionalNonNullCallbackInterface", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8549
8550 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8551 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8552 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8553 if (objIsXray) {
8554 unwrappedObj.emplace(cx, obj);
8555 }
8556 Optional<OwningNonNull<TestCallbackInterface>> arg0;
8557 if (args.hasDefined(0)) {
8558 arg0.Construct();
8559 if (args[0].isObject()) {
8560 { // scope for tempRoot and tempGlobalRoot if needed
8561 JS::Rooted<JSObject*> tempRoot(cx, &args[0].toObject());
8562 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
8563 arg0.Value() = new TestCallbackInterface(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
8564 }
8565 } else {
8566 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
8567 return false;
8568 }
8569 }
8570 if (objIsXray) {
8571 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8572 // we know Xrays have no dynamic unwrap behavior.
8573 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8574 if (!unwrappedObj.ref()) {
8575 return false;
8576 }
8577 }
8578 FastErrorResult rv;
8579 // NOTE: This assert does NOT call the function.
8580 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNonNullCallbackInterface(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
8581 MOZ_KnownLive(self)(self)->PassOptionalNonNullCallbackInterface(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
8582 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNonNullCallbackInterface"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNonNullCallbackInterface"
)), 0))
) {
8583 return false;
8584 }
8585 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8585); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8585; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8586 args.rval().setUndefined();
8587 return true;
8588}
8589
8590static const JSJitInfo passOptionalNonNullCallbackInterface_methodinfo = {
8591 { (JSJitGetterOp)passOptionalNonNullCallbackInterface },
8592 { prototypes::id::TestJSImplInterface },
8593 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8594 JSJitInfo::Method,
8595 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8596 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
8597 false, /* isInfallible. False in setters. */
8598 false, /* isMovable. Not relevant for setters. */
8599 false, /* isEliminatable. Not relevant for setters. */
8600 false, /* isAlwaysInSlot. Only relevant for getters. */
8601 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8602 false, /* isTypedMethod. Only relevant for methods. */
8603 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8604};
8605
8606MOZ_CAN_RUN_SCRIPT static bool
8607passOptionalCallbackInterfaceWithDefault(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8608{
8609 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalCallbackInterfaceWithDefault");
8610 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8613( cx, "TestJSImplInterface"
, "passOptionalCallbackInterfaceWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8611 "TestJSImplInterface", "passOptionalCallbackInterfaceWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8613( cx, "TestJSImplInterface"
, "passOptionalCallbackInterfaceWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8612 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8613( cx, "TestJSImplInterface"
, "passOptionalCallbackInterfaceWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8613 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8613( cx, "TestJSImplInterface"
, "passOptionalCallbackInterfaceWithDefault", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8614
8615 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8616 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8617 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8618 if (objIsXray) {
8619 unwrappedObj.emplace(cx, obj);
8620 }
8621 RootedCallback<RefPtr<binding_detail::FastTestCallbackInterface>> arg0(cx);
8622 if (args.hasDefined(0)) {
8623 if (args[0].isObject()) {
8624 { // scope for tempRoot and tempGlobalRoot if needed
8625 arg0 = new binding_detail::FastTestCallbackInterface(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
8626 }
8627 } else if (args[0].isNullOrUndefined()) {
8628 arg0 = nullptr;
8629 } else {
8630 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
8631 return false;
8632 }
8633 } else {
8634 arg0 = nullptr;
8635 }
8636 if (objIsXray) {
8637 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8638 // we know Xrays have no dynamic unwrap behavior.
8639 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8640 if (!unwrappedObj.ref()) {
8641 return false;
8642 }
8643 }
8644 FastErrorResult rv;
8645 // NOTE: This assert does NOT call the function.
8646 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalCallbackInterfaceWithDefault(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
8647 MOZ_KnownLive(self)(self)->PassOptionalCallbackInterfaceWithDefault(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
8648 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalCallbackInterfaceWithDefault"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalCallbackInterfaceWithDefault"
)), 0))
) {
8649 return false;
8650 }
8651 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8651); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8651; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8652 args.rval().setUndefined();
8653 return true;
8654}
8655
8656static const JSJitInfo passOptionalCallbackInterfaceWithDefault_methodinfo = {
8657 { (JSJitGetterOp)passOptionalCallbackInterfaceWithDefault },
8658 { prototypes::id::TestJSImplInterface },
8659 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8660 JSJitInfo::Method,
8661 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8662 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
8663 false, /* isInfallible. False in setters. */
8664 false, /* isMovable. Not relevant for setters. */
8665 false, /* isEliminatable. Not relevant for setters. */
8666 false, /* isAlwaysInSlot. Only relevant for getters. */
8667 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8668 false, /* isTypedMethod. Only relevant for methods. */
8669 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8670};
8671
8672MOZ_CAN_RUN_SCRIPT static bool
8673receiveSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8674{
8675 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8678( cx, "TestJSImplInterface"
, "receiveSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8676 "TestJSImplInterface", "receiveSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8678( cx, "TestJSImplInterface"
, "receiveSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8677 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8678( cx, "TestJSImplInterface"
, "receiveSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8678 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8678( cx, "TestJSImplInterface"
, "receiveSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
8679
8680 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8681 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8682 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8683 if (objIsXray) {
8684 unwrappedObj.emplace(cx, obj);
8685 }
8686 if (objIsXray) {
8687 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8688 // we know Xrays have no dynamic unwrap behavior.
8689 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8690 if (!unwrappedObj.ref()) {
8691 return false;
8692 }
8693 }
8694 FastErrorResult rv;
8695 nsTArray<int32_t> result;
8696 // NOTE: This assert does NOT call the function.
8697 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
8698 MOZ_KnownLive(self)(self)->ReceiveSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
8699 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveSequence"
)), 0))
) {
8700 return false;
8701 }
8702 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8702); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8702; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8703
8704 uint32_t length = result.Length();
8705 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
8706 if (!returnArray) {
8707 return false;
8708 }
8709 // Scope for 'tmp'
8710 {
8711 JS::Rooted<JS::Value> tmp(cx);
8712 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
8713 // Control block to let us common up the JS_DefineElement calls when there
8714 // are different ways to succeed at wrapping the object.
8715 do {
8716 tmp.setInt32(int32_t(result[sequenceIdx0]));
8717 break;
8718 } while (false);
8719 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
8720 JSPROP_ENUMERATE)) {
8721 return false;
8722 }
8723 }
8724 }
8725 args.rval().setObject(*returnArray);
8726 return true;
8727}
8728
8729static const JSJitInfo receiveSequence_methodinfo = {
8730 { (JSJitGetterOp)receiveSequence },
8731 { prototypes::id::TestJSImplInterface },
8732 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8733 JSJitInfo::Method,
8734 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8735 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
8736 false, /* isInfallible. False in setters. */
8737 false, /* isMovable. Not relevant for setters. */
8738 false, /* isEliminatable. Not relevant for setters. */
8739 false, /* isAlwaysInSlot. Only relevant for getters. */
8740 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8741 false, /* isTypedMethod. Only relevant for methods. */
8742 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8743};
8744
8745MOZ_CAN_RUN_SCRIPT static bool
8746receiveNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8747{
8748 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8751( cx, "TestJSImplInterface"
, "receiveNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8749 "TestJSImplInterface", "receiveNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8751( cx, "TestJSImplInterface"
, "receiveNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8750 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8751( cx, "TestJSImplInterface"
, "receiveNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8751 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8751( cx, "TestJSImplInterface"
, "receiveNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
8752
8753 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8754 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8755 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8756 if (objIsXray) {
8757 unwrappedObj.emplace(cx, obj);
8758 }
8759 if (objIsXray) {
8760 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8761 // we know Xrays have no dynamic unwrap behavior.
8762 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8763 if (!unwrappedObj.ref()) {
8764 return false;
8765 }
8766 }
8767 FastErrorResult rv;
8768 Nullable<nsTArray<int32_t>> result;
8769 // NOTE: This assert does NOT call the function.
8770 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
8771 MOZ_KnownLive(self)(self)->ReceiveNullableSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
8772 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableSequence"
)), 0))
) {
8773 return false;
8774 }
8775 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8775); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8775; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8776
8777 if (result.IsNull()) {
8778 args.rval().setNull();
8779 return true;
8780 }
8781
8782 uint32_t length = result.Value().Length();
8783 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
8784 if (!returnArray) {
8785 return false;
8786 }
8787 // Scope for 'tmp'
8788 {
8789 JS::Rooted<JS::Value> tmp(cx);
8790 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
8791 // Control block to let us common up the JS_DefineElement calls when there
8792 // are different ways to succeed at wrapping the object.
8793 do {
8794 tmp.setInt32(int32_t(result.Value()[sequenceIdx0]));
8795 break;
8796 } while (false);
8797 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
8798 JSPROP_ENUMERATE)) {
8799 return false;
8800 }
8801 }
8802 }
8803 args.rval().setObject(*returnArray);
8804 return true;
8805}
8806
8807static const JSJitInfo receiveNullableSequence_methodinfo = {
8808 { (JSJitGetterOp)receiveNullableSequence },
8809 { prototypes::id::TestJSImplInterface },
8810 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8811 JSJitInfo::Method,
8812 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8813 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
8814 false, /* isInfallible. False in setters. */
8815 false, /* isMovable. Not relevant for setters. */
8816 false, /* isEliminatable. Not relevant for setters. */
8817 false, /* isAlwaysInSlot. Only relevant for getters. */
8818 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8819 false, /* isTypedMethod. Only relevant for methods. */
8820 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8821};
8822
8823MOZ_CAN_RUN_SCRIPT static bool
8824receiveSequenceOfNullableInts(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8825{
8826 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8829( cx, "TestJSImplInterface"
, "receiveSequenceOfNullableInts", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8827 "TestJSImplInterface", "receiveSequenceOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8829( cx, "TestJSImplInterface"
, "receiveSequenceOfNullableInts", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8828 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8829( cx, "TestJSImplInterface"
, "receiveSequenceOfNullableInts", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8829 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8829( cx, "TestJSImplInterface"
, "receiveSequenceOfNullableInts", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8830
8831 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8832 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8833 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8834 if (objIsXray) {
8835 unwrappedObj.emplace(cx, obj);
8836 }
8837 if (objIsXray) {
8838 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8839 // we know Xrays have no dynamic unwrap behavior.
8840 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8841 if (!unwrappedObj.ref()) {
8842 return false;
8843 }
8844 }
8845 FastErrorResult rv;
8846 nsTArray<Nullable<int32_t>> result;
8847 // NOTE: This assert does NOT call the function.
8848 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveSequenceOfNullableInts(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
8849 MOZ_KnownLive(self)(self)->ReceiveSequenceOfNullableInts(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
8850 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveSequenceOfNullableInts"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveSequenceOfNullableInts"
)), 0))
) {
8851 return false;
8852 }
8853 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8853); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8853; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8854
8855 uint32_t length = result.Length();
8856 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
8857 if (!returnArray) {
8858 return false;
8859 }
8860 // Scope for 'tmp'
8861 {
8862 JS::Rooted<JS::Value> tmp(cx);
8863 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
8864 // Control block to let us common up the JS_DefineElement calls when there
8865 // are different ways to succeed at wrapping the object.
8866 do {
8867 if (result[sequenceIdx0].IsNull()) {
8868 tmp.setNull();
8869 break;
8870 }
8871 tmp.setInt32(int32_t(result[sequenceIdx0].Value()));
8872 break;
8873 } while (false);
8874 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
8875 JSPROP_ENUMERATE)) {
8876 return false;
8877 }
8878 }
8879 }
8880 args.rval().setObject(*returnArray);
8881 return true;
8882}
8883
8884static const JSJitInfo receiveSequenceOfNullableInts_methodinfo = {
8885 { (JSJitGetterOp)receiveSequenceOfNullableInts },
8886 { prototypes::id::TestJSImplInterface },
8887 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8888 JSJitInfo::Method,
8889 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8890 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
8891 false, /* isInfallible. False in setters. */
8892 false, /* isMovable. Not relevant for setters. */
8893 false, /* isEliminatable. Not relevant for setters. */
8894 false, /* isAlwaysInSlot. Only relevant for getters. */
8895 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8896 false, /* isTypedMethod. Only relevant for methods. */
8897 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8898};
8899
8900MOZ_CAN_RUN_SCRIPT static bool
8901receiveNullableSequenceOfNullableInts(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8902{
8903 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8906( cx, "TestJSImplInterface"
, "receiveNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8904 "TestJSImplInterface", "receiveNullableSequenceOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8906( cx, "TestJSImplInterface"
, "receiveNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8905 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8906( cx, "TestJSImplInterface"
, "receiveNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
8906 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8906( cx, "TestJSImplInterface"
, "receiveNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
8907
8908 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8909 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8910 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8911 if (objIsXray) {
8912 unwrappedObj.emplace(cx, obj);
8913 }
8914 if (objIsXray) {
8915 // Since our object is an Xray, we can just CheckedUnwrapStatic:
8916 // we know Xrays have no dynamic unwrap behavior.
8917 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
8918 if (!unwrappedObj.ref()) {
8919 return false;
8920 }
8921 }
8922 FastErrorResult rv;
8923 Nullable<nsTArray<Nullable<int32_t>>> result;
8924 // NOTE: This assert does NOT call the function.
8925 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableSequenceOfNullableInts(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
8926 MOZ_KnownLive(self)(self)->ReceiveNullableSequenceOfNullableInts(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
8927 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableSequenceOfNullableInts"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableSequenceOfNullableInts"
)), 0))
) {
8928 return false;
8929 }
8930 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 8930); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 8930; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
8931
8932 if (result.IsNull()) {
8933 args.rval().setNull();
8934 return true;
8935 }
8936
8937 uint32_t length = result.Value().Length();
8938 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
8939 if (!returnArray) {
8940 return false;
8941 }
8942 // Scope for 'tmp'
8943 {
8944 JS::Rooted<JS::Value> tmp(cx);
8945 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
8946 // Control block to let us common up the JS_DefineElement calls when there
8947 // are different ways to succeed at wrapping the object.
8948 do {
8949 if (result.Value()[sequenceIdx0].IsNull()) {
8950 tmp.setNull();
8951 break;
8952 }
8953 tmp.setInt32(int32_t(result.Value()[sequenceIdx0].Value()));
8954 break;
8955 } while (false);
8956 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
8957 JSPROP_ENUMERATE)) {
8958 return false;
8959 }
8960 }
8961 }
8962 args.rval().setObject(*returnArray);
8963 return true;
8964}
8965
8966static const JSJitInfo receiveNullableSequenceOfNullableInts_methodinfo = {
8967 { (JSJitGetterOp)receiveNullableSequenceOfNullableInts },
8968 { prototypes::id::TestJSImplInterface },
8969 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
8970 JSJitInfo::Method,
8971 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
8972 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
8973 false, /* isInfallible. False in setters. */
8974 false, /* isMovable. Not relevant for setters. */
8975 false, /* isEliminatable. Not relevant for setters. */
8976 false, /* isAlwaysInSlot. Only relevant for getters. */
8977 false, /* isLazilyCachedInSlot. Only relevant for getters. */
8978 false, /* isTypedMethod. Only relevant for methods. */
8979 0 /* Reserved slot index, if we're stored in a slot, else 0. */
8980};
8981
8982MOZ_CAN_RUN_SCRIPT static bool
8983passSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
8984{
8985 BindingCallContext cx(cx_, "TestJSImplInterface.passSequence");
8986 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject8989( cx, "TestJSImplInterface"
, "passSequence", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8987 "TestJSImplInterface", "passSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject8989( cx, "TestJSImplInterface"
, "passSequence", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8988 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject8989( cx, "TestJSImplInterface"
, "passSequence", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
8989 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject8989( cx, "TestJSImplInterface"
, "passSequence", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
8990
8991 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
8992 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequence", 1)) {
8993 return false;
8994 }
8995 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
8996 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
8997 if (objIsXray) {
8998 unwrappedObj.emplace(cx, obj);
8999 }
9000 binding_detail::AutoSequence<int32_t> arg0;
9001 if (args[0].isObject()) {
9002 JS::ForOfIterator iter(cx);
9003 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
9004 return false;
9005 }
9006 if (!iter.valueIsIterable()) {
9007 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9008 return false;
9009 }
9010 binding_detail::AutoSequence<int32_t> &arr = arg0;
9011 JS::Rooted<JS::Value> temp(cx);
9012 while (true) {
9013 bool done;
9014 if (!iter.next(&temp, &done)) {
9015 return false;
9016 }
9017 if (done) {
9018 break;
9019 }
9020 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
9021 if (!slotPtr) {
9022 JS_ReportOutOfMemory(cx);
9023 return false;
9024 }
9025 int32_t& slot = *slotPtr;
9026 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
9027 return false;
9028 }
9029 }
9030 } else {
9031 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9032 return false;
9033 }
9034 if (objIsXray) {
9035 // Since our object is an Xray, we can just CheckedUnwrapStatic:
9036 // we know Xrays have no dynamic unwrap behavior.
9037 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
9038 if (!unwrappedObj.ref()) {
9039 return false;
9040 }
9041 }
9042 FastErrorResult rv;
9043 // NOTE: This assert does NOT call the function.
9044 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
9045 MOZ_KnownLive(self)(self)->PassSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
9046 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequence"
)), 0))
) {
9047 return false;
9048 }
9049 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9049); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9049; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9050 args.rval().setUndefined();
9051 return true;
9052}
9053
9054static const JSJitInfo passSequence_methodinfo = {
9055 { (JSJitGetterOp)passSequence },
9056 { prototypes::id::TestJSImplInterface },
9057 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
9058 JSJitInfo::Method,
9059 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9060 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
9061 false, /* isInfallible. False in setters. */
9062 false, /* isMovable. Not relevant for setters. */
9063 false, /* isEliminatable. Not relevant for setters. */
9064 false, /* isAlwaysInSlot. Only relevant for getters. */
9065 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9066 false, /* isTypedMethod. Only relevant for methods. */
9067 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9068};
9069
9070MOZ_CAN_RUN_SCRIPT static bool
9071passNullableSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9072{
9073 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableSequence");
9074 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9077( cx, "TestJSImplInterface"
, "passNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
9075 "TestJSImplInterface", "passNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9077( cx, "TestJSImplInterface"
, "passNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
9076 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9077( cx, "TestJSImplInterface"
, "passNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
9077 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9077( cx, "TestJSImplInterface"
, "passNullableSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
9078
9079 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
9080 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableSequence", 1)) {
9081 return false;
9082 }
9083 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
9084 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
9085 if (objIsXray) {
9086 unwrappedObj.emplace(cx, obj);
9087 }
9088 Nullable<Sequence<int32_t>> arg0;
9089 if (args[0].isObject()) {
9090 JS::ForOfIterator iter(cx);
9091 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
9092 return false;
9093 }
9094 if (!iter.valueIsIterable()) {
9095 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9096 return false;
9097 }
9098 Sequence<int32_t> &arr = arg0.SetValue();
9099 JS::Rooted<JS::Value> temp(cx);
9100 while (true) {
9101 bool done;
9102 if (!iter.next(&temp, &done)) {
9103 return false;
9104 }
9105 if (done) {
9106 break;
9107 }
9108 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
9109 if (!slotPtr) {
9110 JS_ReportOutOfMemory(cx);
9111 return false;
9112 }
9113 int32_t& slot = *slotPtr;
9114 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
9115 return false;
9116 }
9117 }
9118 } else if (args[0].isNullOrUndefined()) {
9119 arg0.SetNull();
9120 } else {
9121 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9122 return false;
9123 }
9124 if (objIsXray) {
9125 // Since our object is an Xray, we can just CheckedUnwrapStatic:
9126 // we know Xrays have no dynamic unwrap behavior.
9127 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
9128 if (!unwrappedObj.ref()) {
9129 return false;
9130 }
9131 }
9132 FastErrorResult rv;
9133 // NOTE: This assert does NOT call the function.
9134 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
9135 MOZ_KnownLive(self)(self)->PassNullableSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
9136 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableSequence"
)), 0))
) {
9137 return false;
9138 }
9139 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9139); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9139; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9140 args.rval().setUndefined();
9141 return true;
9142}
9143
9144static const JSJitInfo passNullableSequence_methodinfo = {
9145 { (JSJitGetterOp)passNullableSequence },
9146 { prototypes::id::TestJSImplInterface },
9147 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
9148 JSJitInfo::Method,
9149 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9150 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
9151 false, /* isInfallible. False in setters. */
9152 false, /* isMovable. Not relevant for setters. */
9153 false, /* isEliminatable. Not relevant for setters. */
9154 false, /* isAlwaysInSlot. Only relevant for getters. */
9155 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9156 false, /* isTypedMethod. Only relevant for methods. */
9157 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9158};
9159
9160MOZ_CAN_RUN_SCRIPT static bool
9161passSequenceOfNullableInts(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9162{
9163 BindingCallContext cx(cx_, "TestJSImplInterface.passSequenceOfNullableInts");
9164 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9167( cx, "TestJSImplInterface"
, "passSequenceOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9165 "TestJSImplInterface", "passSequenceOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9167( cx, "TestJSImplInterface"
, "passSequenceOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9166 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9167( cx, "TestJSImplInterface"
, "passSequenceOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9167 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9167( cx, "TestJSImplInterface"
, "passSequenceOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9168
9169 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
9170 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequenceOfNullableInts", 1)) {
9171 return false;
9172 }
9173 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
9174 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
9175 if (objIsXray) {
9176 unwrappedObj.emplace(cx, obj);
9177 }
9178 binding_detail::AutoSequence<Nullable<int32_t>> arg0;
9179 if (args[0].isObject()) {
9180 JS::ForOfIterator iter(cx);
9181 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
9182 return false;
9183 }
9184 if (!iter.valueIsIterable()) {
9185 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9186 return false;
9187 }
9188 binding_detail::AutoSequence<Nullable<int32_t>> &arr = arg0;
9189 JS::Rooted<JS::Value> temp(cx);
9190 while (true) {
9191 bool done;
9192 if (!iter.next(&temp, &done)) {
9193 return false;
9194 }
9195 if (done) {
9196 break;
9197 }
9198 Nullable<int32_t>* slotPtr = arr.AppendElement(mozilla::fallible);
9199 if (!slotPtr) {
9200 JS_ReportOutOfMemory(cx);
9201 return false;
9202 }
9203 Nullable<int32_t>& slot = *slotPtr;
9204 if (temp.isNullOrUndefined()) {
9205 slot.SetNull();
9206 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot.SetValue())) {
9207 return false;
9208 }
9209 }
9210 } else {
9211 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9212 return false;
9213 }
9214 if (objIsXray) {
9215 // Since our object is an Xray, we can just CheckedUnwrapStatic:
9216 // we know Xrays have no dynamic unwrap behavior.
9217 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
9218 if (!unwrappedObj.ref()) {
9219 return false;
9220 }
9221 }
9222 FastErrorResult rv;
9223 // NOTE: This assert does NOT call the function.
9224 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfNullableInts(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
9225 MOZ_KnownLive(self)(self)->PassSequenceOfNullableInts(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
9226 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfNullableInts"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfNullableInts"
)), 0))
) {
9227 return false;
9228 }
9229 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9229); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9229; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9230 args.rval().setUndefined();
9231 return true;
9232}
9233
9234static const JSJitInfo passSequenceOfNullableInts_methodinfo = {
9235 { (JSJitGetterOp)passSequenceOfNullableInts },
9236 { prototypes::id::TestJSImplInterface },
9237 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
9238 JSJitInfo::Method,
9239 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9240 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
9241 false, /* isInfallible. False in setters. */
9242 false, /* isMovable. Not relevant for setters. */
9243 false, /* isEliminatable. Not relevant for setters. */
9244 false, /* isAlwaysInSlot. Only relevant for getters. */
9245 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9246 false, /* isTypedMethod. Only relevant for methods. */
9247 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9248};
9249
9250MOZ_CAN_RUN_SCRIPT static bool
9251passOptionalSequenceOfNullableInts(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9252{
9253 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalSequenceOfNullableInts");
9254 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9257( cx, "TestJSImplInterface"
, "passOptionalSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9255 "TestJSImplInterface", "passOptionalSequenceOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9257( cx, "TestJSImplInterface"
, "passOptionalSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9256 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9257( cx, "TestJSImplInterface"
, "passOptionalSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9257 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9257( cx, "TestJSImplInterface"
, "passOptionalSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9258
9259 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
9260 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
9261 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
9262 if (objIsXray) {
9263 unwrappedObj.emplace(cx, obj);
9264 }
9265 Optional<Sequence<Nullable<int32_t>>> arg0;
9266 if (args.hasDefined(0)) {
9267 arg0.Construct();
9268 if (args[0].isObject()) {
9269 JS::ForOfIterator iter(cx);
9270 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
9271 return false;
9272 }
9273 if (!iter.valueIsIterable()) {
9274 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9275 return false;
9276 }
9277 Sequence<Nullable<int32_t>> &arr = arg0.Value();
9278 JS::Rooted<JS::Value> temp(cx);
9279 while (true) {
9280 bool done;
9281 if (!iter.next(&temp, &done)) {
9282 return false;
9283 }
9284 if (done) {
9285 break;
9286 }
9287 Nullable<int32_t>* slotPtr = arr.AppendElement(mozilla::fallible);
9288 if (!slotPtr) {
9289 JS_ReportOutOfMemory(cx);
9290 return false;
9291 }
9292 Nullable<int32_t>& slot = *slotPtr;
9293 if (temp.isNullOrUndefined()) {
9294 slot.SetNull();
9295 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot.SetValue())) {
9296 return false;
9297 }
9298 }
9299 } else {
9300 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9301 return false;
9302 }
9303 }
9304 if (objIsXray) {
9305 // Since our object is an Xray, we can just CheckedUnwrapStatic:
9306 // we know Xrays have no dynamic unwrap behavior.
9307 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
9308 if (!unwrappedObj.ref()) {
9309 return false;
9310 }
9311 }
9312 FastErrorResult rv;
9313 // NOTE: This assert does NOT call the function.
9314 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSequenceOfNullableInts(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
9315 MOZ_KnownLive(self)(self)->PassOptionalSequenceOfNullableInts(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
9316 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSequenceOfNullableInts"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSequenceOfNullableInts"
)), 0))
) {
9317 return false;
9318 }
9319 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9319); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9319; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9320 args.rval().setUndefined();
9321 return true;
9322}
9323
9324static const JSJitInfo passOptionalSequenceOfNullableInts_methodinfo = {
9325 { (JSJitGetterOp)passOptionalSequenceOfNullableInts },
9326 { prototypes::id::TestJSImplInterface },
9327 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
9328 JSJitInfo::Method,
9329 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9330 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
9331 false, /* isInfallible. False in setters. */
9332 false, /* isMovable. Not relevant for setters. */
9333 false, /* isEliminatable. Not relevant for setters. */
9334 false, /* isAlwaysInSlot. Only relevant for getters. */
9335 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9336 false, /* isTypedMethod. Only relevant for methods. */
9337 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9338};
9339
9340MOZ_CAN_RUN_SCRIPT static bool
9341passOptionalNullableSequenceOfNullableInts(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9342{
9343 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableSequenceOfNullableInts");
9344 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9347( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9345 "TestJSImplInterface", "passOptionalNullableSequenceOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9347( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9346 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9347( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9347 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9347( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9348
9349 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
9350 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
9351 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
9352 if (objIsXray) {
9353 unwrappedObj.emplace(cx, obj);
9354 }
9355 Optional<Nullable<Sequence<Nullable<int32_t>>>> arg0;
9356 if (args.hasDefined(0)) {
9357 arg0.Construct();
9358 if (args[0].isObject()) {
9359 JS::ForOfIterator iter(cx);
9360 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
9361 return false;
9362 }
9363 if (!iter.valueIsIterable()) {
9364 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9365 return false;
9366 }
9367 Sequence<Nullable<int32_t>> &arr = arg0.Value().SetValue();
9368 JS::Rooted<JS::Value> temp(cx);
9369 while (true) {
9370 bool done;
9371 if (!iter.next(&temp, &done)) {
9372 return false;
9373 }
9374 if (done) {
9375 break;
9376 }
9377 Nullable<int32_t>* slotPtr = arr.AppendElement(mozilla::fallible);
9378 if (!slotPtr) {
9379 JS_ReportOutOfMemory(cx);
9380 return false;
9381 }
9382 Nullable<int32_t>& slot = *slotPtr;
9383 if (temp.isNullOrUndefined()) {
9384 slot.SetNull();
9385 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot.SetValue())) {
9386 return false;
9387 }
9388 }
9389 } else if (args[0].isNullOrUndefined()) {
9390 arg0.Value().SetNull();
9391 } else {
9392 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
9393 return false;
9394 }
9395 }
9396 if (objIsXray) {
9397 // Since our object is an Xray, we can just CheckedUnwrapStatic:
9398 // we know Xrays have no dynamic unwrap behavior.
9399 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
9400 if (!unwrappedObj.ref()) {
9401 return false;
9402 }
9403 }
9404 FastErrorResult rv;
9405 // NOTE: This assert does NOT call the function.
9406 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableInts(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
9407 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableInts(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
9408 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceOfNullableInts"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceOfNullableInts"
)), 0))
) {
9409 return false;
9410 }
9411 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9411); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9411; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9412 args.rval().setUndefined();
9413 return true;
9414}
9415
9416static const JSJitInfo passOptionalNullableSequenceOfNullableInts_methodinfo = {
9417 { (JSJitGetterOp)passOptionalNullableSequenceOfNullableInts },
9418 { prototypes::id::TestJSImplInterface },
9419 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
9420 JSJitInfo::Method,
9421 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9422 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
9423 false, /* isInfallible. False in setters. */
9424 false, /* isMovable. Not relevant for setters. */
9425 false, /* isEliminatable. Not relevant for setters. */
9426 false, /* isAlwaysInSlot. Only relevant for getters. */
9427 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9428 false, /* isTypedMethod. Only relevant for methods. */
9429 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9430};
9431
9432MOZ_CAN_RUN_SCRIPT static bool
9433receiveCastableObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9434{
9435 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9438( cx, "TestJSImplInterface"
, "receiveCastableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9436 "TestJSImplInterface", "receiveCastableObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9438( cx, "TestJSImplInterface"
, "receiveCastableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9437 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9438( cx, "TestJSImplInterface"
, "receiveCastableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9438 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9438( cx, "TestJSImplInterface"
, "receiveCastableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9439
9440 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
9441 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
9442 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
9443 if (objIsXray) {
9444 unwrappedObj.emplace(cx, obj);
9445 }
9446 if (objIsXray) {
9447 // Since our object is an Xray, we can just CheckedUnwrapStatic:
9448 // we know Xrays have no dynamic unwrap behavior.
9449 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
9450 if (!unwrappedObj.ref()) {
9451 return false;
9452 }
9453 }
9454 FastErrorResult rv;
9455 nsTArray<StrongPtrForMember<mozilla::dom::TestJSImplInterface>> result;
9456 // NOTE: This assert does NOT call the function.
9457 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveCastableObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
9458 MOZ_KnownLive(self)(self)->ReceiveCastableObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
9459 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveCastableObjectSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveCastableObjectSequence"
)), 0))
) {
9460 return false;
9461 }
9462 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9462); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9462; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9463
9464 uint32_t length = result.Length();
9465 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9466 if (!returnArray) {
9467 return false;
9468 }
9469 // Scope for 'tmp'
9470 {
9471 JS::Rooted<JS::Value> tmp(cx);
9472 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9473 // Control block to let us common up the JS_DefineElement calls when there
9474 // are different ways to succeed at wrapping the object.
9475 do {
9476 if (!GetOrCreateDOMReflector(cx, result[sequenceIdx0], &tmp)) {
9477 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9477); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 9477; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
9478 return false;
9479 }
9480 break;
9481 } while (false);
9482 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9483 JSPROP_ENUMERATE)) {
9484 return false;
9485 }
9486 }
9487 }
9488 args.rval().setObject(*returnArray);
9489 return true;
9490}
9491
9492static const JSJitInfo receiveCastableObjectSequence_methodinfo = {
9493 { (JSJitGetterOp)receiveCastableObjectSequence },
9494 { prototypes::id::TestJSImplInterface },
9495 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
9496 JSJitInfo::Method,
9497 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9498 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
9499 false, /* isInfallible. False in setters. */
9500 false, /* isMovable. Not relevant for setters. */
9501 false, /* isEliminatable. Not relevant for setters. */
9502 false, /* isAlwaysInSlot. Only relevant for getters. */
9503 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9504 false, /* isTypedMethod. Only relevant for methods. */
9505 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9506};
9507
9508MOZ_CAN_RUN_SCRIPT static bool
9509receiveCallbackObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9510{
9511 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9514( cx, "TestJSImplInterface"
, "receiveCallbackObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9512 "TestJSImplInterface", "receiveCallbackObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9514( cx, "TestJSImplInterface"
, "receiveCallbackObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9513 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9514( cx, "TestJSImplInterface"
, "receiveCallbackObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9514 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9514( cx, "TestJSImplInterface"
, "receiveCallbackObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9515
9516 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
9517 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
9518 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
9519 if (objIsXray) {
9520 unwrappedObj.emplace(cx, obj);
9521 }
9522 if (objIsXray) {
9523 // Since our object is an Xray, we can just CheckedUnwrapStatic:
9524 // we know Xrays have no dynamic unwrap behavior.
9525 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
9526 if (!unwrappedObj.ref()) {
9527 return false;
9528 }
9529 }
9530 FastErrorResult rv;
9531 nsTArray<StrongPtrForMember<mozilla::dom::TestCallbackInterface>> result;
9532 // NOTE: This assert does NOT call the function.
9533 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveCallbackObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
9534 MOZ_KnownLive(self)(self)->ReceiveCallbackObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
9535 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveCallbackObjectSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveCallbackObjectSequence"
)), 0))
) {
9536 return false;
9537 }
9538 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9538); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9538; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9539
9540 uint32_t length = result.Length();
9541 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9542 if (!returnArray) {
9543 return false;
9544 }
9545 // Scope for 'tmp'
9546 {
9547 JS::Rooted<JS::Value> tmp(cx);
9548 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9549 // Control block to let us common up the JS_DefineElement calls when there
9550 // are different ways to succeed at wrapping the object.
9551 do {
9552 tmp.setObjectOrNull(GetCallbackFromCallbackObject(cx, result[sequenceIdx0]));
9553 if (!MaybeWrapObjectValue(cx, &tmp)) {
9554 return false;
9555 }
9556 break;
9557 } while (false);
9558 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9559 JSPROP_ENUMERATE)) {
9560 return false;
9561 }
9562 }
9563 }
9564 args.rval().setObject(*returnArray);
9565 return true;
9566}
9567
9568static const JSJitInfo receiveCallbackObjectSequence_methodinfo = {
9569 { (JSJitGetterOp)receiveCallbackObjectSequence },
9570 { prototypes::id::TestJSImplInterface },
9571 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
9572 JSJitInfo::Method,
9573 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9574 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
9575 false, /* isInfallible. False in setters. */
9576 false, /* isMovable. Not relevant for setters. */
9577 false, /* isEliminatable. Not relevant for setters. */
9578 false, /* isAlwaysInSlot. Only relevant for getters. */
9579 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9580 false, /* isTypedMethod. Only relevant for methods. */
9581 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9582};
9583
9584MOZ_CAN_RUN_SCRIPT static bool
9585receiveNullableCastableObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9586{
9587 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9590( cx, "TestJSImplInterface"
, "receiveNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9588 "TestJSImplInterface", "receiveNullableCastableObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9590( cx, "TestJSImplInterface"
, "receiveNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9589 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9590( cx, "TestJSImplInterface"
, "receiveNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9590 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9590( cx, "TestJSImplInterface"
, "receiveNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9591
9592 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
9593 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
9594 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
9595 if (objIsXray) {
9596 unwrappedObj.emplace(cx, obj);
9597 }
9598 if (objIsXray) {
9599 // Since our object is an Xray, we can just CheckedUnwrapStatic:
9600 // we know Xrays have no dynamic unwrap behavior.
9601 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
9602 if (!unwrappedObj.ref()) {
9603 return false;
9604 }
9605 }
9606 FastErrorResult rv;
9607 nsTArray<StrongPtrForMember<mozilla::dom::TestJSImplInterface>> result;
9608 // NOTE: This assert does NOT call the function.
9609 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableCastableObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
9610 MOZ_KnownLive(self)(self)->ReceiveNullableCastableObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
9611 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableCastableObjectSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableCastableObjectSequence"
)), 0))
) {
9612 return false;
9613 }
9614 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9614); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9614; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9615
9616 uint32_t length = result.Length();
9617 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9618 if (!returnArray) {
9619 return false;
9620 }
9621 // Scope for 'tmp'
9622 {
9623 JS::Rooted<JS::Value> tmp(cx);
9624 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9625 // Control block to let us common up the JS_DefineElement calls when there
9626 // are different ways to succeed at wrapping the object.
9627 do {
9628 if (!result[sequenceIdx0]) {
9629 tmp.setNull();
9630 break;
9631 }
9632 if (!GetOrCreateDOMReflector(cx, result[sequenceIdx0], &tmp)) {
9633 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9633); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 9633; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
9634 return false;
9635 }
9636 break;
9637 } while (false);
9638 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9639 JSPROP_ENUMERATE)) {
9640 return false;
9641 }
9642 }
9643 }
9644 args.rval().setObject(*returnArray);
9645 return true;
9646}
9647
9648static const JSJitInfo receiveNullableCastableObjectSequence_methodinfo = {
9649 { (JSJitGetterOp)receiveNullableCastableObjectSequence },
9650 { prototypes::id::TestJSImplInterface },
9651 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
9652 JSJitInfo::Method,
9653 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9654 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
9655 false, /* isInfallible. False in setters. */
9656 false, /* isMovable. Not relevant for setters. */
9657 false, /* isEliminatable. Not relevant for setters. */
9658 false, /* isAlwaysInSlot. Only relevant for getters. */
9659 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9660 false, /* isTypedMethod. Only relevant for methods. */
9661 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9662};
9663
9664MOZ_CAN_RUN_SCRIPT static bool
9665receiveNullableCallbackObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9666{
9667 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9670( cx, "TestJSImplInterface"
, "receiveNullableCallbackObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9668 "TestJSImplInterface", "receiveNullableCallbackObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9670( cx, "TestJSImplInterface"
, "receiveNullableCallbackObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9669 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9670( cx, "TestJSImplInterface"
, "receiveNullableCallbackObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9670 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9670( cx, "TestJSImplInterface"
, "receiveNullableCallbackObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9671
9672 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
9673 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
9674 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
9675 if (objIsXray) {
9676 unwrappedObj.emplace(cx, obj);
9677 }
9678 if (objIsXray) {
9679 // Since our object is an Xray, we can just CheckedUnwrapStatic:
9680 // we know Xrays have no dynamic unwrap behavior.
9681 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
9682 if (!unwrappedObj.ref()) {
9683 return false;
9684 }
9685 }
9686 FastErrorResult rv;
9687 nsTArray<StrongPtrForMember<mozilla::dom::TestCallbackInterface>> result;
9688 // NOTE: This assert does NOT call the function.
9689 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableCallbackObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
9690 MOZ_KnownLive(self)(self)->ReceiveNullableCallbackObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
9691 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableCallbackObjectSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableCallbackObjectSequence"
)), 0))
) {
9692 return false;
9693 }
9694 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9694); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9694; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9695
9696 uint32_t length = result.Length();
9697 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9698 if (!returnArray) {
9699 return false;
9700 }
9701 // Scope for 'tmp'
9702 {
9703 JS::Rooted<JS::Value> tmp(cx);
9704 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9705 // Control block to let us common up the JS_DefineElement calls when there
9706 // are different ways to succeed at wrapping the object.
9707 do {
9708 if (result[sequenceIdx0]) {
9709 tmp.setObjectOrNull(GetCallbackFromCallbackObject(cx, result[sequenceIdx0]));
9710 if (!MaybeWrapObjectOrNullValue(cx, &tmp)) {
9711 return false;
9712 }
9713 break;
9714 } else {
9715 tmp.setNull();
9716 break;
9717 }
9718 } while (false);
9719 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9720 JSPROP_ENUMERATE)) {
9721 return false;
9722 }
9723 }
9724 }
9725 args.rval().setObject(*returnArray);
9726 return true;
9727}
9728
9729static const JSJitInfo receiveNullableCallbackObjectSequence_methodinfo = {
9730 { (JSJitGetterOp)receiveNullableCallbackObjectSequence },
9731 { prototypes::id::TestJSImplInterface },
9732 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
9733 JSJitInfo::Method,
9734 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9735 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
9736 false, /* isInfallible. False in setters. */
9737 false, /* isMovable. Not relevant for setters. */
9738 false, /* isEliminatable. Not relevant for setters. */
9739 false, /* isAlwaysInSlot. Only relevant for getters. */
9740 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9741 false, /* isTypedMethod. Only relevant for methods. */
9742 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9743};
9744
9745MOZ_CAN_RUN_SCRIPT static bool
9746receiveCastableObjectNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9747{
9748 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9751( cx, "TestJSImplInterface"
, "receiveCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9749 "TestJSImplInterface", "receiveCastableObjectNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9751( cx, "TestJSImplInterface"
, "receiveCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9750 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9751( cx, "TestJSImplInterface"
, "receiveCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9751 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9751( cx, "TestJSImplInterface"
, "receiveCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9752
9753 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
9754 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
9755 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
9756 if (objIsXray) {
9757 unwrappedObj.emplace(cx, obj);
9758 }
9759 if (objIsXray) {
9760 // Since our object is an Xray, we can just CheckedUnwrapStatic:
9761 // we know Xrays have no dynamic unwrap behavior.
9762 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
9763 if (!unwrappedObj.ref()) {
9764 return false;
9765 }
9766 }
9767 FastErrorResult rv;
9768 Nullable<nsTArray<StrongPtrForMember<mozilla::dom::TestJSImplInterface>>> result;
9769 // NOTE: This assert does NOT call the function.
9770 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveCastableObjectNullableSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
9771 MOZ_KnownLive(self)(self)->ReceiveCastableObjectNullableSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
9772 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveCastableObjectNullableSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveCastableObjectNullableSequence"
)), 0))
) {
9773 return false;
9774 }
9775 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9775); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9775; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9776
9777 if (result.IsNull()) {
9778 args.rval().setNull();
9779 return true;
9780 }
9781
9782 uint32_t length = result.Value().Length();
9783 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9784 if (!returnArray) {
9785 return false;
9786 }
9787 // Scope for 'tmp'
9788 {
9789 JS::Rooted<JS::Value> tmp(cx);
9790 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9791 // Control block to let us common up the JS_DefineElement calls when there
9792 // are different ways to succeed at wrapping the object.
9793 do {
9794 if (!GetOrCreateDOMReflector(cx, result.Value()[sequenceIdx0], &tmp)) {
9795 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9795); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 9795; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
9796 return false;
9797 }
9798 break;
9799 } while (false);
9800 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9801 JSPROP_ENUMERATE)) {
9802 return false;
9803 }
9804 }
9805 }
9806 args.rval().setObject(*returnArray);
9807 return true;
9808}
9809
9810static const JSJitInfo receiveCastableObjectNullableSequence_methodinfo = {
9811 { (JSJitGetterOp)receiveCastableObjectNullableSequence },
9812 { prototypes::id::TestJSImplInterface },
9813 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
9814 JSJitInfo::Method,
9815 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9816 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
9817 false, /* isInfallible. False in setters. */
9818 false, /* isMovable. Not relevant for setters. */
9819 false, /* isEliminatable. Not relevant for setters. */
9820 false, /* isAlwaysInSlot. Only relevant for getters. */
9821 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9822 false, /* isTypedMethod. Only relevant for methods. */
9823 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9824};
9825
9826MOZ_CAN_RUN_SCRIPT static bool
9827receiveNullableCastableObjectNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9828{
9829 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9832( cx, "TestJSImplInterface"
, "receiveNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9830 "TestJSImplInterface", "receiveNullableCastableObjectNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9832( cx, "TestJSImplInterface"
, "receiveNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9831 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9832( cx, "TestJSImplInterface"
, "receiveNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9832 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9832( cx, "TestJSImplInterface"
, "receiveNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9833
9834 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
9835 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
9836 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
9837 if (objIsXray) {
9838 unwrappedObj.emplace(cx, obj);
9839 }
9840 if (objIsXray) {
9841 // Since our object is an Xray, we can just CheckedUnwrapStatic:
9842 // we know Xrays have no dynamic unwrap behavior.
9843 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
9844 if (!unwrappedObj.ref()) {
9845 return false;
9846 }
9847 }
9848 FastErrorResult rv;
9849 Nullable<nsTArray<StrongPtrForMember<mozilla::dom::TestJSImplInterface>>> result;
9850 // NOTE: This assert does NOT call the function.
9851 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableCastableObjectNullableSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
9852 MOZ_KnownLive(self)(self)->ReceiveNullableCastableObjectNullableSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
9853 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableCastableObjectNullableSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableCastableObjectNullableSequence"
)), 0))
) {
9854 return false;
9855 }
9856 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9856); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9856; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9857
9858 if (result.IsNull()) {
9859 args.rval().setNull();
9860 return true;
9861 }
9862
9863 uint32_t length = result.Value().Length();
9864 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9865 if (!returnArray) {
9866 return false;
9867 }
9868 // Scope for 'tmp'
9869 {
9870 JS::Rooted<JS::Value> tmp(cx);
9871 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9872 // Control block to let us common up the JS_DefineElement calls when there
9873 // are different ways to succeed at wrapping the object.
9874 do {
9875 if (!result.Value()[sequenceIdx0]) {
9876 tmp.setNull();
9877 break;
9878 }
9879 if (!GetOrCreateDOMReflector(cx, result.Value()[sequenceIdx0], &tmp)) {
9880 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9880); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 9880; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
9881 return false;
9882 }
9883 break;
9884 } while (false);
9885 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9886 JSPROP_ENUMERATE)) {
9887 return false;
9888 }
9889 }
9890 }
9891 args.rval().setObject(*returnArray);
9892 return true;
9893}
9894
9895static const JSJitInfo receiveNullableCastableObjectNullableSequence_methodinfo = {
9896 { (JSJitGetterOp)receiveNullableCastableObjectNullableSequence },
9897 { prototypes::id::TestJSImplInterface },
9898 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
9899 JSJitInfo::Method,
9900 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9901 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
9902 false, /* isInfallible. False in setters. */
9903 false, /* isMovable. Not relevant for setters. */
9904 false, /* isEliminatable. Not relevant for setters. */
9905 false, /* isAlwaysInSlot. Only relevant for getters. */
9906 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9907 false, /* isTypedMethod. Only relevant for methods. */
9908 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9909};
9910
9911MOZ_CAN_RUN_SCRIPT static bool
9912receiveWeakCastableObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9913{
9914 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9917( cx, "TestJSImplInterface"
, "receiveWeakCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9915 "TestJSImplInterface", "receiveWeakCastableObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9917( cx, "TestJSImplInterface"
, "receiveWeakCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9916 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9917( cx, "TestJSImplInterface"
, "receiveWeakCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9917 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9917( cx, "TestJSImplInterface"
, "receiveWeakCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9918
9919 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
9920 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
9921 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
9922 if (objIsXray) {
9923 unwrappedObj.emplace(cx, obj);
9924 }
9925 if (objIsXray) {
9926 // Since our object is an Xray, we can just CheckedUnwrapStatic:
9927 // we know Xrays have no dynamic unwrap behavior.
9928 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
9929 if (!unwrappedObj.ref()) {
9930 return false;
9931 }
9932 }
9933 FastErrorResult rv;
9934 nsTArray<StrongPtrForMember<mozilla::dom::TestJSImplInterface>> result;
9935 // NOTE: This assert does NOT call the function.
9936 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveWeakCastableObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
9937 MOZ_KnownLive(self)(self)->ReceiveWeakCastableObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
9938 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakCastableObjectSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakCastableObjectSequence"
)), 0))
) {
9939 return false;
9940 }
9941 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9941); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 9941; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
9942
9943 uint32_t length = result.Length();
9944 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
9945 if (!returnArray) {
9946 return false;
9947 }
9948 // Scope for 'tmp'
9949 {
9950 JS::Rooted<JS::Value> tmp(cx);
9951 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
9952 // Control block to let us common up the JS_DefineElement calls when there
9953 // are different ways to succeed at wrapping the object.
9954 do {
9955 if (!GetOrCreateDOMReflector(cx, result[sequenceIdx0], &tmp)) {
9956 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 9956); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 9956; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
9957 return false;
9958 }
9959 break;
9960 } while (false);
9961 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
9962 JSPROP_ENUMERATE)) {
9963 return false;
9964 }
9965 }
9966 }
9967 args.rval().setObject(*returnArray);
9968 return true;
9969}
9970
9971static const JSJitInfo receiveWeakCastableObjectSequence_methodinfo = {
9972 { (JSJitGetterOp)receiveWeakCastableObjectSequence },
9973 { prototypes::id::TestJSImplInterface },
9974 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
9975 JSJitInfo::Method,
9976 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
9977 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
9978 false, /* isInfallible. False in setters. */
9979 false, /* isMovable. Not relevant for setters. */
9980 false, /* isEliminatable. Not relevant for setters. */
9981 false, /* isAlwaysInSlot. Only relevant for getters. */
9982 false, /* isLazilyCachedInSlot. Only relevant for getters. */
9983 false, /* isTypedMethod. Only relevant for methods. */
9984 0 /* Reserved slot index, if we're stored in a slot, else 0. */
9985};
9986
9987MOZ_CAN_RUN_SCRIPT static bool
9988receiveWeakNullableCastableObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
9989{
9990 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject9993( cx, "TestJSImplInterface"
, "receiveWeakNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9991 "TestJSImplInterface", "receiveWeakNullableCastableObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject9993( cx, "TestJSImplInterface"
, "receiveWeakNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9992 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject9993( cx, "TestJSImplInterface"
, "receiveWeakNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
9993 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject9993( cx, "TestJSImplInterface"
, "receiveWeakNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
9994
9995 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
9996 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
9997 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
9998 if (objIsXray) {
9999 unwrappedObj.emplace(cx, obj);
10000 }
10001 if (objIsXray) {
10002 // Since our object is an Xray, we can just CheckedUnwrapStatic:
10003 // we know Xrays have no dynamic unwrap behavior.
10004 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
10005 if (!unwrappedObj.ref()) {
10006 return false;
10007 }
10008 }
10009 FastErrorResult rv;
10010 nsTArray<StrongPtrForMember<mozilla::dom::TestJSImplInterface>> result;
10011 // NOTE: This assert does NOT call the function.
10012 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveWeakNullableCastableObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
10013 MOZ_KnownLive(self)(self)->ReceiveWeakNullableCastableObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
10014 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakNullableCastableObjectSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakNullableCastableObjectSequence"
)), 0))
) {
10015 return false;
10016 }
10017 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 10017); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10017; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10018
10019 uint32_t length = result.Length();
10020 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
10021 if (!returnArray) {
10022 return false;
10023 }
10024 // Scope for 'tmp'
10025 {
10026 JS::Rooted<JS::Value> tmp(cx);
10027 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
10028 // Control block to let us common up the JS_DefineElement calls when there
10029 // are different ways to succeed at wrapping the object.
10030 do {
10031 if (!result[sequenceIdx0]) {
10032 tmp.setNull();
10033 break;
10034 }
10035 if (!GetOrCreateDOMReflector(cx, result[sequenceIdx0], &tmp)) {
10036 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 10036); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 10036; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
10037 return false;
10038 }
10039 break;
10040 } while (false);
10041 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
10042 JSPROP_ENUMERATE)) {
10043 return false;
10044 }
10045 }
10046 }
10047 args.rval().setObject(*returnArray);
10048 return true;
10049}
10050
10051static const JSJitInfo receiveWeakNullableCastableObjectSequence_methodinfo = {
10052 { (JSJitGetterOp)receiveWeakNullableCastableObjectSequence },
10053 { prototypes::id::TestJSImplInterface },
10054 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
10055 JSJitInfo::Method,
10056 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10057 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
10058 false, /* isInfallible. False in setters. */
10059 false, /* isMovable. Not relevant for setters. */
10060 false, /* isEliminatable. Not relevant for setters. */
10061 false, /* isAlwaysInSlot. Only relevant for getters. */
10062 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10063 false, /* isTypedMethod. Only relevant for methods. */
10064 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10065};
10066
10067MOZ_CAN_RUN_SCRIPT static bool
10068receiveWeakCastableObjectNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10069{
10070 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10073( cx, "TestJSImplInterface"
, "receiveWeakCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10071 "TestJSImplInterface", "receiveWeakCastableObjectNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10073( cx, "TestJSImplInterface"
, "receiveWeakCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10072 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10073( cx, "TestJSImplInterface"
, "receiveWeakCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10073 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10073( cx, "TestJSImplInterface"
, "receiveWeakCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10074
10075 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
10076 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
10077 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
10078 if (objIsXray) {
10079 unwrappedObj.emplace(cx, obj);
10080 }
10081 if (objIsXray) {
10082 // Since our object is an Xray, we can just CheckedUnwrapStatic:
10083 // we know Xrays have no dynamic unwrap behavior.
10084 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
10085 if (!unwrappedObj.ref()) {
10086 return false;
10087 }
10088 }
10089 FastErrorResult rv;
10090 Nullable<nsTArray<StrongPtrForMember<mozilla::dom::TestJSImplInterface>>> result;
10091 // NOTE: This assert does NOT call the function.
10092 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveWeakCastableObjectNullableSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
10093 MOZ_KnownLive(self)(self)->ReceiveWeakCastableObjectNullableSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
10094 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakCastableObjectNullableSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakCastableObjectNullableSequence"
)), 0))
) {
10095 return false;
10096 }
10097 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 10097); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10097; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10098
10099 if (result.IsNull()) {
10100 args.rval().setNull();
10101 return true;
10102 }
10103
10104 uint32_t length = result.Value().Length();
10105 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
10106 if (!returnArray) {
10107 return false;
10108 }
10109 // Scope for 'tmp'
10110 {
10111 JS::Rooted<JS::Value> tmp(cx);
10112 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
10113 // Control block to let us common up the JS_DefineElement calls when there
10114 // are different ways to succeed at wrapping the object.
10115 do {
10116 if (!GetOrCreateDOMReflector(cx, result.Value()[sequenceIdx0], &tmp)) {
10117 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 10117); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 10117; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
10118 return false;
10119 }
10120 break;
10121 } while (false);
10122 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
10123 JSPROP_ENUMERATE)) {
10124 return false;
10125 }
10126 }
10127 }
10128 args.rval().setObject(*returnArray);
10129 return true;
10130}
10131
10132static const JSJitInfo receiveWeakCastableObjectNullableSequence_methodinfo = {
10133 { (JSJitGetterOp)receiveWeakCastableObjectNullableSequence },
10134 { prototypes::id::TestJSImplInterface },
10135 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
10136 JSJitInfo::Method,
10137 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10138 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
10139 false, /* isInfallible. False in setters. */
10140 false, /* isMovable. Not relevant for setters. */
10141 false, /* isEliminatable. Not relevant for setters. */
10142 false, /* isAlwaysInSlot. Only relevant for getters. */
10143 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10144 false, /* isTypedMethod. Only relevant for methods. */
10145 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10146};
10147
10148MOZ_CAN_RUN_SCRIPT static bool
10149receiveWeakNullableCastableObjectNullableSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10150{
10151 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10154( cx, "TestJSImplInterface"
, "receiveWeakNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10152 "TestJSImplInterface", "receiveWeakNullableCastableObjectNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10154( cx, "TestJSImplInterface"
, "receiveWeakNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10153 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10154( cx, "TestJSImplInterface"
, "receiveWeakNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10154 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10154( cx, "TestJSImplInterface"
, "receiveWeakNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10155
10156 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
10157 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
10158 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
10159 if (objIsXray) {
10160 unwrappedObj.emplace(cx, obj);
10161 }
10162 if (objIsXray) {
10163 // Since our object is an Xray, we can just CheckedUnwrapStatic:
10164 // we know Xrays have no dynamic unwrap behavior.
10165 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
10166 if (!unwrappedObj.ref()) {
10167 return false;
10168 }
10169 }
10170 FastErrorResult rv;
10171 Nullable<nsTArray<StrongPtrForMember<mozilla::dom::TestJSImplInterface>>> result;
10172 // NOTE: This assert does NOT call the function.
10173 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveWeakNullableCastableObjectNullableSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
10174 MOZ_KnownLive(self)(self)->ReceiveWeakNullableCastableObjectNullableSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
10175 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakNullableCastableObjectNullableSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveWeakNullableCastableObjectNullableSequence"
)), 0))
) {
10176 return false;
10177 }
10178 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 10178); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10178; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10179
10180 if (result.IsNull()) {
10181 args.rval().setNull();
10182 return true;
10183 }
10184
10185 uint32_t length = result.Value().Length();
10186 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
10187 if (!returnArray) {
10188 return false;
10189 }
10190 // Scope for 'tmp'
10191 {
10192 JS::Rooted<JS::Value> tmp(cx);
10193 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
10194 // Control block to let us common up the JS_DefineElement calls when there
10195 // are different ways to succeed at wrapping the object.
10196 do {
10197 if (!result.Value()[sequenceIdx0]) {
10198 tmp.setNull();
10199 break;
10200 }
10201 if (!GetOrCreateDOMReflector(cx, result.Value()[sequenceIdx0], &tmp)) {
10202 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 10202); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 10202; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
10203 return false;
10204 }
10205 break;
10206 } while (false);
10207 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
10208 JSPROP_ENUMERATE)) {
10209 return false;
10210 }
10211 }
10212 }
10213 args.rval().setObject(*returnArray);
10214 return true;
10215}
10216
10217static const JSJitInfo receiveWeakNullableCastableObjectNullableSequence_methodinfo = {
10218 { (JSJitGetterOp)receiveWeakNullableCastableObjectNullableSequence },
10219 { prototypes::id::TestJSImplInterface },
10220 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
10221 JSJitInfo::Method,
10222 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10223 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
10224 false, /* isInfallible. False in setters. */
10225 false, /* isMovable. Not relevant for setters. */
10226 false, /* isEliminatable. Not relevant for setters. */
10227 false, /* isAlwaysInSlot. Only relevant for getters. */
10228 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10229 false, /* isTypedMethod. Only relevant for methods. */
10230 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10231};
10232
10233MOZ_CAN_RUN_SCRIPT static bool
10234passCastableObjectSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10235{
10236 BindingCallContext cx(cx_, "TestJSImplInterface.passCastableObjectSequence");
10237 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10240( cx, "TestJSImplInterface"
, "passCastableObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10238 "TestJSImplInterface", "passCastableObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10240( cx, "TestJSImplInterface"
, "passCastableObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10239 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10240( cx, "TestJSImplInterface"
, "passCastableObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10240 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10240( cx, "TestJSImplInterface"
, "passCastableObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10241
10242 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
10243 if (!args.requireAtLeast(cx, "TestJSImplInterface.passCastableObjectSequence", 1)) {
10244 return false;
10245 }
10246 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
10247 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
10248 if (objIsXray) {
10249 unwrappedObj.emplace(cx, obj);
10250 }
10251 binding_detail::AutoSequence<OwningNonNull<mozilla::dom::TestJSImplInterface>> arg0;
10252 if (args[0].isObject()) {
10253 JS::ForOfIterator iter(cx);
10254 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10255 return false;
10256 }
10257 if (!iter.valueIsIterable()) {
10258 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10259 return false;
10260 }
10261 binding_detail::AutoSequence<OwningNonNull<mozilla::dom::TestJSImplInterface>> &arr = arg0;
10262 JS::Rooted<JS::Value> temp(cx);
10263 while (true) {
10264 bool done;
10265 if (!iter.next(&temp, &done)) {
10266 return false;
10267 }
10268 if (done) {
10269 break;
10270 }
10271 OwningNonNull<mozilla::dom::TestJSImplInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
10272 if (!slotPtr) {
10273 JS_ReportOutOfMemory(cx);
10274 return false;
10275 }
10276 OwningNonNull<mozilla::dom::TestJSImplInterface>& slot = *slotPtr;
10277 if (temp.isObject()) {
10278 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
10279 {
10280 // Our JSContext should be in the right global to do unwrapping in.
10281 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(&temp, slot, cx);
10282 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
10283 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "TestJSImplInterface");
10284 return false;
10285 }
10286 }
10287 } else {
10288 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
10289 return false;
10290 }
10291 }
10292 } else {
10293 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10294 return false;
10295 }
10296 if (objIsXray) {
10297 // Since our object is an Xray, we can just CheckedUnwrapStatic:
10298 // we know Xrays have no dynamic unwrap behavior.
10299 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
10300 if (!unwrappedObj.ref()) {
10301 return false;
10302 }
10303 }
10304 FastErrorResult rv;
10305 // NOTE: This assert does NOT call the function.
10306 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassCastableObjectSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
10307 MOZ_KnownLive(self)(self)->PassCastableObjectSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
10308 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passCastableObjectSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passCastableObjectSequence"
)), 0))
) {
10309 return false;
10310 }
10311 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 10311); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10311; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10312 args.rval().setUndefined();
10313 return true;
10314}
10315
10316static const JSJitInfo passCastableObjectSequence_methodinfo = {
10317 { (JSJitGetterOp)passCastableObjectSequence },
10318 { prototypes::id::TestJSImplInterface },
10319 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
10320 JSJitInfo::Method,
10321 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10322 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10323 false, /* isInfallible. False in setters. */
10324 false, /* isMovable. Not relevant for setters. */
10325 false, /* isEliminatable. Not relevant for setters. */
10326 false, /* isAlwaysInSlot. Only relevant for getters. */
10327 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10328 false, /* isTypedMethod. Only relevant for methods. */
10329 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10330};
10331
10332MOZ_CAN_RUN_SCRIPT static bool
10333passNullableCastableObjectSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10334{
10335 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableCastableObjectSequence");
10336 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10339( cx, "TestJSImplInterface"
, "passNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10337 "TestJSImplInterface", "passNullableCastableObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10339( cx, "TestJSImplInterface"
, "passNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10338 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10339( cx, "TestJSImplInterface"
, "passNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10339 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10339( cx, "TestJSImplInterface"
, "passNullableCastableObjectSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10340
10341 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
10342 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableCastableObjectSequence", 1)) {
10343 return false;
10344 }
10345 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
10346 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
10347 if (objIsXray) {
10348 unwrappedObj.emplace(cx, obj);
10349 }
10350 binding_detail::AutoSequence<RefPtr<mozilla::dom::TestJSImplInterface>> arg0;
10351 if (args[0].isObject()) {
10352 JS::ForOfIterator iter(cx);
10353 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10354 return false;
10355 }
10356 if (!iter.valueIsIterable()) {
10357 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10358 return false;
10359 }
10360 binding_detail::AutoSequence<RefPtr<mozilla::dom::TestJSImplInterface>> &arr = arg0;
10361 JS::Rooted<JS::Value> temp(cx);
10362 while (true) {
10363 bool done;
10364 if (!iter.next(&temp, &done)) {
10365 return false;
10366 }
10367 if (done) {
10368 break;
10369 }
10370 RefPtr<mozilla::dom::TestJSImplInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
10371 if (!slotPtr) {
10372 JS_ReportOutOfMemory(cx);
10373 return false;
10374 }
10375 RefPtr<mozilla::dom::TestJSImplInterface>& slot = *slotPtr;
10376 if (temp.isObject()) {
10377 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
10378 {
10379 // Our JSContext should be in the right global to do unwrapping in.
10380 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(&temp, slot, cx);
10381 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
10382 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "TestJSImplInterface");
10383 return false;
10384 }
10385 }
10386 } else if (temp.isNullOrUndefined()) {
10387 slot = nullptr;
10388 } else {
10389 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
10390 return false;
10391 }
10392 }
10393 } else {
10394 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10395 return false;
10396 }
10397 if (objIsXray) {
10398 // Since our object is an Xray, we can just CheckedUnwrapStatic:
10399 // we know Xrays have no dynamic unwrap behavior.
10400 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
10401 if (!unwrappedObj.ref()) {
10402 return false;
10403 }
10404 }
10405 FastErrorResult rv;
10406 // NOTE: This assert does NOT call the function.
10407 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableCastableObjectSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
10408 MOZ_KnownLive(self)(self)->PassNullableCastableObjectSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
10409 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableCastableObjectSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableCastableObjectSequence"
)), 0))
) {
10410 return false;
10411 }
10412 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 10412); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10412; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10413 args.rval().setUndefined();
10414 return true;
10415}
10416
10417static const JSJitInfo passNullableCastableObjectSequence_methodinfo = {
10418 { (JSJitGetterOp)passNullableCastableObjectSequence },
10419 { prototypes::id::TestJSImplInterface },
10420 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
10421 JSJitInfo::Method,
10422 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10423 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10424 false, /* isInfallible. False in setters. */
10425 false, /* isMovable. Not relevant for setters. */
10426 false, /* isEliminatable. Not relevant for setters. */
10427 false, /* isAlwaysInSlot. Only relevant for getters. */
10428 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10429 false, /* isTypedMethod. Only relevant for methods. */
10430 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10431};
10432
10433MOZ_CAN_RUN_SCRIPT static bool
10434passCastableObjectNullableSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10435{
10436 BindingCallContext cx(cx_, "TestJSImplInterface.passCastableObjectNullableSequence");
10437 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10440( cx, "TestJSImplInterface"
, "passCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10438 "TestJSImplInterface", "passCastableObjectNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10440( cx, "TestJSImplInterface"
, "passCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10439 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10440( cx, "TestJSImplInterface"
, "passCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10440 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10440( cx, "TestJSImplInterface"
, "passCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10441
10442 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
10443 if (!args.requireAtLeast(cx, "TestJSImplInterface.passCastableObjectNullableSequence", 1)) {
10444 return false;
10445 }
10446 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
10447 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
10448 if (objIsXray) {
10449 unwrappedObj.emplace(cx, obj);
10450 }
10451 Nullable<Sequence<OwningNonNull<mozilla::dom::TestJSImplInterface>>> arg0;
10452 if (args[0].isObject()) {
10453 JS::ForOfIterator iter(cx);
10454 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10455 return false;
10456 }
10457 if (!iter.valueIsIterable()) {
10458 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10459 return false;
10460 }
10461 Sequence<OwningNonNull<mozilla::dom::TestJSImplInterface>> &arr = arg0.SetValue();
10462 JS::Rooted<JS::Value> temp(cx);
10463 while (true) {
10464 bool done;
10465 if (!iter.next(&temp, &done)) {
10466 return false;
10467 }
10468 if (done) {
10469 break;
10470 }
10471 OwningNonNull<mozilla::dom::TestJSImplInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
10472 if (!slotPtr) {
10473 JS_ReportOutOfMemory(cx);
10474 return false;
10475 }
10476 OwningNonNull<mozilla::dom::TestJSImplInterface>& slot = *slotPtr;
10477 if (temp.isObject()) {
10478 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
10479 {
10480 // Our JSContext should be in the right global to do unwrapping in.
10481 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(&temp, slot, cx);
10482 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
10483 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "TestJSImplInterface");
10484 return false;
10485 }
10486 }
10487 } else {
10488 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
10489 return false;
10490 }
10491 }
10492 } else if (args[0].isNullOrUndefined()) {
10493 arg0.SetNull();
10494 } else {
10495 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10496 return false;
10497 }
10498 if (objIsXray) {
10499 // Since our object is an Xray, we can just CheckedUnwrapStatic:
10500 // we know Xrays have no dynamic unwrap behavior.
10501 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
10502 if (!unwrappedObj.ref()) {
10503 return false;
10504 }
10505 }
10506 FastErrorResult rv;
10507 // NOTE: This assert does NOT call the function.
10508 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassCastableObjectNullableSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
10509 MOZ_KnownLive(self)(self)->PassCastableObjectNullableSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
10510 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passCastableObjectNullableSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passCastableObjectNullableSequence"
)), 0))
) {
10511 return false;
10512 }
10513 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 10513); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10513; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10514 args.rval().setUndefined();
10515 return true;
10516}
10517
10518static const JSJitInfo passCastableObjectNullableSequence_methodinfo = {
10519 { (JSJitGetterOp)passCastableObjectNullableSequence },
10520 { prototypes::id::TestJSImplInterface },
10521 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
10522 JSJitInfo::Method,
10523 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10524 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10525 false, /* isInfallible. False in setters. */
10526 false, /* isMovable. Not relevant for setters. */
10527 false, /* isEliminatable. Not relevant for setters. */
10528 false, /* isAlwaysInSlot. Only relevant for getters. */
10529 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10530 false, /* isTypedMethod. Only relevant for methods. */
10531 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10532};
10533
10534MOZ_CAN_RUN_SCRIPT static bool
10535passNullableCastableObjectNullableSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10536{
10537 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableCastableObjectNullableSequence");
10538 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10541( cx, "TestJSImplInterface"
, "passNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10539 "TestJSImplInterface", "passNullableCastableObjectNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10541( cx, "TestJSImplInterface"
, "passNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10540 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10541( cx, "TestJSImplInterface"
, "passNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10541 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10541( cx, "TestJSImplInterface"
, "passNullableCastableObjectNullableSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10542
10543 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
10544 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableCastableObjectNullableSequence", 1)) {
10545 return false;
10546 }
10547 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
10548 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
10549 if (objIsXray) {
10550 unwrappedObj.emplace(cx, obj);
10551 }
10552 Nullable<Sequence<RefPtr<mozilla::dom::TestJSImplInterface>>> arg0;
10553 if (args[0].isObject()) {
10554 JS::ForOfIterator iter(cx);
10555 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10556 return false;
10557 }
10558 if (!iter.valueIsIterable()) {
10559 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10560 return false;
10561 }
10562 Sequence<RefPtr<mozilla::dom::TestJSImplInterface>> &arr = arg0.SetValue();
10563 JS::Rooted<JS::Value> temp(cx);
10564 while (true) {
10565 bool done;
10566 if (!iter.next(&temp, &done)) {
10567 return false;
10568 }
10569 if (done) {
10570 break;
10571 }
10572 RefPtr<mozilla::dom::TestJSImplInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
10573 if (!slotPtr) {
10574 JS_ReportOutOfMemory(cx);
10575 return false;
10576 }
10577 RefPtr<mozilla::dom::TestJSImplInterface>& slot = *slotPtr;
10578 if (temp.isObject()) {
10579 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
10580 {
10581 // Our JSContext should be in the right global to do unwrapping in.
10582 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(&temp, slot, cx);
10583 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
10584 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "TestJSImplInterface");
10585 return false;
10586 }
10587 }
10588 } else if (temp.isNullOrUndefined()) {
10589 slot = nullptr;
10590 } else {
10591 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
10592 return false;
10593 }
10594 }
10595 } else if (args[0].isNullOrUndefined()) {
10596 arg0.SetNull();
10597 } else {
10598 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10599 return false;
10600 }
10601 if (objIsXray) {
10602 // Since our object is an Xray, we can just CheckedUnwrapStatic:
10603 // we know Xrays have no dynamic unwrap behavior.
10604 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
10605 if (!unwrappedObj.ref()) {
10606 return false;
10607 }
10608 }
10609 FastErrorResult rv;
10610 // NOTE: This assert does NOT call the function.
10611 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableCastableObjectNullableSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
10612 MOZ_KnownLive(self)(self)->PassNullableCastableObjectNullableSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
10613 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableCastableObjectNullableSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableCastableObjectNullableSequence"
)), 0))
) {
10614 return false;
10615 }
10616 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 10616); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10616; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10617 args.rval().setUndefined();
10618 return true;
10619}
10620
10621static const JSJitInfo passNullableCastableObjectNullableSequence_methodinfo = {
10622 { (JSJitGetterOp)passNullableCastableObjectNullableSequence },
10623 { prototypes::id::TestJSImplInterface },
10624 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
10625 JSJitInfo::Method,
10626 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10627 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10628 false, /* isInfallible. False in setters. */
10629 false, /* isMovable. Not relevant for setters. */
10630 false, /* isEliminatable. Not relevant for setters. */
10631 false, /* isAlwaysInSlot. Only relevant for getters. */
10632 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10633 false, /* isTypedMethod. Only relevant for methods. */
10634 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10635};
10636
10637MOZ_CAN_RUN_SCRIPT static bool
10638passOptionalSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10639{
10640 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalSequence");
10641 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10644( cx, "TestJSImplInterface"
, "passOptionalSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10642 "TestJSImplInterface", "passOptionalSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10644( cx, "TestJSImplInterface"
, "passOptionalSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10643 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10644( cx, "TestJSImplInterface"
, "passOptionalSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
10644 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10644( cx, "TestJSImplInterface"
, "passOptionalSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
10645
10646 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
10647 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
10648 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
10649 if (objIsXray) {
10650 unwrappedObj.emplace(cx, obj);
10651 }
10652 Optional<Sequence<int32_t>> arg0;
10653 if (args.hasDefined(0)) {
10654 arg0.Construct();
10655 if (args[0].isObject()) {
10656 JS::ForOfIterator iter(cx);
10657 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10658 return false;
10659 }
10660 if (!iter.valueIsIterable()) {
10661 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10662 return false;
10663 }
10664 Sequence<int32_t> &arr = arg0.Value();
10665 JS::Rooted<JS::Value> temp(cx);
10666 while (true) {
10667 bool done;
10668 if (!iter.next(&temp, &done)) {
10669 return false;
10670 }
10671 if (done) {
10672 break;
10673 }
10674 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
10675 if (!slotPtr) {
10676 JS_ReportOutOfMemory(cx);
10677 return false;
10678 }
10679 int32_t& slot = *slotPtr;
10680 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
10681 return false;
10682 }
10683 }
10684 } else {
10685 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10686 return false;
10687 }
10688 }
10689 if (objIsXray) {
10690 // Since our object is an Xray, we can just CheckedUnwrapStatic:
10691 // we know Xrays have no dynamic unwrap behavior.
10692 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
10693 if (!unwrappedObj.ref()) {
10694 return false;
10695 }
10696 }
10697 FastErrorResult rv;
10698 // NOTE: This assert does NOT call the function.
10699 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
10700 MOZ_KnownLive(self)(self)->PassOptionalSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
10701 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSequence"
)), 0))
) {
10702 return false;
10703 }
10704 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 10704); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10704; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10705 args.rval().setUndefined();
10706 return true;
10707}
10708
10709static const JSJitInfo passOptionalSequence_methodinfo = {
10710 { (JSJitGetterOp)passOptionalSequence },
10711 { prototypes::id::TestJSImplInterface },
10712 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
10713 JSJitInfo::Method,
10714 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10715 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10716 false, /* isInfallible. False in setters. */
10717 false, /* isMovable. Not relevant for setters. */
10718 false, /* isEliminatable. Not relevant for setters. */
10719 false, /* isAlwaysInSlot. Only relevant for getters. */
10720 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10721 false, /* isTypedMethod. Only relevant for methods. */
10722 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10723};
10724
10725MOZ_CAN_RUN_SCRIPT static bool
10726passOptionalSequenceWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10727{
10728 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalSequenceWithDefaultValue");
10729 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10732( cx, "TestJSImplInterface"
, "passOptionalSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10730 "TestJSImplInterface", "passOptionalSequenceWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10732( cx, "TestJSImplInterface"
, "passOptionalSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10731 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10732( cx, "TestJSImplInterface"
, "passOptionalSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10732 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10732( cx, "TestJSImplInterface"
, "passOptionalSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10733
10734 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
10735 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
10736 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
10737 if (objIsXray) {
10738 unwrappedObj.emplace(cx, obj);
10739 }
10740 binding_detail::AutoSequence<int32_t> arg0;
10741 if (args.hasDefined(0)) {
10742 if (args[0].isObject()) {
10743 JS::ForOfIterator iter(cx);
10744 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10745 return false;
10746 }
10747 if (!iter.valueIsIterable()) {
10748 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10749 return false;
10750 }
10751 binding_detail::AutoSequence<int32_t> &arr = arg0;
10752 JS::Rooted<JS::Value> temp(cx);
10753 while (true) {
10754 bool done;
10755 if (!iter.next(&temp, &done)) {
10756 return false;
10757 }
10758 if (done) {
10759 break;
10760 }
10761 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
10762 if (!slotPtr) {
10763 JS_ReportOutOfMemory(cx);
10764 return false;
10765 }
10766 int32_t& slot = *slotPtr;
10767 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
10768 return false;
10769 }
10770 }
10771 } else {
10772 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10773 return false;
10774 }
10775 } else {
10776 /* arg0 array is already empty; nothing to do */
10777 }
10778 if (objIsXray) {
10779 // Since our object is an Xray, we can just CheckedUnwrapStatic:
10780 // we know Xrays have no dynamic unwrap behavior.
10781 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
10782 if (!unwrappedObj.ref()) {
10783 return false;
10784 }
10785 }
10786 FastErrorResult rv;
10787 // NOTE: This assert does NOT call the function.
10788 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSequenceWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
10789 MOZ_KnownLive(self)(self)->PassOptionalSequenceWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
10790 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSequenceWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSequenceWithDefaultValue"
)), 0))
) {
10791 return false;
10792 }
10793 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 10793); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10793; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10794 args.rval().setUndefined();
10795 return true;
10796}
10797
10798static const JSJitInfo passOptionalSequenceWithDefaultValue_methodinfo = {
10799 { (JSJitGetterOp)passOptionalSequenceWithDefaultValue },
10800 { prototypes::id::TestJSImplInterface },
10801 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
10802 JSJitInfo::Method,
10803 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10804 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10805 false, /* isInfallible. False in setters. */
10806 false, /* isMovable. Not relevant for setters. */
10807 false, /* isEliminatable. Not relevant for setters. */
10808 false, /* isAlwaysInSlot. Only relevant for getters. */
10809 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10810 false, /* isTypedMethod. Only relevant for methods. */
10811 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10812};
10813
10814MOZ_CAN_RUN_SCRIPT static bool
10815passOptionalNullableSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10816{
10817 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableSequence");
10818 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10821( cx, "TestJSImplInterface"
, "passOptionalNullableSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10819 "TestJSImplInterface", "passOptionalNullableSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10821( cx, "TestJSImplInterface"
, "passOptionalNullableSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10820 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10821( cx, "TestJSImplInterface"
, "passOptionalNullableSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10821 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10821( cx, "TestJSImplInterface"
, "passOptionalNullableSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10822
10823 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
10824 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
10825 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
10826 if (objIsXray) {
10827 unwrappedObj.emplace(cx, obj);
10828 }
10829 Optional<Nullable<Sequence<int32_t>>> arg0;
10830 if (args.hasDefined(0)) {
10831 arg0.Construct();
10832 if (args[0].isObject()) {
10833 JS::ForOfIterator iter(cx);
10834 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10835 return false;
10836 }
10837 if (!iter.valueIsIterable()) {
10838 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10839 return false;
10840 }
10841 Sequence<int32_t> &arr = arg0.Value().SetValue();
10842 JS::Rooted<JS::Value> temp(cx);
10843 while (true) {
10844 bool done;
10845 if (!iter.next(&temp, &done)) {
10846 return false;
10847 }
10848 if (done) {
10849 break;
10850 }
10851 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
10852 if (!slotPtr) {
10853 JS_ReportOutOfMemory(cx);
10854 return false;
10855 }
10856 int32_t& slot = *slotPtr;
10857 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
10858 return false;
10859 }
10860 }
10861 } else if (args[0].isNullOrUndefined()) {
10862 arg0.Value().SetNull();
10863 } else {
10864 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10865 return false;
10866 }
10867 }
10868 if (objIsXray) {
10869 // Since our object is an Xray, we can just CheckedUnwrapStatic:
10870 // we know Xrays have no dynamic unwrap behavior.
10871 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
10872 if (!unwrappedObj.ref()) {
10873 return false;
10874 }
10875 }
10876 FastErrorResult rv;
10877 // NOTE: This assert does NOT call the function.
10878 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
10879 MOZ_KnownLive(self)(self)->PassOptionalNullableSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
10880 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequence"
)), 0))
) {
10881 return false;
10882 }
10883 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 10883); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10883; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10884 args.rval().setUndefined();
10885 return true;
10886}
10887
10888static const JSJitInfo passOptionalNullableSequence_methodinfo = {
10889 { (JSJitGetterOp)passOptionalNullableSequence },
10890 { prototypes::id::TestJSImplInterface },
10891 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
10892 JSJitInfo::Method,
10893 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10894 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10895 false, /* isInfallible. False in setters. */
10896 false, /* isMovable. Not relevant for setters. */
10897 false, /* isEliminatable. Not relevant for setters. */
10898 false, /* isAlwaysInSlot. Only relevant for getters. */
10899 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10900 false, /* isTypedMethod. Only relevant for methods. */
10901 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10902};
10903
10904MOZ_CAN_RUN_SCRIPT static bool
10905passOptionalNullableSequenceWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10906{
10907 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableSequenceWithDefaultValue");
10908 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject10911( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10909 "TestJSImplInterface", "passOptionalNullableSequenceWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject10911( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10910 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject10911( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
10911 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject10911( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
10912
10913 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
10914 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
10915 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
10916 if (objIsXray) {
10917 unwrappedObj.emplace(cx, obj);
10918 }
10919 Nullable<Sequence<int32_t>> arg0;
10920 if (args.hasDefined(0)) {
10921 if (args[0].isObject()) {
10922 JS::ForOfIterator iter(cx);
10923 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
10924 return false;
10925 }
10926 if (!iter.valueIsIterable()) {
10927 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10928 return false;
10929 }
10930 Sequence<int32_t> &arr = arg0.SetValue();
10931 JS::Rooted<JS::Value> temp(cx);
10932 while (true) {
10933 bool done;
10934 if (!iter.next(&temp, &done)) {
10935 return false;
10936 }
10937 if (done) {
10938 break;
10939 }
10940 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
10941 if (!slotPtr) {
10942 JS_ReportOutOfMemory(cx);
10943 return false;
10944 }
10945 int32_t& slot = *slotPtr;
10946 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
10947 return false;
10948 }
10949 }
10950 } else if (args[0].isNullOrUndefined()) {
10951 arg0.SetNull();
10952 } else {
10953 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
10954 return false;
10955 }
10956 } else {
10957 arg0.SetNull();
10958 }
10959 if (objIsXray) {
10960 // Since our object is an Xray, we can just CheckedUnwrapStatic:
10961 // we know Xrays have no dynamic unwrap behavior.
10962 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
10963 if (!unwrappedObj.ref()) {
10964 return false;
10965 }
10966 }
10967 FastErrorResult rv;
10968 // NOTE: This assert does NOT call the function.
10969 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
10970 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
10971 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceWithDefaultValue"
)), 0))
) {
10972 return false;
10973 }
10974 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 10974); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 10974; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
10975 args.rval().setUndefined();
10976 return true;
10977}
10978
10979static const JSJitInfo passOptionalNullableSequenceWithDefaultValue_methodinfo = {
10980 { (JSJitGetterOp)passOptionalNullableSequenceWithDefaultValue },
10981 { prototypes::id::TestJSImplInterface },
10982 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
10983 JSJitInfo::Method,
10984 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
10985 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
10986 false, /* isInfallible. False in setters. */
10987 false, /* isMovable. Not relevant for setters. */
10988 false, /* isEliminatable. Not relevant for setters. */
10989 false, /* isAlwaysInSlot. Only relevant for getters. */
10990 false, /* isLazilyCachedInSlot. Only relevant for getters. */
10991 false, /* isTypedMethod. Only relevant for methods. */
10992 0 /* Reserved slot index, if we're stored in a slot, else 0. */
10993};
10994
10995MOZ_CAN_RUN_SCRIPT static bool
10996passOptionalNullableSequenceWithDefaultValue2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
10997{
10998 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableSequenceWithDefaultValue2");
10999 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11002( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11000 "TestJSImplInterface", "passOptionalNullableSequenceWithDefaultValue2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11002( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11001 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11002( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11002 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11002( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
11003
11004 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
11005 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
11006 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
11007 if (objIsXray) {
11008 unwrappedObj.emplace(cx, obj);
11009 }
11010 Nullable<Sequence<int32_t>> arg0;
11011 if (args.hasDefined(0)) {
11012 if (args[0].isObject()) {
11013 JS::ForOfIterator iter(cx);
11014 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
11015 return false;
11016 }
11017 if (!iter.valueIsIterable()) {
11018 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
11019 return false;
11020 }
11021 Sequence<int32_t> &arr = arg0.SetValue();
11022 JS::Rooted<JS::Value> temp(cx);
11023 while (true) {
11024 bool done;
11025 if (!iter.next(&temp, &done)) {
11026 return false;
11027 }
11028 if (done) {
11029 break;
11030 }
11031 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
11032 if (!slotPtr) {
11033 JS_ReportOutOfMemory(cx);
11034 return false;
11035 }
11036 int32_t& slot = *slotPtr;
11037 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
11038 return false;
11039 }
11040 }
11041 } else if (args[0].isNullOrUndefined()) {
11042 arg0.SetNull();
11043 } else {
11044 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
11045 return false;
11046 }
11047 } else {
11048 arg0.SetValue();
11049 }
11050 if (objIsXray) {
11051 // Since our object is an Xray, we can just CheckedUnwrapStatic:
11052 // we know Xrays have no dynamic unwrap behavior.
11053 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
11054 if (!unwrappedObj.ref()) {
11055 return false;
11056 }
11057 }
11058 FastErrorResult rv;
11059 // NOTE: This assert does NOT call the function.
11060 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceWithDefaultValue2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
11061 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceWithDefaultValue2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
11062 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceWithDefaultValue2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceWithDefaultValue2"
)), 0))
) {
11063 return false;
11064 }
11065 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 11065); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11065; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11066 args.rval().setUndefined();
11067 return true;
11068}
11069
11070static const JSJitInfo passOptionalNullableSequenceWithDefaultValue2_methodinfo = {
11071 { (JSJitGetterOp)passOptionalNullableSequenceWithDefaultValue2 },
11072 { prototypes::id::TestJSImplInterface },
11073 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
11074 JSJitInfo::Method,
11075 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11076 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
11077 false, /* isInfallible. False in setters. */
11078 false, /* isMovable. Not relevant for setters. */
11079 false, /* isEliminatable. Not relevant for setters. */
11080 false, /* isAlwaysInSlot. Only relevant for getters. */
11081 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11082 false, /* isTypedMethod. Only relevant for methods. */
11083 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11084};
11085
11086MOZ_CAN_RUN_SCRIPT static bool
11087passOptionalObjectSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11088{
11089 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalObjectSequence");
11090 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11093( cx, "TestJSImplInterface"
, "passOptionalObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11091 "TestJSImplInterface", "passOptionalObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11093( cx, "TestJSImplInterface"
, "passOptionalObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11092 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11093( cx, "TestJSImplInterface"
, "passOptionalObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11093 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11093( cx, "TestJSImplInterface"
, "passOptionalObjectSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
11094
11095 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
11096 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
11097 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
11098 if (objIsXray) {
11099 unwrappedObj.emplace(cx, obj);
11100 }
11101 Optional<Sequence<OwningNonNull<mozilla::dom::TestJSImplInterface>>> arg0;
11102 if (args.hasDefined(0)) {
11103 arg0.Construct();
11104 if (args[0].isObject()) {
11105 JS::ForOfIterator iter(cx);
11106 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
11107 return false;
11108 }
11109 if (!iter.valueIsIterable()) {
11110 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
11111 return false;
11112 }
11113 Sequence<OwningNonNull<mozilla::dom::TestJSImplInterface>> &arr = arg0.Value();
11114 JS::Rooted<JS::Value> temp(cx);
11115 while (true) {
11116 bool done;
11117 if (!iter.next(&temp, &done)) {
11118 return false;
11119 }
11120 if (done) {
11121 break;
11122 }
11123 OwningNonNull<mozilla::dom::TestJSImplInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
11124 if (!slotPtr) {
11125 JS_ReportOutOfMemory(cx);
11126 return false;
11127 }
11128 OwningNonNull<mozilla::dom::TestJSImplInterface>& slot = *slotPtr;
11129 if (temp.isObject()) {
11130 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
11131 {
11132 // Our JSContext should be in the right global to do unwrapping in.
11133 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(&temp, slot, cx);
11134 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
11135 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "TestJSImplInterface");
11136 return false;
11137 }
11138 }
11139 } else {
11140 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
11141 return false;
11142 }
11143 }
11144 } else {
11145 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
11146 return false;
11147 }
11148 }
11149 if (objIsXray) {
11150 // Since our object is an Xray, we can just CheckedUnwrapStatic:
11151 // we know Xrays have no dynamic unwrap behavior.
11152 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
11153 if (!unwrappedObj.ref()) {
11154 return false;
11155 }
11156 }
11157 FastErrorResult rv;
11158 // NOTE: This assert does NOT call the function.
11159 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalObjectSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
11160 MOZ_KnownLive(self)(self)->PassOptionalObjectSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
11161 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalObjectSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalObjectSequence"
)), 0))
) {
11162 return false;
11163 }
11164 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 11164); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11164; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11165 args.rval().setUndefined();
11166 return true;
11167}
11168
11169static const JSJitInfo passOptionalObjectSequence_methodinfo = {
11170 { (JSJitGetterOp)passOptionalObjectSequence },
11171 { prototypes::id::TestJSImplInterface },
11172 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
11173 JSJitInfo::Method,
11174 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11175 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
11176 false, /* isInfallible. False in setters. */
11177 false, /* isMovable. Not relevant for setters. */
11178 false, /* isEliminatable. Not relevant for setters. */
11179 false, /* isAlwaysInSlot. Only relevant for getters. */
11180 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11181 false, /* isTypedMethod. Only relevant for methods. */
11182 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11183};
11184
11185MOZ_CAN_RUN_SCRIPT static bool
11186passExternalInterfaceSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11187{
11188 BindingCallContext cx(cx_, "TestJSImplInterface.passExternalInterfaceSequence");
11189 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11192( cx, "TestJSImplInterface"
, "passExternalInterfaceSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11190 "TestJSImplInterface", "passExternalInterfaceSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11192( cx, "TestJSImplInterface"
, "passExternalInterfaceSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11191 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11192( cx, "TestJSImplInterface"
, "passExternalInterfaceSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11192 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11192( cx, "TestJSImplInterface"
, "passExternalInterfaceSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
11193
11194 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
11195 if (!args.requireAtLeast(cx, "TestJSImplInterface.passExternalInterfaceSequence", 1)) {
11196 return false;
11197 }
11198 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
11199 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
11200 if (objIsXray) {
11201 unwrappedObj.emplace(cx, obj);
11202 }
11203 binding_detail::AutoSequence<RefPtr<mozilla::dom::TestExternalInterface>> arg0;
11204 if (args[0].isObject()) {
11205 JS::ForOfIterator iter(cx);
11206 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
11207 return false;
11208 }
11209 if (!iter.valueIsIterable()) {
11210 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
11211 return false;
11212 }
11213 binding_detail::AutoSequence<RefPtr<mozilla::dom::TestExternalInterface>> &arr = arg0;
11214 JS::Rooted<JS::Value> temp(cx);
11215 while (true) {
11216 bool done;
11217 if (!iter.next(&temp, &done)) {
11218 return false;
11219 }
11220 if (done) {
11221 break;
11222 }
11223 RefPtr<mozilla::dom::TestExternalInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
11224 if (!slotPtr) {
11225 JS_ReportOutOfMemory(cx);
11226 return false;
11227 }
11228 RefPtr<mozilla::dom::TestExternalInterface>& slot = *slotPtr;
11229 if (temp.isObject()) {
11230 static_assert(IsRefcounted<mozilla::dom::TestExternalInterface>::value, "We can only store refcounted classes.");
11231 RefPtr<mozilla::dom::TestExternalInterface> tempHolder;
11232 JS::Rooted<JSObject*> source(cx, &temp.toObject());
11233 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(tempHolder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(tempHolder
)))), 0)))
) {
11234 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "TestExternalInterface");
11235 return false;
11236 }
11237 MOZ_ASSERT(tempHolder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(tempHolder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(tempHolder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("tempHolder", "../TestJSImplGenBinding.cpp"
, 11237); AnnotateMozCrashReason("MOZ_ASSERT" "(" "tempHolder"
")"); do { *((volatile int*)__null) = 11237; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
11238 slot = tempHolder;
11239 } else {
11240 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
11241 return false;
11242 }
11243 }
11244 } else {
11245 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
11246 return false;
11247 }
11248 if (objIsXray) {
11249 // Since our object is an Xray, we can just CheckedUnwrapStatic:
11250 // we know Xrays have no dynamic unwrap behavior.
11251 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
11252 if (!unwrappedObj.ref()) {
11253 return false;
11254 }
11255 }
11256 FastErrorResult rv;
11257 // NOTE: This assert does NOT call the function.
11258 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassExternalInterfaceSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
11259 MOZ_KnownLive(self)(self)->PassExternalInterfaceSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
11260 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passExternalInterfaceSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passExternalInterfaceSequence"
)), 0))
) {
11261 return false;
11262 }
11263 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 11263); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11263; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11264 args.rval().setUndefined();
11265 return true;
11266}
11267
11268static const JSJitInfo passExternalInterfaceSequence_methodinfo = {
11269 { (JSJitGetterOp)passExternalInterfaceSequence },
11270 { prototypes::id::TestJSImplInterface },
11271 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
11272 JSJitInfo::Method,
11273 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11274 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
11275 false, /* isInfallible. False in setters. */
11276 false, /* isMovable. Not relevant for setters. */
11277 false, /* isEliminatable. Not relevant for setters. */
11278 false, /* isAlwaysInSlot. Only relevant for getters. */
11279 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11280 false, /* isTypedMethod. Only relevant for methods. */
11281 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11282};
11283
11284MOZ_CAN_RUN_SCRIPT static bool
11285passNullableExternalInterfaceSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11286{
11287 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableExternalInterfaceSequence");
11288 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11291( cx, "TestJSImplInterface"
, "passNullableExternalInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11289 "TestJSImplInterface", "passNullableExternalInterfaceSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11291( cx, "TestJSImplInterface"
, "passNullableExternalInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11290 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11291( cx, "TestJSImplInterface"
, "passNullableExternalInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11291 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11291( cx, "TestJSImplInterface"
, "passNullableExternalInterfaceSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
11292
11293 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
11294 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableExternalInterfaceSequence", 1)) {
11295 return false;
11296 }
11297 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
11298 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
11299 if (objIsXray) {
11300 unwrappedObj.emplace(cx, obj);
11301 }
11302 binding_detail::AutoSequence<RefPtr<mozilla::dom::TestExternalInterface>> arg0;
11303 if (args[0].isObject()) {
11304 JS::ForOfIterator iter(cx);
11305 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
11306 return false;
11307 }
11308 if (!iter.valueIsIterable()) {
11309 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
11310 return false;
11311 }
11312 binding_detail::AutoSequence<RefPtr<mozilla::dom::TestExternalInterface>> &arr = arg0;
11313 JS::Rooted<JS::Value> temp(cx);
11314 while (true) {
11315 bool done;
11316 if (!iter.next(&temp, &done)) {
11317 return false;
11318 }
11319 if (done) {
11320 break;
11321 }
11322 RefPtr<mozilla::dom::TestExternalInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
11323 if (!slotPtr) {
11324 JS_ReportOutOfMemory(cx);
11325 return false;
11326 }
11327 RefPtr<mozilla::dom::TestExternalInterface>& slot = *slotPtr;
11328 if (temp.isObject()) {
11329 static_assert(IsRefcounted<mozilla::dom::TestExternalInterface>::value, "We can only store refcounted classes.");
11330 RefPtr<mozilla::dom::TestExternalInterface> tempHolder;
11331 JS::Rooted<JSObject*> source(cx, &temp.toObject());
11332 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(tempHolder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(tempHolder
)))), 0)))
) {
11333 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "TestExternalInterface");
11334 return false;
11335 }
11336 MOZ_ASSERT(tempHolder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(tempHolder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(tempHolder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("tempHolder", "../TestJSImplGenBinding.cpp"
, 11336); AnnotateMozCrashReason("MOZ_ASSERT" "(" "tempHolder"
")"); do { *((volatile int*)__null) = 11336; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
11337 slot = tempHolder;
11338 } else if (temp.isNullOrUndefined()) {
11339 slot = nullptr;
11340 } else {
11341 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
11342 return false;
11343 }
11344 }
11345 } else {
11346 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
11347 return false;
11348 }
11349 if (objIsXray) {
11350 // Since our object is an Xray, we can just CheckedUnwrapStatic:
11351 // we know Xrays have no dynamic unwrap behavior.
11352 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
11353 if (!unwrappedObj.ref()) {
11354 return false;
11355 }
11356 }
11357 FastErrorResult rv;
11358 // NOTE: This assert does NOT call the function.
11359 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableExternalInterfaceSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
11360 MOZ_KnownLive(self)(self)->PassNullableExternalInterfaceSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
11361 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableExternalInterfaceSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableExternalInterfaceSequence"
)), 0))
) {
11362 return false;
11363 }
11364 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 11364); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11364; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11365 args.rval().setUndefined();
11366 return true;
11367}
11368
11369static const JSJitInfo passNullableExternalInterfaceSequence_methodinfo = {
11370 { (JSJitGetterOp)passNullableExternalInterfaceSequence },
11371 { prototypes::id::TestJSImplInterface },
11372 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
11373 JSJitInfo::Method,
11374 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11375 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
11376 false, /* isInfallible. False in setters. */
11377 false, /* isMovable. Not relevant for setters. */
11378 false, /* isEliminatable. Not relevant for setters. */
11379 false, /* isAlwaysInSlot. Only relevant for getters. */
11380 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11381 false, /* isTypedMethod. Only relevant for methods. */
11382 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11383};
11384
11385MOZ_CAN_RUN_SCRIPT static bool
11386receiveStringSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11387{
11388 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11391( cx, "TestJSImplInterface"
, "receiveStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11389 "TestJSImplInterface", "receiveStringSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11391( cx, "TestJSImplInterface"
, "receiveStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11390 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11391( cx, "TestJSImplInterface"
, "receiveStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11391 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11391( cx, "TestJSImplInterface"
, "receiveStringSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
11392
11393 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
11394 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
11395 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
11396 if (objIsXray) {
11397 unwrappedObj.emplace(cx, obj);
11398 }
11399 if (objIsXray) {
11400 // Since our object is an Xray, we can just CheckedUnwrapStatic:
11401 // we know Xrays have no dynamic unwrap behavior.
11402 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
11403 if (!unwrappedObj.ref()) {
11404 return false;
11405 }
11406 }
11407 FastErrorResult rv;
11408 nsTArray<nsString> result;
11409 // NOTE: This assert does NOT call the function.
11410 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveStringSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
11411 MOZ_KnownLive(self)(self)->ReceiveStringSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
11412 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveStringSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveStringSequence"
)), 0))
) {
11413 return false;
11414 }
11415 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 11415); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11415; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11416
11417 uint32_t length = result.Length();
11418 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
11419 if (!returnArray) {
11420 return false;
11421 }
11422 // Scope for 'tmp'
11423 {
11424 JS::Rooted<JS::Value> tmp(cx);
11425 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
11426 // Control block to let us common up the JS_DefineElement calls when there
11427 // are different ways to succeed at wrapping the object.
11428 do {
11429 if (!xpc::NonVoidStringToJsval(cx, result[sequenceIdx0], &tmp)) {
11430 return false;
11431 }
11432 break;
11433 } while (false);
11434 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
11435 JSPROP_ENUMERATE)) {
11436 return false;
11437 }
11438 }
11439 }
11440 args.rval().setObject(*returnArray);
11441 return true;
11442}
11443
11444static const JSJitInfo receiveStringSequence_methodinfo = {
11445 { (JSJitGetterOp)receiveStringSequence },
11446 { prototypes::id::TestJSImplInterface },
11447 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
11448 JSJitInfo::Method,
11449 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11450 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
11451 false, /* isInfallible. False in setters. */
11452 false, /* isMovable. Not relevant for setters. */
11453 false, /* isEliminatable. Not relevant for setters. */
11454 false, /* isAlwaysInSlot. Only relevant for getters. */
11455 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11456 false, /* isTypedMethod. Only relevant for methods. */
11457 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11458};
11459
11460MOZ_CAN_RUN_SCRIPT static bool
11461receiveByteStringSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11462{
11463 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11466( cx, "TestJSImplInterface"
, "receiveByteStringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11464 "TestJSImplInterface", "receiveByteStringSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11466( cx, "TestJSImplInterface"
, "receiveByteStringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11465 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11466( cx, "TestJSImplInterface"
, "receiveByteStringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11466 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11466( cx, "TestJSImplInterface"
, "receiveByteStringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
11467
11468 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
11469 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
11470 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
11471 if (objIsXray) {
11472 unwrappedObj.emplace(cx, obj);
11473 }
11474 if (objIsXray) {
11475 // Since our object is an Xray, we can just CheckedUnwrapStatic:
11476 // we know Xrays have no dynamic unwrap behavior.
11477 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
11478 if (!unwrappedObj.ref()) {
11479 return false;
11480 }
11481 }
11482 FastErrorResult rv;
11483 nsTArray<nsCString> result;
11484 // NOTE: This assert does NOT call the function.
11485 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveByteStringSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
11486 MOZ_KnownLive(self)(self)->ReceiveByteStringSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
11487 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveByteStringSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveByteStringSequence"
)), 0))
) {
11488 return false;
11489 }
11490 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 11490); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11490; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11491
11492 uint32_t length = result.Length();
11493 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
11494 if (!returnArray) {
11495 return false;
11496 }
11497 // Scope for 'tmp'
11498 {
11499 JS::Rooted<JS::Value> tmp(cx);
11500 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
11501 // Control block to let us common up the JS_DefineElement calls when there
11502 // are different ways to succeed at wrapping the object.
11503 do {
11504 if (!NonVoidByteStringToJsval(cx, result[sequenceIdx0], &tmp)) {
11505 return false;
11506 }
11507 break;
11508 } while (false);
11509 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
11510 JSPROP_ENUMERATE)) {
11511 return false;
11512 }
11513 }
11514 }
11515 args.rval().setObject(*returnArray);
11516 return true;
11517}
11518
11519static const JSJitInfo receiveByteStringSequence_methodinfo = {
11520 { (JSJitGetterOp)receiveByteStringSequence },
11521 { prototypes::id::TestJSImplInterface },
11522 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
11523 JSJitInfo::Method,
11524 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11525 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
11526 false, /* isInfallible. False in setters. */
11527 false, /* isMovable. Not relevant for setters. */
11528 false, /* isEliminatable. Not relevant for setters. */
11529 false, /* isAlwaysInSlot. Only relevant for getters. */
11530 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11531 false, /* isTypedMethod. Only relevant for methods. */
11532 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11533};
11534
11535MOZ_CAN_RUN_SCRIPT static bool
11536receiveUTF8StringSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11537{
11538 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11541( cx, "TestJSImplInterface"
, "receiveUTF8StringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11539 "TestJSImplInterface", "receiveUTF8StringSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11541( cx, "TestJSImplInterface"
, "receiveUTF8StringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11540 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11541( cx, "TestJSImplInterface"
, "receiveUTF8StringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11541 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11541( cx, "TestJSImplInterface"
, "receiveUTF8StringSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
11542
11543 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
11544 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
11545 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
11546 if (objIsXray) {
11547 unwrappedObj.emplace(cx, obj);
11548 }
11549 if (objIsXray) {
11550 // Since our object is an Xray, we can just CheckedUnwrapStatic:
11551 // we know Xrays have no dynamic unwrap behavior.
11552 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
11553 if (!unwrappedObj.ref()) {
11554 return false;
11555 }
11556 }
11557 FastErrorResult rv;
11558 nsTArray<nsCString> result;
11559 // NOTE: This assert does NOT call the function.
11560 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveUTF8StringSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
11561 MOZ_KnownLive(self)(self)->ReceiveUTF8StringSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
11562 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUTF8StringSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUTF8StringSequence"
)), 0))
) {
11563 return false;
11564 }
11565 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 11565); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11565; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11566
11567 uint32_t length = result.Length();
11568 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
11569 if (!returnArray) {
11570 return false;
11571 }
11572 // Scope for 'tmp'
11573 {
11574 JS::Rooted<JS::Value> tmp(cx);
11575 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
11576 // Control block to let us common up the JS_DefineElement calls when there
11577 // are different ways to succeed at wrapping the object.
11578 do {
11579 if (!NonVoidUTF8StringToJsval(cx, result[sequenceIdx0], &tmp)) {
11580 return false;
11581 }
11582 break;
11583 } while (false);
11584 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
11585 JSPROP_ENUMERATE)) {
11586 return false;
11587 }
11588 }
11589 }
11590 args.rval().setObject(*returnArray);
11591 return true;
11592}
11593
11594static const JSJitInfo receiveUTF8StringSequence_methodinfo = {
11595 { (JSJitGetterOp)receiveUTF8StringSequence },
11596 { prototypes::id::TestJSImplInterface },
11597 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
11598 JSJitInfo::Method,
11599 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11600 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
11601 false, /* isInfallible. False in setters. */
11602 false, /* isMovable. Not relevant for setters. */
11603 false, /* isEliminatable. Not relevant for setters. */
11604 false, /* isAlwaysInSlot. Only relevant for getters. */
11605 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11606 false, /* isTypedMethod. Only relevant for methods. */
11607 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11608};
11609
11610MOZ_CAN_RUN_SCRIPT static bool
11611receiveAnySequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11612{
11613 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11616( cx, "TestJSImplInterface"
, "receiveAnySequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11614 "TestJSImplInterface", "receiveAnySequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11616( cx, "TestJSImplInterface"
, "receiveAnySequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11615 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11616( cx, "TestJSImplInterface"
, "receiveAnySequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11616 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11616( cx, "TestJSImplInterface"
, "receiveAnySequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
11617
11618 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
11619 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
11620 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
11621 if (objIsXray) {
11622 unwrappedObj.emplace(cx, obj);
11623 }
11624 if (objIsXray) {
11625 // Since our object is an Xray, we can just CheckedUnwrapStatic:
11626 // we know Xrays have no dynamic unwrap behavior.
11627 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
11628 if (!unwrappedObj.ref()) {
11629 return false;
11630 }
11631 }
11632 FastErrorResult rv;
11633 nsTArray<JS::Value> result;
11634 SequenceRooter<JS::Value > resultRooter(cx, &result);
11635 // NOTE: This assert does NOT call the function.
11636 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveAnySequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
11637 MOZ_KnownLive(self)(self)->ReceiveAnySequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
11638 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveAnySequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveAnySequence"
)), 0))
) {
11639 return false;
11640 }
11641 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 11641); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11641; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11642
11643 uint32_t length = result.Length();
11644 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
11645 if (!returnArray) {
11646 return false;
11647 }
11648 // Scope for 'tmp'
11649 {
11650 JS::Rooted<JS::Value> tmp(cx);
11651 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
11652 // Control block to let us common up the JS_DefineElement calls when there
11653 // are different ways to succeed at wrapping the object.
11654 do {
11655 JS::ExposeValueToActiveJS(result[sequenceIdx0]);
11656 tmp.set(result[sequenceIdx0]);
11657 if (!MaybeWrapValue(cx, &tmp)) {
11658 return false;
11659 }
11660 break;
11661 } while (false);
11662 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
11663 JSPROP_ENUMERATE)) {
11664 return false;
11665 }
11666 }
11667 }
11668 args.rval().setObject(*returnArray);
11669 return true;
11670}
11671
11672static const JSJitInfo receiveAnySequence_methodinfo = {
11673 { (JSJitGetterOp)receiveAnySequence },
11674 { prototypes::id::TestJSImplInterface },
11675 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
11676 JSJitInfo::Method,
11677 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11678 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
11679 false, /* isInfallible. False in setters. */
11680 false, /* isMovable. Not relevant for setters. */
11681 false, /* isEliminatable. Not relevant for setters. */
11682 false, /* isAlwaysInSlot. Only relevant for getters. */
11683 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11684 false, /* isTypedMethod. Only relevant for methods. */
11685 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11686};
11687
11688MOZ_CAN_RUN_SCRIPT static bool
11689receiveNullableAnySequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11690{
11691 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11694( cx, "TestJSImplInterface"
, "receiveNullableAnySequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11692 "TestJSImplInterface", "receiveNullableAnySequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11694( cx, "TestJSImplInterface"
, "receiveNullableAnySequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11693 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11694( cx, "TestJSImplInterface"
, "receiveNullableAnySequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11694 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11694( cx, "TestJSImplInterface"
, "receiveNullableAnySequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
11695
11696 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
11697 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
11698 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
11699 if (objIsXray) {
11700 unwrappedObj.emplace(cx, obj);
11701 }
11702 if (objIsXray) {
11703 // Since our object is an Xray, we can just CheckedUnwrapStatic:
11704 // we know Xrays have no dynamic unwrap behavior.
11705 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
11706 if (!unwrappedObj.ref()) {
11707 return false;
11708 }
11709 }
11710 FastErrorResult rv;
11711 Nullable<nsTArray<JS::Value>> result;
11712 SequenceRooter<JS::Value > resultRooter(cx, &result);
11713 // NOTE: This assert does NOT call the function.
11714 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableAnySequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
11715 MOZ_KnownLive(self)(self)->ReceiveNullableAnySequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
11716 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableAnySequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableAnySequence"
)), 0))
) {
11717 return false;
11718 }
11719 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 11719); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11719; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11720
11721 if (result.IsNull()) {
11722 args.rval().setNull();
11723 return true;
11724 }
11725
11726 uint32_t length = result.Value().Length();
11727 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
11728 if (!returnArray) {
11729 return false;
11730 }
11731 // Scope for 'tmp'
11732 {
11733 JS::Rooted<JS::Value> tmp(cx);
11734 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
11735 // Control block to let us common up the JS_DefineElement calls when there
11736 // are different ways to succeed at wrapping the object.
11737 do {
11738 JS::ExposeValueToActiveJS(result.Value()[sequenceIdx0]);
11739 tmp.set(result.Value()[sequenceIdx0]);
11740 if (!MaybeWrapValue(cx, &tmp)) {
11741 return false;
11742 }
11743 break;
11744 } while (false);
11745 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
11746 JSPROP_ENUMERATE)) {
11747 return false;
11748 }
11749 }
11750 }
11751 args.rval().setObject(*returnArray);
11752 return true;
11753}
11754
11755static const JSJitInfo receiveNullableAnySequence_methodinfo = {
11756 { (JSJitGetterOp)receiveNullableAnySequence },
11757 { prototypes::id::TestJSImplInterface },
11758 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
11759 JSJitInfo::Method,
11760 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11761 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
11762 false, /* isInfallible. False in setters. */
11763 false, /* isMovable. Not relevant for setters. */
11764 false, /* isEliminatable. Not relevant for setters. */
11765 false, /* isAlwaysInSlot. Only relevant for getters. */
11766 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11767 false, /* isTypedMethod. Only relevant for methods. */
11768 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11769};
11770
11771MOZ_CAN_RUN_SCRIPT static bool
11772receiveObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11773{
11774 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11777( cx, "TestJSImplInterface"
, "receiveObjectSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11775 "TestJSImplInterface", "receiveObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11777( cx, "TestJSImplInterface"
, "receiveObjectSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11776 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11777( cx, "TestJSImplInterface"
, "receiveObjectSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11777 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11777( cx, "TestJSImplInterface"
, "receiveObjectSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
11778
11779 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
11780 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
11781 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
11782 if (objIsXray) {
11783 unwrappedObj.emplace(cx, obj);
11784 }
11785 if (objIsXray) {
11786 // Since our object is an Xray, we can just CheckedUnwrapStatic:
11787 // we know Xrays have no dynamic unwrap behavior.
11788 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
11789 if (!unwrappedObj.ref()) {
11790 return false;
11791 }
11792 }
11793 FastErrorResult rv;
11794 nsTArray<JSObject*> result;
11795 SequenceRooter<JSObject* > resultRooter(cx, &result);
11796 // NOTE: This assert does NOT call the function.
11797 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
11798 MOZ_KnownLive(self)(self)->ReceiveObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
11799 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveObjectSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveObjectSequence"
)), 0))
) {
11800 return false;
11801 }
11802 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 11802); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11802; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11803
11804 uint32_t length = result.Length();
11805 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
11806 if (!returnArray) {
11807 return false;
11808 }
11809 // Scope for 'tmp'
11810 {
11811 JS::Rooted<JS::Value> tmp(cx);
11812 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
11813 // Control block to let us common up the JS_DefineElement calls when there
11814 // are different ways to succeed at wrapping the object.
11815 do {
11816 JS::ExposeObjectToActiveJS(result[sequenceIdx0]);
11817 tmp.setObject(*result[sequenceIdx0]);
11818 if (!MaybeWrapObjectValue(cx, &tmp)) {
11819 return false;
11820 }
11821 break;
11822 } while (false);
11823 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
11824 JSPROP_ENUMERATE)) {
11825 return false;
11826 }
11827 }
11828 }
11829 args.rval().setObject(*returnArray);
11830 return true;
11831}
11832
11833static const JSJitInfo receiveObjectSequence_methodinfo = {
11834 { (JSJitGetterOp)receiveObjectSequence },
11835 { prototypes::id::TestJSImplInterface },
11836 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
11837 JSJitInfo::Method,
11838 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11839 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
11840 false, /* isInfallible. False in setters. */
11841 false, /* isMovable. Not relevant for setters. */
11842 false, /* isEliminatable. Not relevant for setters. */
11843 false, /* isAlwaysInSlot. Only relevant for getters. */
11844 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11845 false, /* isTypedMethod. Only relevant for methods. */
11846 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11847};
11848
11849MOZ_CAN_RUN_SCRIPT static bool
11850receiveNullableObjectSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11851{
11852 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11855( cx, "TestJSImplInterface"
, "receiveNullableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11853 "TestJSImplInterface", "receiveNullableObjectSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11855( cx, "TestJSImplInterface"
, "receiveNullableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11854 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11855( cx, "TestJSImplInterface"
, "receiveNullableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
11855 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11855( cx, "TestJSImplInterface"
, "receiveNullableObjectSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
11856
11857 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
11858 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
11859 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
11860 if (objIsXray) {
11861 unwrappedObj.emplace(cx, obj);
11862 }
11863 if (objIsXray) {
11864 // Since our object is an Xray, we can just CheckedUnwrapStatic:
11865 // we know Xrays have no dynamic unwrap behavior.
11866 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
11867 if (!unwrappedObj.ref()) {
11868 return false;
11869 }
11870 }
11871 FastErrorResult rv;
11872 nsTArray<JSObject*> result;
11873 SequenceRooter<JSObject* > resultRooter(cx, &result);
11874 // NOTE: This assert does NOT call the function.
11875 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
11876 MOZ_KnownLive(self)(self)->ReceiveNullableObjectSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
11877 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableObjectSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableObjectSequence"
)), 0))
) {
11878 return false;
11879 }
11880 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 11880); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 11880; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
11881
11882 uint32_t length = result.Length();
11883 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
11884 if (!returnArray) {
11885 return false;
11886 }
11887 // Scope for 'tmp'
11888 {
11889 JS::Rooted<JS::Value> tmp(cx);
11890 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
11891 // Control block to let us common up the JS_DefineElement calls when there
11892 // are different ways to succeed at wrapping the object.
11893 do {
11894 if (result[sequenceIdx0]) {
11895 JS::ExposeObjectToActiveJS(result[sequenceIdx0]);
11896 }
11897 tmp.setObjectOrNull(result[sequenceIdx0]);
11898 if (!MaybeWrapObjectOrNullValue(cx, &tmp)) {
11899 return false;
11900 }
11901 break;
11902 } while (false);
11903 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
11904 JSPROP_ENUMERATE)) {
11905 return false;
11906 }
11907 }
11908 }
11909 args.rval().setObject(*returnArray);
11910 return true;
11911}
11912
11913static const JSJitInfo receiveNullableObjectSequence_methodinfo = {
11914 { (JSJitGetterOp)receiveNullableObjectSequence },
11915 { prototypes::id::TestJSImplInterface },
11916 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
11917 JSJitInfo::Method,
11918 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
11919 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
11920 false, /* isInfallible. False in setters. */
11921 false, /* isMovable. Not relevant for setters. */
11922 false, /* isEliminatable. Not relevant for setters. */
11923 false, /* isAlwaysInSlot. Only relevant for getters. */
11924 false, /* isLazilyCachedInSlot. Only relevant for getters. */
11925 false, /* isTypedMethod. Only relevant for methods. */
11926 0 /* Reserved slot index, if we're stored in a slot, else 0. */
11927};
11928
11929MOZ_CAN_RUN_SCRIPT static bool
11930passSequenceOfSequences(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
11931{
11932 BindingCallContext cx(cx_, "TestJSImplInterface.passSequenceOfSequences");
11933 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject11936( cx, "TestJSImplInterface"
, "passSequenceOfSequences", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11934 "TestJSImplInterface", "passSequenceOfSequences", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject11936( cx, "TestJSImplInterface"
, "passSequenceOfSequences", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11935 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject11936( cx, "TestJSImplInterface"
, "passSequenceOfSequences", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
11936 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject11936( cx, "TestJSImplInterface"
, "passSequenceOfSequences", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
11937
11938 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
11939 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequenceOfSequences", 1)) {
11940 return false;
11941 }
11942 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
11943 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
11944 if (objIsXray) {
11945 unwrappedObj.emplace(cx, obj);
11946 }
11947 binding_detail::AutoSequence<Sequence<int32_t>> arg0;
11948 if (args[0].isObject()) {
11949 JS::ForOfIterator iter(cx);
11950 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
11951 return false;
11952 }
11953 if (!iter.valueIsIterable()) {
11954 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
11955 return false;
11956 }
11957 binding_detail::AutoSequence<Sequence<int32_t>> &arr = arg0;
11958 JS::Rooted<JS::Value> temp(cx);
11959 while (true) {
11960 bool done;
11961 if (!iter.next(&temp, &done)) {
11962 return false;
11963 }
11964 if (done) {
11965 break;
11966 }
11967 Sequence<int32_t>* slotPtr = arr.AppendElement(mozilla::fallible);
11968 if (!slotPtr) {
11969 JS_ReportOutOfMemory(cx);
11970 return false;
11971 }
11972 Sequence<int32_t>& slot = *slotPtr;
11973 if (temp.isObject()) {
11974 JS::ForOfIterator iter1(cx);
11975 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
11976 return false;
11977 }
11978 if (!iter1.valueIsIterable()) {
11979 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
11980 return false;
11981 }
11982 Sequence<int32_t> &arr1 = slot;
11983 JS::Rooted<JS::Value> temp1(cx);
11984 while (true) {
11985 bool done1;
11986 if (!iter1.next(&temp1, &done1)) {
11987 return false;
11988 }
11989 if (done1) {
11990 break;
11991 }
11992 int32_t* slotPtr1 = arr1.AppendElement(mozilla::fallible);
11993 if (!slotPtr1) {
11994 JS_ReportOutOfMemory(cx);
11995 return false;
11996 }
11997 int32_t& slot1 = *slotPtr1;
11998 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp1, "Element of element of argument 1", &slot1)) {
11999 return false;
12000 }
12001 }
12002 } else {
12003 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
12004 return false;
12005 }
12006 }
12007 } else {
12008 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
12009 return false;
12010 }
12011 if (objIsXray) {
12012 // Since our object is an Xray, we can just CheckedUnwrapStatic:
12013 // we know Xrays have no dynamic unwrap behavior.
12014 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
12015 if (!unwrappedObj.ref()) {
12016 return false;
12017 }
12018 }
12019 FastErrorResult rv;
12020 // NOTE: This assert does NOT call the function.
12021 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfSequences(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
12022 MOZ_KnownLive(self)(self)->PassSequenceOfSequences(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
12023 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfSequences"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfSequences"
)), 0))
) {
12024 return false;
12025 }
12026 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 12026); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12026; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12027 args.rval().setUndefined();
12028 return true;
12029}
12030
12031static const JSJitInfo passSequenceOfSequences_methodinfo = {
12032 { (JSJitGetterOp)passSequenceOfSequences },
12033 { prototypes::id::TestJSImplInterface },
12034 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
12035 JSJitInfo::Method,
12036 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12037 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12038 false, /* isInfallible. False in setters. */
12039 false, /* isMovable. Not relevant for setters. */
12040 false, /* isEliminatable. Not relevant for setters. */
12041 false, /* isAlwaysInSlot. Only relevant for getters. */
12042 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12043 false, /* isTypedMethod. Only relevant for methods. */
12044 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12045};
12046
12047MOZ_CAN_RUN_SCRIPT static bool
12048passSequenceOfSequencesOfSequences(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12049{
12050 BindingCallContext cx(cx_, "TestJSImplInterface.passSequenceOfSequencesOfSequences");
12051 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12054( cx, "TestJSImplInterface"
, "passSequenceOfSequencesOfSequences", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12052 "TestJSImplInterface", "passSequenceOfSequencesOfSequences", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12054( cx, "TestJSImplInterface"
, "passSequenceOfSequencesOfSequences", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12053 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12054( cx, "TestJSImplInterface"
, "passSequenceOfSequencesOfSequences", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12054 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12054( cx, "TestJSImplInterface"
, "passSequenceOfSequencesOfSequences", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
12055
12056 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
12057 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequenceOfSequencesOfSequences", 1)) {
12058 return false;
12059 }
12060 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
12061 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
12062 if (objIsXray) {
12063 unwrappedObj.emplace(cx, obj);
12064 }
12065 binding_detail::AutoSequence<Sequence<Sequence<int32_t>>> arg0;
12066 if (args[0].isObject()) {
12067 JS::ForOfIterator iter(cx);
12068 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
12069 return false;
12070 }
12071 if (!iter.valueIsIterable()) {
12072 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
12073 return false;
12074 }
12075 binding_detail::AutoSequence<Sequence<Sequence<int32_t>>> &arr = arg0;
12076 JS::Rooted<JS::Value> temp(cx);
12077 while (true) {
12078 bool done;
12079 if (!iter.next(&temp, &done)) {
12080 return false;
12081 }
12082 if (done) {
12083 break;
12084 }
12085 Sequence<Sequence<int32_t>>* slotPtr = arr.AppendElement(mozilla::fallible);
12086 if (!slotPtr) {
12087 JS_ReportOutOfMemory(cx);
12088 return false;
12089 }
12090 Sequence<Sequence<int32_t>>& slot = *slotPtr;
12091 if (temp.isObject()) {
12092 JS::ForOfIterator iter1(cx);
12093 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
12094 return false;
12095 }
12096 if (!iter1.valueIsIterable()) {
12097 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
12098 return false;
12099 }
12100 Sequence<Sequence<int32_t>> &arr1 = slot;
12101 JS::Rooted<JS::Value> temp1(cx);
12102 while (true) {
12103 bool done1;
12104 if (!iter1.next(&temp1, &done1)) {
12105 return false;
12106 }
12107 if (done1) {
12108 break;
12109 }
12110 Sequence<int32_t>* slotPtr1 = arr1.AppendElement(mozilla::fallible);
12111 if (!slotPtr1) {
12112 JS_ReportOutOfMemory(cx);
12113 return false;
12114 }
12115 Sequence<int32_t>& slot1 = *slotPtr1;
12116 if (temp1.isObject()) {
12117 JS::ForOfIterator iter2(cx);
12118 if (!iter2.init(temp1, JS::ForOfIterator::AllowNonIterable)) {
12119 return false;
12120 }
12121 if (!iter2.valueIsIterable()) {
12122 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of element of argument 1", "sequence");
12123 return false;
12124 }
12125 Sequence<int32_t> &arr2 = slot1;
12126 JS::Rooted<JS::Value> temp2(cx);
12127 while (true) {
12128 bool done2;
12129 if (!iter2.next(&temp2, &done2)) {
12130 return false;
12131 }
12132 if (done2) {
12133 break;
12134 }
12135 int32_t* slotPtr2 = arr2.AppendElement(mozilla::fallible);
12136 if (!slotPtr2) {
12137 JS_ReportOutOfMemory(cx);
12138 return false;
12139 }
12140 int32_t& slot2 = *slotPtr2;
12141 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp2, "Element of element of element of argument 1", &slot2)) {
12142 return false;
12143 }
12144 }
12145 } else {
12146 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of element of argument 1", "sequence");
12147 return false;
12148 }
12149 }
12150 } else {
12151 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
12152 return false;
12153 }
12154 }
12155 } else {
12156 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
12157 return false;
12158 }
12159 if (objIsXray) {
12160 // Since our object is an Xray, we can just CheckedUnwrapStatic:
12161 // we know Xrays have no dynamic unwrap behavior.
12162 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
12163 if (!unwrappedObj.ref()) {
12164 return false;
12165 }
12166 }
12167 FastErrorResult rv;
12168 // NOTE: This assert does NOT call the function.
12169 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfSequencesOfSequences(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
12170 MOZ_KnownLive(self)(self)->PassSequenceOfSequencesOfSequences(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
12171 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfSequencesOfSequences"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfSequencesOfSequences"
)), 0))
) {
12172 return false;
12173 }
12174 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 12174); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12174; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12175 args.rval().setUndefined();
12176 return true;
12177}
12178
12179static const JSJitInfo passSequenceOfSequencesOfSequences_methodinfo = {
12180 { (JSJitGetterOp)passSequenceOfSequencesOfSequences },
12181 { prototypes::id::TestJSImplInterface },
12182 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
12183 JSJitInfo::Method,
12184 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12185 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12186 false, /* isInfallible. False in setters. */
12187 false, /* isMovable. Not relevant for setters. */
12188 false, /* isEliminatable. Not relevant for setters. */
12189 false, /* isAlwaysInSlot. Only relevant for getters. */
12190 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12191 false, /* isTypedMethod. Only relevant for methods. */
12192 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12193};
12194
12195MOZ_CAN_RUN_SCRIPT static bool
12196passRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12197{
12198 BindingCallContext cx(cx_, "TestJSImplInterface.passRecord");
12199 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12202( cx, "TestJSImplInterface"
, "passRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
12200 "TestJSImplInterface", "passRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12202( cx, "TestJSImplInterface"
, "passRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
12201 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12202( cx, "TestJSImplInterface"
, "passRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
12202 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12202( cx, "TestJSImplInterface"
, "passRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
12203
12204 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
12205 if (!args.requireAtLeast(cx, "TestJSImplInterface.passRecord", 1)) {
12206 return false;
12207 }
12208 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
12209 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
12210 if (objIsXray) {
12211 unwrappedObj.emplace(cx, obj);
12212 }
12213 Record<nsString, int32_t> arg0;
12214 if (args[0].isObject()) {
12215 auto& recordEntries = arg0.Entries();
12216
12217 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
12218 JS::RootedVector<jsid> ids(cx);
12219 if (!js::GetPropertyKeys(cx, recordObj,
12220 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12221 return false;
12222 }
12223 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12224 JS_ReportOutOfMemory(cx);
12225 return false;
12226 }
12227 JS::Rooted<JS::Value> propNameValue(cx);
12228 JS::Rooted<JS::Value> temp(cx);
12229 JS::Rooted<jsid> curId(cx);
12230 JS::Rooted<JS::Value> idVal(cx);
12231 // Use a hashset to keep track of ids seen, to avoid
12232 // introducing nasty O(N^2) behavior scanning for them all the
12233 // time. Ideally we'd use a data structure with O(1) lookup
12234 // _and_ ordering for the MozMap, but we don't have one lying
12235 // around.
12236 nsTHashtable<nsStringHashKey> idsSeen;
12237 for (size_t i = 0; i < ids.length(); ++i) {
12238 curId = ids[i];
12239
12240 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
12241 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
12242 &desc)) {
12243 return false;
12244 }
12245
12246 if (desc.isNothing() || !desc->enumerable()) {
12247 continue;
12248 }
12249
12250 idVal = js::IdToValue(curId);
12251 nsString propName;
12252 // This will just throw if idVal is a Symbol, like the spec says
12253 // to do.
12254 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
12255 return false;
12256 }
12257
12258 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
12259 return false;
12260 }
12261
12262 Record<nsString, int32_t>::EntryType* entry;
12263 if (!idsSeen.EnsureInserted(propName)) {
12264 // Find the existing entry.
12265 auto idx = recordEntries.IndexOf(propName);
12266 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 12267); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12267; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
12267 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 12267); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12267; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
12268 // Now blow it away to make it look like it was just added
12269 // to the array, because it's not obvious that it's
12270 // safe to write to its already-initialized mValue via our
12271 // normal codegen conversions. For example, the value
12272 // could be a union and this would change its type, but
12273 // codegen assumes we won't do that.
12274 entry = recordEntries.ReconstructElementAt(idx);
12275 } else {
12276 // Safe to do an infallible append here, because we did a
12277 // SetCapacity above to the right capacity.
12278 entry = recordEntries.AppendElement();
12279 }
12280 entry->mKey = propName;
12281 int32_t& slot = entry->mValue;
12282 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot)) {
12283 return false;
12284 }
12285 }
12286 } else {
12287 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
12288 return false;
12289 }
12290 if (objIsXray) {
12291 // Since our object is an Xray, we can just CheckedUnwrapStatic:
12292 // we know Xrays have no dynamic unwrap behavior.
12293 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
12294 if (!unwrappedObj.ref()) {
12295 return false;
12296 }
12297 }
12298 FastErrorResult rv;
12299 // NOTE: This assert does NOT call the function.
12300 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
12301 MOZ_KnownLive(self)(self)->PassRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
12302 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecord"
)), 0))
) {
12303 return false;
12304 }
12305 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 12305); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12305; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12306 args.rval().setUndefined();
12307 return true;
12308}
12309
12310static const JSJitInfo passRecord_methodinfo = {
12311 { (JSJitGetterOp)passRecord },
12312 { prototypes::id::TestJSImplInterface },
12313 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
12314 JSJitInfo::Method,
12315 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12316 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12317 false, /* isInfallible. False in setters. */
12318 false, /* isMovable. Not relevant for setters. */
12319 false, /* isEliminatable. Not relevant for setters. */
12320 false, /* isAlwaysInSlot. Only relevant for getters. */
12321 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12322 false, /* isTypedMethod. Only relevant for methods. */
12323 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12324};
12325
12326MOZ_CAN_RUN_SCRIPT static bool
12327passNullableRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12328{
12329 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableRecord");
12330 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12333( cx, "TestJSImplInterface"
, "passNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
12331 "TestJSImplInterface", "passNullableRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12333( cx, "TestJSImplInterface"
, "passNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
12332 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12333( cx, "TestJSImplInterface"
, "passNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
12333 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12333( cx, "TestJSImplInterface"
, "passNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
12334
12335 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
12336 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableRecord", 1)) {
12337 return false;
12338 }
12339 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
12340 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
12341 if (objIsXray) {
12342 unwrappedObj.emplace(cx, obj);
12343 }
12344 Nullable<Record<nsString, int32_t>> arg0;
12345 if (args[0].isObject()) {
12346 auto& recordEntries = arg0.SetValue().Entries();
12347
12348 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
12349 JS::RootedVector<jsid> ids(cx);
12350 if (!js::GetPropertyKeys(cx, recordObj,
12351 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12352 return false;
12353 }
12354 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12355 JS_ReportOutOfMemory(cx);
12356 return false;
12357 }
12358 JS::Rooted<JS::Value> propNameValue(cx);
12359 JS::Rooted<JS::Value> temp(cx);
12360 JS::Rooted<jsid> curId(cx);
12361 JS::Rooted<JS::Value> idVal(cx);
12362 // Use a hashset to keep track of ids seen, to avoid
12363 // introducing nasty O(N^2) behavior scanning for them all the
12364 // time. Ideally we'd use a data structure with O(1) lookup
12365 // _and_ ordering for the MozMap, but we don't have one lying
12366 // around.
12367 nsTHashtable<nsStringHashKey> idsSeen;
12368 for (size_t i = 0; i < ids.length(); ++i) {
12369 curId = ids[i];
12370
12371 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
12372 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
12373 &desc)) {
12374 return false;
12375 }
12376
12377 if (desc.isNothing() || !desc->enumerable()) {
12378 continue;
12379 }
12380
12381 idVal = js::IdToValue(curId);
12382 nsString propName;
12383 // This will just throw if idVal is a Symbol, like the spec says
12384 // to do.
12385 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
12386 return false;
12387 }
12388
12389 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
12390 return false;
12391 }
12392
12393 Record<nsString, int32_t>::EntryType* entry;
12394 if (!idsSeen.EnsureInserted(propName)) {
12395 // Find the existing entry.
12396 auto idx = recordEntries.IndexOf(propName);
12397 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 12398); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12398; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
12398 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 12398); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12398; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
12399 // Now blow it away to make it look like it was just added
12400 // to the array, because it's not obvious that it's
12401 // safe to write to its already-initialized mValue via our
12402 // normal codegen conversions. For example, the value
12403 // could be a union and this would change its type, but
12404 // codegen assumes we won't do that.
12405 entry = recordEntries.ReconstructElementAt(idx);
12406 } else {
12407 // Safe to do an infallible append here, because we did a
12408 // SetCapacity above to the right capacity.
12409 entry = recordEntries.AppendElement();
12410 }
12411 entry->mKey = propName;
12412 int32_t& slot = entry->mValue;
12413 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot)) {
12414 return false;
12415 }
12416 }
12417 } else if (args[0].isNullOrUndefined()) {
12418 arg0.SetNull();
12419 } else {
12420 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
12421 return false;
12422 }
12423 if (objIsXray) {
12424 // Since our object is an Xray, we can just CheckedUnwrapStatic:
12425 // we know Xrays have no dynamic unwrap behavior.
12426 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
12427 if (!unwrappedObj.ref()) {
12428 return false;
12429 }
12430 }
12431 FastErrorResult rv;
12432 // NOTE: This assert does NOT call the function.
12433 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
12434 MOZ_KnownLive(self)(self)->PassNullableRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
12435 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableRecord"
)), 0))
) {
12436 return false;
12437 }
12438 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 12438); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12438; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12439 args.rval().setUndefined();
12440 return true;
12441}
12442
12443static const JSJitInfo passNullableRecord_methodinfo = {
12444 { (JSJitGetterOp)passNullableRecord },
12445 { prototypes::id::TestJSImplInterface },
12446 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
12447 JSJitInfo::Method,
12448 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12449 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12450 false, /* isInfallible. False in setters. */
12451 false, /* isMovable. Not relevant for setters. */
12452 false, /* isEliminatable. Not relevant for setters. */
12453 false, /* isAlwaysInSlot. Only relevant for getters. */
12454 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12455 false, /* isTypedMethod. Only relevant for methods. */
12456 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12457};
12458
12459MOZ_CAN_RUN_SCRIPT static bool
12460passRecordOfNullableInts(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12461{
12462 BindingCallContext cx(cx_, "TestJSImplInterface.passRecordOfNullableInts");
12463 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12466( cx, "TestJSImplInterface"
, "passRecordOfNullableInts", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12464 "TestJSImplInterface", "passRecordOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12466( cx, "TestJSImplInterface"
, "passRecordOfNullableInts", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12465 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12466( cx, "TestJSImplInterface"
, "passRecordOfNullableInts", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12466 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12466( cx, "TestJSImplInterface"
, "passRecordOfNullableInts", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
12467
12468 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
12469 if (!args.requireAtLeast(cx, "TestJSImplInterface.passRecordOfNullableInts", 1)) {
12470 return false;
12471 }
12472 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
12473 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
12474 if (objIsXray) {
12475 unwrappedObj.emplace(cx, obj);
12476 }
12477 Record<nsString, Nullable<int32_t>> arg0;
12478 if (args[0].isObject()) {
12479 auto& recordEntries = arg0.Entries();
12480
12481 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
12482 JS::RootedVector<jsid> ids(cx);
12483 if (!js::GetPropertyKeys(cx, recordObj,
12484 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12485 return false;
12486 }
12487 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12488 JS_ReportOutOfMemory(cx);
12489 return false;
12490 }
12491 JS::Rooted<JS::Value> propNameValue(cx);
12492 JS::Rooted<JS::Value> temp(cx);
12493 JS::Rooted<jsid> curId(cx);
12494 JS::Rooted<JS::Value> idVal(cx);
12495 // Use a hashset to keep track of ids seen, to avoid
12496 // introducing nasty O(N^2) behavior scanning for them all the
12497 // time. Ideally we'd use a data structure with O(1) lookup
12498 // _and_ ordering for the MozMap, but we don't have one lying
12499 // around.
12500 nsTHashtable<nsStringHashKey> idsSeen;
12501 for (size_t i = 0; i < ids.length(); ++i) {
12502 curId = ids[i];
12503
12504 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
12505 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
12506 &desc)) {
12507 return false;
12508 }
12509
12510 if (desc.isNothing() || !desc->enumerable()) {
12511 continue;
12512 }
12513
12514 idVal = js::IdToValue(curId);
12515 nsString propName;
12516 // This will just throw if idVal is a Symbol, like the spec says
12517 // to do.
12518 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
12519 return false;
12520 }
12521
12522 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
12523 return false;
12524 }
12525
12526 Record<nsString, Nullable<int32_t>>::EntryType* entry;
12527 if (!idsSeen.EnsureInserted(propName)) {
12528 // Find the existing entry.
12529 auto idx = recordEntries.IndexOf(propName);
12530 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 12531); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12531; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
12531 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 12531); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12531; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
12532 // Now blow it away to make it look like it was just added
12533 // to the array, because it's not obvious that it's
12534 // safe to write to its already-initialized mValue via our
12535 // normal codegen conversions. For example, the value
12536 // could be a union and this would change its type, but
12537 // codegen assumes we won't do that.
12538 entry = recordEntries.ReconstructElementAt(idx);
12539 } else {
12540 // Safe to do an infallible append here, because we did a
12541 // SetCapacity above to the right capacity.
12542 entry = recordEntries.AppendElement();
12543 }
12544 entry->mKey = propName;
12545 Nullable<int32_t>& slot = entry->mValue;
12546 if (temp.isNullOrUndefined()) {
12547 slot.SetNull();
12548 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot.SetValue())) {
12549 return false;
12550 }
12551 }
12552 } else {
12553 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
12554 return false;
12555 }
12556 if (objIsXray) {
12557 // Since our object is an Xray, we can just CheckedUnwrapStatic:
12558 // we know Xrays have no dynamic unwrap behavior.
12559 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
12560 if (!unwrappedObj.ref()) {
12561 return false;
12562 }
12563 }
12564 FastErrorResult rv;
12565 // NOTE: This assert does NOT call the function.
12566 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfNullableInts(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
12567 MOZ_KnownLive(self)(self)->PassRecordOfNullableInts(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
12568 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfNullableInts"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfNullableInts"
)), 0))
) {
12569 return false;
12570 }
12571 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 12571); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12571; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12572 args.rval().setUndefined();
12573 return true;
12574}
12575
12576static const JSJitInfo passRecordOfNullableInts_methodinfo = {
12577 { (JSJitGetterOp)passRecordOfNullableInts },
12578 { prototypes::id::TestJSImplInterface },
12579 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
12580 JSJitInfo::Method,
12581 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12582 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12583 false, /* isInfallible. False in setters. */
12584 false, /* isMovable. Not relevant for setters. */
12585 false, /* isEliminatable. Not relevant for setters. */
12586 false, /* isAlwaysInSlot. Only relevant for getters. */
12587 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12588 false, /* isTypedMethod. Only relevant for methods. */
12589 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12590};
12591
12592MOZ_CAN_RUN_SCRIPT static bool
12593passOptionalRecordOfNullableInts(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12594{
12595 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalRecordOfNullableInts");
12596 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12599( cx, "TestJSImplInterface"
, "passOptionalRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12597 "TestJSImplInterface", "passOptionalRecordOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12599( cx, "TestJSImplInterface"
, "passOptionalRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12598 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12599( cx, "TestJSImplInterface"
, "passOptionalRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12599 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12599( cx, "TestJSImplInterface"
, "passOptionalRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
12600
12601 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
12602 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
12603 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
12604 if (objIsXray) {
12605 unwrappedObj.emplace(cx, obj);
12606 }
12607 Optional<Record<nsString, Nullable<int32_t>>> arg0;
12608 if (args.hasDefined(0)) {
12609 arg0.Construct();
12610 if (args[0].isObject()) {
12611 auto& recordEntries = arg0.Value().Entries();
12612
12613 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
12614 JS::RootedVector<jsid> ids(cx);
12615 if (!js::GetPropertyKeys(cx, recordObj,
12616 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12617 return false;
12618 }
12619 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12620 JS_ReportOutOfMemory(cx);
12621 return false;
12622 }
12623 JS::Rooted<JS::Value> propNameValue(cx);
12624 JS::Rooted<JS::Value> temp(cx);
12625 JS::Rooted<jsid> curId(cx);
12626 JS::Rooted<JS::Value> idVal(cx);
12627 // Use a hashset to keep track of ids seen, to avoid
12628 // introducing nasty O(N^2) behavior scanning for them all the
12629 // time. Ideally we'd use a data structure with O(1) lookup
12630 // _and_ ordering for the MozMap, but we don't have one lying
12631 // around.
12632 nsTHashtable<nsStringHashKey> idsSeen;
12633 for (size_t i = 0; i < ids.length(); ++i) {
12634 curId = ids[i];
12635
12636 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
12637 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
12638 &desc)) {
12639 return false;
12640 }
12641
12642 if (desc.isNothing() || !desc->enumerable()) {
12643 continue;
12644 }
12645
12646 idVal = js::IdToValue(curId);
12647 nsString propName;
12648 // This will just throw if idVal is a Symbol, like the spec says
12649 // to do.
12650 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
12651 return false;
12652 }
12653
12654 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
12655 return false;
12656 }
12657
12658 Record<nsString, Nullable<int32_t>>::EntryType* entry;
12659 if (!idsSeen.EnsureInserted(propName)) {
12660 // Find the existing entry.
12661 auto idx = recordEntries.IndexOf(propName);
12662 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 12663); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12663; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
12663 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 12663); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12663; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
12664 // Now blow it away to make it look like it was just added
12665 // to the array, because it's not obvious that it's
12666 // safe to write to its already-initialized mValue via our
12667 // normal codegen conversions. For example, the value
12668 // could be a union and this would change its type, but
12669 // codegen assumes we won't do that.
12670 entry = recordEntries.ReconstructElementAt(idx);
12671 } else {
12672 // Safe to do an infallible append here, because we did a
12673 // SetCapacity above to the right capacity.
12674 entry = recordEntries.AppendElement();
12675 }
12676 entry->mKey = propName;
12677 Nullable<int32_t>& slot = entry->mValue;
12678 if (temp.isNullOrUndefined()) {
12679 slot.SetNull();
12680 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot.SetValue())) {
12681 return false;
12682 }
12683 }
12684 } else {
12685 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
12686 return false;
12687 }
12688 }
12689 if (objIsXray) {
12690 // Since our object is an Xray, we can just CheckedUnwrapStatic:
12691 // we know Xrays have no dynamic unwrap behavior.
12692 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
12693 if (!unwrappedObj.ref()) {
12694 return false;
12695 }
12696 }
12697 FastErrorResult rv;
12698 // NOTE: This assert does NOT call the function.
12699 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalRecordOfNullableInts(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
12700 MOZ_KnownLive(self)(self)->PassOptionalRecordOfNullableInts(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
12701 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalRecordOfNullableInts"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalRecordOfNullableInts"
)), 0))
) {
12702 return false;
12703 }
12704 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 12704); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12704; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12705 args.rval().setUndefined();
12706 return true;
12707}
12708
12709static const JSJitInfo passOptionalRecordOfNullableInts_methodinfo = {
12710 { (JSJitGetterOp)passOptionalRecordOfNullableInts },
12711 { prototypes::id::TestJSImplInterface },
12712 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
12713 JSJitInfo::Method,
12714 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12715 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12716 false, /* isInfallible. False in setters. */
12717 false, /* isMovable. Not relevant for setters. */
12718 false, /* isEliminatable. Not relevant for setters. */
12719 false, /* isAlwaysInSlot. Only relevant for getters. */
12720 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12721 false, /* isTypedMethod. Only relevant for methods. */
12722 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12723};
12724
12725MOZ_CAN_RUN_SCRIPT static bool
12726passOptionalNullableRecordOfNullableInts(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12727{
12728 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableRecordOfNullableInts");
12729 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12732( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12730 "TestJSImplInterface", "passOptionalNullableRecordOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12732( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12731 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12732( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12732 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12732( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
12733
12734 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
12735 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
12736 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
12737 if (objIsXray) {
12738 unwrappedObj.emplace(cx, obj);
12739 }
12740 Optional<Nullable<Record<nsString, Nullable<int32_t>>>> arg0;
12741 if (args.hasDefined(0)) {
12742 arg0.Construct();
12743 if (args[0].isObject()) {
12744 auto& recordEntries = arg0.Value().SetValue().Entries();
12745
12746 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
12747 JS::RootedVector<jsid> ids(cx);
12748 if (!js::GetPropertyKeys(cx, recordObj,
12749 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12750 return false;
12751 }
12752 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12753 JS_ReportOutOfMemory(cx);
12754 return false;
12755 }
12756 JS::Rooted<JS::Value> propNameValue(cx);
12757 JS::Rooted<JS::Value> temp(cx);
12758 JS::Rooted<jsid> curId(cx);
12759 JS::Rooted<JS::Value> idVal(cx);
12760 // Use a hashset to keep track of ids seen, to avoid
12761 // introducing nasty O(N^2) behavior scanning for them all the
12762 // time. Ideally we'd use a data structure with O(1) lookup
12763 // _and_ ordering for the MozMap, but we don't have one lying
12764 // around.
12765 nsTHashtable<nsStringHashKey> idsSeen;
12766 for (size_t i = 0; i < ids.length(); ++i) {
12767 curId = ids[i];
12768
12769 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
12770 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
12771 &desc)) {
12772 return false;
12773 }
12774
12775 if (desc.isNothing() || !desc->enumerable()) {
12776 continue;
12777 }
12778
12779 idVal = js::IdToValue(curId);
12780 nsString propName;
12781 // This will just throw if idVal is a Symbol, like the spec says
12782 // to do.
12783 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
12784 return false;
12785 }
12786
12787 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
12788 return false;
12789 }
12790
12791 Record<nsString, Nullable<int32_t>>::EntryType* entry;
12792 if (!idsSeen.EnsureInserted(propName)) {
12793 // Find the existing entry.
12794 auto idx = recordEntries.IndexOf(propName);
12795 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 12796); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12796; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
12796 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 12796); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12796; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
12797 // Now blow it away to make it look like it was just added
12798 // to the array, because it's not obvious that it's
12799 // safe to write to its already-initialized mValue via our
12800 // normal codegen conversions. For example, the value
12801 // could be a union and this would change its type, but
12802 // codegen assumes we won't do that.
12803 entry = recordEntries.ReconstructElementAt(idx);
12804 } else {
12805 // Safe to do an infallible append here, because we did a
12806 // SetCapacity above to the right capacity.
12807 entry = recordEntries.AppendElement();
12808 }
12809 entry->mKey = propName;
12810 Nullable<int32_t>& slot = entry->mValue;
12811 if (temp.isNullOrUndefined()) {
12812 slot.SetNull();
12813 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot.SetValue())) {
12814 return false;
12815 }
12816 }
12817 } else if (args[0].isNullOrUndefined()) {
12818 arg0.Value().SetNull();
12819 } else {
12820 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
12821 return false;
12822 }
12823 }
12824 if (objIsXray) {
12825 // Since our object is an Xray, we can just CheckedUnwrapStatic:
12826 // we know Xrays have no dynamic unwrap behavior.
12827 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
12828 if (!unwrappedObj.ref()) {
12829 return false;
12830 }
12831 }
12832 FastErrorResult rv;
12833 // NOTE: This assert does NOT call the function.
12834 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfNullableInts(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
12835 MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfNullableInts(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
12836 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableRecordOfNullableInts"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableRecordOfNullableInts"
)), 0))
) {
12837 return false;
12838 }
12839 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 12839); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12839; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12840 args.rval().setUndefined();
12841 return true;
12842}
12843
12844static const JSJitInfo passOptionalNullableRecordOfNullableInts_methodinfo = {
12845 { (JSJitGetterOp)passOptionalNullableRecordOfNullableInts },
12846 { prototypes::id::TestJSImplInterface },
12847 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
12848 JSJitInfo::Method,
12849 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12850 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12851 false, /* isInfallible. False in setters. */
12852 false, /* isMovable. Not relevant for setters. */
12853 false, /* isEliminatable. Not relevant for setters. */
12854 false, /* isAlwaysInSlot. Only relevant for getters. */
12855 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12856 false, /* isTypedMethod. Only relevant for methods. */
12857 0 /* Reserved slot index, if we're stored in a slot, else 0. */
12858};
12859
12860MOZ_CAN_RUN_SCRIPT static bool
12861passCastableObjectRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
12862{
12863 BindingCallContext cx(cx_, "TestJSImplInterface.passCastableObjectRecord");
12864 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject12867( cx, "TestJSImplInterface"
, "passCastableObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12865 "TestJSImplInterface", "passCastableObjectRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject12867( cx, "TestJSImplInterface"
, "passCastableObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12866 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject12867( cx, "TestJSImplInterface"
, "passCastableObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
12867 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject12867( cx, "TestJSImplInterface"
, "passCastableObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
12868
12869 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
12870 if (!args.requireAtLeast(cx, "TestJSImplInterface.passCastableObjectRecord", 1)) {
12871 return false;
12872 }
12873 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
12874 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
12875 if (objIsXray) {
12876 unwrappedObj.emplace(cx, obj);
12877 }
12878 Record<nsString, OwningNonNull<mozilla::dom::TestInterface>> arg0;
12879 if (args[0].isObject()) {
12880 auto& recordEntries = arg0.Entries();
12881
12882 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
12883 JS::RootedVector<jsid> ids(cx);
12884 if (!js::GetPropertyKeys(cx, recordObj,
12885 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
12886 return false;
12887 }
12888 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
12889 JS_ReportOutOfMemory(cx);
12890 return false;
12891 }
12892 JS::Rooted<JS::Value> propNameValue(cx);
12893 JS::Rooted<JS::Value> temp(cx);
12894 JS::Rooted<jsid> curId(cx);
12895 JS::Rooted<JS::Value> idVal(cx);
12896 // Use a hashset to keep track of ids seen, to avoid
12897 // introducing nasty O(N^2) behavior scanning for them all the
12898 // time. Ideally we'd use a data structure with O(1) lookup
12899 // _and_ ordering for the MozMap, but we don't have one lying
12900 // around.
12901 nsTHashtable<nsStringHashKey> idsSeen;
12902 for (size_t i = 0; i < ids.length(); ++i) {
12903 curId = ids[i];
12904
12905 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
12906 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
12907 &desc)) {
12908 return false;
12909 }
12910
12911 if (desc.isNothing() || !desc->enumerable()) {
12912 continue;
12913 }
12914
12915 idVal = js::IdToValue(curId);
12916 nsString propName;
12917 // This will just throw if idVal is a Symbol, like the spec says
12918 // to do.
12919 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
12920 return false;
12921 }
12922
12923 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
12924 return false;
12925 }
12926
12927 Record<nsString, OwningNonNull<mozilla::dom::TestInterface>>::EntryType* entry;
12928 if (!idsSeen.EnsureInserted(propName)) {
12929 // Find the existing entry.
12930 auto idx = recordEntries.IndexOf(propName);
12931 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 12932); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12932; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
12932 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 12932); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 12932; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
12933 // Now blow it away to make it look like it was just added
12934 // to the array, because it's not obvious that it's
12935 // safe to write to its already-initialized mValue via our
12936 // normal codegen conversions. For example, the value
12937 // could be a union and this would change its type, but
12938 // codegen assumes we won't do that.
12939 entry = recordEntries.ReconstructElementAt(idx);
12940 } else {
12941 // Safe to do an infallible append here, because we did a
12942 // SetCapacity above to the right capacity.
12943 entry = recordEntries.AppendElement();
12944 }
12945 entry->mKey = propName;
12946 OwningNonNull<mozilla::dom::TestInterface>& slot = entry->mValue;
12947 if (temp.isObject()) {
12948 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
12949 {
12950 // Our JSContext should be in the right global to do unwrapping in.
12951 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
12952 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
12953 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "TestInterface");
12954 return false;
12955 }
12956 }
12957 } else {
12958 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
12959 return false;
12960 }
12961 }
12962 } else {
12963 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
12964 return false;
12965 }
12966 if (objIsXray) {
12967 // Since our object is an Xray, we can just CheckedUnwrapStatic:
12968 // we know Xrays have no dynamic unwrap behavior.
12969 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
12970 if (!unwrappedObj.ref()) {
12971 return false;
12972 }
12973 }
12974 FastErrorResult rv;
12975 // NOTE: This assert does NOT call the function.
12976 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassCastableObjectRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
12977 MOZ_KnownLive(self)(self)->PassCastableObjectRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
12978 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passCastableObjectRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passCastableObjectRecord"
)), 0))
) {
12979 return false;
12980 }
12981 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 12981); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 12981; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
12982 args.rval().setUndefined();
12983 return true;
12984}
12985
12986static const JSJitInfo passCastableObjectRecord_methodinfo = {
12987 { (JSJitGetterOp)passCastableObjectRecord },
12988 { prototypes::id::TestJSImplInterface },
12989 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
12990 JSJitInfo::Method,
12991 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
12992 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
12993 false, /* isInfallible. False in setters. */
12994 false, /* isMovable. Not relevant for setters. */
12995 false, /* isEliminatable. Not relevant for setters. */
12996 false, /* isAlwaysInSlot. Only relevant for getters. */
12997 false, /* isLazilyCachedInSlot. Only relevant for getters. */
12998 false, /* isTypedMethod. Only relevant for methods. */
12999 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13000};
13001
13002MOZ_CAN_RUN_SCRIPT static bool
13003passNullableCastableObjectRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13004{
13005 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableCastableObjectRecord");
13006 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13009( cx, "TestJSImplInterface"
, "passNullableCastableObjectRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13007 "TestJSImplInterface", "passNullableCastableObjectRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13009( cx, "TestJSImplInterface"
, "passNullableCastableObjectRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13008 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13009( cx, "TestJSImplInterface"
, "passNullableCastableObjectRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13009 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13009( cx, "TestJSImplInterface"
, "passNullableCastableObjectRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
13010
13011 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
13012 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableCastableObjectRecord", 1)) {
13013 return false;
13014 }
13015 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
13016 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
13017 if (objIsXray) {
13018 unwrappedObj.emplace(cx, obj);
13019 }
13020 Record<nsString, RefPtr<mozilla::dom::TestInterface>> arg0;
13021 if (args[0].isObject()) {
13022 auto& recordEntries = arg0.Entries();
13023
13024 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
13025 JS::RootedVector<jsid> ids(cx);
13026 if (!js::GetPropertyKeys(cx, recordObj,
13027 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
13028 return false;
13029 }
13030 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
13031 JS_ReportOutOfMemory(cx);
13032 return false;
13033 }
13034 JS::Rooted<JS::Value> propNameValue(cx);
13035 JS::Rooted<JS::Value> temp(cx);
13036 JS::Rooted<jsid> curId(cx);
13037 JS::Rooted<JS::Value> idVal(cx);
13038 // Use a hashset to keep track of ids seen, to avoid
13039 // introducing nasty O(N^2) behavior scanning for them all the
13040 // time. Ideally we'd use a data structure with O(1) lookup
13041 // _and_ ordering for the MozMap, but we don't have one lying
13042 // around.
13043 nsTHashtable<nsStringHashKey> idsSeen;
13044 for (size_t i = 0; i < ids.length(); ++i) {
13045 curId = ids[i];
13046
13047 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
13048 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
13049 &desc)) {
13050 return false;
13051 }
13052
13053 if (desc.isNothing() || !desc->enumerable()) {
13054 continue;
13055 }
13056
13057 idVal = js::IdToValue(curId);
13058 nsString propName;
13059 // This will just throw if idVal is a Symbol, like the spec says
13060 // to do.
13061 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
13062 return false;
13063 }
13064
13065 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
13066 return false;
13067 }
13068
13069 Record<nsString, RefPtr<mozilla::dom::TestInterface>>::EntryType* entry;
13070 if (!idsSeen.EnsureInserted(propName)) {
13071 // Find the existing entry.
13072 auto idx = recordEntries.IndexOf(propName);
13073 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 13074); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13074; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
13074 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 13074); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13074; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13075 // Now blow it away to make it look like it was just added
13076 // to the array, because it's not obvious that it's
13077 // safe to write to its already-initialized mValue via our
13078 // normal codegen conversions. For example, the value
13079 // could be a union and this would change its type, but
13080 // codegen assumes we won't do that.
13081 entry = recordEntries.ReconstructElementAt(idx);
13082 } else {
13083 // Safe to do an infallible append here, because we did a
13084 // SetCapacity above to the right capacity.
13085 entry = recordEntries.AppendElement();
13086 }
13087 entry->mKey = propName;
13088 RefPtr<mozilla::dom::TestInterface>& slot = entry->mValue;
13089 if (temp.isObject()) {
13090 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
13091 {
13092 // Our JSContext should be in the right global to do unwrapping in.
13093 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
13094 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
13095 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "TestInterface");
13096 return false;
13097 }
13098 }
13099 } else if (temp.isNullOrUndefined()) {
13100 slot = nullptr;
13101 } else {
13102 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
13103 return false;
13104 }
13105 }
13106 } else {
13107 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
13108 return false;
13109 }
13110 if (objIsXray) {
13111 // Since our object is an Xray, we can just CheckedUnwrapStatic:
13112 // we know Xrays have no dynamic unwrap behavior.
13113 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
13114 if (!unwrappedObj.ref()) {
13115 return false;
13116 }
13117 }
13118 FastErrorResult rv;
13119 // NOTE: This assert does NOT call the function.
13120 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableCastableObjectRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
13121 MOZ_KnownLive(self)(self)->PassNullableCastableObjectRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
13122 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableCastableObjectRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableCastableObjectRecord"
)), 0))
) {
13123 return false;
13124 }
13125 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 13125); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13125; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13126 args.rval().setUndefined();
13127 return true;
13128}
13129
13130static const JSJitInfo passNullableCastableObjectRecord_methodinfo = {
13131 { (JSJitGetterOp)passNullableCastableObjectRecord },
13132 { prototypes::id::TestJSImplInterface },
13133 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
13134 JSJitInfo::Method,
13135 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13136 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
13137 false, /* isInfallible. False in setters. */
13138 false, /* isMovable. Not relevant for setters. */
13139 false, /* isEliminatable. Not relevant for setters. */
13140 false, /* isAlwaysInSlot. Only relevant for getters. */
13141 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13142 false, /* isTypedMethod. Only relevant for methods. */
13143 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13144};
13145
13146MOZ_CAN_RUN_SCRIPT static bool
13147passCastableObjectNullableRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13148{
13149 BindingCallContext cx(cx_, "TestJSImplInterface.passCastableObjectNullableRecord");
13150 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13153( cx, "TestJSImplInterface"
, "passCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13151 "TestJSImplInterface", "passCastableObjectNullableRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13153( cx, "TestJSImplInterface"
, "passCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13152 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13153( cx, "TestJSImplInterface"
, "passCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13153 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13153( cx, "TestJSImplInterface"
, "passCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
13154
13155 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
13156 if (!args.requireAtLeast(cx, "TestJSImplInterface.passCastableObjectNullableRecord", 1)) {
13157 return false;
13158 }
13159 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
13160 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
13161 if (objIsXray) {
13162 unwrappedObj.emplace(cx, obj);
13163 }
13164 Nullable<Record<nsString, OwningNonNull<mozilla::dom::TestInterface>>> arg0;
13165 if (args[0].isObject()) {
13166 auto& recordEntries = arg0.SetValue().Entries();
13167
13168 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
13169 JS::RootedVector<jsid> ids(cx);
13170 if (!js::GetPropertyKeys(cx, recordObj,
13171 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
13172 return false;
13173 }
13174 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
13175 JS_ReportOutOfMemory(cx);
13176 return false;
13177 }
13178 JS::Rooted<JS::Value> propNameValue(cx);
13179 JS::Rooted<JS::Value> temp(cx);
13180 JS::Rooted<jsid> curId(cx);
13181 JS::Rooted<JS::Value> idVal(cx);
13182 // Use a hashset to keep track of ids seen, to avoid
13183 // introducing nasty O(N^2) behavior scanning for them all the
13184 // time. Ideally we'd use a data structure with O(1) lookup
13185 // _and_ ordering for the MozMap, but we don't have one lying
13186 // around.
13187 nsTHashtable<nsStringHashKey> idsSeen;
13188 for (size_t i = 0; i < ids.length(); ++i) {
13189 curId = ids[i];
13190
13191 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
13192 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
13193 &desc)) {
13194 return false;
13195 }
13196
13197 if (desc.isNothing() || !desc->enumerable()) {
13198 continue;
13199 }
13200
13201 idVal = js::IdToValue(curId);
13202 nsString propName;
13203 // This will just throw if idVal is a Symbol, like the spec says
13204 // to do.
13205 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
13206 return false;
13207 }
13208
13209 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
13210 return false;
13211 }
13212
13213 Record<nsString, OwningNonNull<mozilla::dom::TestInterface>>::EntryType* entry;
13214 if (!idsSeen.EnsureInserted(propName)) {
13215 // Find the existing entry.
13216 auto idx = recordEntries.IndexOf(propName);
13217 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 13218); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13218; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
13218 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 13218); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13218; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13219 // Now blow it away to make it look like it was just added
13220 // to the array, because it's not obvious that it's
13221 // safe to write to its already-initialized mValue via our
13222 // normal codegen conversions. For example, the value
13223 // could be a union and this would change its type, but
13224 // codegen assumes we won't do that.
13225 entry = recordEntries.ReconstructElementAt(idx);
13226 } else {
13227 // Safe to do an infallible append here, because we did a
13228 // SetCapacity above to the right capacity.
13229 entry = recordEntries.AppendElement();
13230 }
13231 entry->mKey = propName;
13232 OwningNonNull<mozilla::dom::TestInterface>& slot = entry->mValue;
13233 if (temp.isObject()) {
13234 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
13235 {
13236 // Our JSContext should be in the right global to do unwrapping in.
13237 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
13238 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
13239 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "TestInterface");
13240 return false;
13241 }
13242 }
13243 } else {
13244 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
13245 return false;
13246 }
13247 }
13248 } else if (args[0].isNullOrUndefined()) {
13249 arg0.SetNull();
13250 } else {
13251 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
13252 return false;
13253 }
13254 if (objIsXray) {
13255 // Since our object is an Xray, we can just CheckedUnwrapStatic:
13256 // we know Xrays have no dynamic unwrap behavior.
13257 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
13258 if (!unwrappedObj.ref()) {
13259 return false;
13260 }
13261 }
13262 FastErrorResult rv;
13263 // NOTE: This assert does NOT call the function.
13264 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassCastableObjectNullableRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
13265 MOZ_KnownLive(self)(self)->PassCastableObjectNullableRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
13266 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passCastableObjectNullableRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passCastableObjectNullableRecord"
)), 0))
) {
13267 return false;
13268 }
13269 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 13269); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13269; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13270 args.rval().setUndefined();
13271 return true;
13272}
13273
13274static const JSJitInfo passCastableObjectNullableRecord_methodinfo = {
13275 { (JSJitGetterOp)passCastableObjectNullableRecord },
13276 { prototypes::id::TestJSImplInterface },
13277 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
13278 JSJitInfo::Method,
13279 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13280 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
13281 false, /* isInfallible. False in setters. */
13282 false, /* isMovable. Not relevant for setters. */
13283 false, /* isEliminatable. Not relevant for setters. */
13284 false, /* isAlwaysInSlot. Only relevant for getters. */
13285 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13286 false, /* isTypedMethod. Only relevant for methods. */
13287 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13288};
13289
13290MOZ_CAN_RUN_SCRIPT static bool
13291passNullableCastableObjectNullableRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13292{
13293 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableCastableObjectNullableRecord");
13294 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13297( cx, "TestJSImplInterface"
, "passNullableCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13295 "TestJSImplInterface", "passNullableCastableObjectNullableRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13297( cx, "TestJSImplInterface"
, "passNullableCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13296 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13297( cx, "TestJSImplInterface"
, "passNullableCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13297 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13297( cx, "TestJSImplInterface"
, "passNullableCastableObjectNullableRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
13298
13299 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
13300 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableCastableObjectNullableRecord", 1)) {
13301 return false;
13302 }
13303 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
13304 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
13305 if (objIsXray) {
13306 unwrappedObj.emplace(cx, obj);
13307 }
13308 Nullable<Record<nsString, RefPtr<mozilla::dom::TestInterface>>> arg0;
13309 if (args[0].isObject()) {
13310 auto& recordEntries = arg0.SetValue().Entries();
13311
13312 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
13313 JS::RootedVector<jsid> ids(cx);
13314 if (!js::GetPropertyKeys(cx, recordObj,
13315 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
13316 return false;
13317 }
13318 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
13319 JS_ReportOutOfMemory(cx);
13320 return false;
13321 }
13322 JS::Rooted<JS::Value> propNameValue(cx);
13323 JS::Rooted<JS::Value> temp(cx);
13324 JS::Rooted<jsid> curId(cx);
13325 JS::Rooted<JS::Value> idVal(cx);
13326 // Use a hashset to keep track of ids seen, to avoid
13327 // introducing nasty O(N^2) behavior scanning for them all the
13328 // time. Ideally we'd use a data structure with O(1) lookup
13329 // _and_ ordering for the MozMap, but we don't have one lying
13330 // around.
13331 nsTHashtable<nsStringHashKey> idsSeen;
13332 for (size_t i = 0; i < ids.length(); ++i) {
13333 curId = ids[i];
13334
13335 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
13336 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
13337 &desc)) {
13338 return false;
13339 }
13340
13341 if (desc.isNothing() || !desc->enumerable()) {
13342 continue;
13343 }
13344
13345 idVal = js::IdToValue(curId);
13346 nsString propName;
13347 // This will just throw if idVal is a Symbol, like the spec says
13348 // to do.
13349 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
13350 return false;
13351 }
13352
13353 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
13354 return false;
13355 }
13356
13357 Record<nsString, RefPtr<mozilla::dom::TestInterface>>::EntryType* entry;
13358 if (!idsSeen.EnsureInserted(propName)) {
13359 // Find the existing entry.
13360 auto idx = recordEntries.IndexOf(propName);
13361 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 13362); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13362; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
13362 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 13362); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13362; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13363 // Now blow it away to make it look like it was just added
13364 // to the array, because it's not obvious that it's
13365 // safe to write to its already-initialized mValue via our
13366 // normal codegen conversions. For example, the value
13367 // could be a union and this would change its type, but
13368 // codegen assumes we won't do that.
13369 entry = recordEntries.ReconstructElementAt(idx);
13370 } else {
13371 // Safe to do an infallible append here, because we did a
13372 // SetCapacity above to the right capacity.
13373 entry = recordEntries.AppendElement();
13374 }
13375 entry->mKey = propName;
13376 RefPtr<mozilla::dom::TestInterface>& slot = entry->mValue;
13377 if (temp.isObject()) {
13378 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
13379 {
13380 // Our JSContext should be in the right global to do unwrapping in.
13381 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
13382 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
13383 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "TestInterface");
13384 return false;
13385 }
13386 }
13387 } else if (temp.isNullOrUndefined()) {
13388 slot = nullptr;
13389 } else {
13390 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
13391 return false;
13392 }
13393 }
13394 } else if (args[0].isNullOrUndefined()) {
13395 arg0.SetNull();
13396 } else {
13397 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
13398 return false;
13399 }
13400 if (objIsXray) {
13401 // Since our object is an Xray, we can just CheckedUnwrapStatic:
13402 // we know Xrays have no dynamic unwrap behavior.
13403 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
13404 if (!unwrappedObj.ref()) {
13405 return false;
13406 }
13407 }
13408 FastErrorResult rv;
13409 // NOTE: This assert does NOT call the function.
13410 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableCastableObjectNullableRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
13411 MOZ_KnownLive(self)(self)->PassNullableCastableObjectNullableRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
13412 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableCastableObjectNullableRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableCastableObjectNullableRecord"
)), 0))
) {
13413 return false;
13414 }
13415 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 13415); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13415; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13416 args.rval().setUndefined();
13417 return true;
13418}
13419
13420static const JSJitInfo passNullableCastableObjectNullableRecord_methodinfo = {
13421 { (JSJitGetterOp)passNullableCastableObjectNullableRecord },
13422 { prototypes::id::TestJSImplInterface },
13423 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
13424 JSJitInfo::Method,
13425 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13426 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
13427 false, /* isInfallible. False in setters. */
13428 false, /* isMovable. Not relevant for setters. */
13429 false, /* isEliminatable. Not relevant for setters. */
13430 false, /* isAlwaysInSlot. Only relevant for getters. */
13431 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13432 false, /* isTypedMethod. Only relevant for methods. */
13433 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13434};
13435
13436MOZ_CAN_RUN_SCRIPT static bool
13437passOptionalRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13438{
13439 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalRecord");
13440 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13443( cx, "TestJSImplInterface"
, "passOptionalRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13441 "TestJSImplInterface", "passOptionalRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13443( cx, "TestJSImplInterface"
, "passOptionalRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13442 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13443( cx, "TestJSImplInterface"
, "passOptionalRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
13443 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13443( cx, "TestJSImplInterface"
, "passOptionalRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
13444
13445 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
13446 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
13447 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
13448 if (objIsXray) {
13449 unwrappedObj.emplace(cx, obj);
13450 }
13451 Optional<Record<nsString, int32_t>> arg0;
13452 if (args.hasDefined(0)) {
13453 arg0.Construct();
13454 if (args[0].isObject()) {
13455 auto& recordEntries = arg0.Value().Entries();
13456
13457 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
13458 JS::RootedVector<jsid> ids(cx);
13459 if (!js::GetPropertyKeys(cx, recordObj,
13460 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
13461 return false;
13462 }
13463 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
13464 JS_ReportOutOfMemory(cx);
13465 return false;
13466 }
13467 JS::Rooted<JS::Value> propNameValue(cx);
13468 JS::Rooted<JS::Value> temp(cx);
13469 JS::Rooted<jsid> curId(cx);
13470 JS::Rooted<JS::Value> idVal(cx);
13471 // Use a hashset to keep track of ids seen, to avoid
13472 // introducing nasty O(N^2) behavior scanning for them all the
13473 // time. Ideally we'd use a data structure with O(1) lookup
13474 // _and_ ordering for the MozMap, but we don't have one lying
13475 // around.
13476 nsTHashtable<nsStringHashKey> idsSeen;
13477 for (size_t i = 0; i < ids.length(); ++i) {
13478 curId = ids[i];
13479
13480 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
13481 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
13482 &desc)) {
13483 return false;
13484 }
13485
13486 if (desc.isNothing() || !desc->enumerable()) {
13487 continue;
13488 }
13489
13490 idVal = js::IdToValue(curId);
13491 nsString propName;
13492 // This will just throw if idVal is a Symbol, like the spec says
13493 // to do.
13494 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
13495 return false;
13496 }
13497
13498 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
13499 return false;
13500 }
13501
13502 Record<nsString, int32_t>::EntryType* entry;
13503 if (!idsSeen.EnsureInserted(propName)) {
13504 // Find the existing entry.
13505 auto idx = recordEntries.IndexOf(propName);
13506 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 13507); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13507; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
13507 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 13507); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13507; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13508 // Now blow it away to make it look like it was just added
13509 // to the array, because it's not obvious that it's
13510 // safe to write to its already-initialized mValue via our
13511 // normal codegen conversions. For example, the value
13512 // could be a union and this would change its type, but
13513 // codegen assumes we won't do that.
13514 entry = recordEntries.ReconstructElementAt(idx);
13515 } else {
13516 // Safe to do an infallible append here, because we did a
13517 // SetCapacity above to the right capacity.
13518 entry = recordEntries.AppendElement();
13519 }
13520 entry->mKey = propName;
13521 int32_t& slot = entry->mValue;
13522 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot)) {
13523 return false;
13524 }
13525 }
13526 } else {
13527 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
13528 return false;
13529 }
13530 }
13531 if (objIsXray) {
13532 // Since our object is an Xray, we can just CheckedUnwrapStatic:
13533 // we know Xrays have no dynamic unwrap behavior.
13534 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
13535 if (!unwrappedObj.ref()) {
13536 return false;
13537 }
13538 }
13539 FastErrorResult rv;
13540 // NOTE: This assert does NOT call the function.
13541 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
13542 MOZ_KnownLive(self)(self)->PassOptionalRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
13543 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalRecord"
)), 0))
) {
13544 return false;
13545 }
13546 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 13546); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13546; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13547 args.rval().setUndefined();
13548 return true;
13549}
13550
13551static const JSJitInfo passOptionalRecord_methodinfo = {
13552 { (JSJitGetterOp)passOptionalRecord },
13553 { prototypes::id::TestJSImplInterface },
13554 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
13555 JSJitInfo::Method,
13556 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13557 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
13558 false, /* isInfallible. False in setters. */
13559 false, /* isMovable. Not relevant for setters. */
13560 false, /* isEliminatable. Not relevant for setters. */
13561 false, /* isAlwaysInSlot. Only relevant for getters. */
13562 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13563 false, /* isTypedMethod. Only relevant for methods. */
13564 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13565};
13566
13567MOZ_CAN_RUN_SCRIPT static bool
13568passOptionalNullableRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13569{
13570 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableRecord");
13571 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13574( cx, "TestJSImplInterface"
, "passOptionalNullableRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13572 "TestJSImplInterface", "passOptionalNullableRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13574( cx, "TestJSImplInterface"
, "passOptionalNullableRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13573 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13574( cx, "TestJSImplInterface"
, "passOptionalNullableRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13574 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13574( cx, "TestJSImplInterface"
, "passOptionalNullableRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
13575
13576 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
13577 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
13578 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
13579 if (objIsXray) {
13580 unwrappedObj.emplace(cx, obj);
13581 }
13582 Optional<Nullable<Record<nsString, int32_t>>> arg0;
13583 if (args.hasDefined(0)) {
13584 arg0.Construct();
13585 if (args[0].isObject()) {
13586 auto& recordEntries = arg0.Value().SetValue().Entries();
13587
13588 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
13589 JS::RootedVector<jsid> ids(cx);
13590 if (!js::GetPropertyKeys(cx, recordObj,
13591 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
13592 return false;
13593 }
13594 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
13595 JS_ReportOutOfMemory(cx);
13596 return false;
13597 }
13598 JS::Rooted<JS::Value> propNameValue(cx);
13599 JS::Rooted<JS::Value> temp(cx);
13600 JS::Rooted<jsid> curId(cx);
13601 JS::Rooted<JS::Value> idVal(cx);
13602 // Use a hashset to keep track of ids seen, to avoid
13603 // introducing nasty O(N^2) behavior scanning for them all the
13604 // time. Ideally we'd use a data structure with O(1) lookup
13605 // _and_ ordering for the MozMap, but we don't have one lying
13606 // around.
13607 nsTHashtable<nsStringHashKey> idsSeen;
13608 for (size_t i = 0; i < ids.length(); ++i) {
13609 curId = ids[i];
13610
13611 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
13612 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
13613 &desc)) {
13614 return false;
13615 }
13616
13617 if (desc.isNothing() || !desc->enumerable()) {
13618 continue;
13619 }
13620
13621 idVal = js::IdToValue(curId);
13622 nsString propName;
13623 // This will just throw if idVal is a Symbol, like the spec says
13624 // to do.
13625 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
13626 return false;
13627 }
13628
13629 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
13630 return false;
13631 }
13632
13633 Record<nsString, int32_t>::EntryType* entry;
13634 if (!idsSeen.EnsureInserted(propName)) {
13635 // Find the existing entry.
13636 auto idx = recordEntries.IndexOf(propName);
13637 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 13638); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13638; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
13638 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 13638); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13638; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13639 // Now blow it away to make it look like it was just added
13640 // to the array, because it's not obvious that it's
13641 // safe to write to its already-initialized mValue via our
13642 // normal codegen conversions. For example, the value
13643 // could be a union and this would change its type, but
13644 // codegen assumes we won't do that.
13645 entry = recordEntries.ReconstructElementAt(idx);
13646 } else {
13647 // Safe to do an infallible append here, because we did a
13648 // SetCapacity above to the right capacity.
13649 entry = recordEntries.AppendElement();
13650 }
13651 entry->mKey = propName;
13652 int32_t& slot = entry->mValue;
13653 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot)) {
13654 return false;
13655 }
13656 }
13657 } else if (args[0].isNullOrUndefined()) {
13658 arg0.Value().SetNull();
13659 } else {
13660 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
13661 return false;
13662 }
13663 }
13664 if (objIsXray) {
13665 // Since our object is an Xray, we can just CheckedUnwrapStatic:
13666 // we know Xrays have no dynamic unwrap behavior.
13667 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
13668 if (!unwrappedObj.ref()) {
13669 return false;
13670 }
13671 }
13672 FastErrorResult rv;
13673 // NOTE: This assert does NOT call the function.
13674 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
13675 MOZ_KnownLive(self)(self)->PassOptionalNullableRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
13676 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableRecord"
)), 0))
) {
13677 return false;
13678 }
13679 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 13679); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13679; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13680 args.rval().setUndefined();
13681 return true;
13682}
13683
13684static const JSJitInfo passOptionalNullableRecord_methodinfo = {
13685 { (JSJitGetterOp)passOptionalNullableRecord },
13686 { prototypes::id::TestJSImplInterface },
13687 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
13688 JSJitInfo::Method,
13689 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13690 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
13691 false, /* isInfallible. False in setters. */
13692 false, /* isMovable. Not relevant for setters. */
13693 false, /* isEliminatable. Not relevant for setters. */
13694 false, /* isAlwaysInSlot. Only relevant for getters. */
13695 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13696 false, /* isTypedMethod. Only relevant for methods. */
13697 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13698};
13699
13700MOZ_CAN_RUN_SCRIPT static bool
13701passOptionalNullableRecordWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13702{
13703 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableRecordWithDefaultValue");
13704 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13707( cx, "TestJSImplInterface"
, "passOptionalNullableRecordWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13705 "TestJSImplInterface", "passOptionalNullableRecordWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13707( cx, "TestJSImplInterface"
, "passOptionalNullableRecordWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13706 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13707( cx, "TestJSImplInterface"
, "passOptionalNullableRecordWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13707 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13707( cx, "TestJSImplInterface"
, "passOptionalNullableRecordWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
13708
13709 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
13710 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
13711 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
13712 if (objIsXray) {
13713 unwrappedObj.emplace(cx, obj);
13714 }
13715 Nullable<Record<nsString, int32_t>> arg0;
13716 if (args.hasDefined(0)) {
13717 if (args[0].isObject()) {
13718 auto& recordEntries = arg0.SetValue().Entries();
13719
13720 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
13721 JS::RootedVector<jsid> ids(cx);
13722 if (!js::GetPropertyKeys(cx, recordObj,
13723 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
13724 return false;
13725 }
13726 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
13727 JS_ReportOutOfMemory(cx);
13728 return false;
13729 }
13730 JS::Rooted<JS::Value> propNameValue(cx);
13731 JS::Rooted<JS::Value> temp(cx);
13732 JS::Rooted<jsid> curId(cx);
13733 JS::Rooted<JS::Value> idVal(cx);
13734 // Use a hashset to keep track of ids seen, to avoid
13735 // introducing nasty O(N^2) behavior scanning for them all the
13736 // time. Ideally we'd use a data structure with O(1) lookup
13737 // _and_ ordering for the MozMap, but we don't have one lying
13738 // around.
13739 nsTHashtable<nsStringHashKey> idsSeen;
13740 for (size_t i = 0; i < ids.length(); ++i) {
13741 curId = ids[i];
13742
13743 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
13744 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
13745 &desc)) {
13746 return false;
13747 }
13748
13749 if (desc.isNothing() || !desc->enumerable()) {
13750 continue;
13751 }
13752
13753 idVal = js::IdToValue(curId);
13754 nsString propName;
13755 // This will just throw if idVal is a Symbol, like the spec says
13756 // to do.
13757 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
13758 return false;
13759 }
13760
13761 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
13762 return false;
13763 }
13764
13765 Record<nsString, int32_t>::EntryType* entry;
13766 if (!idsSeen.EnsureInserted(propName)) {
13767 // Find the existing entry.
13768 auto idx = recordEntries.IndexOf(propName);
13769 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 13770); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13770; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
13770 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 13770); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13770; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13771 // Now blow it away to make it look like it was just added
13772 // to the array, because it's not obvious that it's
13773 // safe to write to its already-initialized mValue via our
13774 // normal codegen conversions. For example, the value
13775 // could be a union and this would change its type, but
13776 // codegen assumes we won't do that.
13777 entry = recordEntries.ReconstructElementAt(idx);
13778 } else {
13779 // Safe to do an infallible append here, because we did a
13780 // SetCapacity above to the right capacity.
13781 entry = recordEntries.AppendElement();
13782 }
13783 entry->mKey = propName;
13784 int32_t& slot = entry->mValue;
13785 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot)) {
13786 return false;
13787 }
13788 }
13789 } else if (args[0].isNullOrUndefined()) {
13790 arg0.SetNull();
13791 } else {
13792 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
13793 return false;
13794 }
13795 } else {
13796 arg0.SetNull();
13797 }
13798 if (objIsXray) {
13799 // Since our object is an Xray, we can just CheckedUnwrapStatic:
13800 // we know Xrays have no dynamic unwrap behavior.
13801 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
13802 if (!unwrappedObj.ref()) {
13803 return false;
13804 }
13805 }
13806 FastErrorResult rv;
13807 // NOTE: This assert does NOT call the function.
13808 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableRecordWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
13809 MOZ_KnownLive(self)(self)->PassOptionalNullableRecordWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
13810 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableRecordWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableRecordWithDefaultValue"
)), 0))
) {
13811 return false;
13812 }
13813 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 13813); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13813; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13814 args.rval().setUndefined();
13815 return true;
13816}
13817
13818static const JSJitInfo passOptionalNullableRecordWithDefaultValue_methodinfo = {
13819 { (JSJitGetterOp)passOptionalNullableRecordWithDefaultValue },
13820 { prototypes::id::TestJSImplInterface },
13821 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
13822 JSJitInfo::Method,
13823 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13824 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
13825 false, /* isInfallible. False in setters. */
13826 false, /* isMovable. Not relevant for setters. */
13827 false, /* isEliminatable. Not relevant for setters. */
13828 false, /* isAlwaysInSlot. Only relevant for getters. */
13829 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13830 false, /* isTypedMethod. Only relevant for methods. */
13831 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13832};
13833
13834MOZ_CAN_RUN_SCRIPT static bool
13835passOptionalObjectRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13836{
13837 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalObjectRecord");
13838 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13841( cx, "TestJSImplInterface"
, "passOptionalObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13839 "TestJSImplInterface", "passOptionalObjectRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13841( cx, "TestJSImplInterface"
, "passOptionalObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13840 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13841( cx, "TestJSImplInterface"
, "passOptionalObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13841 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13841( cx, "TestJSImplInterface"
, "passOptionalObjectRecord", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
13842
13843 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
13844 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
13845 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
13846 if (objIsXray) {
13847 unwrappedObj.emplace(cx, obj);
13848 }
13849 Optional<Record<nsString, OwningNonNull<mozilla::dom::TestInterface>>> arg0;
13850 if (args.hasDefined(0)) {
13851 arg0.Construct();
13852 if (args[0].isObject()) {
13853 auto& recordEntries = arg0.Value().Entries();
13854
13855 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
13856 JS::RootedVector<jsid> ids(cx);
13857 if (!js::GetPropertyKeys(cx, recordObj,
13858 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
13859 return false;
13860 }
13861 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
13862 JS_ReportOutOfMemory(cx);
13863 return false;
13864 }
13865 JS::Rooted<JS::Value> propNameValue(cx);
13866 JS::Rooted<JS::Value> temp(cx);
13867 JS::Rooted<jsid> curId(cx);
13868 JS::Rooted<JS::Value> idVal(cx);
13869 // Use a hashset to keep track of ids seen, to avoid
13870 // introducing nasty O(N^2) behavior scanning for them all the
13871 // time. Ideally we'd use a data structure with O(1) lookup
13872 // _and_ ordering for the MozMap, but we don't have one lying
13873 // around.
13874 nsTHashtable<nsStringHashKey> idsSeen;
13875 for (size_t i = 0; i < ids.length(); ++i) {
13876 curId = ids[i];
13877
13878 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
13879 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
13880 &desc)) {
13881 return false;
13882 }
13883
13884 if (desc.isNothing() || !desc->enumerable()) {
13885 continue;
13886 }
13887
13888 idVal = js::IdToValue(curId);
13889 nsString propName;
13890 // This will just throw if idVal is a Symbol, like the spec says
13891 // to do.
13892 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
13893 return false;
13894 }
13895
13896 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
13897 return false;
13898 }
13899
13900 Record<nsString, OwningNonNull<mozilla::dom::TestInterface>>::EntryType* entry;
13901 if (!idsSeen.EnsureInserted(propName)) {
13902 // Find the existing entry.
13903 auto idx = recordEntries.IndexOf(propName);
13904 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 13905); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13905; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
13905 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 13905); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 13905; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
13906 // Now blow it away to make it look like it was just added
13907 // to the array, because it's not obvious that it's
13908 // safe to write to its already-initialized mValue via our
13909 // normal codegen conversions. For example, the value
13910 // could be a union and this would change its type, but
13911 // codegen assumes we won't do that.
13912 entry = recordEntries.ReconstructElementAt(idx);
13913 } else {
13914 // Safe to do an infallible append here, because we did a
13915 // SetCapacity above to the right capacity.
13916 entry = recordEntries.AppendElement();
13917 }
13918 entry->mKey = propName;
13919 OwningNonNull<mozilla::dom::TestInterface>& slot = entry->mValue;
13920 if (temp.isObject()) {
13921 static_assert(IsRefcounted<mozilla::dom::TestInterface>::value, "We can only store refcounted classes.");
13922 {
13923 // Our JSContext should be in the right global to do unwrapping in.
13924 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(&temp, slot, cx);
13925 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
13926 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "TestInterface");
13927 return false;
13928 }
13929 }
13930 } else {
13931 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
13932 return false;
13933 }
13934 }
13935 } else {
13936 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
13937 return false;
13938 }
13939 }
13940 if (objIsXray) {
13941 // Since our object is an Xray, we can just CheckedUnwrapStatic:
13942 // we know Xrays have no dynamic unwrap behavior.
13943 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
13944 if (!unwrappedObj.ref()) {
13945 return false;
13946 }
13947 }
13948 FastErrorResult rv;
13949 // NOTE: This assert does NOT call the function.
13950 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalObjectRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
13951 MOZ_KnownLive(self)(self)->PassOptionalObjectRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
13952 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalObjectRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalObjectRecord"
)), 0))
) {
13953 return false;
13954 }
13955 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 13955); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 13955; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
13956 args.rval().setUndefined();
13957 return true;
13958}
13959
13960static const JSJitInfo passOptionalObjectRecord_methodinfo = {
13961 { (JSJitGetterOp)passOptionalObjectRecord },
13962 { prototypes::id::TestJSImplInterface },
13963 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
13964 JSJitInfo::Method,
13965 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
13966 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
13967 false, /* isInfallible. False in setters. */
13968 false, /* isMovable. Not relevant for setters. */
13969 false, /* isEliminatable. Not relevant for setters. */
13970 false, /* isAlwaysInSlot. Only relevant for getters. */
13971 false, /* isLazilyCachedInSlot. Only relevant for getters. */
13972 false, /* isTypedMethod. Only relevant for methods. */
13973 0 /* Reserved slot index, if we're stored in a slot, else 0. */
13974};
13975
13976MOZ_CAN_RUN_SCRIPT static bool
13977passExternalInterfaceRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
13978{
13979 BindingCallContext cx(cx_, "TestJSImplInterface.passExternalInterfaceRecord");
13980 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject13983( cx, "TestJSImplInterface"
, "passExternalInterfaceRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13981 "TestJSImplInterface", "passExternalInterfaceRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject13983( cx, "TestJSImplInterface"
, "passExternalInterfaceRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13982 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject13983( cx, "TestJSImplInterface"
, "passExternalInterfaceRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
13983 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject13983( cx, "TestJSImplInterface"
, "passExternalInterfaceRecord", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
13984
13985 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
13986 if (!args.requireAtLeast(cx, "TestJSImplInterface.passExternalInterfaceRecord", 1)) {
13987 return false;
13988 }
13989 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
13990 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
13991 if (objIsXray) {
13992 unwrappedObj.emplace(cx, obj);
13993 }
13994 Record<nsString, RefPtr<mozilla::dom::TestExternalInterface>> arg0;
13995 if (args[0].isObject()) {
13996 auto& recordEntries = arg0.Entries();
13997
13998 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
13999 JS::RootedVector<jsid> ids(cx);
14000 if (!js::GetPropertyKeys(cx, recordObj,
14001 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
14002 return false;
14003 }
14004 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
14005 JS_ReportOutOfMemory(cx);
14006 return false;
14007 }
14008 JS::Rooted<JS::Value> propNameValue(cx);
14009 JS::Rooted<JS::Value> temp(cx);
14010 JS::Rooted<jsid> curId(cx);
14011 JS::Rooted<JS::Value> idVal(cx);
14012 // Use a hashset to keep track of ids seen, to avoid
14013 // introducing nasty O(N^2) behavior scanning for them all the
14014 // time. Ideally we'd use a data structure with O(1) lookup
14015 // _and_ ordering for the MozMap, but we don't have one lying
14016 // around.
14017 nsTHashtable<nsStringHashKey> idsSeen;
14018 for (size_t i = 0; i < ids.length(); ++i) {
14019 curId = ids[i];
14020
14021 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
14022 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
14023 &desc)) {
14024 return false;
14025 }
14026
14027 if (desc.isNothing() || !desc->enumerable()) {
14028 continue;
14029 }
14030
14031 idVal = js::IdToValue(curId);
14032 nsString propName;
14033 // This will just throw if idVal is a Symbol, like the spec says
14034 // to do.
14035 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
14036 return false;
14037 }
14038
14039 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
14040 return false;
14041 }
14042
14043 Record<nsString, RefPtr<mozilla::dom::TestExternalInterface>>::EntryType* entry;
14044 if (!idsSeen.EnsureInserted(propName)) {
14045 // Find the existing entry.
14046 auto idx = recordEntries.IndexOf(propName);
14047 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 14048); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 14048; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
14048 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 14048); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 14048; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
14049 // Now blow it away to make it look like it was just added
14050 // to the array, because it's not obvious that it's
14051 // safe to write to its already-initialized mValue via our
14052 // normal codegen conversions. For example, the value
14053 // could be a union and this would change its type, but
14054 // codegen assumes we won't do that.
14055 entry = recordEntries.ReconstructElementAt(idx);
14056 } else {
14057 // Safe to do an infallible append here, because we did a
14058 // SetCapacity above to the right capacity.
14059 entry = recordEntries.AppendElement();
14060 }
14061 entry->mKey = propName;
14062 RefPtr<mozilla::dom::TestExternalInterface>& slot = entry->mValue;
14063 if (temp.isObject()) {
14064 static_assert(IsRefcounted<mozilla::dom::TestExternalInterface>::value, "We can only store refcounted classes.");
14065 RefPtr<mozilla::dom::TestExternalInterface> tempHolder;
14066 JS::Rooted<JSObject*> source(cx, &temp.toObject());
14067 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(tempHolder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(tempHolder
)))), 0)))
) {
14068 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "TestExternalInterface");
14069 return false;
14070 }
14071 MOZ_ASSERT(tempHolder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(tempHolder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(tempHolder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("tempHolder", "../TestJSImplGenBinding.cpp"
, 14071); AnnotateMozCrashReason("MOZ_ASSERT" "(" "tempHolder"
")"); do { *((volatile int*)__null) = 14071; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
14072 slot = tempHolder;
14073 } else {
14074 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
14075 return false;
14076 }
14077 }
14078 } else {
14079 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14080 return false;
14081 }
14082 if (objIsXray) {
14083 // Since our object is an Xray, we can just CheckedUnwrapStatic:
14084 // we know Xrays have no dynamic unwrap behavior.
14085 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
14086 if (!unwrappedObj.ref()) {
14087 return false;
14088 }
14089 }
14090 FastErrorResult rv;
14091 // NOTE: This assert does NOT call the function.
14092 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassExternalInterfaceRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
14093 MOZ_KnownLive(self)(self)->PassExternalInterfaceRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
14094 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passExternalInterfaceRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passExternalInterfaceRecord"
)), 0))
) {
14095 return false;
14096 }
14097 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 14097); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14097; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14098 args.rval().setUndefined();
14099 return true;
14100}
14101
14102static const JSJitInfo passExternalInterfaceRecord_methodinfo = {
14103 { (JSJitGetterOp)passExternalInterfaceRecord },
14104 { prototypes::id::TestJSImplInterface },
14105 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
14106 JSJitInfo::Method,
14107 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14108 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14109 false, /* isInfallible. False in setters. */
14110 false, /* isMovable. Not relevant for setters. */
14111 false, /* isEliminatable. Not relevant for setters. */
14112 false, /* isAlwaysInSlot. Only relevant for getters. */
14113 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14114 false, /* isTypedMethod. Only relevant for methods. */
14115 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14116};
14117
14118MOZ_CAN_RUN_SCRIPT static bool
14119passNullableExternalInterfaceRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14120{
14121 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableExternalInterfaceRecord");
14122 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14125( cx, "TestJSImplInterface"
, "passNullableExternalInterfaceRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
14123 "TestJSImplInterface", "passNullableExternalInterfaceRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14125( cx, "TestJSImplInterface"
, "passNullableExternalInterfaceRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
14124 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14125( cx, "TestJSImplInterface"
, "passNullableExternalInterfaceRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
14125 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14125( cx, "TestJSImplInterface"
, "passNullableExternalInterfaceRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
14126
14127 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
14128 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableExternalInterfaceRecord", 1)) {
14129 return false;
14130 }
14131 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
14132 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
14133 if (objIsXray) {
14134 unwrappedObj.emplace(cx, obj);
14135 }
14136 Record<nsString, RefPtr<mozilla::dom::TestExternalInterface>> arg0;
14137 if (args[0].isObject()) {
14138 auto& recordEntries = arg0.Entries();
14139
14140 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
14141 JS::RootedVector<jsid> ids(cx);
14142 if (!js::GetPropertyKeys(cx, recordObj,
14143 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
14144 return false;
14145 }
14146 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
14147 JS_ReportOutOfMemory(cx);
14148 return false;
14149 }
14150 JS::Rooted<JS::Value> propNameValue(cx);
14151 JS::Rooted<JS::Value> temp(cx);
14152 JS::Rooted<jsid> curId(cx);
14153 JS::Rooted<JS::Value> idVal(cx);
14154 // Use a hashset to keep track of ids seen, to avoid
14155 // introducing nasty O(N^2) behavior scanning for them all the
14156 // time. Ideally we'd use a data structure with O(1) lookup
14157 // _and_ ordering for the MozMap, but we don't have one lying
14158 // around.
14159 nsTHashtable<nsStringHashKey> idsSeen;
14160 for (size_t i = 0; i < ids.length(); ++i) {
14161 curId = ids[i];
14162
14163 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
14164 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
14165 &desc)) {
14166 return false;
14167 }
14168
14169 if (desc.isNothing() || !desc->enumerable()) {
14170 continue;
14171 }
14172
14173 idVal = js::IdToValue(curId);
14174 nsString propName;
14175 // This will just throw if idVal is a Symbol, like the spec says
14176 // to do.
14177 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
14178 return false;
14179 }
14180
14181 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
14182 return false;
14183 }
14184
14185 Record<nsString, RefPtr<mozilla::dom::TestExternalInterface>>::EntryType* entry;
14186 if (!idsSeen.EnsureInserted(propName)) {
14187 // Find the existing entry.
14188 auto idx = recordEntries.IndexOf(propName);
14189 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 14190); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 14190; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
14190 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 14190); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 14190; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
14191 // Now blow it away to make it look like it was just added
14192 // to the array, because it's not obvious that it's
14193 // safe to write to its already-initialized mValue via our
14194 // normal codegen conversions. For example, the value
14195 // could be a union and this would change its type, but
14196 // codegen assumes we won't do that.
14197 entry = recordEntries.ReconstructElementAt(idx);
14198 } else {
14199 // Safe to do an infallible append here, because we did a
14200 // SetCapacity above to the right capacity.
14201 entry = recordEntries.AppendElement();
14202 }
14203 entry->mKey = propName;
14204 RefPtr<mozilla::dom::TestExternalInterface>& slot = entry->mValue;
14205 if (temp.isObject()) {
14206 static_assert(IsRefcounted<mozilla::dom::TestExternalInterface>::value, "We can only store refcounted classes.");
14207 RefPtr<mozilla::dom::TestExternalInterface> tempHolder;
14208 JS::Rooted<JSObject*> source(cx, &temp.toObject());
14209 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(tempHolder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(tempHolder
)))), 0)))
) {
14210 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "TestExternalInterface");
14211 return false;
14212 }
14213 MOZ_ASSERT(tempHolder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(tempHolder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(tempHolder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("tempHolder", "../TestJSImplGenBinding.cpp"
, 14213); AnnotateMozCrashReason("MOZ_ASSERT" "(" "tempHolder"
")"); do { *((volatile int*)__null) = 14213; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
14214 slot = tempHolder;
14215 } else if (temp.isNullOrUndefined()) {
14216 slot = nullptr;
14217 } else {
14218 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
14219 return false;
14220 }
14221 }
14222 } else {
14223 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14224 return false;
14225 }
14226 if (objIsXray) {
14227 // Since our object is an Xray, we can just CheckedUnwrapStatic:
14228 // we know Xrays have no dynamic unwrap behavior.
14229 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
14230 if (!unwrappedObj.ref()) {
14231 return false;
14232 }
14233 }
14234 FastErrorResult rv;
14235 // NOTE: This assert does NOT call the function.
14236 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableExternalInterfaceRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
14237 MOZ_KnownLive(self)(self)->PassNullableExternalInterfaceRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
14238 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableExternalInterfaceRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableExternalInterfaceRecord"
)), 0))
) {
14239 return false;
14240 }
14241 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 14241); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14241; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14242 args.rval().setUndefined();
14243 return true;
14244}
14245
14246static const JSJitInfo passNullableExternalInterfaceRecord_methodinfo = {
14247 { (JSJitGetterOp)passNullableExternalInterfaceRecord },
14248 { prototypes::id::TestJSImplInterface },
14249 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
14250 JSJitInfo::Method,
14251 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14252 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14253 false, /* isInfallible. False in setters. */
14254 false, /* isMovable. Not relevant for setters. */
14255 false, /* isEliminatable. Not relevant for setters. */
14256 false, /* isAlwaysInSlot. Only relevant for getters. */
14257 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14258 false, /* isTypedMethod. Only relevant for methods. */
14259 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14260};
14261
14262MOZ_CAN_RUN_SCRIPT static bool
14263passStringRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14264{
14265 BindingCallContext cx(cx_, "TestJSImplInterface.passStringRecord");
14266 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14269( cx, "TestJSImplInterface"
, "passStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14267 "TestJSImplInterface", "passStringRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14269( cx, "TestJSImplInterface"
, "passStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14268 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14269( cx, "TestJSImplInterface"
, "passStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14269 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14269( cx, "TestJSImplInterface"
, "passStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14270
14271 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
14272 if (!args.requireAtLeast(cx, "TestJSImplInterface.passStringRecord", 1)) {
14273 return false;
14274 }
14275 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
14276 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
14277 if (objIsXray) {
14278 unwrappedObj.emplace(cx, obj);
14279 }
14280 Record<nsString, nsString> arg0;
14281 if (args[0].isObject()) {
14282 auto& recordEntries = arg0.Entries();
14283
14284 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
14285 JS::RootedVector<jsid> ids(cx);
14286 if (!js::GetPropertyKeys(cx, recordObj,
14287 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
14288 return false;
14289 }
14290 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
14291 JS_ReportOutOfMemory(cx);
14292 return false;
14293 }
14294 JS::Rooted<JS::Value> propNameValue(cx);
14295 JS::Rooted<JS::Value> temp(cx);
14296 JS::Rooted<jsid> curId(cx);
14297 JS::Rooted<JS::Value> idVal(cx);
14298 // Use a hashset to keep track of ids seen, to avoid
14299 // introducing nasty O(N^2) behavior scanning for them all the
14300 // time. Ideally we'd use a data structure with O(1) lookup
14301 // _and_ ordering for the MozMap, but we don't have one lying
14302 // around.
14303 nsTHashtable<nsStringHashKey> idsSeen;
14304 for (size_t i = 0; i < ids.length(); ++i) {
14305 curId = ids[i];
14306
14307 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
14308 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
14309 &desc)) {
14310 return false;
14311 }
14312
14313 if (desc.isNothing() || !desc->enumerable()) {
14314 continue;
14315 }
14316
14317 idVal = js::IdToValue(curId);
14318 nsString propName;
14319 // This will just throw if idVal is a Symbol, like the spec says
14320 // to do.
14321 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
14322 return false;
14323 }
14324
14325 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
14326 return false;
14327 }
14328
14329 Record<nsString, nsString>::EntryType* entry;
14330 if (!idsSeen.EnsureInserted(propName)) {
14331 // Find the existing entry.
14332 auto idx = recordEntries.IndexOf(propName);
14333 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 14334); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 14334; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
14334 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 14334); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 14334; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
14335 // Now blow it away to make it look like it was just added
14336 // to the array, because it's not obvious that it's
14337 // safe to write to its already-initialized mValue via our
14338 // normal codegen conversions. For example, the value
14339 // could be a union and this would change its type, but
14340 // codegen assumes we won't do that.
14341 entry = recordEntries.ReconstructElementAt(idx);
14342 } else {
14343 // Safe to do an infallible append here, because we did a
14344 // SetCapacity above to the right capacity.
14345 entry = recordEntries.AppendElement();
14346 }
14347 entry->mKey = propName;
14348 nsString& slot = entry->mValue;
14349 if (!ConvertJSValueToString(cx, temp, eStringify, eStringify, slot)) {
14350 return false;
14351 }
14352 }
14353 } else {
14354 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14355 return false;
14356 }
14357 if (objIsXray) {
14358 // Since our object is an Xray, we can just CheckedUnwrapStatic:
14359 // we know Xrays have no dynamic unwrap behavior.
14360 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
14361 if (!unwrappedObj.ref()) {
14362 return false;
14363 }
14364 }
14365 FastErrorResult rv;
14366 // NOTE: This assert does NOT call the function.
14367 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassStringRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
14368 MOZ_KnownLive(self)(self)->PassStringRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
14369 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passStringRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passStringRecord"
)), 0))
) {
14370 return false;
14371 }
14372 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 14372); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14372; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14373 args.rval().setUndefined();
14374 return true;
14375}
14376
14377static const JSJitInfo passStringRecord_methodinfo = {
14378 { (JSJitGetterOp)passStringRecord },
14379 { prototypes::id::TestJSImplInterface },
14380 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
14381 JSJitInfo::Method,
14382 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14383 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14384 false, /* isInfallible. False in setters. */
14385 false, /* isMovable. Not relevant for setters. */
14386 false, /* isEliminatable. Not relevant for setters. */
14387 false, /* isAlwaysInSlot. Only relevant for getters. */
14388 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14389 false, /* isTypedMethod. Only relevant for methods. */
14390 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14391};
14392
14393MOZ_CAN_RUN_SCRIPT static bool
14394passByteStringRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14395{
14396 BindingCallContext cx(cx_, "TestJSImplInterface.passByteStringRecord");
14397 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14400( cx, "TestJSImplInterface"
, "passByteStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14398 "TestJSImplInterface", "passByteStringRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14400( cx, "TestJSImplInterface"
, "passByteStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14399 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14400( cx, "TestJSImplInterface"
, "passByteStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14400 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14400( cx, "TestJSImplInterface"
, "passByteStringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14401
14402 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
14403 if (!args.requireAtLeast(cx, "TestJSImplInterface.passByteStringRecord", 1)) {
14404 return false;
14405 }
14406 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
14407 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
14408 if (objIsXray) {
14409 unwrappedObj.emplace(cx, obj);
14410 }
14411 Record<nsString, nsCString> arg0;
14412 if (args[0].isObject()) {
14413 auto& recordEntries = arg0.Entries();
14414
14415 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
14416 JS::RootedVector<jsid> ids(cx);
14417 if (!js::GetPropertyKeys(cx, recordObj,
14418 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
14419 return false;
14420 }
14421 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
14422 JS_ReportOutOfMemory(cx);
14423 return false;
14424 }
14425 JS::Rooted<JS::Value> propNameValue(cx);
14426 JS::Rooted<JS::Value> temp(cx);
14427 JS::Rooted<jsid> curId(cx);
14428 JS::Rooted<JS::Value> idVal(cx);
14429 // Use a hashset to keep track of ids seen, to avoid
14430 // introducing nasty O(N^2) behavior scanning for them all the
14431 // time. Ideally we'd use a data structure with O(1) lookup
14432 // _and_ ordering for the MozMap, but we don't have one lying
14433 // around.
14434 nsTHashtable<nsStringHashKey> idsSeen;
14435 for (size_t i = 0; i < ids.length(); ++i) {
14436 curId = ids[i];
14437
14438 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
14439 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
14440 &desc)) {
14441 return false;
14442 }
14443
14444 if (desc.isNothing() || !desc->enumerable()) {
14445 continue;
14446 }
14447
14448 idVal = js::IdToValue(curId);
14449 nsString propName;
14450 // This will just throw if idVal is a Symbol, like the spec says
14451 // to do.
14452 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
14453 return false;
14454 }
14455
14456 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
14457 return false;
14458 }
14459
14460 Record<nsString, nsCString>::EntryType* entry;
14461 if (!idsSeen.EnsureInserted(propName)) {
14462 // Find the existing entry.
14463 auto idx = recordEntries.IndexOf(propName);
14464 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 14465); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 14465; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
14465 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 14465); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 14465; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
14466 // Now blow it away to make it look like it was just added
14467 // to the array, because it's not obvious that it's
14468 // safe to write to its already-initialized mValue via our
14469 // normal codegen conversions. For example, the value
14470 // could be a union and this would change its type, but
14471 // codegen assumes we won't do that.
14472 entry = recordEntries.ReconstructElementAt(idx);
14473 } else {
14474 // Safe to do an infallible append here, because we did a
14475 // SetCapacity above to the right capacity.
14476 entry = recordEntries.AppendElement();
14477 }
14478 entry->mKey = propName;
14479 nsCString& slot = entry->mValue;
14480 if (!ConvertJSValueToByteString(cx, temp, false, "value in argument 1", slot)) {
14481 return false;
14482 }
14483 }
14484 } else {
14485 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14486 return false;
14487 }
14488 if (objIsXray) {
14489 // Since our object is an Xray, we can just CheckedUnwrapStatic:
14490 // we know Xrays have no dynamic unwrap behavior.
14491 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
14492 if (!unwrappedObj.ref()) {
14493 return false;
14494 }
14495 }
14496 FastErrorResult rv;
14497 // NOTE: This assert does NOT call the function.
14498 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassByteStringRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
14499 MOZ_KnownLive(self)(self)->PassByteStringRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
14500 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passByteStringRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passByteStringRecord"
)), 0))
) {
14501 return false;
14502 }
14503 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 14503); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14503; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14504 args.rval().setUndefined();
14505 return true;
14506}
14507
14508static const JSJitInfo passByteStringRecord_methodinfo = {
14509 { (JSJitGetterOp)passByteStringRecord },
14510 { prototypes::id::TestJSImplInterface },
14511 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
14512 JSJitInfo::Method,
14513 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14514 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14515 false, /* isInfallible. False in setters. */
14516 false, /* isMovable. Not relevant for setters. */
14517 false, /* isEliminatable. Not relevant for setters. */
14518 false, /* isAlwaysInSlot. Only relevant for getters. */
14519 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14520 false, /* isTypedMethod. Only relevant for methods. */
14521 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14522};
14523
14524MOZ_CAN_RUN_SCRIPT static bool
14525passUTF8StringRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14526{
14527 BindingCallContext cx(cx_, "TestJSImplInterface.passUTF8StringRecord");
14528 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14531( cx, "TestJSImplInterface"
, "passUTF8StringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14529 "TestJSImplInterface", "passUTF8StringRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14531( cx, "TestJSImplInterface"
, "passUTF8StringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14530 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14531( cx, "TestJSImplInterface"
, "passUTF8StringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14531 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14531( cx, "TestJSImplInterface"
, "passUTF8StringRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14532
14533 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
14534 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUTF8StringRecord", 1)) {
14535 return false;
14536 }
14537 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
14538 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
14539 if (objIsXray) {
14540 unwrappedObj.emplace(cx, obj);
14541 }
14542 Record<nsString, nsCString> arg0;
14543 if (args[0].isObject()) {
14544 auto& recordEntries = arg0.Entries();
14545
14546 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
14547 JS::RootedVector<jsid> ids(cx);
14548 if (!js::GetPropertyKeys(cx, recordObj,
14549 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
14550 return false;
14551 }
14552 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
14553 JS_ReportOutOfMemory(cx);
14554 return false;
14555 }
14556 JS::Rooted<JS::Value> propNameValue(cx);
14557 JS::Rooted<JS::Value> temp(cx);
14558 JS::Rooted<jsid> curId(cx);
14559 JS::Rooted<JS::Value> idVal(cx);
14560 // Use a hashset to keep track of ids seen, to avoid
14561 // introducing nasty O(N^2) behavior scanning for them all the
14562 // time. Ideally we'd use a data structure with O(1) lookup
14563 // _and_ ordering for the MozMap, but we don't have one lying
14564 // around.
14565 nsTHashtable<nsStringHashKey> idsSeen;
14566 for (size_t i = 0; i < ids.length(); ++i) {
14567 curId = ids[i];
14568
14569 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
14570 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
14571 &desc)) {
14572 return false;
14573 }
14574
14575 if (desc.isNothing() || !desc->enumerable()) {
14576 continue;
14577 }
14578
14579 idVal = js::IdToValue(curId);
14580 nsString propName;
14581 // This will just throw if idVal is a Symbol, like the spec says
14582 // to do.
14583 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
14584 return false;
14585 }
14586
14587 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
14588 return false;
14589 }
14590
14591 Record<nsString, nsCString>::EntryType* entry;
14592 if (!idsSeen.EnsureInserted(propName)) {
14593 // Find the existing entry.
14594 auto idx = recordEntries.IndexOf(propName);
14595 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 14596); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 14596; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
14596 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 14596); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 14596; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
14597 // Now blow it away to make it look like it was just added
14598 // to the array, because it's not obvious that it's
14599 // safe to write to its already-initialized mValue via our
14600 // normal codegen conversions. For example, the value
14601 // could be a union and this would change its type, but
14602 // codegen assumes we won't do that.
14603 entry = recordEntries.ReconstructElementAt(idx);
14604 } else {
14605 // Safe to do an infallible append here, because we did a
14606 // SetCapacity above to the right capacity.
14607 entry = recordEntries.AppendElement();
14608 }
14609 entry->mKey = propName;
14610 nsCString& slot = entry->mValue;
14611 if (!ConvertJSValueToString(cx, temp, eStringify, eStringify, slot)) {
14612 return false;
14613 }
14614 }
14615 } else {
14616 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14617 return false;
14618 }
14619 if (objIsXray) {
14620 // Since our object is an Xray, we can just CheckedUnwrapStatic:
14621 // we know Xrays have no dynamic unwrap behavior.
14622 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
14623 if (!unwrappedObj.ref()) {
14624 return false;
14625 }
14626 }
14627 FastErrorResult rv;
14628 // NOTE: This assert does NOT call the function.
14629 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUTF8StringRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
14630 MOZ_KnownLive(self)(self)->PassUTF8StringRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
14631 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUTF8StringRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUTF8StringRecord"
)), 0))
) {
14632 return false;
14633 }
14634 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 14634); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14634; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14635 args.rval().setUndefined();
14636 return true;
14637}
14638
14639static const JSJitInfo passUTF8StringRecord_methodinfo = {
14640 { (JSJitGetterOp)passUTF8StringRecord },
14641 { prototypes::id::TestJSImplInterface },
14642 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
14643 JSJitInfo::Method,
14644 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14645 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14646 false, /* isInfallible. False in setters. */
14647 false, /* isMovable. Not relevant for setters. */
14648 false, /* isEliminatable. Not relevant for setters. */
14649 false, /* isAlwaysInSlot. Only relevant for getters. */
14650 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14651 false, /* isTypedMethod. Only relevant for methods. */
14652 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14653};
14654
14655MOZ_CAN_RUN_SCRIPT static bool
14656passRecordOfRecords(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14657{
14658 BindingCallContext cx(cx_, "TestJSImplInterface.passRecordOfRecords");
14659 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14662( cx, "TestJSImplInterface"
, "passRecordOfRecords", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14660 "TestJSImplInterface", "passRecordOfRecords", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14662( cx, "TestJSImplInterface"
, "passRecordOfRecords", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14661 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14662( cx, "TestJSImplInterface"
, "passRecordOfRecords", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14662 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14662( cx, "TestJSImplInterface"
, "passRecordOfRecords", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14663
14664 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
14665 if (!args.requireAtLeast(cx, "TestJSImplInterface.passRecordOfRecords", 1)) {
14666 return false;
14667 }
14668 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
14669 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
14670 if (objIsXray) {
14671 unwrappedObj.emplace(cx, obj);
14672 }
14673 Record<nsString, Record<nsString, int32_t>> arg0;
14674 if (args[0].isObject()) {
14675 auto& recordEntries = arg0.Entries();
14676
14677 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
14678 JS::RootedVector<jsid> ids(cx);
14679 if (!js::GetPropertyKeys(cx, recordObj,
14680 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
14681 return false;
14682 }
14683 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
14684 JS_ReportOutOfMemory(cx);
14685 return false;
14686 }
14687 JS::Rooted<JS::Value> propNameValue(cx);
14688 JS::Rooted<JS::Value> temp(cx);
14689 JS::Rooted<jsid> curId(cx);
14690 JS::Rooted<JS::Value> idVal(cx);
14691 // Use a hashset to keep track of ids seen, to avoid
14692 // introducing nasty O(N^2) behavior scanning for them all the
14693 // time. Ideally we'd use a data structure with O(1) lookup
14694 // _and_ ordering for the MozMap, but we don't have one lying
14695 // around.
14696 nsTHashtable<nsStringHashKey> idsSeen;
14697 for (size_t i = 0; i < ids.length(); ++i) {
14698 curId = ids[i];
14699
14700 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
14701 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
14702 &desc)) {
14703 return false;
14704 }
14705
14706 if (desc.isNothing() || !desc->enumerable()) {
14707 continue;
14708 }
14709
14710 idVal = js::IdToValue(curId);
14711 nsString propName;
14712 // This will just throw if idVal is a Symbol, like the spec says
14713 // to do.
14714 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
14715 return false;
14716 }
14717
14718 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
14719 return false;
14720 }
14721
14722 Record<nsString, Record<nsString, int32_t>>::EntryType* entry;
14723 if (!idsSeen.EnsureInserted(propName)) {
14724 // Find the existing entry.
14725 auto idx = recordEntries.IndexOf(propName);
14726 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 14727); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 14727; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
14727 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 14727); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 14727; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
14728 // Now blow it away to make it look like it was just added
14729 // to the array, because it's not obvious that it's
14730 // safe to write to its already-initialized mValue via our
14731 // normal codegen conversions. For example, the value
14732 // could be a union and this would change its type, but
14733 // codegen assumes we won't do that.
14734 entry = recordEntries.ReconstructElementAt(idx);
14735 } else {
14736 // Safe to do an infallible append here, because we did a
14737 // SetCapacity above to the right capacity.
14738 entry = recordEntries.AppendElement();
14739 }
14740 entry->mKey = propName;
14741 Record<nsString, int32_t>& slot = entry->mValue;
14742 if (temp.isObject()) {
14743 auto& recordEntries = slot.Entries();
14744
14745 JS::Rooted<JSObject*> recordObj(cx, &temp.toObject());
14746 JS::RootedVector<jsid> ids(cx);
14747 if (!js::GetPropertyKeys(cx, recordObj,
14748 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
14749 return false;
14750 }
14751 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
14752 JS_ReportOutOfMemory(cx);
14753 return false;
14754 }
14755 JS::Rooted<JS::Value> propNameValue(cx);
14756 JS::Rooted<JS::Value> temp(cx);
14757 JS::Rooted<jsid> curId(cx);
14758 JS::Rooted<JS::Value> idVal(cx);
14759 // Use a hashset to keep track of ids seen, to avoid
14760 // introducing nasty O(N^2) behavior scanning for them all the
14761 // time. Ideally we'd use a data structure with O(1) lookup
14762 // _and_ ordering for the MozMap, but we don't have one lying
14763 // around.
14764 nsTHashtable<nsStringHashKey> idsSeen;
14765 for (size_t i = 0; i < ids.length(); ++i) {
14766 curId = ids[i];
14767
14768 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
14769 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
14770 &desc)) {
14771 return false;
14772 }
14773
14774 if (desc.isNothing() || !desc->enumerable()) {
14775 continue;
14776 }
14777
14778 idVal = js::IdToValue(curId);
14779 nsString propName;
14780 // This will just throw if idVal is a Symbol, like the spec says
14781 // to do.
14782 if (!ConvertJSValueToString(cx, idVal, "key of value in argument 1", propName)) {
14783 return false;
14784 }
14785
14786 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
14787 return false;
14788 }
14789
14790 Record<nsString, int32_t>::EntryType* entry;
14791 if (!idsSeen.EnsureInserted(propName)) {
14792 // Find the existing entry.
14793 auto idx = recordEntries.IndexOf(propName);
14794 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 14795); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 14795; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
14795 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 14795); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 14795; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
14796 // Now blow it away to make it look like it was just added
14797 // to the array, because it's not obvious that it's
14798 // safe to write to its already-initialized mValue via our
14799 // normal codegen conversions. For example, the value
14800 // could be a union and this would change its type, but
14801 // codegen assumes we won't do that.
14802 entry = recordEntries.ReconstructElementAt(idx);
14803 } else {
14804 // Safe to do an infallible append here, because we did a
14805 // SetCapacity above to the right capacity.
14806 entry = recordEntries.AppendElement();
14807 }
14808 entry->mKey = propName;
14809 int32_t& slot = entry->mValue;
14810 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in value in argument 1", &slot)) {
14811 return false;
14812 }
14813 }
14814 } else {
14815 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
14816 return false;
14817 }
14818 }
14819 } else {
14820 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
14821 return false;
14822 }
14823 if (objIsXray) {
14824 // Since our object is an Xray, we can just CheckedUnwrapStatic:
14825 // we know Xrays have no dynamic unwrap behavior.
14826 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
14827 if (!unwrappedObj.ref()) {
14828 return false;
14829 }
14830 }
14831 FastErrorResult rv;
14832 // NOTE: This assert does NOT call the function.
14833 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfRecords(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
14834 MOZ_KnownLive(self)(self)->PassRecordOfRecords(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
14835 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfRecords"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfRecords"
)), 0))
) {
14836 return false;
14837 }
14838 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 14838); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14838; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14839 args.rval().setUndefined();
14840 return true;
14841}
14842
14843static const JSJitInfo passRecordOfRecords_methodinfo = {
14844 { (JSJitGetterOp)passRecordOfRecords },
14845 { prototypes::id::TestJSImplInterface },
14846 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
14847 JSJitInfo::Method,
14848 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14849 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
14850 false, /* isInfallible. False in setters. */
14851 false, /* isMovable. Not relevant for setters. */
14852 false, /* isEliminatable. Not relevant for setters. */
14853 false, /* isAlwaysInSlot. Only relevant for getters. */
14854 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14855 false, /* isTypedMethod. Only relevant for methods. */
14856 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14857};
14858
14859MOZ_CAN_RUN_SCRIPT static bool
14860receiveRecord(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14861{
14862 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14865( cx, "TestJSImplInterface"
, "receiveRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14863 "TestJSImplInterface", "receiveRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14865( cx, "TestJSImplInterface"
, "receiveRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14864 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14865( cx, "TestJSImplInterface"
, "receiveRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14865 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14865( cx, "TestJSImplInterface"
, "receiveRecord", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14866
14867 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
14868 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
14869 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
14870 if (objIsXray) {
14871 unwrappedObj.emplace(cx, obj);
14872 }
14873 if (objIsXray) {
14874 // Since our object is an Xray, we can just CheckedUnwrapStatic:
14875 // we know Xrays have no dynamic unwrap behavior.
14876 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
14877 if (!unwrappedObj.ref()) {
14878 return false;
14879 }
14880 }
14881 FastErrorResult rv;
14882 Record<nsString, int32_t> result;
14883 // NOTE: This assert does NOT call the function.
14884 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveRecord(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
14885 MOZ_KnownLive(self)(self)->ReceiveRecord(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
14886 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveRecord"
)), 0))
) {
14887 return false;
14888 }
14889 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 14889); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14889; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14890
14891 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
14892 if (!returnObj) {
14893 return false;
14894 }
14895 // Scope for 'tmp'
14896 {
14897 JS::Rooted<JS::Value> tmp(cx);
14898 for (auto& entry : result.Entries()) {
14899 auto& recordValue0 = entry.mValue;
14900 // Control block to let us common up the JS_DefineUCProperty calls when there
14901 // are different ways to succeed at wrapping the value.
14902 do {
14903 tmp.setInt32(int32_t(recordValue0));
14904 break;
14905 } while (false);
14906 if (!JS_DefineUCProperty(cx, returnObj,
14907 entry.mKey.BeginReading(),
14908 entry.mKey.Length(), tmp,
14909 JSPROP_ENUMERATE)) {
14910 return false;
14911 }
14912 }
14913 }
14914 args.rval().setObject(*returnObj);
14915 return true;
14916}
14917
14918static const JSJitInfo receiveRecord_methodinfo = {
14919 { (JSJitGetterOp)receiveRecord },
14920 { prototypes::id::TestJSImplInterface },
14921 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
14922 JSJitInfo::Method,
14923 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
14924 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
14925 false, /* isInfallible. False in setters. */
14926 false, /* isMovable. Not relevant for setters. */
14927 false, /* isEliminatable. Not relevant for setters. */
14928 false, /* isAlwaysInSlot. Only relevant for getters. */
14929 false, /* isLazilyCachedInSlot. Only relevant for getters. */
14930 false, /* isTypedMethod. Only relevant for methods. */
14931 0 /* Reserved slot index, if we're stored in a slot, else 0. */
14932};
14933
14934MOZ_CAN_RUN_SCRIPT static bool
14935receiveNullableRecord(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
14936{
14937 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject14940( cx, "TestJSImplInterface"
, "receiveNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14938 "TestJSImplInterface", "receiveNullableRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject14940( cx, "TestJSImplInterface"
, "receiveNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14939 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject14940( cx, "TestJSImplInterface"
, "receiveNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
14940 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject14940( cx, "TestJSImplInterface"
, "receiveNullableRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
14941
14942 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
14943 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
14944 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
14945 if (objIsXray) {
14946 unwrappedObj.emplace(cx, obj);
14947 }
14948 if (objIsXray) {
14949 // Since our object is an Xray, we can just CheckedUnwrapStatic:
14950 // we know Xrays have no dynamic unwrap behavior.
14951 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
14952 if (!unwrappedObj.ref()) {
14953 return false;
14954 }
14955 }
14956 FastErrorResult rv;
14957 Nullable<Record<nsString, int32_t>> result;
14958 // NOTE: This assert does NOT call the function.
14959 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableRecord(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
14960 MOZ_KnownLive(self)(self)->ReceiveNullableRecord(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
14961 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableRecord"
)), 0))
) {
14962 return false;
14963 }
14964 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 14964); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 14964; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
14965
14966 if (result.IsNull()) {
14967 args.rval().setNull();
14968 return true;
14969 }
14970
14971 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
14972 if (!returnObj) {
14973 return false;
14974 }
14975 // Scope for 'tmp'
14976 {
14977 JS::Rooted<JS::Value> tmp(cx);
14978 for (auto& entry : result.Value().Entries()) {
14979 auto& recordValue0 = entry.mValue;
14980 // Control block to let us common up the JS_DefineUCProperty calls when there
14981 // are different ways to succeed at wrapping the value.
14982 do {
14983 tmp.setInt32(int32_t(recordValue0));
14984 break;
14985 } while (false);
14986 if (!JS_DefineUCProperty(cx, returnObj,
14987 entry.mKey.BeginReading(),
14988 entry.mKey.Length(), tmp,
14989 JSPROP_ENUMERATE)) {
14990 return false;
14991 }
14992 }
14993 }
14994 args.rval().setObject(*returnObj);
14995 return true;
14996}
14997
14998static const JSJitInfo receiveNullableRecord_methodinfo = {
14999 { (JSJitGetterOp)receiveNullableRecord },
15000 { prototypes::id::TestJSImplInterface },
15001 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
15002 JSJitInfo::Method,
15003 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15004 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
15005 false, /* isInfallible. False in setters. */
15006 false, /* isMovable. Not relevant for setters. */
15007 false, /* isEliminatable. Not relevant for setters. */
15008 false, /* isAlwaysInSlot. Only relevant for getters. */
15009 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15010 false, /* isTypedMethod. Only relevant for methods. */
15011 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15012};
15013
15014MOZ_CAN_RUN_SCRIPT static bool
15015receiveRecordOfNullableInts(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15016{
15017 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15020( cx, "TestJSImplInterface"
, "receiveRecordOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15018 "TestJSImplInterface", "receiveRecordOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15020( cx, "TestJSImplInterface"
, "receiveRecordOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15019 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15020( cx, "TestJSImplInterface"
, "receiveRecordOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15020 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15020( cx, "TestJSImplInterface"
, "receiveRecordOfNullableInts", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
15021
15022 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
15023 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
15024 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
15025 if (objIsXray) {
15026 unwrappedObj.emplace(cx, obj);
15027 }
15028 if (objIsXray) {
15029 // Since our object is an Xray, we can just CheckedUnwrapStatic:
15030 // we know Xrays have no dynamic unwrap behavior.
15031 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
15032 if (!unwrappedObj.ref()) {
15033 return false;
15034 }
15035 }
15036 FastErrorResult rv;
15037 Record<nsString, Nullable<int32_t>> result;
15038 // NOTE: This assert does NOT call the function.
15039 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveRecordOfNullableInts(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
15040 MOZ_KnownLive(self)(self)->ReceiveRecordOfNullableInts(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
15041 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveRecordOfNullableInts"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveRecordOfNullableInts"
)), 0))
) {
15042 return false;
15043 }
15044 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 15044); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15044; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15045
15046 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
15047 if (!returnObj) {
15048 return false;
15049 }
15050 // Scope for 'tmp'
15051 {
15052 JS::Rooted<JS::Value> tmp(cx);
15053 for (auto& entry : result.Entries()) {
15054 auto& recordValue0 = entry.mValue;
15055 // Control block to let us common up the JS_DefineUCProperty calls when there
15056 // are different ways to succeed at wrapping the value.
15057 do {
15058 if (recordValue0.IsNull()) {
15059 tmp.setNull();
15060 break;
15061 }
15062 tmp.setInt32(int32_t(recordValue0.Value()));
15063 break;
15064 } while (false);
15065 if (!JS_DefineUCProperty(cx, returnObj,
15066 entry.mKey.BeginReading(),
15067 entry.mKey.Length(), tmp,
15068 JSPROP_ENUMERATE)) {
15069 return false;
15070 }
15071 }
15072 }
15073 args.rval().setObject(*returnObj);
15074 return true;
15075}
15076
15077static const JSJitInfo receiveRecordOfNullableInts_methodinfo = {
15078 { (JSJitGetterOp)receiveRecordOfNullableInts },
15079 { prototypes::id::TestJSImplInterface },
15080 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
15081 JSJitInfo::Method,
15082 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15083 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
15084 false, /* isInfallible. False in setters. */
15085 false, /* isMovable. Not relevant for setters. */
15086 false, /* isEliminatable. Not relevant for setters. */
15087 false, /* isAlwaysInSlot. Only relevant for getters. */
15088 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15089 false, /* isTypedMethod. Only relevant for methods. */
15090 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15091};
15092
15093MOZ_CAN_RUN_SCRIPT static bool
15094receiveNullableRecordOfNullableInts(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15095{
15096 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15099( cx, "TestJSImplInterface"
, "receiveNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15097 "TestJSImplInterface", "receiveNullableRecordOfNullableInts", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15099( cx, "TestJSImplInterface"
, "receiveNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15098 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15099( cx, "TestJSImplInterface"
, "receiveNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15099 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15099( cx, "TestJSImplInterface"
, "receiveNullableRecordOfNullableInts", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
15100
15101 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
15102 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
15103 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
15104 if (objIsXray) {
15105 unwrappedObj.emplace(cx, obj);
15106 }
15107 if (objIsXray) {
15108 // Since our object is an Xray, we can just CheckedUnwrapStatic:
15109 // we know Xrays have no dynamic unwrap behavior.
15110 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
15111 if (!unwrappedObj.ref()) {
15112 return false;
15113 }
15114 }
15115 FastErrorResult rv;
15116 Nullable<Record<nsString, Nullable<int32_t>>> result;
15117 // NOTE: This assert does NOT call the function.
15118 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableRecordOfNullableInts(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
15119 MOZ_KnownLive(self)(self)->ReceiveNullableRecordOfNullableInts(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
15120 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableRecordOfNullableInts"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableRecordOfNullableInts"
)), 0))
) {
15121 return false;
15122 }
15123 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 15123); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15123; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15124
15125 if (result.IsNull()) {
15126 args.rval().setNull();
15127 return true;
15128 }
15129
15130 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
15131 if (!returnObj) {
15132 return false;
15133 }
15134 // Scope for 'tmp'
15135 {
15136 JS::Rooted<JS::Value> tmp(cx);
15137 for (auto& entry : result.Value().Entries()) {
15138 auto& recordValue0 = entry.mValue;
15139 // Control block to let us common up the JS_DefineUCProperty calls when there
15140 // are different ways to succeed at wrapping the value.
15141 do {
15142 if (recordValue0.IsNull()) {
15143 tmp.setNull();
15144 break;
15145 }
15146 tmp.setInt32(int32_t(recordValue0.Value()));
15147 break;
15148 } while (false);
15149 if (!JS_DefineUCProperty(cx, returnObj,
15150 entry.mKey.BeginReading(),
15151 entry.mKey.Length(), tmp,
15152 JSPROP_ENUMERATE)) {
15153 return false;
15154 }
15155 }
15156 }
15157 args.rval().setObject(*returnObj);
15158 return true;
15159}
15160
15161static const JSJitInfo receiveNullableRecordOfNullableInts_methodinfo = {
15162 { (JSJitGetterOp)receiveNullableRecordOfNullableInts },
15163 { prototypes::id::TestJSImplInterface },
15164 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
15165 JSJitInfo::Method,
15166 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15167 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
15168 false, /* isInfallible. False in setters. */
15169 false, /* isMovable. Not relevant for setters. */
15170 false, /* isEliminatable. Not relevant for setters. */
15171 false, /* isAlwaysInSlot. Only relevant for getters. */
15172 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15173 false, /* isTypedMethod. Only relevant for methods. */
15174 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15175};
15176
15177MOZ_CAN_RUN_SCRIPT static bool
15178receiveAnyRecord(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15179{
15180 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15183( cx, "TestJSImplInterface"
, "receiveAnyRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15181 "TestJSImplInterface", "receiveAnyRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15183( cx, "TestJSImplInterface"
, "receiveAnyRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15182 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15183( cx, "TestJSImplInterface"
, "receiveAnyRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15183 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15183( cx, "TestJSImplInterface"
, "receiveAnyRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15184
15185 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
15186 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
15187 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
15188 if (objIsXray) {
15189 unwrappedObj.emplace(cx, obj);
15190 }
15191 if (objIsXray) {
15192 // Since our object is an Xray, we can just CheckedUnwrapStatic:
15193 // we know Xrays have no dynamic unwrap behavior.
15194 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
15195 if (!unwrappedObj.ref()) {
15196 return false;
15197 }
15198 }
15199 FastErrorResult rv;
15200 Record<nsString, JS::Value> result;
15201 RecordRooter<nsString, JS::Value> resultRooter(cx, &result);
15202 // NOTE: This assert does NOT call the function.
15203 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveAnyRecord(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
15204 MOZ_KnownLive(self)(self)->ReceiveAnyRecord(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
15205 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveAnyRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveAnyRecord"
)), 0))
) {
15206 return false;
15207 }
15208 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 15208); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15208; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15209
15210 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
15211 if (!returnObj) {
15212 return false;
15213 }
15214 // Scope for 'tmp'
15215 {
15216 JS::Rooted<JS::Value> tmp(cx);
15217 for (auto& entry : result.Entries()) {
15218 auto& recordValue0 = entry.mValue;
15219 // Control block to let us common up the JS_DefineUCProperty calls when there
15220 // are different ways to succeed at wrapping the value.
15221 do {
15222 JS::ExposeValueToActiveJS(recordValue0);
15223 tmp.set(recordValue0);
15224 if (!MaybeWrapValue(cx, &tmp)) {
15225 return false;
15226 }
15227 break;
15228 } while (false);
15229 if (!JS_DefineUCProperty(cx, returnObj,
15230 entry.mKey.BeginReading(),
15231 entry.mKey.Length(), tmp,
15232 JSPROP_ENUMERATE)) {
15233 return false;
15234 }
15235 }
15236 }
15237 args.rval().setObject(*returnObj);
15238 return true;
15239}
15240
15241static const JSJitInfo receiveAnyRecord_methodinfo = {
15242 { (JSJitGetterOp)receiveAnyRecord },
15243 { prototypes::id::TestJSImplInterface },
15244 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
15245 JSJitInfo::Method,
15246 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15247 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
15248 false, /* isInfallible. False in setters. */
15249 false, /* isMovable. Not relevant for setters. */
15250 false, /* isEliminatable. Not relevant for setters. */
15251 false, /* isAlwaysInSlot. Only relevant for getters. */
15252 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15253 false, /* isTypedMethod. Only relevant for methods. */
15254 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15255};
15256
15257MOZ_CAN_RUN_SCRIPT static bool
15258passArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15259{
15260 BindingCallContext cx(cx_, "TestJSImplInterface.passArrayBuffer");
15261 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15264( cx, "TestJSImplInterface"
, "passArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15262 "TestJSImplInterface", "passArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15264( cx, "TestJSImplInterface"
, "passArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15263 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15264( cx, "TestJSImplInterface"
, "passArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15264 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15264( cx, "TestJSImplInterface"
, "passArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15265
15266 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
15267 if (!args.requireAtLeast(cx, "TestJSImplInterface.passArrayBuffer", 1)) {
15268 return false;
15269 }
15270 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
15271 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
15272 if (objIsXray) {
15273 unwrappedObj.emplace(cx, obj);
15274 }
15275 RootedSpiderMonkeyInterface<ArrayBuffer> arg0(cx);
15276 if (args[0].isObject()) {
15277 if (!arg0.Init(&args[0].toObject())) {
15278 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBuffer");
15279 return false;
15280 }
15281 if (JS::IsSharedArrayBufferObject(arg0.Obj())) {
15282 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
15283 return false;
15284 }
15285 if (JS::IsLargeArrayBufferMaybeShared(arg0.Obj())) {
15286 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
15287 return false;
15288 }
15289 if (JS::IsResizableArrayBufferMaybeShared(arg0.Obj())) {
15290 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
15291 return false;
15292 }
15293 } else {
15294 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
15295 return false;
15296 }
15297 if (objIsXray) {
15298 // Since our object is an Xray, we can just CheckedUnwrapStatic:
15299 // we know Xrays have no dynamic unwrap behavior.
15300 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
15301 if (!unwrappedObj.ref()) {
15302 return false;
15303 }
15304 }
15305 FastErrorResult rv;
15306 // NOTE: This assert does NOT call the function.
15307 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
15308 MOZ_KnownLive(self)(self)->PassArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
15309 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passArrayBuffer"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passArrayBuffer"
)), 0))
) {
15310 return false;
15311 }
15312 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 15312); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15312; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15313 args.rval().setUndefined();
15314 return true;
15315}
15316
15317static const JSJitInfo passArrayBuffer_methodinfo = {
15318 { (JSJitGetterOp)passArrayBuffer },
15319 { prototypes::id::TestJSImplInterface },
15320 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
15321 JSJitInfo::Method,
15322 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15323 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15324 false, /* isInfallible. False in setters. */
15325 false, /* isMovable. Not relevant for setters. */
15326 false, /* isEliminatable. Not relevant for setters. */
15327 false, /* isAlwaysInSlot. Only relevant for getters. */
15328 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15329 false, /* isTypedMethod. Only relevant for methods. */
15330 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15331};
15332
15333MOZ_CAN_RUN_SCRIPT static bool
15334passNullableArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15335{
15336 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableArrayBuffer");
15337 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15340( cx, "TestJSImplInterface"
, "passNullableArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15338 "TestJSImplInterface", "passNullableArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15340( cx, "TestJSImplInterface"
, "passNullableArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15339 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15340( cx, "TestJSImplInterface"
, "passNullableArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15340 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15340( cx, "TestJSImplInterface"
, "passNullableArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15341
15342 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
15343 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableArrayBuffer", 1)) {
15344 return false;
15345 }
15346 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
15347 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
15348 if (objIsXray) {
15349 unwrappedObj.emplace(cx, obj);
15350 }
15351 RootedSpiderMonkeyInterface<Nullable<ArrayBuffer>> arg0(cx);
15352 if (args[0].isObject()) {
15353 if (!arg0.SetValue().Init(&args[0].toObject())) {
15354 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferOrNull");
15355 return false;
15356 }
15357 if (JS::IsSharedArrayBufferObject(arg0.SetValue().Obj())) {
15358 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
15359 return false;
15360 }
15361 if (JS::IsLargeArrayBufferMaybeShared(arg0.SetValue().Obj())) {
15362 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
15363 return false;
15364 }
15365 if (JS::IsResizableArrayBufferMaybeShared(arg0.SetValue().Obj())) {
15366 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
15367 return false;
15368 }
15369 } else if (args[0].isNullOrUndefined()) {
15370 arg0.SetNull();
15371 } else {
15372 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
15373 return false;
15374 }
15375 if (objIsXray) {
15376 // Since our object is an Xray, we can just CheckedUnwrapStatic:
15377 // we know Xrays have no dynamic unwrap behavior.
15378 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
15379 if (!unwrappedObj.ref()) {
15380 return false;
15381 }
15382 }
15383 FastErrorResult rv;
15384 // NOTE: This assert does NOT call the function.
15385 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
15386 MOZ_KnownLive(self)(self)->PassNullableArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
15387 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableArrayBuffer"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableArrayBuffer"
)), 0))
) {
15388 return false;
15389 }
15390 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 15390); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15390; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15391 args.rval().setUndefined();
15392 return true;
15393}
15394
15395static const JSJitInfo passNullableArrayBuffer_methodinfo = {
15396 { (JSJitGetterOp)passNullableArrayBuffer },
15397 { prototypes::id::TestJSImplInterface },
15398 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
15399 JSJitInfo::Method,
15400 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15401 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15402 false, /* isInfallible. False in setters. */
15403 false, /* isMovable. Not relevant for setters. */
15404 false, /* isEliminatable. Not relevant for setters. */
15405 false, /* isAlwaysInSlot. Only relevant for getters. */
15406 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15407 false, /* isTypedMethod. Only relevant for methods. */
15408 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15409};
15410
15411MOZ_CAN_RUN_SCRIPT static bool
15412passOptionalArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15413{
15414 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalArrayBuffer");
15415 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15418( cx, "TestJSImplInterface"
, "passOptionalArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15416 "TestJSImplInterface", "passOptionalArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15418( cx, "TestJSImplInterface"
, "passOptionalArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15417 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15418( cx, "TestJSImplInterface"
, "passOptionalArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15418 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15418( cx, "TestJSImplInterface"
, "passOptionalArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15419
15420 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
15421 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
15422 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
15423 if (objIsXray) {
15424 unwrappedObj.emplace(cx, obj);
15425 }
15426 Optional<ArrayBuffer> arg0;
15427 Maybe<SpiderMonkeyInterfaceRooter<ArrayBuffer>> arg0_holder;
15428 if (args.hasDefined(0)) {
15429 arg0.Construct();
15430 arg0_holder.emplace(cx, &arg0.Value());
15431 if (args[0].isObject()) {
15432 if (!arg0.Value().Init(&args[0].toObject())) {
15433 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBuffer");
15434 return false;
15435 }
15436 if (JS::IsSharedArrayBufferObject(arg0.Value().Obj())) {
15437 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
15438 return false;
15439 }
15440 if (JS::IsLargeArrayBufferMaybeShared(arg0.Value().Obj())) {
15441 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
15442 return false;
15443 }
15444 if (JS::IsResizableArrayBufferMaybeShared(arg0.Value().Obj())) {
15445 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
15446 return false;
15447 }
15448 } else {
15449 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
15450 return false;
15451 }
15452 }
15453 if (objIsXray) {
15454 // Since our object is an Xray, we can just CheckedUnwrapStatic:
15455 // we know Xrays have no dynamic unwrap behavior.
15456 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
15457 if (!unwrappedObj.ref()) {
15458 return false;
15459 }
15460 }
15461 FastErrorResult rv;
15462 // NOTE: This assert does NOT call the function.
15463 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
15464 MOZ_KnownLive(self)(self)->PassOptionalArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
15465 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalArrayBuffer"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalArrayBuffer"
)), 0))
) {
15466 return false;
15467 }
15468 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 15468); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15468; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15469 args.rval().setUndefined();
15470 return true;
15471}
15472
15473static const JSJitInfo passOptionalArrayBuffer_methodinfo = {
15474 { (JSJitGetterOp)passOptionalArrayBuffer },
15475 { prototypes::id::TestJSImplInterface },
15476 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
15477 JSJitInfo::Method,
15478 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15479 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15480 false, /* isInfallible. False in setters. */
15481 false, /* isMovable. Not relevant for setters. */
15482 false, /* isEliminatable. Not relevant for setters. */
15483 false, /* isAlwaysInSlot. Only relevant for getters. */
15484 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15485 false, /* isTypedMethod. Only relevant for methods. */
15486 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15487};
15488
15489MOZ_CAN_RUN_SCRIPT static bool
15490passOptionalNullableArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15491{
15492 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableArrayBuffer");
15493 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15496( cx, "TestJSImplInterface"
, "passOptionalNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15494 "TestJSImplInterface", "passOptionalNullableArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15496( cx, "TestJSImplInterface"
, "passOptionalNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15495 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15496( cx, "TestJSImplInterface"
, "passOptionalNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15496 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15496( cx, "TestJSImplInterface"
, "passOptionalNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
15497
15498 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
15499 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
15500 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
15501 if (objIsXray) {
15502 unwrappedObj.emplace(cx, obj);
15503 }
15504 Optional<Nullable<ArrayBuffer>> arg0;
15505 Maybe<SpiderMonkeyInterfaceRooter<ArrayBuffer>> arg0_holder;
15506 if (args.hasDefined(0)) {
15507 arg0.Construct();
15508 arg0_holder.emplace(cx, &arg0.Value().SetValue());
15509 if (args[0].isObject()) {
15510 if (!arg0.Value().SetValue().Init(&args[0].toObject())) {
15511 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferOrNull");
15512 return false;
15513 }
15514 if (JS::IsSharedArrayBufferObject(arg0.Value().SetValue().Obj())) {
15515 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
15516 return false;
15517 }
15518 if (JS::IsLargeArrayBufferMaybeShared(arg0.Value().SetValue().Obj())) {
15519 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
15520 return false;
15521 }
15522 if (JS::IsResizableArrayBufferMaybeShared(arg0.Value().SetValue().Obj())) {
15523 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
15524 return false;
15525 }
15526 } else if (args[0].isNullOrUndefined()) {
15527 arg0.Value().SetNull();
15528 } else {
15529 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
15530 return false;
15531 }
15532 }
15533 if (objIsXray) {
15534 // Since our object is an Xray, we can just CheckedUnwrapStatic:
15535 // we know Xrays have no dynamic unwrap behavior.
15536 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
15537 if (!unwrappedObj.ref()) {
15538 return false;
15539 }
15540 }
15541 FastErrorResult rv;
15542 // NOTE: This assert does NOT call the function.
15543 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
15544 MOZ_KnownLive(self)(self)->PassOptionalNullableArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
15545 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableArrayBuffer"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableArrayBuffer"
)), 0))
) {
15546 return false;
15547 }
15548 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 15548); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15548; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15549 args.rval().setUndefined();
15550 return true;
15551}
15552
15553static const JSJitInfo passOptionalNullableArrayBuffer_methodinfo = {
15554 { (JSJitGetterOp)passOptionalNullableArrayBuffer },
15555 { prototypes::id::TestJSImplInterface },
15556 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
15557 JSJitInfo::Method,
15558 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15559 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15560 false, /* isInfallible. False in setters. */
15561 false, /* isMovable. Not relevant for setters. */
15562 false, /* isEliminatable. Not relevant for setters. */
15563 false, /* isAlwaysInSlot. Only relevant for getters. */
15564 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15565 false, /* isTypedMethod. Only relevant for methods. */
15566 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15567};
15568
15569MOZ_CAN_RUN_SCRIPT static bool
15570passOptionalNullableArrayBufferWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15571{
15572 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableArrayBufferWithDefaultValue");
15573 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15576( cx, "TestJSImplInterface"
, "passOptionalNullableArrayBufferWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15574 "TestJSImplInterface", "passOptionalNullableArrayBufferWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15576( cx, "TestJSImplInterface"
, "passOptionalNullableArrayBufferWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15575 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15576( cx, "TestJSImplInterface"
, "passOptionalNullableArrayBufferWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
15576 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15576( cx, "TestJSImplInterface"
, "passOptionalNullableArrayBufferWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
15577
15578 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
15579 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
15580 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
15581 if (objIsXray) {
15582 unwrappedObj.emplace(cx, obj);
15583 }
15584 RootedSpiderMonkeyInterface<Nullable<ArrayBuffer>> arg0(cx);
15585 if (args.hasDefined(0)) {
15586 if (args[0].isObject()) {
15587 if (!arg0.SetValue().Init(&args[0].toObject())) {
15588 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferOrNull");
15589 return false;
15590 }
15591 if (JS::IsSharedArrayBufferObject(arg0.SetValue().Obj())) {
15592 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
15593 return false;
15594 }
15595 if (JS::IsLargeArrayBufferMaybeShared(arg0.SetValue().Obj())) {
15596 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
15597 return false;
15598 }
15599 if (JS::IsResizableArrayBufferMaybeShared(arg0.SetValue().Obj())) {
15600 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
15601 return false;
15602 }
15603 } else if (args[0].isNullOrUndefined()) {
15604 arg0.SetNull();
15605 } else {
15606 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
15607 return false;
15608 }
15609 } else {
15610 arg0.SetNull();
15611 }
15612 if (objIsXray) {
15613 // Since our object is an Xray, we can just CheckedUnwrapStatic:
15614 // we know Xrays have no dynamic unwrap behavior.
15615 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
15616 if (!unwrappedObj.ref()) {
15617 return false;
15618 }
15619 }
15620 FastErrorResult rv;
15621 // NOTE: This assert does NOT call the function.
15622 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableArrayBufferWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
15623 MOZ_KnownLive(self)(self)->PassOptionalNullableArrayBufferWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
15624 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableArrayBufferWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableArrayBufferWithDefaultValue"
)), 0))
) {
15625 return false;
15626 }
15627 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 15627); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15627; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15628 args.rval().setUndefined();
15629 return true;
15630}
15631
15632static const JSJitInfo passOptionalNullableArrayBufferWithDefaultValue_methodinfo = {
15633 { (JSJitGetterOp)passOptionalNullableArrayBufferWithDefaultValue },
15634 { prototypes::id::TestJSImplInterface },
15635 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
15636 JSJitInfo::Method,
15637 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15638 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15639 false, /* isInfallible. False in setters. */
15640 false, /* isMovable. Not relevant for setters. */
15641 false, /* isEliminatable. Not relevant for setters. */
15642 false, /* isAlwaysInSlot. Only relevant for getters. */
15643 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15644 false, /* isTypedMethod. Only relevant for methods. */
15645 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15646};
15647
15648MOZ_CAN_RUN_SCRIPT static bool
15649passArrayBufferView(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15650{
15651 BindingCallContext cx(cx_, "TestJSImplInterface.passArrayBufferView");
15652 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15655( cx, "TestJSImplInterface"
, "passArrayBufferView", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15653 "TestJSImplInterface", "passArrayBufferView", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15655( cx, "TestJSImplInterface"
, "passArrayBufferView", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15654 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15655( cx, "TestJSImplInterface"
, "passArrayBufferView", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15655 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15655( cx, "TestJSImplInterface"
, "passArrayBufferView", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15656
15657 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
15658 if (!args.requireAtLeast(cx, "TestJSImplInterface.passArrayBufferView", 1)) {
15659 return false;
15660 }
15661 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
15662 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
15663 if (objIsXray) {
15664 unwrappedObj.emplace(cx, obj);
15665 }
15666 RootedSpiderMonkeyInterface<ArrayBufferView> arg0(cx);
15667 if (args[0].isObject()) {
15668 if (!arg0.Init(&args[0].toObject())) {
15669 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferView");
15670 return false;
15671 }
15672 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
15673 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
15674 return false;
15675 }
15676 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
15677 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
15678 return false;
15679 }
15680 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
15681 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
15682 return false;
15683 }
15684 } else {
15685 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
15686 return false;
15687 }
15688 if (objIsXray) {
15689 // Since our object is an Xray, we can just CheckedUnwrapStatic:
15690 // we know Xrays have no dynamic unwrap behavior.
15691 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
15692 if (!unwrappedObj.ref()) {
15693 return false;
15694 }
15695 }
15696 FastErrorResult rv;
15697 // NOTE: This assert does NOT call the function.
15698 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassArrayBufferView(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
15699 MOZ_KnownLive(self)(self)->PassArrayBufferView(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
15700 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passArrayBufferView"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passArrayBufferView"
)), 0))
) {
15701 return false;
15702 }
15703 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 15703); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15703; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15704 args.rval().setUndefined();
15705 return true;
15706}
15707
15708static const JSJitInfo passArrayBufferView_methodinfo = {
15709 { (JSJitGetterOp)passArrayBufferView },
15710 { prototypes::id::TestJSImplInterface },
15711 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
15712 JSJitInfo::Method,
15713 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15714 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15715 false, /* isInfallible. False in setters. */
15716 false, /* isMovable. Not relevant for setters. */
15717 false, /* isEliminatable. Not relevant for setters. */
15718 false, /* isAlwaysInSlot. Only relevant for getters. */
15719 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15720 false, /* isTypedMethod. Only relevant for methods. */
15721 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15722};
15723
15724MOZ_CAN_RUN_SCRIPT static bool
15725passInt8Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15726{
15727 BindingCallContext cx(cx_, "TestJSImplInterface.passInt8Array");
15728 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15731( cx, "TestJSImplInterface"
, "passInt8Array", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15729 "TestJSImplInterface", "passInt8Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15731( cx, "TestJSImplInterface"
, "passInt8Array", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15730 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15731( cx, "TestJSImplInterface"
, "passInt8Array", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15731 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15731( cx, "TestJSImplInterface"
, "passInt8Array", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15732
15733 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
15734 if (!args.requireAtLeast(cx, "TestJSImplInterface.passInt8Array", 1)) {
15735 return false;
15736 }
15737 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
15738 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
15739 if (objIsXray) {
15740 unwrappedObj.emplace(cx, obj);
15741 }
15742 RootedSpiderMonkeyInterface<Int8Array> arg0(cx);
15743 if (args[0].isObject()) {
15744 if (!arg0.Init(&args[0].toObject())) {
15745 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Int8Array");
15746 return false;
15747 }
15748 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
15749 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
15750 return false;
15751 }
15752 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
15753 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
15754 return false;
15755 }
15756 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
15757 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
15758 return false;
15759 }
15760 } else {
15761 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
15762 return false;
15763 }
15764 if (objIsXray) {
15765 // Since our object is an Xray, we can just CheckedUnwrapStatic:
15766 // we know Xrays have no dynamic unwrap behavior.
15767 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
15768 if (!unwrappedObj.ref()) {
15769 return false;
15770 }
15771 }
15772 FastErrorResult rv;
15773 // NOTE: This assert does NOT call the function.
15774 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassInt8Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
15775 MOZ_KnownLive(self)(self)->PassInt8Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
15776 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passInt8Array"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passInt8Array"
)), 0))
) {
15777 return false;
15778 }
15779 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 15779); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15779; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15780 args.rval().setUndefined();
15781 return true;
15782}
15783
15784static const JSJitInfo passInt8Array_methodinfo = {
15785 { (JSJitGetterOp)passInt8Array },
15786 { prototypes::id::TestJSImplInterface },
15787 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
15788 JSJitInfo::Method,
15789 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15790 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15791 false, /* isInfallible. False in setters. */
15792 false, /* isMovable. Not relevant for setters. */
15793 false, /* isEliminatable. Not relevant for setters. */
15794 false, /* isAlwaysInSlot. Only relevant for getters. */
15795 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15796 false, /* isTypedMethod. Only relevant for methods. */
15797 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15798};
15799
15800MOZ_CAN_RUN_SCRIPT static bool
15801passInt16Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15802{
15803 BindingCallContext cx(cx_, "TestJSImplInterface.passInt16Array");
15804 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15807( cx, "TestJSImplInterface"
, "passInt16Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15805 "TestJSImplInterface", "passInt16Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15807( cx, "TestJSImplInterface"
, "passInt16Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15806 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15807( cx, "TestJSImplInterface"
, "passInt16Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15807 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15807( cx, "TestJSImplInterface"
, "passInt16Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15808
15809 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
15810 if (!args.requireAtLeast(cx, "TestJSImplInterface.passInt16Array", 1)) {
15811 return false;
15812 }
15813 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
15814 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
15815 if (objIsXray) {
15816 unwrappedObj.emplace(cx, obj);
15817 }
15818 RootedSpiderMonkeyInterface<Int16Array> arg0(cx);
15819 if (args[0].isObject()) {
15820 if (!arg0.Init(&args[0].toObject())) {
15821 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Int16Array");
15822 return false;
15823 }
15824 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
15825 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
15826 return false;
15827 }
15828 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
15829 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
15830 return false;
15831 }
15832 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
15833 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
15834 return false;
15835 }
15836 } else {
15837 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
15838 return false;
15839 }
15840 if (objIsXray) {
15841 // Since our object is an Xray, we can just CheckedUnwrapStatic:
15842 // we know Xrays have no dynamic unwrap behavior.
15843 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
15844 if (!unwrappedObj.ref()) {
15845 return false;
15846 }
15847 }
15848 FastErrorResult rv;
15849 // NOTE: This assert does NOT call the function.
15850 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassInt16Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
15851 MOZ_KnownLive(self)(self)->PassInt16Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
15852 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passInt16Array"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passInt16Array"
)), 0))
) {
15853 return false;
15854 }
15855 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 15855); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15855; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15856 args.rval().setUndefined();
15857 return true;
15858}
15859
15860static const JSJitInfo passInt16Array_methodinfo = {
15861 { (JSJitGetterOp)passInt16Array },
15862 { prototypes::id::TestJSImplInterface },
15863 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
15864 JSJitInfo::Method,
15865 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15866 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15867 false, /* isInfallible. False in setters. */
15868 false, /* isMovable. Not relevant for setters. */
15869 false, /* isEliminatable. Not relevant for setters. */
15870 false, /* isAlwaysInSlot. Only relevant for getters. */
15871 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15872 false, /* isTypedMethod. Only relevant for methods. */
15873 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15874};
15875
15876MOZ_CAN_RUN_SCRIPT static bool
15877passInt32Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15878{
15879 BindingCallContext cx(cx_, "TestJSImplInterface.passInt32Array");
15880 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15883( cx, "TestJSImplInterface"
, "passInt32Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15881 "TestJSImplInterface", "passInt32Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15883( cx, "TestJSImplInterface"
, "passInt32Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15882 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15883( cx, "TestJSImplInterface"
, "passInt32Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15883 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15883( cx, "TestJSImplInterface"
, "passInt32Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15884
15885 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
15886 if (!args.requireAtLeast(cx, "TestJSImplInterface.passInt32Array", 1)) {
15887 return false;
15888 }
15889 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
15890 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
15891 if (objIsXray) {
15892 unwrappedObj.emplace(cx, obj);
15893 }
15894 RootedSpiderMonkeyInterface<Int32Array> arg0(cx);
15895 if (args[0].isObject()) {
15896 if (!arg0.Init(&args[0].toObject())) {
15897 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Int32Array");
15898 return false;
15899 }
15900 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
15901 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
15902 return false;
15903 }
15904 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
15905 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
15906 return false;
15907 }
15908 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
15909 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
15910 return false;
15911 }
15912 } else {
15913 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
15914 return false;
15915 }
15916 if (objIsXray) {
15917 // Since our object is an Xray, we can just CheckedUnwrapStatic:
15918 // we know Xrays have no dynamic unwrap behavior.
15919 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
15920 if (!unwrappedObj.ref()) {
15921 return false;
15922 }
15923 }
15924 FastErrorResult rv;
15925 // NOTE: This assert does NOT call the function.
15926 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassInt32Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
15927 MOZ_KnownLive(self)(self)->PassInt32Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
15928 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passInt32Array"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passInt32Array"
)), 0))
) {
15929 return false;
15930 }
15931 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 15931); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 15931; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
15932 args.rval().setUndefined();
15933 return true;
15934}
15935
15936static const JSJitInfo passInt32Array_methodinfo = {
15937 { (JSJitGetterOp)passInt32Array },
15938 { prototypes::id::TestJSImplInterface },
15939 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
15940 JSJitInfo::Method,
15941 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
15942 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
15943 false, /* isInfallible. False in setters. */
15944 false, /* isMovable. Not relevant for setters. */
15945 false, /* isEliminatable. Not relevant for setters. */
15946 false, /* isAlwaysInSlot. Only relevant for getters. */
15947 false, /* isLazilyCachedInSlot. Only relevant for getters. */
15948 false, /* isTypedMethod. Only relevant for methods. */
15949 0 /* Reserved slot index, if we're stored in a slot, else 0. */
15950};
15951
15952MOZ_CAN_RUN_SCRIPT static bool
15953passUint8Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
15954{
15955 BindingCallContext cx(cx_, "TestJSImplInterface.passUint8Array");
15956 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject15959( cx, "TestJSImplInterface"
, "passUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15957 "TestJSImplInterface", "passUint8Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject15959( cx, "TestJSImplInterface"
, "passUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15958 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject15959( cx, "TestJSImplInterface"
, "passUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
15959 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject15959( cx, "TestJSImplInterface"
, "passUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
15960
15961 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
15962 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUint8Array", 1)) {
15963 return false;
15964 }
15965 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
15966 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
15967 if (objIsXray) {
15968 unwrappedObj.emplace(cx, obj);
15969 }
15970 RootedSpiderMonkeyInterface<Uint8Array> arg0(cx);
15971 if (args[0].isObject()) {
15972 if (!arg0.Init(&args[0].toObject())) {
15973 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Uint8Array");
15974 return false;
15975 }
15976 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
15977 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
15978 return false;
15979 }
15980 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
15981 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
15982 return false;
15983 }
15984 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
15985 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
15986 return false;
15987 }
15988 } else {
15989 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
15990 return false;
15991 }
15992 if (objIsXray) {
15993 // Since our object is an Xray, we can just CheckedUnwrapStatic:
15994 // we know Xrays have no dynamic unwrap behavior.
15995 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
15996 if (!unwrappedObj.ref()) {
15997 return false;
15998 }
15999 }
16000 FastErrorResult rv;
16001 // NOTE: This assert does NOT call the function.
16002 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUint8Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
16003 MOZ_KnownLive(self)(self)->PassUint8Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
16004 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUint8Array"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUint8Array"
)), 0))
) {
16005 return false;
16006 }
16007 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 16007); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16007; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16008 args.rval().setUndefined();
16009 return true;
16010}
16011
16012static const JSJitInfo passUint8Array_methodinfo = {
16013 { (JSJitGetterOp)passUint8Array },
16014 { prototypes::id::TestJSImplInterface },
16015 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
16016 JSJitInfo::Method,
16017 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16018 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16019 false, /* isInfallible. False in setters. */
16020 false, /* isMovable. Not relevant for setters. */
16021 false, /* isEliminatable. Not relevant for setters. */
16022 false, /* isAlwaysInSlot. Only relevant for getters. */
16023 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16024 false, /* isTypedMethod. Only relevant for methods. */
16025 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16026};
16027
16028MOZ_CAN_RUN_SCRIPT static bool
16029passUint16Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16030{
16031 BindingCallContext cx(cx_, "TestJSImplInterface.passUint16Array");
16032 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16035( cx, "TestJSImplInterface"
, "passUint16Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16033 "TestJSImplInterface", "passUint16Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16035( cx, "TestJSImplInterface"
, "passUint16Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16034 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16035( cx, "TestJSImplInterface"
, "passUint16Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16035 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16035( cx, "TestJSImplInterface"
, "passUint16Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16036
16037 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
16038 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUint16Array", 1)) {
16039 return false;
16040 }
16041 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
16042 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
16043 if (objIsXray) {
16044 unwrappedObj.emplace(cx, obj);
16045 }
16046 RootedSpiderMonkeyInterface<Uint16Array> arg0(cx);
16047 if (args[0].isObject()) {
16048 if (!arg0.Init(&args[0].toObject())) {
16049 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Uint16Array");
16050 return false;
16051 }
16052 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
16053 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
16054 return false;
16055 }
16056 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
16057 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
16058 return false;
16059 }
16060 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
16061 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
16062 return false;
16063 }
16064 } else {
16065 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
16066 return false;
16067 }
16068 if (objIsXray) {
16069 // Since our object is an Xray, we can just CheckedUnwrapStatic:
16070 // we know Xrays have no dynamic unwrap behavior.
16071 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
16072 if (!unwrappedObj.ref()) {
16073 return false;
16074 }
16075 }
16076 FastErrorResult rv;
16077 // NOTE: This assert does NOT call the function.
16078 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUint16Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
16079 MOZ_KnownLive(self)(self)->PassUint16Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
16080 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUint16Array"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUint16Array"
)), 0))
) {
16081 return false;
16082 }
16083 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 16083); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16083; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16084 args.rval().setUndefined();
16085 return true;
16086}
16087
16088static const JSJitInfo passUint16Array_methodinfo = {
16089 { (JSJitGetterOp)passUint16Array },
16090 { prototypes::id::TestJSImplInterface },
16091 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
16092 JSJitInfo::Method,
16093 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16094 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16095 false, /* isInfallible. False in setters. */
16096 false, /* isMovable. Not relevant for setters. */
16097 false, /* isEliminatable. Not relevant for setters. */
16098 false, /* isAlwaysInSlot. Only relevant for getters. */
16099 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16100 false, /* isTypedMethod. Only relevant for methods. */
16101 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16102};
16103
16104MOZ_CAN_RUN_SCRIPT static bool
16105passUint32Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16106{
16107 BindingCallContext cx(cx_, "TestJSImplInterface.passUint32Array");
16108 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16111( cx, "TestJSImplInterface"
, "passUint32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16109 "TestJSImplInterface", "passUint32Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16111( cx, "TestJSImplInterface"
, "passUint32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16110 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16111( cx, "TestJSImplInterface"
, "passUint32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16111 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16111( cx, "TestJSImplInterface"
, "passUint32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16112
16113 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
16114 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUint32Array", 1)) {
16115 return false;
16116 }
16117 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
16118 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
16119 if (objIsXray) {
16120 unwrappedObj.emplace(cx, obj);
16121 }
16122 RootedSpiderMonkeyInterface<Uint32Array> arg0(cx);
16123 if (args[0].isObject()) {
16124 if (!arg0.Init(&args[0].toObject())) {
16125 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Uint32Array");
16126 return false;
16127 }
16128 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
16129 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
16130 return false;
16131 }
16132 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
16133 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
16134 return false;
16135 }
16136 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
16137 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
16138 return false;
16139 }
16140 } else {
16141 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
16142 return false;
16143 }
16144 if (objIsXray) {
16145 // Since our object is an Xray, we can just CheckedUnwrapStatic:
16146 // we know Xrays have no dynamic unwrap behavior.
16147 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
16148 if (!unwrappedObj.ref()) {
16149 return false;
16150 }
16151 }
16152 FastErrorResult rv;
16153 // NOTE: This assert does NOT call the function.
16154 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUint32Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
16155 MOZ_KnownLive(self)(self)->PassUint32Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
16156 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUint32Array"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUint32Array"
)), 0))
) {
16157 return false;
16158 }
16159 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 16159); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16159; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16160 args.rval().setUndefined();
16161 return true;
16162}
16163
16164static const JSJitInfo passUint32Array_methodinfo = {
16165 { (JSJitGetterOp)passUint32Array },
16166 { prototypes::id::TestJSImplInterface },
16167 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
16168 JSJitInfo::Method,
16169 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16170 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16171 false, /* isInfallible. False in setters. */
16172 false, /* isMovable. Not relevant for setters. */
16173 false, /* isEliminatable. Not relevant for setters. */
16174 false, /* isAlwaysInSlot. Only relevant for getters. */
16175 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16176 false, /* isTypedMethod. Only relevant for methods. */
16177 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16178};
16179
16180MOZ_CAN_RUN_SCRIPT static bool
16181passUint8ClampedArray(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16182{
16183 BindingCallContext cx(cx_, "TestJSImplInterface.passUint8ClampedArray");
16184 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16187( cx, "TestJSImplInterface"
, "passUint8ClampedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16185 "TestJSImplInterface", "passUint8ClampedArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16187( cx, "TestJSImplInterface"
, "passUint8ClampedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16186 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16187( cx, "TestJSImplInterface"
, "passUint8ClampedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16187 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16187( cx, "TestJSImplInterface"
, "passUint8ClampedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16188
16189 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
16190 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUint8ClampedArray", 1)) {
16191 return false;
16192 }
16193 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
16194 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
16195 if (objIsXray) {
16196 unwrappedObj.emplace(cx, obj);
16197 }
16198 RootedSpiderMonkeyInterface<Uint8ClampedArray> arg0(cx);
16199 if (args[0].isObject()) {
16200 if (!arg0.Init(&args[0].toObject())) {
16201 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Uint8ClampedArray");
16202 return false;
16203 }
16204 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
16205 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
16206 return false;
16207 }
16208 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
16209 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
16210 return false;
16211 }
16212 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
16213 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
16214 return false;
16215 }
16216 } else {
16217 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
16218 return false;
16219 }
16220 if (objIsXray) {
16221 // Since our object is an Xray, we can just CheckedUnwrapStatic:
16222 // we know Xrays have no dynamic unwrap behavior.
16223 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
16224 if (!unwrappedObj.ref()) {
16225 return false;
16226 }
16227 }
16228 FastErrorResult rv;
16229 // NOTE: This assert does NOT call the function.
16230 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUint8ClampedArray(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
16231 MOZ_KnownLive(self)(self)->PassUint8ClampedArray(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
16232 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUint8ClampedArray"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUint8ClampedArray"
)), 0))
) {
16233 return false;
16234 }
16235 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 16235); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16235; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16236 args.rval().setUndefined();
16237 return true;
16238}
16239
16240static const JSJitInfo passUint8ClampedArray_methodinfo = {
16241 { (JSJitGetterOp)passUint8ClampedArray },
16242 { prototypes::id::TestJSImplInterface },
16243 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
16244 JSJitInfo::Method,
16245 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16246 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16247 false, /* isInfallible. False in setters. */
16248 false, /* isMovable. Not relevant for setters. */
16249 false, /* isEliminatable. Not relevant for setters. */
16250 false, /* isAlwaysInSlot. Only relevant for getters. */
16251 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16252 false, /* isTypedMethod. Only relevant for methods. */
16253 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16254};
16255
16256MOZ_CAN_RUN_SCRIPT static bool
16257passFloat32Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16258{
16259 BindingCallContext cx(cx_, "TestJSImplInterface.passFloat32Array");
16260 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16263( cx, "TestJSImplInterface"
, "passFloat32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16261 "TestJSImplInterface", "passFloat32Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16263( cx, "TestJSImplInterface"
, "passFloat32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16262 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16263( cx, "TestJSImplInterface"
, "passFloat32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16263 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16263( cx, "TestJSImplInterface"
, "passFloat32Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16264
16265 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
16266 if (!args.requireAtLeast(cx, "TestJSImplInterface.passFloat32Array", 1)) {
16267 return false;
16268 }
16269 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
16270 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
16271 if (objIsXray) {
16272 unwrappedObj.emplace(cx, obj);
16273 }
16274 RootedSpiderMonkeyInterface<Float32Array> arg0(cx);
16275 if (args[0].isObject()) {
16276 if (!arg0.Init(&args[0].toObject())) {
16277 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Float32Array");
16278 return false;
16279 }
16280 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
16281 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
16282 return false;
16283 }
16284 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
16285 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
16286 return false;
16287 }
16288 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
16289 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
16290 return false;
16291 }
16292 } else {
16293 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
16294 return false;
16295 }
16296 if (objIsXray) {
16297 // Since our object is an Xray, we can just CheckedUnwrapStatic:
16298 // we know Xrays have no dynamic unwrap behavior.
16299 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
16300 if (!unwrappedObj.ref()) {
16301 return false;
16302 }
16303 }
16304 FastErrorResult rv;
16305 // NOTE: This assert does NOT call the function.
16306 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassFloat32Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
16307 MOZ_KnownLive(self)(self)->PassFloat32Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
16308 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passFloat32Array"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passFloat32Array"
)), 0))
) {
16309 return false;
16310 }
16311 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 16311); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16311; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16312 args.rval().setUndefined();
16313 return true;
16314}
16315
16316static const JSJitInfo passFloat32Array_methodinfo = {
16317 { (JSJitGetterOp)passFloat32Array },
16318 { prototypes::id::TestJSImplInterface },
16319 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
16320 JSJitInfo::Method,
16321 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16322 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16323 false, /* isInfallible. False in setters. */
16324 false, /* isMovable. Not relevant for setters. */
16325 false, /* isEliminatable. Not relevant for setters. */
16326 false, /* isAlwaysInSlot. Only relevant for getters. */
16327 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16328 false, /* isTypedMethod. Only relevant for methods. */
16329 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16330};
16331
16332MOZ_CAN_RUN_SCRIPT static bool
16333passFloat64Array(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16334{
16335 BindingCallContext cx(cx_, "TestJSImplInterface.passFloat64Array");
16336 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16339( cx, "TestJSImplInterface"
, "passFloat64Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16337 "TestJSImplInterface", "passFloat64Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16339( cx, "TestJSImplInterface"
, "passFloat64Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16338 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16339( cx, "TestJSImplInterface"
, "passFloat64Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16339 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16339( cx, "TestJSImplInterface"
, "passFloat64Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16340
16341 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
16342 if (!args.requireAtLeast(cx, "TestJSImplInterface.passFloat64Array", 1)) {
16343 return false;
16344 }
16345 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
16346 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
16347 if (objIsXray) {
16348 unwrappedObj.emplace(cx, obj);
16349 }
16350 RootedSpiderMonkeyInterface<Float64Array> arg0(cx);
16351 if (args[0].isObject()) {
16352 if (!arg0.Init(&args[0].toObject())) {
16353 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Float64Array");
16354 return false;
16355 }
16356 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
16357 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
16358 return false;
16359 }
16360 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
16361 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
16362 return false;
16363 }
16364 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
16365 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
16366 return false;
16367 }
16368 } else {
16369 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
16370 return false;
16371 }
16372 if (objIsXray) {
16373 // Since our object is an Xray, we can just CheckedUnwrapStatic:
16374 // we know Xrays have no dynamic unwrap behavior.
16375 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
16376 if (!unwrappedObj.ref()) {
16377 return false;
16378 }
16379 }
16380 FastErrorResult rv;
16381 // NOTE: This assert does NOT call the function.
16382 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassFloat64Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
16383 MOZ_KnownLive(self)(self)->PassFloat64Array(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
16384 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passFloat64Array"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passFloat64Array"
)), 0))
) {
16385 return false;
16386 }
16387 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 16387); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16387; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16388 args.rval().setUndefined();
16389 return true;
16390}
16391
16392static const JSJitInfo passFloat64Array_methodinfo = {
16393 { (JSJitGetterOp)passFloat64Array },
16394 { prototypes::id::TestJSImplInterface },
16395 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
16396 JSJitInfo::Method,
16397 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16398 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16399 false, /* isInfallible. False in setters. */
16400 false, /* isMovable. Not relevant for setters. */
16401 false, /* isEliminatable. Not relevant for setters. */
16402 false, /* isAlwaysInSlot. Only relevant for getters. */
16403 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16404 false, /* isTypedMethod. Only relevant for methods. */
16405 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16406};
16407
16408MOZ_CAN_RUN_SCRIPT static bool
16409passSequenceOfArrayBuffers(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16410{
16411 BindingCallContext cx(cx_, "TestJSImplInterface.passSequenceOfArrayBuffers");
16412 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16415( cx, "TestJSImplInterface"
, "passSequenceOfArrayBuffers", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16413 "TestJSImplInterface", "passSequenceOfArrayBuffers", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16415( cx, "TestJSImplInterface"
, "passSequenceOfArrayBuffers", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16414 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16415( cx, "TestJSImplInterface"
, "passSequenceOfArrayBuffers", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16415 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16415( cx, "TestJSImplInterface"
, "passSequenceOfArrayBuffers", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16416
16417 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
16418 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequenceOfArrayBuffers", 1)) {
16419 return false;
16420 }
16421 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
16422 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
16423 if (objIsXray) {
16424 unwrappedObj.emplace(cx, obj);
16425 }
16426 binding_detail::AutoSequence<ArrayBuffer> arg0;
16427 SequenceRooter<ArrayBuffer> arg0_holder(cx, &arg0);
16428 if (args[0].isObject()) {
16429 JS::ForOfIterator iter(cx);
16430 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
16431 return false;
16432 }
16433 if (!iter.valueIsIterable()) {
16434 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
16435 return false;
16436 }
16437 binding_detail::AutoSequence<ArrayBuffer> &arr = arg0;
16438 JS::Rooted<JS::Value> temp(cx);
16439 while (true) {
16440 bool done;
16441 if (!iter.next(&temp, &done)) {
16442 return false;
16443 }
16444 if (done) {
16445 break;
16446 }
16447 ArrayBuffer* slotPtr = arr.AppendElement(mozilla::fallible);
16448 if (!slotPtr) {
16449 JS_ReportOutOfMemory(cx);
16450 return false;
16451 }
16452 ArrayBuffer& slot = *slotPtr;
16453 if (temp.isObject()) {
16454 if (!slot.Init(&temp.toObject())) {
16455 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "ArrayBuffer");
16456 return false;
16457 }
16458 if (JS::IsSharedArrayBufferObject(slot.Obj())) {
16459 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Element of argument 1");
16460 return false;
16461 }
16462 if (JS::IsLargeArrayBufferMaybeShared(slot.Obj())) {
16463 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Element of argument 1");
16464 return false;
16465 }
16466 if (JS::IsResizableArrayBufferMaybeShared(slot.Obj())) {
16467 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Element of argument 1");
16468 return false;
16469 }
16470 } else {
16471 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
16472 return false;
16473 }
16474 }
16475 } else {
16476 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
16477 return false;
16478 }
16479 if (objIsXray) {
16480 // Since our object is an Xray, we can just CheckedUnwrapStatic:
16481 // we know Xrays have no dynamic unwrap behavior.
16482 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
16483 if (!unwrappedObj.ref()) {
16484 return false;
16485 }
16486 }
16487 FastErrorResult rv;
16488 // NOTE: This assert does NOT call the function.
16489 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfArrayBuffers(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
16490 MOZ_KnownLive(self)(self)->PassSequenceOfArrayBuffers(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
16491 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfArrayBuffers"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfArrayBuffers"
)), 0))
) {
16492 return false;
16493 }
16494 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 16494); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16494; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16495 args.rval().setUndefined();
16496 return true;
16497}
16498
16499static const JSJitInfo passSequenceOfArrayBuffers_methodinfo = {
16500 { (JSJitGetterOp)passSequenceOfArrayBuffers },
16501 { prototypes::id::TestJSImplInterface },
16502 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
16503 JSJitInfo::Method,
16504 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16505 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16506 false, /* isInfallible. False in setters. */
16507 false, /* isMovable. Not relevant for setters. */
16508 false, /* isEliminatable. Not relevant for setters. */
16509 false, /* isAlwaysInSlot. Only relevant for getters. */
16510 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16511 false, /* isTypedMethod. Only relevant for methods. */
16512 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16513};
16514
16515MOZ_CAN_RUN_SCRIPT static bool
16516passSequenceOfNullableArrayBuffers(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16517{
16518 BindingCallContext cx(cx_, "TestJSImplInterface.passSequenceOfNullableArrayBuffers");
16519 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16522( cx, "TestJSImplInterface"
, "passSequenceOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16520 "TestJSImplInterface", "passSequenceOfNullableArrayBuffers", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16522( cx, "TestJSImplInterface"
, "passSequenceOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16521 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16522( cx, "TestJSImplInterface"
, "passSequenceOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16522 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16522( cx, "TestJSImplInterface"
, "passSequenceOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16523
16524 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
16525 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequenceOfNullableArrayBuffers", 1)) {
16526 return false;
16527 }
16528 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
16529 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
16530 if (objIsXray) {
16531 unwrappedObj.emplace(cx, obj);
16532 }
16533 binding_detail::AutoSequence<Nullable<ArrayBuffer>> arg0;
16534 SequenceRooter<Nullable<ArrayBuffer>> arg0_holder(cx, &arg0);
16535 if (args[0].isObject()) {
16536 JS::ForOfIterator iter(cx);
16537 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
16538 return false;
16539 }
16540 if (!iter.valueIsIterable()) {
16541 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
16542 return false;
16543 }
16544 binding_detail::AutoSequence<Nullable<ArrayBuffer>> &arr = arg0;
16545 JS::Rooted<JS::Value> temp(cx);
16546 while (true) {
16547 bool done;
16548 if (!iter.next(&temp, &done)) {
16549 return false;
16550 }
16551 if (done) {
16552 break;
16553 }
16554 Nullable<ArrayBuffer>* slotPtr = arr.AppendElement(mozilla::fallible);
16555 if (!slotPtr) {
16556 JS_ReportOutOfMemory(cx);
16557 return false;
16558 }
16559 Nullable<ArrayBuffer>& slot = *slotPtr;
16560 if (temp.isObject()) {
16561 if (!slot.SetValue().Init(&temp.toObject())) {
16562 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of argument 1", "ArrayBufferOrNull");
16563 return false;
16564 }
16565 if (JS::IsSharedArrayBufferObject(slot.SetValue().Obj())) {
16566 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Element of argument 1");
16567 return false;
16568 }
16569 if (JS::IsLargeArrayBufferMaybeShared(slot.SetValue().Obj())) {
16570 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Element of argument 1");
16571 return false;
16572 }
16573 if (JS::IsResizableArrayBufferMaybeShared(slot.SetValue().Obj())) {
16574 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Element of argument 1");
16575 return false;
16576 }
16577 } else if (temp.isNullOrUndefined()) {
16578 slot.SetNull();
16579 } else {
16580 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
16581 return false;
16582 }
16583 }
16584 } else {
16585 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
16586 return false;
16587 }
16588 if (objIsXray) {
16589 // Since our object is an Xray, we can just CheckedUnwrapStatic:
16590 // we know Xrays have no dynamic unwrap behavior.
16591 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
16592 if (!unwrappedObj.ref()) {
16593 return false;
16594 }
16595 }
16596 FastErrorResult rv;
16597 // NOTE: This assert does NOT call the function.
16598 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfNullableArrayBuffers(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
16599 MOZ_KnownLive(self)(self)->PassSequenceOfNullableArrayBuffers(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
16600 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfNullableArrayBuffers"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfNullableArrayBuffers"
)), 0))
) {
16601 return false;
16602 }
16603 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 16603); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16603; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16604 args.rval().setUndefined();
16605 return true;
16606}
16607
16608static const JSJitInfo passSequenceOfNullableArrayBuffers_methodinfo = {
16609 { (JSJitGetterOp)passSequenceOfNullableArrayBuffers },
16610 { prototypes::id::TestJSImplInterface },
16611 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
16612 JSJitInfo::Method,
16613 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16614 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16615 false, /* isInfallible. False in setters. */
16616 false, /* isMovable. Not relevant for setters. */
16617 false, /* isEliminatable. Not relevant for setters. */
16618 false, /* isAlwaysInSlot. Only relevant for getters. */
16619 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16620 false, /* isTypedMethod. Only relevant for methods. */
16621 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16622};
16623
16624MOZ_CAN_RUN_SCRIPT static bool
16625passRecordOfArrayBuffers(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16626{
16627 BindingCallContext cx(cx_, "TestJSImplInterface.passRecordOfArrayBuffers");
16628 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16631( cx, "TestJSImplInterface"
, "passRecordOfArrayBuffers", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16629 "TestJSImplInterface", "passRecordOfArrayBuffers", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16631( cx, "TestJSImplInterface"
, "passRecordOfArrayBuffers", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16630 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16631( cx, "TestJSImplInterface"
, "passRecordOfArrayBuffers", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16631 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16631( cx, "TestJSImplInterface"
, "passRecordOfArrayBuffers", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16632
16633 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
16634 if (!args.requireAtLeast(cx, "TestJSImplInterface.passRecordOfArrayBuffers", 1)) {
16635 return false;
16636 }
16637 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
16638 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
16639 if (objIsXray) {
16640 unwrappedObj.emplace(cx, obj);
16641 }
16642 Record<nsString, ArrayBuffer> arg0;
16643 RecordRooter<nsString, ArrayBuffer> arg0_holder(cx, &arg0);
16644 if (args[0].isObject()) {
16645 auto& recordEntries = arg0.Entries();
16646
16647 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
16648 JS::RootedVector<jsid> ids(cx);
16649 if (!js::GetPropertyKeys(cx, recordObj,
16650 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
16651 return false;
16652 }
16653 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
16654 JS_ReportOutOfMemory(cx);
16655 return false;
16656 }
16657 JS::Rooted<JS::Value> propNameValue(cx);
16658 JS::Rooted<JS::Value> temp(cx);
16659 JS::Rooted<jsid> curId(cx);
16660 JS::Rooted<JS::Value> idVal(cx);
16661 // Use a hashset to keep track of ids seen, to avoid
16662 // introducing nasty O(N^2) behavior scanning for them all the
16663 // time. Ideally we'd use a data structure with O(1) lookup
16664 // _and_ ordering for the MozMap, but we don't have one lying
16665 // around.
16666 nsTHashtable<nsStringHashKey> idsSeen;
16667 for (size_t i = 0; i < ids.length(); ++i) {
16668 curId = ids[i];
16669
16670 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
16671 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
16672 &desc)) {
16673 return false;
16674 }
16675
16676 if (desc.isNothing() || !desc->enumerable()) {
16677 continue;
16678 }
16679
16680 idVal = js::IdToValue(curId);
16681 nsString propName;
16682 // This will just throw if idVal is a Symbol, like the spec says
16683 // to do.
16684 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
16685 return false;
16686 }
16687
16688 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
16689 return false;
16690 }
16691
16692 Record<nsString, ArrayBuffer>::EntryType* entry;
16693 if (!idsSeen.EnsureInserted(propName)) {
16694 // Find the existing entry.
16695 auto idx = recordEntries.IndexOf(propName);
16696 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 16697); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 16697; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
16697 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 16697); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 16697; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
16698 // Now blow it away to make it look like it was just added
16699 // to the array, because it's not obvious that it's
16700 // safe to write to its already-initialized mValue via our
16701 // normal codegen conversions. For example, the value
16702 // could be a union and this would change its type, but
16703 // codegen assumes we won't do that.
16704 entry = recordEntries.ReconstructElementAt(idx);
16705 } else {
16706 // Safe to do an infallible append here, because we did a
16707 // SetCapacity above to the right capacity.
16708 entry = recordEntries.AppendElement();
16709 }
16710 entry->mKey = propName;
16711 ArrayBuffer& slot = entry->mValue;
16712 if (temp.isObject()) {
16713 if (!slot.Init(&temp.toObject())) {
16714 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "ArrayBuffer");
16715 return false;
16716 }
16717 if (JS::IsSharedArrayBufferObject(slot.Obj())) {
16718 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Value in argument 1");
16719 return false;
16720 }
16721 if (JS::IsLargeArrayBufferMaybeShared(slot.Obj())) {
16722 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value in argument 1");
16723 return false;
16724 }
16725 if (JS::IsResizableArrayBufferMaybeShared(slot.Obj())) {
16726 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value in argument 1");
16727 return false;
16728 }
16729 } else {
16730 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
16731 return false;
16732 }
16733 }
16734 } else {
16735 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
16736 return false;
16737 }
16738 if (objIsXray) {
16739 // Since our object is an Xray, we can just CheckedUnwrapStatic:
16740 // we know Xrays have no dynamic unwrap behavior.
16741 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
16742 if (!unwrappedObj.ref()) {
16743 return false;
16744 }
16745 }
16746 FastErrorResult rv;
16747 // NOTE: This assert does NOT call the function.
16748 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfArrayBuffers(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
16749 MOZ_KnownLive(self)(self)->PassRecordOfArrayBuffers(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
16750 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfArrayBuffers"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfArrayBuffers"
)), 0))
) {
16751 return false;
16752 }
16753 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 16753); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16753; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16754 args.rval().setUndefined();
16755 return true;
16756}
16757
16758static const JSJitInfo passRecordOfArrayBuffers_methodinfo = {
16759 { (JSJitGetterOp)passRecordOfArrayBuffers },
16760 { prototypes::id::TestJSImplInterface },
16761 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
16762 JSJitInfo::Method,
16763 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16764 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16765 false, /* isInfallible. False in setters. */
16766 false, /* isMovable. Not relevant for setters. */
16767 false, /* isEliminatable. Not relevant for setters. */
16768 false, /* isAlwaysInSlot. Only relevant for getters. */
16769 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16770 false, /* isTypedMethod. Only relevant for methods. */
16771 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16772};
16773
16774MOZ_CAN_RUN_SCRIPT static bool
16775passRecordOfNullableArrayBuffers(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16776{
16777 BindingCallContext cx(cx_, "TestJSImplInterface.passRecordOfNullableArrayBuffers");
16778 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16781( cx, "TestJSImplInterface"
, "passRecordOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16779 "TestJSImplInterface", "passRecordOfNullableArrayBuffers", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16781( cx, "TestJSImplInterface"
, "passRecordOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16780 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16781( cx, "TestJSImplInterface"
, "passRecordOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
16781 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16781( cx, "TestJSImplInterface"
, "passRecordOfNullableArrayBuffers", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
16782
16783 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
16784 if (!args.requireAtLeast(cx, "TestJSImplInterface.passRecordOfNullableArrayBuffers", 1)) {
16785 return false;
16786 }
16787 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
16788 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
16789 if (objIsXray) {
16790 unwrappedObj.emplace(cx, obj);
16791 }
16792 Record<nsString, Nullable<ArrayBuffer>> arg0;
16793 RecordRooter<nsString, Nullable<ArrayBuffer>> arg0_holder(cx, &arg0);
16794 if (args[0].isObject()) {
16795 auto& recordEntries = arg0.Entries();
16796
16797 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
16798 JS::RootedVector<jsid> ids(cx);
16799 if (!js::GetPropertyKeys(cx, recordObj,
16800 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
16801 return false;
16802 }
16803 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
16804 JS_ReportOutOfMemory(cx);
16805 return false;
16806 }
16807 JS::Rooted<JS::Value> propNameValue(cx);
16808 JS::Rooted<JS::Value> temp(cx);
16809 JS::Rooted<jsid> curId(cx);
16810 JS::Rooted<JS::Value> idVal(cx);
16811 // Use a hashset to keep track of ids seen, to avoid
16812 // introducing nasty O(N^2) behavior scanning for them all the
16813 // time. Ideally we'd use a data structure with O(1) lookup
16814 // _and_ ordering for the MozMap, but we don't have one lying
16815 // around.
16816 nsTHashtable<nsStringHashKey> idsSeen;
16817 for (size_t i = 0; i < ids.length(); ++i) {
16818 curId = ids[i];
16819
16820 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
16821 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
16822 &desc)) {
16823 return false;
16824 }
16825
16826 if (desc.isNothing() || !desc->enumerable()) {
16827 continue;
16828 }
16829
16830 idVal = js::IdToValue(curId);
16831 nsString propName;
16832 // This will just throw if idVal is a Symbol, like the spec says
16833 // to do.
16834 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
16835 return false;
16836 }
16837
16838 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
16839 return false;
16840 }
16841
16842 Record<nsString, Nullable<ArrayBuffer>>::EntryType* entry;
16843 if (!idsSeen.EnsureInserted(propName)) {
16844 // Find the existing entry.
16845 auto idx = recordEntries.IndexOf(propName);
16846 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 16847); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 16847; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
16847 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 16847); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 16847; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
16848 // Now blow it away to make it look like it was just added
16849 // to the array, because it's not obvious that it's
16850 // safe to write to its already-initialized mValue via our
16851 // normal codegen conversions. For example, the value
16852 // could be a union and this would change its type, but
16853 // codegen assumes we won't do that.
16854 entry = recordEntries.ReconstructElementAt(idx);
16855 } else {
16856 // Safe to do an infallible append here, because we did a
16857 // SetCapacity above to the right capacity.
16858 entry = recordEntries.AppendElement();
16859 }
16860 entry->mKey = propName;
16861 Nullable<ArrayBuffer>& slot = entry->mValue;
16862 if (temp.isObject()) {
16863 if (!slot.SetValue().Init(&temp.toObject())) {
16864 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value in argument 1", "ArrayBufferOrNull");
16865 return false;
16866 }
16867 if (JS::IsSharedArrayBufferObject(slot.SetValue().Obj())) {
16868 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Value in argument 1");
16869 return false;
16870 }
16871 if (JS::IsLargeArrayBufferMaybeShared(slot.SetValue().Obj())) {
16872 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value in argument 1");
16873 return false;
16874 }
16875 if (JS::IsResizableArrayBufferMaybeShared(slot.SetValue().Obj())) {
16876 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value in argument 1");
16877 return false;
16878 }
16879 } else if (temp.isNullOrUndefined()) {
16880 slot.SetNull();
16881 } else {
16882 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
16883 return false;
16884 }
16885 }
16886 } else {
16887 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
16888 return false;
16889 }
16890 if (objIsXray) {
16891 // Since our object is an Xray, we can just CheckedUnwrapStatic:
16892 // we know Xrays have no dynamic unwrap behavior.
16893 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
16894 if (!unwrappedObj.ref()) {
16895 return false;
16896 }
16897 }
16898 FastErrorResult rv;
16899 // NOTE: This assert does NOT call the function.
16900 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfNullableArrayBuffers(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
16901 MOZ_KnownLive(self)(self)->PassRecordOfNullableArrayBuffers(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
16902 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfNullableArrayBuffers"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfNullableArrayBuffers"
)), 0))
) {
16903 return false;
16904 }
16905 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 16905); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16905; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16906 args.rval().setUndefined();
16907 return true;
16908}
16909
16910static const JSJitInfo passRecordOfNullableArrayBuffers_methodinfo = {
16911 { (JSJitGetterOp)passRecordOfNullableArrayBuffers },
16912 { prototypes::id::TestJSImplInterface },
16913 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
16914 JSJitInfo::Method,
16915 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
16916 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
16917 false, /* isInfallible. False in setters. */
16918 false, /* isMovable. Not relevant for setters. */
16919 false, /* isEliminatable. Not relevant for setters. */
16920 false, /* isAlwaysInSlot. Only relevant for getters. */
16921 false, /* isLazilyCachedInSlot. Only relevant for getters. */
16922 false, /* isTypedMethod. Only relevant for methods. */
16923 0 /* Reserved slot index, if we're stored in a slot, else 0. */
16924};
16925
16926MOZ_CAN_RUN_SCRIPT static bool
16927passVariadicTypedArray(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
16928{
16929 BindingCallContext cx(cx_, "TestJSImplInterface.passVariadicTypedArray");
16930 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject16933( cx, "TestJSImplInterface"
, "passVariadicTypedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16931 "TestJSImplInterface", "passVariadicTypedArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject16933( cx, "TestJSImplInterface"
, "passVariadicTypedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16932 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject16933( cx, "TestJSImplInterface"
, "passVariadicTypedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
16933 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject16933( cx, "TestJSImplInterface"
, "passVariadicTypedArray", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
16934
16935 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
16936 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
16937 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
16938 if (objIsXray) {
16939 unwrappedObj.emplace(cx, obj);
16940 }
16941 AutoSequence<Float32Array> arg0;
16942 SequenceRooter<Float32Array> arg0_holder(cx, &arg0);
16943 if (args.length() > 0) {
16944 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
16945 JS_ReportOutOfMemory(cx);
16946 return false;
16947 }
16948 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
16949 // OK to do infallible append here, since we ensured capacity already.
16950 Float32Array& slot = *arg0.AppendElement();
16951 if (args[variadicArg].isObject()) {
16952 if (!slot.Init(&args[variadicArg].toObject())) {
16953 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Float32Array");
16954 return false;
16955 }
16956 if (JS::IsArrayBufferViewShared(slot.Obj())) {
16957 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
16958 return false;
16959 }
16960 if (JS::IsLargeArrayBufferView(slot.Obj())) {
16961 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
16962 return false;
16963 }
16964 if (JS::IsResizableArrayBufferView(slot.Obj())) {
16965 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
16966 return false;
16967 }
16968 } else {
16969 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
16970 return false;
16971 }
16972 }
16973 }
16974 if (objIsXray) {
16975 // Since our object is an Xray, we can just CheckedUnwrapStatic:
16976 // we know Xrays have no dynamic unwrap behavior.
16977 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
16978 if (!unwrappedObj.ref()) {
16979 return false;
16980 }
16981 }
16982 FastErrorResult rv;
16983 // NOTE: This assert does NOT call the function.
16984 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicTypedArray(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
16985 MOZ_KnownLive(self)(self)->PassVariadicTypedArray(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
16986 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicTypedArray"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicTypedArray"
)), 0))
) {
16987 return false;
16988 }
16989 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 16989); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 16989; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
16990 args.rval().setUndefined();
16991 return true;
16992}
16993
16994static const JSJitInfo passVariadicTypedArray_methodinfo = {
16995 { (JSJitGetterOp)passVariadicTypedArray },
16996 { prototypes::id::TestJSImplInterface },
16997 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
16998 JSJitInfo::Method,
16999 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17000 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17001 false, /* isInfallible. False in setters. */
17002 false, /* isMovable. Not relevant for setters. */
17003 false, /* isEliminatable. Not relevant for setters. */
17004 false, /* isAlwaysInSlot. Only relevant for getters. */
17005 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17006 false, /* isTypedMethod. Only relevant for methods. */
17007 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17008};
17009
17010MOZ_CAN_RUN_SCRIPT static bool
17011passVariadicNullableTypedArray(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17012{
17013 BindingCallContext cx(cx_, "TestJSImplInterface.passVariadicNullableTypedArray");
17014 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17017( cx, "TestJSImplInterface"
, "passVariadicNullableTypedArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17015 "TestJSImplInterface", "passVariadicNullableTypedArray", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17017( cx, "TestJSImplInterface"
, "passVariadicNullableTypedArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17016 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17017( cx, "TestJSImplInterface"
, "passVariadicNullableTypedArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17017 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17017( cx, "TestJSImplInterface"
, "passVariadicNullableTypedArray", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
17018
17019 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17020 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17021 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17022 if (objIsXray) {
17023 unwrappedObj.emplace(cx, obj);
17024 }
17025 AutoSequence<Nullable<Float32Array>> arg0;
17026 SequenceRooter<Nullable<Float32Array>> arg0_holder(cx, &arg0);
17027 if (args.length() > 0) {
17028 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
17029 JS_ReportOutOfMemory(cx);
17030 return false;
17031 }
17032 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
17033 // OK to do infallible append here, since we ensured capacity already.
17034 Nullable<Float32Array>& slot = *arg0.AppendElement();
17035 if (args[variadicArg].isObject()) {
17036 if (!slot.SetValue().Init(&args[variadicArg].toObject())) {
17037 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "Float32ArrayOrNull");
17038 return false;
17039 }
17040 if (JS::IsArrayBufferViewShared(slot.SetValue().Obj())) {
17041 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 1");
17042 return false;
17043 }
17044 if (JS::IsLargeArrayBufferView(slot.SetValue().Obj())) {
17045 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
17046 return false;
17047 }
17048 if (JS::IsResizableArrayBufferView(slot.SetValue().Obj())) {
17049 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
17050 return false;
17051 }
17052 } else if (args[variadicArg].isNullOrUndefined()) {
17053 slot.SetNull();
17054 } else {
17055 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
17056 return false;
17057 }
17058 }
17059 }
17060 if (objIsXray) {
17061 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17062 // we know Xrays have no dynamic unwrap behavior.
17063 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17064 if (!unwrappedObj.ref()) {
17065 return false;
17066 }
17067 }
17068 FastErrorResult rv;
17069 // NOTE: This assert does NOT call the function.
17070 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicNullableTypedArray(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17071 MOZ_KnownLive(self)(self)->PassVariadicNullableTypedArray(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17072 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicNullableTypedArray"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicNullableTypedArray"
)), 0))
) {
17073 return false;
17074 }
17075 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17075); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17075; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17076 args.rval().setUndefined();
17077 return true;
17078}
17079
17080static const JSJitInfo passVariadicNullableTypedArray_methodinfo = {
17081 { (JSJitGetterOp)passVariadicNullableTypedArray },
17082 { prototypes::id::TestJSImplInterface },
17083 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17084 JSJitInfo::Method,
17085 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17086 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17087 false, /* isInfallible. False in setters. */
17088 false, /* isMovable. Not relevant for setters. */
17089 false, /* isEliminatable. Not relevant for setters. */
17090 false, /* isAlwaysInSlot. Only relevant for getters. */
17091 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17092 false, /* isTypedMethod. Only relevant for methods. */
17093 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17094};
17095
17096MOZ_CAN_RUN_SCRIPT static bool
17097receiveUint8Array(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17098{
17099 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17102( cx, "TestJSImplInterface"
, "receiveUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17100 "TestJSImplInterface", "receiveUint8Array", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17102( cx, "TestJSImplInterface"
, "receiveUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17101 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17102( cx, "TestJSImplInterface"
, "receiveUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17102 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17102( cx, "TestJSImplInterface"
, "receiveUint8Array", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17103
17104 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17105 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17106 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17107 if (objIsXray) {
17108 unwrappedObj.emplace(cx, obj);
17109 }
17110 if (objIsXray) {
17111 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17112 // we know Xrays have no dynamic unwrap behavior.
17113 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17114 if (!unwrappedObj.ref()) {
17115 return false;
17116 }
17117 }
17118 FastErrorResult rv;
17119 JS::Rooted<JSObject*> result(cx);
17120 // NOTE: This assert does NOT call the function.
17121 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveUint8Array(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17122 MOZ_KnownLive(self)(self)->ReceiveUint8Array(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17123 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUint8Array"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUint8Array"
)), 0))
) {
17124 return false;
17125 }
17126 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17126); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17126; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17127 JS::ExposeObjectToActiveJS(result);
17128 args.rval().setObject(*result);
17129 if (!MaybeWrapNonDOMObjectValue(cx, args.rval())) {
17130 return false;
17131 }
17132 return true;
17133}
17134
17135static const JSJitInfo receiveUint8Array_methodinfo = {
17136 { (JSJitGetterOp)receiveUint8Array },
17137 { prototypes::id::TestJSImplInterface },
17138 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17139 JSJitInfo::Method,
17140 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17141 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
17142 false, /* isInfallible. False in setters. */
17143 false, /* isMovable. Not relevant for setters. */
17144 false, /* isEliminatable. Not relevant for setters. */
17145 false, /* isAlwaysInSlot. Only relevant for getters. */
17146 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17147 false, /* isTypedMethod. Only relevant for methods. */
17148 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17149};
17150
17151MOZ_CAN_RUN_SCRIPT static bool
17152get_uint8ArrayAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
17153{
17154 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17157( cx, "TestJSImplInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17155 "TestJSImplInterface", "uint8ArrayAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17157( cx, "TestJSImplInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17156 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject17157( cx, "TestJSImplInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17157 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17157( cx, "TestJSImplInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17158
17159 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17160 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17161 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17162 if (objIsXray) {
17163 unwrappedObj.emplace(cx, obj);
17164 }
17165 if (objIsXray) {
17166 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17167 // we know Xrays have no dynamic unwrap behavior.
17168 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17169 if (!unwrappedObj.ref()) {
17170 return false;
17171 }
17172 }
17173 FastErrorResult rv;
17174 JS::Rooted<JSObject*> result(cx);
17175 // NOTE: This assert does NOT call the function.
17176 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetUint8ArrayAttr(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17177 MOZ_KnownLive(self)(self)->GetUint8ArrayAttr(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17178 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.uint8ArrayAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.uint8ArrayAttr getter"
)), 0))
) {
17179 return false;
17180 }
17181 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17181); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17181; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17182 JS::ExposeObjectToActiveJS(result);
17183 args.rval().setObject(*result);
17184 if (!MaybeWrapNonDOMObjectValue(cx, args.rval())) {
17185 return false;
17186 }
17187 return true;
17188}
17189
17190MOZ_CAN_RUN_SCRIPT static bool
17191set_uint8ArrayAttr(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
17192{
17193 BindingCallContext cx(cx_, "TestJSImplInterface.uint8ArrayAttr setter");
17194 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17197( cx, "TestJSImplInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17195 "TestJSImplInterface", "uint8ArrayAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17197( cx, "TestJSImplInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17196 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject17197( cx, "TestJSImplInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17197 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17197( cx, "TestJSImplInterface"
, "uint8ArrayAttr", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17198
17199 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17200 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17201 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17202 if (objIsXray) {
17203 unwrappedObj.emplace(cx, obj);
17204 }
17205 RootedSpiderMonkeyInterface<Uint8Array> arg0(cx);
17206 if (args[0].isObject()) {
17207 if (!arg0.Init(&args[0].toObject())) {
17208 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "Uint8Array");
17209 return false;
17210 }
17211 if (JS::IsArrayBufferViewShared(arg0.Obj())) {
17212 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Value being assigned");
17213 return false;
17214 }
17215 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
17216 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value being assigned");
17217 return false;
17218 }
17219 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
17220 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value being assigned");
17221 return false;
17222 }
17223 } else {
17224 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
17225 return false;
17226 }
17227 if (objIsXray) {
17228 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17229 // we know Xrays have no dynamic unwrap behavior.
17230 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17231 if (!unwrappedObj.ref()) {
17232 return false;
17233 }
17234 }
17235 FastErrorResult rv;
17236 // NOTE: This assert does NOT call the function.
17237 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetUint8ArrayAttr(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17238 MOZ_KnownLive(self)(self)->SetUint8ArrayAttr(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17239 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.uint8ArrayAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.uint8ArrayAttr setter"
)), 0))
) {
17240 return false;
17241 }
17242 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17242); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17242; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17243
17244 return true;
17245}
17246
17247static const JSJitInfo uint8ArrayAttr_getterinfo = {
17248 { get_uint8ArrayAttr },
17249 { prototypes::id::TestJSImplInterface },
17250 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17251 JSJitInfo::Getter,
17252 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17253 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
17254 false, /* isInfallible. False in setters. */
17255 false, /* isMovable. Not relevant for setters. */
17256 false, /* isEliminatable. Not relevant for setters. */
17257 false, /* isAlwaysInSlot. Only relevant for getters. */
17258 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17259 false, /* isTypedMethod. Only relevant for methods. */
17260 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17261};
17262static const JSJitInfo uint8ArrayAttr_setterinfo = {
17263 { (JSJitGetterOp)set_uint8ArrayAttr },
17264 { prototypes::id::TestJSImplInterface },
17265 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17266 JSJitInfo::Setter,
17267 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17268 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17269 false, /* isInfallible. False in setters. */
17270 false, /* isMovable. Not relevant for setters. */
17271 false, /* isEliminatable. Not relevant for setters. */
17272 false, /* isAlwaysInSlot. Only relevant for getters. */
17273 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17274 false, /* isTypedMethod. Only relevant for methods. */
17275 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17276};
17277
17278MOZ_CAN_RUN_SCRIPT static bool
17279passString(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17280{
17281 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17284( cx, "TestJSImplInterface"
, "passString", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17282 "TestJSImplInterface", "passString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17284( cx, "TestJSImplInterface"
, "passString", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17283 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17284( cx, "TestJSImplInterface"
, "passString", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17284 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17284( cx, "TestJSImplInterface"
, "passString", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17285
17286 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17287 if (!args.requireAtLeast(cx, "TestJSImplInterface.passString", 1)) {
17288 return false;
17289 }
17290 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17291 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17292 if (objIsXray) {
17293 unwrappedObj.emplace(cx, obj);
17294 }
17295 binding_detail::FakeString<char16_t> arg0;
17296 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
17297 return false;
17298 }
17299 if (objIsXray) {
17300 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17301 // we know Xrays have no dynamic unwrap behavior.
17302 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17303 if (!unwrappedObj.ref()) {
17304 return false;
17305 }
17306 }
17307 FastErrorResult rv;
17308 // NOTE: This assert does NOT call the function.
17309 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassString(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17310 MOZ_KnownLive(self)(self)->PassString(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17311 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passString"
)), 0))
) {
17312 return false;
17313 }
17314 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17314); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17314; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17315 args.rval().setUndefined();
17316 return true;
17317}
17318
17319static const JSJitInfo passString_methodinfo = {
17320 { (JSJitGetterOp)passString },
17321 { prototypes::id::TestJSImplInterface },
17322 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17323 JSJitInfo::Method,
17324 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17325 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17326 false, /* isInfallible. False in setters. */
17327 false, /* isMovable. Not relevant for setters. */
17328 false, /* isEliminatable. Not relevant for setters. */
17329 false, /* isAlwaysInSlot. Only relevant for getters. */
17330 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17331 false, /* isTypedMethod. Only relevant for methods. */
17332 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17333};
17334
17335MOZ_CAN_RUN_SCRIPT static bool
17336passNullableString(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17337{
17338 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17341( cx, "TestJSImplInterface"
, "passNullableString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17339 "TestJSImplInterface", "passNullableString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17341( cx, "TestJSImplInterface"
, "passNullableString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17340 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17341( cx, "TestJSImplInterface"
, "passNullableString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17341 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17341( cx, "TestJSImplInterface"
, "passNullableString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17342
17343 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17344 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableString", 1)) {
17345 return false;
17346 }
17347 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17348 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17349 if (objIsXray) {
17350 unwrappedObj.emplace(cx, obj);
17351 }
17352 binding_detail::FakeString<char16_t> arg0;
17353 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0)) {
17354 return false;
17355 }
17356 if (objIsXray) {
17357 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17358 // we know Xrays have no dynamic unwrap behavior.
17359 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17360 if (!unwrappedObj.ref()) {
17361 return false;
17362 }
17363 }
17364 FastErrorResult rv;
17365 // NOTE: This assert does NOT call the function.
17366 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableString(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17367 MOZ_KnownLive(self)(self)->PassNullableString(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17368 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableString"
)), 0))
) {
17369 return false;
17370 }
17371 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17371); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17371; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17372 args.rval().setUndefined();
17373 return true;
17374}
17375
17376static const JSJitInfo passNullableString_methodinfo = {
17377 { (JSJitGetterOp)passNullableString },
17378 { prototypes::id::TestJSImplInterface },
17379 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17380 JSJitInfo::Method,
17381 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17382 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17383 false, /* isInfallible. False in setters. */
17384 false, /* isMovable. Not relevant for setters. */
17385 false, /* isEliminatable. Not relevant for setters. */
17386 false, /* isAlwaysInSlot. Only relevant for getters. */
17387 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17388 false, /* isTypedMethod. Only relevant for methods. */
17389 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17390};
17391
17392MOZ_CAN_RUN_SCRIPT static bool
17393passOptionalString(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17394{
17395 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17398( cx, "TestJSImplInterface"
, "passOptionalString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17396 "TestJSImplInterface", "passOptionalString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17398( cx, "TestJSImplInterface"
, "passOptionalString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17397 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17398( cx, "TestJSImplInterface"
, "passOptionalString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17398 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17398( cx, "TestJSImplInterface"
, "passOptionalString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17399
17400 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17401 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17402 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17403 if (objIsXray) {
17404 unwrappedObj.emplace(cx, obj);
17405 }
17406 Optional<nsAString> arg0;
17407 binding_detail::FakeString<char16_t> arg0_holder;
17408 if (args.hasDefined(0)) {
17409 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0_holder)) {
17410 return false;
17411 }
17412 arg0 = &arg0_holder;
17413 }
17414 if (objIsXray) {
17415 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17416 // we know Xrays have no dynamic unwrap behavior.
17417 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17418 if (!unwrappedObj.ref()) {
17419 return false;
17420 }
17421 }
17422 FastErrorResult rv;
17423 // NOTE: This assert does NOT call the function.
17424 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalString(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17425 MOZ_KnownLive(self)(self)->PassOptionalString(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17426 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalString"
)), 0))
) {
17427 return false;
17428 }
17429 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17429); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17429; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17430 args.rval().setUndefined();
17431 return true;
17432}
17433
17434static const JSJitInfo passOptionalString_methodinfo = {
17435 { (JSJitGetterOp)passOptionalString },
17436 { prototypes::id::TestJSImplInterface },
17437 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17438 JSJitInfo::Method,
17439 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17440 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17441 false, /* isInfallible. False in setters. */
17442 false, /* isMovable. Not relevant for setters. */
17443 false, /* isEliminatable. Not relevant for setters. */
17444 false, /* isAlwaysInSlot. Only relevant for getters. */
17445 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17446 false, /* isTypedMethod. Only relevant for methods. */
17447 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17448};
17449
17450MOZ_CAN_RUN_SCRIPT static bool
17451passOptionalStringWithDefaultValue(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17452{
17453 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17456( cx, "TestJSImplInterface"
, "passOptionalStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17454 "TestJSImplInterface", "passOptionalStringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17456( cx, "TestJSImplInterface"
, "passOptionalStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17455 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17456( cx, "TestJSImplInterface"
, "passOptionalStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17456 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17456( cx, "TestJSImplInterface"
, "passOptionalStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
17457
17458 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17459 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17460 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17461 if (objIsXray) {
17462 unwrappedObj.emplace(cx, obj);
17463 }
17464 binding_detail::FakeString<char16_t> arg0;
17465 if (args.hasDefined(0)) {
17466 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
17467 return false;
17468 }
17469 } else {
17470 arg0.AssignLiteral(u"abc");
17471 }
17472 if (objIsXray) {
17473 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17474 // we know Xrays have no dynamic unwrap behavior.
17475 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17476 if (!unwrappedObj.ref()) {
17477 return false;
17478 }
17479 }
17480 FastErrorResult rv;
17481 // NOTE: This assert does NOT call the function.
17482 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalStringWithDefaultValue(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17483 MOZ_KnownLive(self)(self)->PassOptionalStringWithDefaultValue(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17484 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalStringWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalStringWithDefaultValue"
)), 0))
) {
17485 return false;
17486 }
17487 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17487); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17487; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17488 args.rval().setUndefined();
17489 return true;
17490}
17491
17492static const JSJitInfo passOptionalStringWithDefaultValue_methodinfo = {
17493 { (JSJitGetterOp)passOptionalStringWithDefaultValue },
17494 { prototypes::id::TestJSImplInterface },
17495 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17496 JSJitInfo::Method,
17497 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17498 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17499 false, /* isInfallible. False in setters. */
17500 false, /* isMovable. Not relevant for setters. */
17501 false, /* isEliminatable. Not relevant for setters. */
17502 false, /* isAlwaysInSlot. Only relevant for getters. */
17503 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17504 false, /* isTypedMethod. Only relevant for methods. */
17505 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17506};
17507
17508MOZ_CAN_RUN_SCRIPT static bool
17509passOptionalNullableString(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17510{
17511 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17514( cx, "TestJSImplInterface"
, "passOptionalNullableString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17512 "TestJSImplInterface", "passOptionalNullableString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17514( cx, "TestJSImplInterface"
, "passOptionalNullableString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17513 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17514( cx, "TestJSImplInterface"
, "passOptionalNullableString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17514 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17514( cx, "TestJSImplInterface"
, "passOptionalNullableString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
17515
17516 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17517 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17518 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17519 if (objIsXray) {
17520 unwrappedObj.emplace(cx, obj);
17521 }
17522 Optional<nsAString> arg0;
17523 binding_detail::FakeString<char16_t> arg0_holder;
17524 if (args.hasDefined(0)) {
17525 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0_holder)) {
17526 return false;
17527 }
17528 arg0 = &arg0_holder;
17529 }
17530 if (objIsXray) {
17531 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17532 // we know Xrays have no dynamic unwrap behavior.
17533 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17534 if (!unwrappedObj.ref()) {
17535 return false;
17536 }
17537 }
17538 FastErrorResult rv;
17539 // NOTE: This assert does NOT call the function.
17540 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableString(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17541 MOZ_KnownLive(self)(self)->PassOptionalNullableString(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17542 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableString"
)), 0))
) {
17543 return false;
17544 }
17545 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17545); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17545; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17546 args.rval().setUndefined();
17547 return true;
17548}
17549
17550static const JSJitInfo passOptionalNullableString_methodinfo = {
17551 { (JSJitGetterOp)passOptionalNullableString },
17552 { prototypes::id::TestJSImplInterface },
17553 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17554 JSJitInfo::Method,
17555 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17556 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17557 false, /* isInfallible. False in setters. */
17558 false, /* isMovable. Not relevant for setters. */
17559 false, /* isEliminatable. Not relevant for setters. */
17560 false, /* isAlwaysInSlot. Only relevant for getters. */
17561 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17562 false, /* isTypedMethod. Only relevant for methods. */
17563 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17564};
17565
17566MOZ_CAN_RUN_SCRIPT static bool
17567passOptionalNullableStringWithDefaultValue(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17568{
17569 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17572( cx, "TestJSImplInterface"
, "passOptionalNullableStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17570 "TestJSImplInterface", "passOptionalNullableStringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17572( cx, "TestJSImplInterface"
, "passOptionalNullableStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17571 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17572( cx, "TestJSImplInterface"
, "passOptionalNullableStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17572 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17572( cx, "TestJSImplInterface"
, "passOptionalNullableStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
17573
17574 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17575 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17576 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17577 if (objIsXray) {
17578 unwrappedObj.emplace(cx, obj);
17579 }
17580 binding_detail::FakeString<char16_t> arg0;
17581 if (args.hasDefined(0)) {
17582 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0)) {
17583 return false;
17584 }
17585 } else {
17586 arg0.SetIsVoid(true);
17587 }
17588 if (objIsXray) {
17589 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17590 // we know Xrays have no dynamic unwrap behavior.
17591 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17592 if (!unwrappedObj.ref()) {
17593 return false;
17594 }
17595 }
17596 FastErrorResult rv;
17597 // NOTE: This assert does NOT call the function.
17598 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableStringWithDefaultValue(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17599 MOZ_KnownLive(self)(self)->PassOptionalNullableStringWithDefaultValue(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17600 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableStringWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableStringWithDefaultValue"
)), 0))
) {
17601 return false;
17602 }
17603 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17603); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17603; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17604 args.rval().setUndefined();
17605 return true;
17606}
17607
17608static const JSJitInfo passOptionalNullableStringWithDefaultValue_methodinfo = {
17609 { (JSJitGetterOp)passOptionalNullableStringWithDefaultValue },
17610 { prototypes::id::TestJSImplInterface },
17611 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17612 JSJitInfo::Method,
17613 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17614 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17615 false, /* isInfallible. False in setters. */
17616 false, /* isMovable. Not relevant for setters. */
17617 false, /* isEliminatable. Not relevant for setters. */
17618 false, /* isAlwaysInSlot. Only relevant for getters. */
17619 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17620 false, /* isTypedMethod. Only relevant for methods. */
17621 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17622};
17623
17624MOZ_CAN_RUN_SCRIPT static bool
17625passVariadicString(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17626{
17627 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17630( cx, "TestJSImplInterface"
, "passVariadicString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17628 "TestJSImplInterface", "passVariadicString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17630( cx, "TestJSImplInterface"
, "passVariadicString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17629 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17630( cx, "TestJSImplInterface"
, "passVariadicString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17630 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17630( cx, "TestJSImplInterface"
, "passVariadicString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17631
17632 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17633 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17634 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17635 if (objIsXray) {
17636 unwrappedObj.emplace(cx, obj);
17637 }
17638 AutoSequence<nsString> arg0;
17639 if (args.length() > 0) {
17640 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
17641 JS_ReportOutOfMemory(cx);
17642 return false;
17643 }
17644 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
17645 // OK to do infallible append here, since we ensured capacity already.
17646 nsString& slot = *arg0.AppendElement();
17647 if (!ConvertJSValueToString(cx, args[variadicArg], eStringify, eStringify, slot)) {
17648 return false;
17649 }
17650 }
17651 }
17652 if (objIsXray) {
17653 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17654 // we know Xrays have no dynamic unwrap behavior.
17655 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17656 if (!unwrappedObj.ref()) {
17657 return false;
17658 }
17659 }
17660 FastErrorResult rv;
17661 // NOTE: This assert does NOT call the function.
17662 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicString(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17663 MOZ_KnownLive(self)(self)->PassVariadicString(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17664 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicString"
)), 0))
) {
17665 return false;
17666 }
17667 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17667); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17667; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17668 args.rval().setUndefined();
17669 return true;
17670}
17671
17672static const JSJitInfo passVariadicString_methodinfo = {
17673 { (JSJitGetterOp)passVariadicString },
17674 { prototypes::id::TestJSImplInterface },
17675 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17676 JSJitInfo::Method,
17677 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17678 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17679 false, /* isInfallible. False in setters. */
17680 false, /* isMovable. Not relevant for setters. */
17681 false, /* isEliminatable. Not relevant for setters. */
17682 false, /* isAlwaysInSlot. Only relevant for getters. */
17683 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17684 false, /* isTypedMethod. Only relevant for methods. */
17685 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17686};
17687
17688MOZ_CAN_RUN_SCRIPT static bool
17689passByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17690{
17691 BindingCallContext cx(cx_, "TestJSImplInterface.passByteString");
17692 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17695( cx, "TestJSImplInterface"
, "passByteString", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17693 "TestJSImplInterface", "passByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17695( cx, "TestJSImplInterface"
, "passByteString", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17694 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17695( cx, "TestJSImplInterface"
, "passByteString", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17695 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17695( cx, "TestJSImplInterface"
, "passByteString", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17696
17697 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17698 if (!args.requireAtLeast(cx, "TestJSImplInterface.passByteString", 1)) {
17699 return false;
17700 }
17701 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17702 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17703 if (objIsXray) {
17704 unwrappedObj.emplace(cx, obj);
17705 }
17706 nsCString arg0;
17707 if (!ConvertJSValueToByteString(cx, args[0], false, "argument 1", arg0)) {
17708 return false;
17709 }
17710 if (objIsXray) {
17711 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17712 // we know Xrays have no dynamic unwrap behavior.
17713 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17714 if (!unwrappedObj.ref()) {
17715 return false;
17716 }
17717 }
17718 FastErrorResult rv;
17719 // NOTE: This assert does NOT call the function.
17720 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17721 MOZ_KnownLive(self)(self)->PassByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17722 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passByteString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passByteString"
)), 0))
) {
17723 return false;
17724 }
17725 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17725); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17725; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17726 args.rval().setUndefined();
17727 return true;
17728}
17729
17730static const JSJitInfo passByteString_methodinfo = {
17731 { (JSJitGetterOp)passByteString },
17732 { prototypes::id::TestJSImplInterface },
17733 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17734 JSJitInfo::Method,
17735 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17736 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17737 false, /* isInfallible. False in setters. */
17738 false, /* isMovable. Not relevant for setters. */
17739 false, /* isEliminatable. Not relevant for setters. */
17740 false, /* isAlwaysInSlot. Only relevant for getters. */
17741 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17742 false, /* isTypedMethod. Only relevant for methods. */
17743 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17744};
17745
17746MOZ_CAN_RUN_SCRIPT static bool
17747passNullableByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17748{
17749 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableByteString");
17750 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17753( cx, "TestJSImplInterface"
, "passNullableByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17751 "TestJSImplInterface", "passNullableByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17753( cx, "TestJSImplInterface"
, "passNullableByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17752 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17753( cx, "TestJSImplInterface"
, "passNullableByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17753 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17753( cx, "TestJSImplInterface"
, "passNullableByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17754
17755 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17756 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableByteString", 1)) {
17757 return false;
17758 }
17759 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17760 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17761 if (objIsXray) {
17762 unwrappedObj.emplace(cx, obj);
17763 }
17764 nsCString arg0;
17765 if (!ConvertJSValueToByteString(cx, args[0], true, "argument 1", arg0)) {
17766 return false;
17767 }
17768 if (objIsXray) {
17769 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17770 // we know Xrays have no dynamic unwrap behavior.
17771 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17772 if (!unwrappedObj.ref()) {
17773 return false;
17774 }
17775 }
17776 FastErrorResult rv;
17777 // NOTE: This assert does NOT call the function.
17778 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17779 MOZ_KnownLive(self)(self)->PassNullableByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17780 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableByteString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableByteString"
)), 0))
) {
17781 return false;
17782 }
17783 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17783); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17783; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17784 args.rval().setUndefined();
17785 return true;
17786}
17787
17788static const JSJitInfo passNullableByteString_methodinfo = {
17789 { (JSJitGetterOp)passNullableByteString },
17790 { prototypes::id::TestJSImplInterface },
17791 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17792 JSJitInfo::Method,
17793 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17794 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17795 false, /* isInfallible. False in setters. */
17796 false, /* isMovable. Not relevant for setters. */
17797 false, /* isEliminatable. Not relevant for setters. */
17798 false, /* isAlwaysInSlot. Only relevant for getters. */
17799 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17800 false, /* isTypedMethod. Only relevant for methods. */
17801 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17802};
17803
17804MOZ_CAN_RUN_SCRIPT static bool
17805passOptionalByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17806{
17807 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalByteString");
17808 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17811( cx, "TestJSImplInterface"
, "passOptionalByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17809 "TestJSImplInterface", "passOptionalByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17811( cx, "TestJSImplInterface"
, "passOptionalByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17810 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17811( cx, "TestJSImplInterface"
, "passOptionalByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
17811 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17811( cx, "TestJSImplInterface"
, "passOptionalByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
17812
17813 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17814 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17815 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17816 if (objIsXray) {
17817 unwrappedObj.emplace(cx, obj);
17818 }
17819 Optional<nsCString> arg0;
17820 if (args.hasDefined(0)) {
17821 arg0.Construct();
17822 if (!ConvertJSValueToByteString(cx, args[0], false, "argument 1", arg0.Value())) {
17823 return false;
17824 }
17825 }
17826 if (objIsXray) {
17827 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17828 // we know Xrays have no dynamic unwrap behavior.
17829 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17830 if (!unwrappedObj.ref()) {
17831 return false;
17832 }
17833 }
17834 FastErrorResult rv;
17835 // NOTE: This assert does NOT call the function.
17836 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17837 MOZ_KnownLive(self)(self)->PassOptionalByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17838 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalByteString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalByteString"
)), 0))
) {
17839 return false;
17840 }
17841 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17841); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17841; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17842 args.rval().setUndefined();
17843 return true;
17844}
17845
17846static const JSJitInfo passOptionalByteString_methodinfo = {
17847 { (JSJitGetterOp)passOptionalByteString },
17848 { prototypes::id::TestJSImplInterface },
17849 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17850 JSJitInfo::Method,
17851 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17852 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17853 false, /* isInfallible. False in setters. */
17854 false, /* isMovable. Not relevant for setters. */
17855 false, /* isEliminatable. Not relevant for setters. */
17856 false, /* isAlwaysInSlot. Only relevant for getters. */
17857 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17858 false, /* isTypedMethod. Only relevant for methods. */
17859 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17860};
17861
17862MOZ_CAN_RUN_SCRIPT static bool
17863passOptionalByteStringWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17864{
17865 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalByteStringWithDefaultValue");
17866 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17869( cx, "TestJSImplInterface"
, "passOptionalByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17867 "TestJSImplInterface", "passOptionalByteStringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17869( cx, "TestJSImplInterface"
, "passOptionalByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17868 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17869( cx, "TestJSImplInterface"
, "passOptionalByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17869 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17869( cx, "TestJSImplInterface"
, "passOptionalByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
17870
17871 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17872 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17873 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17874 if (objIsXray) {
17875 unwrappedObj.emplace(cx, obj);
17876 }
17877 nsCString arg0;
17878 if (args.hasDefined(0)) {
17879 if (!ConvertJSValueToByteString(cx, args[0], false, "argument 1", arg0)) {
17880 return false;
17881 }
17882 } else {
17883 arg0.AssignLiteral("abc");
17884 }
17885 if (objIsXray) {
17886 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17887 // we know Xrays have no dynamic unwrap behavior.
17888 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17889 if (!unwrappedObj.ref()) {
17890 return false;
17891 }
17892 }
17893 FastErrorResult rv;
17894 // NOTE: This assert does NOT call the function.
17895 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalByteStringWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17896 MOZ_KnownLive(self)(self)->PassOptionalByteStringWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17897 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalByteStringWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalByteStringWithDefaultValue"
)), 0))
) {
17898 return false;
17899 }
17900 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17900); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17900; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17901 args.rval().setUndefined();
17902 return true;
17903}
17904
17905static const JSJitInfo passOptionalByteStringWithDefaultValue_methodinfo = {
17906 { (JSJitGetterOp)passOptionalByteStringWithDefaultValue },
17907 { prototypes::id::TestJSImplInterface },
17908 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17909 JSJitInfo::Method,
17910 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17911 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17912 false, /* isInfallible. False in setters. */
17913 false, /* isMovable. Not relevant for setters. */
17914 false, /* isEliminatable. Not relevant for setters. */
17915 false, /* isAlwaysInSlot. Only relevant for getters. */
17916 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17917 false, /* isTypedMethod. Only relevant for methods. */
17918 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17919};
17920
17921MOZ_CAN_RUN_SCRIPT static bool
17922passOptionalNullableByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17923{
17924 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableByteString");
17925 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17928( cx, "TestJSImplInterface"
, "passOptionalNullableByteString", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17926 "TestJSImplInterface", "passOptionalNullableByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17928( cx, "TestJSImplInterface"
, "passOptionalNullableByteString", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17927 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17928( cx, "TestJSImplInterface"
, "passOptionalNullableByteString", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17928 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17928( cx, "TestJSImplInterface"
, "passOptionalNullableByteString", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
17929
17930 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17931 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17932 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17933 if (objIsXray) {
17934 unwrappedObj.emplace(cx, obj);
17935 }
17936 Optional<nsCString> arg0;
17937 if (args.hasDefined(0)) {
17938 arg0.Construct();
17939 if (!ConvertJSValueToByteString(cx, args[0], true, "argument 1", arg0.Value())) {
17940 return false;
17941 }
17942 }
17943 if (objIsXray) {
17944 // Since our object is an Xray, we can just CheckedUnwrapStatic:
17945 // we know Xrays have no dynamic unwrap behavior.
17946 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
17947 if (!unwrappedObj.ref()) {
17948 return false;
17949 }
17950 }
17951 FastErrorResult rv;
17952 // NOTE: This assert does NOT call the function.
17953 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
17954 MOZ_KnownLive(self)(self)->PassOptionalNullableByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
17955 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableByteString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableByteString"
)), 0))
) {
17956 return false;
17957 }
17958 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 17958); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 17958; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
17959 args.rval().setUndefined();
17960 return true;
17961}
17962
17963static const JSJitInfo passOptionalNullableByteString_methodinfo = {
17964 { (JSJitGetterOp)passOptionalNullableByteString },
17965 { prototypes::id::TestJSImplInterface },
17966 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
17967 JSJitInfo::Method,
17968 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
17969 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
17970 false, /* isInfallible. False in setters. */
17971 false, /* isMovable. Not relevant for setters. */
17972 false, /* isEliminatable. Not relevant for setters. */
17973 false, /* isAlwaysInSlot. Only relevant for getters. */
17974 false, /* isLazilyCachedInSlot. Only relevant for getters. */
17975 false, /* isTypedMethod. Only relevant for methods. */
17976 0 /* Reserved slot index, if we're stored in a slot, else 0. */
17977};
17978
17979MOZ_CAN_RUN_SCRIPT static bool
17980passOptionalNullableByteStringWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
17981{
17982 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableByteStringWithDefaultValue");
17983 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject17986( cx, "TestJSImplInterface"
, "passOptionalNullableByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17984 "TestJSImplInterface", "passOptionalNullableByteStringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject17986( cx, "TestJSImplInterface"
, "passOptionalNullableByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17985 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject17986( cx, "TestJSImplInterface"
, "passOptionalNullableByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
17986 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject17986( cx, "TestJSImplInterface"
, "passOptionalNullableByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
17987
17988 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
17989 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
17990 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
17991 if (objIsXray) {
17992 unwrappedObj.emplace(cx, obj);
17993 }
17994 nsCString arg0;
17995 if (args.hasDefined(0)) {
17996 if (!ConvertJSValueToByteString(cx, args[0], true, "argument 1", arg0)) {
17997 return false;
17998 }
17999 } else {
18000 arg0.SetIsVoid(true);
18001 }
18002 if (objIsXray) {
18003 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18004 // we know Xrays have no dynamic unwrap behavior.
18005 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18006 if (!unwrappedObj.ref()) {
18007 return false;
18008 }
18009 }
18010 FastErrorResult rv;
18011 // NOTE: This assert does NOT call the function.
18012 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableByteStringWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18013 MOZ_KnownLive(self)(self)->PassOptionalNullableByteStringWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18014 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableByteStringWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableByteStringWithDefaultValue"
)), 0))
) {
18015 return false;
18016 }
18017 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18017); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18017; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18018 args.rval().setUndefined();
18019 return true;
18020}
18021
18022static const JSJitInfo passOptionalNullableByteStringWithDefaultValue_methodinfo = {
18023 { (JSJitGetterOp)passOptionalNullableByteStringWithDefaultValue },
18024 { prototypes::id::TestJSImplInterface },
18025 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18026 JSJitInfo::Method,
18027 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18028 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18029 false, /* isInfallible. False in setters. */
18030 false, /* isMovable. Not relevant for setters. */
18031 false, /* isEliminatable. Not relevant for setters. */
18032 false, /* isAlwaysInSlot. Only relevant for getters. */
18033 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18034 false, /* isTypedMethod. Only relevant for methods. */
18035 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18036};
18037
18038MOZ_CAN_RUN_SCRIPT static bool
18039passVariadicByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18040{
18041 BindingCallContext cx(cx_, "TestJSImplInterface.passVariadicByteString");
18042 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18045( cx, "TestJSImplInterface"
, "passVariadicByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18043 "TestJSImplInterface", "passVariadicByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18045( cx, "TestJSImplInterface"
, "passVariadicByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18044 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18045( cx, "TestJSImplInterface"
, "passVariadicByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18045 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18045( cx, "TestJSImplInterface"
, "passVariadicByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18046
18047 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18048 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18049 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18050 if (objIsXray) {
18051 unwrappedObj.emplace(cx, obj);
18052 }
18053 AutoSequence<nsCString> arg0;
18054 if (args.length() > 0) {
18055 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
18056 JS_ReportOutOfMemory(cx);
18057 return false;
18058 }
18059 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
18060 // OK to do infallible append here, since we ensured capacity already.
18061 nsCString& slot = *arg0.AppendElement();
18062 if (!ConvertJSValueToByteString(cx, args[variadicArg], false, "argument 1", slot)) {
18063 return false;
18064 }
18065 }
18066 }
18067 if (objIsXray) {
18068 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18069 // we know Xrays have no dynamic unwrap behavior.
18070 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18071 if (!unwrappedObj.ref()) {
18072 return false;
18073 }
18074 }
18075 FastErrorResult rv;
18076 // NOTE: This assert does NOT call the function.
18077 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18078 MOZ_KnownLive(self)(self)->PassVariadicByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18079 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicByteString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicByteString"
)), 0))
) {
18080 return false;
18081 }
18082 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18082); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18082; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18083 args.rval().setUndefined();
18084 return true;
18085}
18086
18087static const JSJitInfo passVariadicByteString_methodinfo = {
18088 { (JSJitGetterOp)passVariadicByteString },
18089 { prototypes::id::TestJSImplInterface },
18090 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18091 JSJitInfo::Method,
18092 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18093 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18094 false, /* isInfallible. False in setters. */
18095 false, /* isMovable. Not relevant for setters. */
18096 false, /* isEliminatable. Not relevant for setters. */
18097 false, /* isAlwaysInSlot. Only relevant for getters. */
18098 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18099 false, /* isTypedMethod. Only relevant for methods. */
18100 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18101};
18102
18103MOZ_CAN_RUN_SCRIPT static bool
18104passUnionByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18105{
18106 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionByteString");
18107 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18110( cx, "TestJSImplInterface"
, "passUnionByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18108 "TestJSImplInterface", "passUnionByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18110( cx, "TestJSImplInterface"
, "passUnionByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18109 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18110( cx, "TestJSImplInterface"
, "passUnionByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18110 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18110( cx, "TestJSImplInterface"
, "passUnionByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18111
18112 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18113 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionByteString", 1)) {
18114 return false;
18115 }
18116 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18117 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18118 if (objIsXray) {
18119 unwrappedObj.emplace(cx, obj);
18120 }
18121 ByteStringOrLong arg0;
18122 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
18123 return false;
18124 }
18125 if (objIsXray) {
18126 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18127 // we know Xrays have no dynamic unwrap behavior.
18128 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18129 if (!unwrappedObj.ref()) {
18130 return false;
18131 }
18132 }
18133 FastErrorResult rv;
18134 // NOTE: This assert does NOT call the function.
18135 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18136 MOZ_KnownLive(self)(self)->PassUnionByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18137 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionByteString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionByteString"
)), 0))
) {
18138 return false;
18139 }
18140 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18140); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18140; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18141 args.rval().setUndefined();
18142 return true;
18143}
18144
18145static const JSJitInfo passUnionByteString_methodinfo = {
18146 { (JSJitGetterOp)passUnionByteString },
18147 { prototypes::id::TestJSImplInterface },
18148 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18149 JSJitInfo::Method,
18150 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18151 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18152 false, /* isInfallible. False in setters. */
18153 false, /* isMovable. Not relevant for setters. */
18154 false, /* isEliminatable. Not relevant for setters. */
18155 false, /* isAlwaysInSlot. Only relevant for getters. */
18156 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18157 false, /* isTypedMethod. Only relevant for methods. */
18158 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18159};
18160
18161MOZ_CAN_RUN_SCRIPT static bool
18162passOptionalUnionByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18163{
18164 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalUnionByteString");
18165 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18168( cx, "TestJSImplInterface"
, "passOptionalUnionByteString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18166 "TestJSImplInterface", "passOptionalUnionByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18168( cx, "TestJSImplInterface"
, "passOptionalUnionByteString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18167 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18168( cx, "TestJSImplInterface"
, "passOptionalUnionByteString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18168 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18168( cx, "TestJSImplInterface"
, "passOptionalUnionByteString", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18169
18170 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18171 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18172 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18173 if (objIsXray) {
18174 unwrappedObj.emplace(cx, obj);
18175 }
18176 Optional<ByteStringOrLong> arg0;
18177 if (args.hasDefined(0)) {
18178 arg0.Construct();
18179 if (!arg0.Value().Init(cx, args[0], "Argument 1", true)) {
18180 return false;
18181 }
18182 }
18183 if (objIsXray) {
18184 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18185 // we know Xrays have no dynamic unwrap behavior.
18186 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18187 if (!unwrappedObj.ref()) {
18188 return false;
18189 }
18190 }
18191 FastErrorResult rv;
18192 // NOTE: This assert does NOT call the function.
18193 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnionByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18194 MOZ_KnownLive(self)(self)->PassOptionalUnionByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18195 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnionByteString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnionByteString"
)), 0))
) {
18196 return false;
18197 }
18198 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18198); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18198; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18199 args.rval().setUndefined();
18200 return true;
18201}
18202
18203static const JSJitInfo passOptionalUnionByteString_methodinfo = {
18204 { (JSJitGetterOp)passOptionalUnionByteString },
18205 { prototypes::id::TestJSImplInterface },
18206 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18207 JSJitInfo::Method,
18208 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18209 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18210 false, /* isInfallible. False in setters. */
18211 false, /* isMovable. Not relevant for setters. */
18212 false, /* isEliminatable. Not relevant for setters. */
18213 false, /* isAlwaysInSlot. Only relevant for getters. */
18214 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18215 false, /* isTypedMethod. Only relevant for methods. */
18216 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18217};
18218
18219MOZ_CAN_RUN_SCRIPT static bool
18220passOptionalUnionByteStringWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18221{
18222 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalUnionByteStringWithDefaultValue");
18223 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18226( cx, "TestJSImplInterface"
, "passOptionalUnionByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18224 "TestJSImplInterface", "passOptionalUnionByteStringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18226( cx, "TestJSImplInterface"
, "passOptionalUnionByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18225 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18226( cx, "TestJSImplInterface"
, "passOptionalUnionByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18226 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18226( cx, "TestJSImplInterface"
, "passOptionalUnionByteStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18227
18228 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18229 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18230 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18231 if (objIsXray) {
18232 unwrappedObj.emplace(cx, obj);
18233 }
18234 ByteStringOrLong arg0;
18235 if (!(args.hasDefined(0))) {
18236 arg0.SetStringLiteral("abc");
18237 } else {
18238 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
18239 return false;
18240 }
18241 }
18242 if (objIsXray) {
18243 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18244 // we know Xrays have no dynamic unwrap behavior.
18245 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18246 if (!unwrappedObj.ref()) {
18247 return false;
18248 }
18249 }
18250 FastErrorResult rv;
18251 // NOTE: This assert does NOT call the function.
18252 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnionByteStringWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18253 MOZ_KnownLive(self)(self)->PassOptionalUnionByteStringWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18254 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnionByteStringWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnionByteStringWithDefaultValue"
)), 0))
) {
18255 return false;
18256 }
18257 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18257); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18257; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18258 args.rval().setUndefined();
18259 return true;
18260}
18261
18262static const JSJitInfo passOptionalUnionByteStringWithDefaultValue_methodinfo = {
18263 { (JSJitGetterOp)passOptionalUnionByteStringWithDefaultValue },
18264 { prototypes::id::TestJSImplInterface },
18265 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18266 JSJitInfo::Method,
18267 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18268 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18269 false, /* isInfallible. False in setters. */
18270 false, /* isMovable. Not relevant for setters. */
18271 false, /* isEliminatable. Not relevant for setters. */
18272 false, /* isAlwaysInSlot. Only relevant for getters. */
18273 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18274 false, /* isTypedMethod. Only relevant for methods. */
18275 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18276};
18277
18278MOZ_CAN_RUN_SCRIPT static bool
18279passUTF8String(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18280{
18281 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18284( cx, "TestJSImplInterface"
, "passUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18282 "TestJSImplInterface", "passUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18284( cx, "TestJSImplInterface"
, "passUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18283 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18284( cx, "TestJSImplInterface"
, "passUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18284 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18284( cx, "TestJSImplInterface"
, "passUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18285
18286 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18287 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUTF8String", 1)) {
18288 return false;
18289 }
18290 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18291 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18292 if (objIsXray) {
18293 unwrappedObj.emplace(cx, obj);
18294 }
18295 binding_detail::FakeString<char> arg0;
18296 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
18297 return false;
18298 }
18299 if (objIsXray) {
18300 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18301 // we know Xrays have no dynamic unwrap behavior.
18302 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18303 if (!unwrappedObj.ref()) {
18304 return false;
18305 }
18306 }
18307 FastErrorResult rv;
18308 // NOTE: This assert does NOT call the function.
18309 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18310 MOZ_KnownLive(self)(self)->PassUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18311 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUTF8String"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUTF8String"
)), 0))
) {
18312 return false;
18313 }
18314 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18314); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18314; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18315 args.rval().setUndefined();
18316 return true;
18317}
18318
18319static const JSJitInfo passUTF8String_methodinfo = {
18320 { (JSJitGetterOp)passUTF8String },
18321 { prototypes::id::TestJSImplInterface },
18322 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18323 JSJitInfo::Method,
18324 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18325 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18326 false, /* isInfallible. False in setters. */
18327 false, /* isMovable. Not relevant for setters. */
18328 false, /* isEliminatable. Not relevant for setters. */
18329 false, /* isAlwaysInSlot. Only relevant for getters. */
18330 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18331 false, /* isTypedMethod. Only relevant for methods. */
18332 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18333};
18334
18335MOZ_CAN_RUN_SCRIPT static bool
18336passNullableUTF8String(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18337{
18338 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18341( cx, "TestJSImplInterface"
, "passNullableUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18339 "TestJSImplInterface", "passNullableUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18341( cx, "TestJSImplInterface"
, "passNullableUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18340 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18341( cx, "TestJSImplInterface"
, "passNullableUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18341 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18341( cx, "TestJSImplInterface"
, "passNullableUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18342
18343 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18344 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableUTF8String", 1)) {
18345 return false;
18346 }
18347 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18348 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18349 if (objIsXray) {
18350 unwrappedObj.emplace(cx, obj);
18351 }
18352 binding_detail::FakeString<char> arg0;
18353 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0)) {
18354 return false;
18355 }
18356 if (objIsXray) {
18357 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18358 // we know Xrays have no dynamic unwrap behavior.
18359 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18360 if (!unwrappedObj.ref()) {
18361 return false;
18362 }
18363 }
18364 FastErrorResult rv;
18365 // NOTE: This assert does NOT call the function.
18366 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18367 MOZ_KnownLive(self)(self)->PassNullableUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18368 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUTF8String"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUTF8String"
)), 0))
) {
18369 return false;
18370 }
18371 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18371); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18371; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18372 args.rval().setUndefined();
18373 return true;
18374}
18375
18376static const JSJitInfo passNullableUTF8String_methodinfo = {
18377 { (JSJitGetterOp)passNullableUTF8String },
18378 { prototypes::id::TestJSImplInterface },
18379 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18380 JSJitInfo::Method,
18381 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18382 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18383 false, /* isInfallible. False in setters. */
18384 false, /* isMovable. Not relevant for setters. */
18385 false, /* isEliminatable. Not relevant for setters. */
18386 false, /* isAlwaysInSlot. Only relevant for getters. */
18387 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18388 false, /* isTypedMethod. Only relevant for methods. */
18389 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18390};
18391
18392MOZ_CAN_RUN_SCRIPT static bool
18393passOptionalUTF8String(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18394{
18395 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18398( cx, "TestJSImplInterface"
, "passOptionalUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18396 "TestJSImplInterface", "passOptionalUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18398( cx, "TestJSImplInterface"
, "passOptionalUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18397 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18398( cx, "TestJSImplInterface"
, "passOptionalUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18398 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18398( cx, "TestJSImplInterface"
, "passOptionalUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18399
18400 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18401 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18402 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18403 if (objIsXray) {
18404 unwrappedObj.emplace(cx, obj);
18405 }
18406 Optional<nsACString> arg0;
18407 binding_detail::FakeString<char> arg0_holder;
18408 if (args.hasDefined(0)) {
18409 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0_holder)) {
18410 return false;
18411 }
18412 arg0 = &arg0_holder;
18413 }
18414 if (objIsXray) {
18415 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18416 // we know Xrays have no dynamic unwrap behavior.
18417 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18418 if (!unwrappedObj.ref()) {
18419 return false;
18420 }
18421 }
18422 FastErrorResult rv;
18423 // NOTE: This assert does NOT call the function.
18424 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18425 MOZ_KnownLive(self)(self)->PassOptionalUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18426 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUTF8String"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUTF8String"
)), 0))
) {
18427 return false;
18428 }
18429 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18429); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18429; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18430 args.rval().setUndefined();
18431 return true;
18432}
18433
18434static const JSJitInfo passOptionalUTF8String_methodinfo = {
18435 { (JSJitGetterOp)passOptionalUTF8String },
18436 { prototypes::id::TestJSImplInterface },
18437 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18438 JSJitInfo::Method,
18439 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18440 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18441 false, /* isInfallible. False in setters. */
18442 false, /* isMovable. Not relevant for setters. */
18443 false, /* isEliminatable. Not relevant for setters. */
18444 false, /* isAlwaysInSlot. Only relevant for getters. */
18445 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18446 false, /* isTypedMethod. Only relevant for methods. */
18447 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18448};
18449
18450MOZ_CAN_RUN_SCRIPT static bool
18451passOptionalUTF8StringWithDefaultValue(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18452{
18453 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18456( cx, "TestJSImplInterface"
, "passOptionalUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18454 "TestJSImplInterface", "passOptionalUTF8StringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18456( cx, "TestJSImplInterface"
, "passOptionalUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18455 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18456( cx, "TestJSImplInterface"
, "passOptionalUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18456 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18456( cx, "TestJSImplInterface"
, "passOptionalUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18457
18458 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18459 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18460 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18461 if (objIsXray) {
18462 unwrappedObj.emplace(cx, obj);
18463 }
18464 binding_detail::FakeString<char> arg0;
18465 if (args.hasDefined(0)) {
18466 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
18467 return false;
18468 }
18469 } else {
18470 arg0.AssignLiteral("abc");
18471 }
18472 if (objIsXray) {
18473 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18474 // we know Xrays have no dynamic unwrap behavior.
18475 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18476 if (!unwrappedObj.ref()) {
18477 return false;
18478 }
18479 }
18480 FastErrorResult rv;
18481 // NOTE: This assert does NOT call the function.
18482 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUTF8StringWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18483 MOZ_KnownLive(self)(self)->PassOptionalUTF8StringWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18484 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUTF8StringWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUTF8StringWithDefaultValue"
)), 0))
) {
18485 return false;
18486 }
18487 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18487); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18487; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18488 args.rval().setUndefined();
18489 return true;
18490}
18491
18492static const JSJitInfo passOptionalUTF8StringWithDefaultValue_methodinfo = {
18493 { (JSJitGetterOp)passOptionalUTF8StringWithDefaultValue },
18494 { prototypes::id::TestJSImplInterface },
18495 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18496 JSJitInfo::Method,
18497 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18498 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18499 false, /* isInfallible. False in setters. */
18500 false, /* isMovable. Not relevant for setters. */
18501 false, /* isEliminatable. Not relevant for setters. */
18502 false, /* isAlwaysInSlot. Only relevant for getters. */
18503 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18504 false, /* isTypedMethod. Only relevant for methods. */
18505 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18506};
18507
18508MOZ_CAN_RUN_SCRIPT static bool
18509passOptionalNullableUTF8String(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18510{
18511 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18514( cx, "TestJSImplInterface"
, "passOptionalNullableUTF8String", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18512 "TestJSImplInterface", "passOptionalNullableUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18514( cx, "TestJSImplInterface"
, "passOptionalNullableUTF8String", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18513 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18514( cx, "TestJSImplInterface"
, "passOptionalNullableUTF8String", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18514 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18514( cx, "TestJSImplInterface"
, "passOptionalNullableUTF8String", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18515
18516 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18517 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18518 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18519 if (objIsXray) {
18520 unwrappedObj.emplace(cx, obj);
18521 }
18522 Optional<nsACString> arg0;
18523 binding_detail::FakeString<char> arg0_holder;
18524 if (args.hasDefined(0)) {
18525 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0_holder)) {
18526 return false;
18527 }
18528 arg0 = &arg0_holder;
18529 }
18530 if (objIsXray) {
18531 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18532 // we know Xrays have no dynamic unwrap behavior.
18533 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18534 if (!unwrappedObj.ref()) {
18535 return false;
18536 }
18537 }
18538 FastErrorResult rv;
18539 // NOTE: This assert does NOT call the function.
18540 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18541 MOZ_KnownLive(self)(self)->PassOptionalNullableUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18542 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableUTF8String"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableUTF8String"
)), 0))
) {
18543 return false;
18544 }
18545 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18545); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18545; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18546 args.rval().setUndefined();
18547 return true;
18548}
18549
18550static const JSJitInfo passOptionalNullableUTF8String_methodinfo = {
18551 { (JSJitGetterOp)passOptionalNullableUTF8String },
18552 { prototypes::id::TestJSImplInterface },
18553 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18554 JSJitInfo::Method,
18555 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18556 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18557 false, /* isInfallible. False in setters. */
18558 false, /* isMovable. Not relevant for setters. */
18559 false, /* isEliminatable. Not relevant for setters. */
18560 false, /* isAlwaysInSlot. Only relevant for getters. */
18561 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18562 false, /* isTypedMethod. Only relevant for methods. */
18563 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18564};
18565
18566MOZ_CAN_RUN_SCRIPT static bool
18567passOptionalNullableUTF8StringWithDefaultValue(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18568{
18569 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18572( cx, "TestJSImplInterface"
, "passOptionalNullableUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18570 "TestJSImplInterface", "passOptionalNullableUTF8StringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18572( cx, "TestJSImplInterface"
, "passOptionalNullableUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18571 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18572( cx, "TestJSImplInterface"
, "passOptionalNullableUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18572 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18572( cx, "TestJSImplInterface"
, "passOptionalNullableUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18573
18574 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18575 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18576 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18577 if (objIsXray) {
18578 unwrappedObj.emplace(cx, obj);
18579 }
18580 binding_detail::FakeString<char> arg0;
18581 if (args.hasDefined(0)) {
18582 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0)) {
18583 return false;
18584 }
18585 } else {
18586 arg0.SetIsVoid(true);
18587 }
18588 if (objIsXray) {
18589 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18590 // we know Xrays have no dynamic unwrap behavior.
18591 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18592 if (!unwrappedObj.ref()) {
18593 return false;
18594 }
18595 }
18596 FastErrorResult rv;
18597 // NOTE: This assert does NOT call the function.
18598 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableUTF8StringWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18599 MOZ_KnownLive(self)(self)->PassOptionalNullableUTF8StringWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18600 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableUTF8StringWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableUTF8StringWithDefaultValue"
)), 0))
) {
18601 return false;
18602 }
18603 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18603); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18603; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18604 args.rval().setUndefined();
18605 return true;
18606}
18607
18608static const JSJitInfo passOptionalNullableUTF8StringWithDefaultValue_methodinfo = {
18609 { (JSJitGetterOp)passOptionalNullableUTF8StringWithDefaultValue },
18610 { prototypes::id::TestJSImplInterface },
18611 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18612 JSJitInfo::Method,
18613 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18614 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18615 false, /* isInfallible. False in setters. */
18616 false, /* isMovable. Not relevant for setters. */
18617 false, /* isEliminatable. Not relevant for setters. */
18618 false, /* isAlwaysInSlot. Only relevant for getters. */
18619 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18620 false, /* isTypedMethod. Only relevant for methods. */
18621 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18622};
18623
18624MOZ_CAN_RUN_SCRIPT static bool
18625passVariadicUTF8String(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18626{
18627 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18630( cx, "TestJSImplInterface"
, "passVariadicUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18628 "TestJSImplInterface", "passVariadicUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18630( cx, "TestJSImplInterface"
, "passVariadicUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18629 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18630( cx, "TestJSImplInterface"
, "passVariadicUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18630 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18630( cx, "TestJSImplInterface"
, "passVariadicUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18631
18632 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18633 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18634 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18635 if (objIsXray) {
18636 unwrappedObj.emplace(cx, obj);
18637 }
18638 AutoSequence<nsCString> arg0;
18639 if (args.length() > 0) {
18640 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
18641 JS_ReportOutOfMemory(cx);
18642 return false;
18643 }
18644 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
18645 // OK to do infallible append here, since we ensured capacity already.
18646 nsCString& slot = *arg0.AppendElement();
18647 if (!ConvertJSValueToString(cx, args[variadicArg], eStringify, eStringify, slot)) {
18648 return false;
18649 }
18650 }
18651 }
18652 if (objIsXray) {
18653 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18654 // we know Xrays have no dynamic unwrap behavior.
18655 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18656 if (!unwrappedObj.ref()) {
18657 return false;
18658 }
18659 }
18660 FastErrorResult rv;
18661 // NOTE: This assert does NOT call the function.
18662 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18663 MOZ_KnownLive(self)(self)->PassVariadicUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18664 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicUTF8String"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicUTF8String"
)), 0))
) {
18665 return false;
18666 }
18667 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18667); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18667; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18668 args.rval().setUndefined();
18669 return true;
18670}
18671
18672static const JSJitInfo passVariadicUTF8String_methodinfo = {
18673 { (JSJitGetterOp)passVariadicUTF8String },
18674 { prototypes::id::TestJSImplInterface },
18675 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18676 JSJitInfo::Method,
18677 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18678 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18679 false, /* isInfallible. False in setters. */
18680 false, /* isMovable. Not relevant for setters. */
18681 false, /* isEliminatable. Not relevant for setters. */
18682 false, /* isAlwaysInSlot. Only relevant for getters. */
18683 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18684 false, /* isTypedMethod. Only relevant for methods. */
18685 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18686};
18687
18688MOZ_CAN_RUN_SCRIPT static bool
18689passUnionUTF8String(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18690{
18691 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionUTF8String");
18692 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18695( cx, "TestJSImplInterface"
, "passUnionUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18693 "TestJSImplInterface", "passUnionUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18695( cx, "TestJSImplInterface"
, "passUnionUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18694 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18695( cx, "TestJSImplInterface"
, "passUnionUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18695 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18695( cx, "TestJSImplInterface"
, "passUnionUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18696
18697 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18698 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionUTF8String", 1)) {
18699 return false;
18700 }
18701 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18702 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18703 if (objIsXray) {
18704 unwrappedObj.emplace(cx, obj);
18705 }
18706 UTF8StringOrLong arg0;
18707 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
18708 return false;
18709 }
18710 if (objIsXray) {
18711 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18712 // we know Xrays have no dynamic unwrap behavior.
18713 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18714 if (!unwrappedObj.ref()) {
18715 return false;
18716 }
18717 }
18718 FastErrorResult rv;
18719 // NOTE: This assert does NOT call the function.
18720 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18721 MOZ_KnownLive(self)(self)->PassUnionUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18722 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionUTF8String"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionUTF8String"
)), 0))
) {
18723 return false;
18724 }
18725 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18725); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18725; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18726 args.rval().setUndefined();
18727 return true;
18728}
18729
18730static const JSJitInfo passUnionUTF8String_methodinfo = {
18731 { (JSJitGetterOp)passUnionUTF8String },
18732 { prototypes::id::TestJSImplInterface },
18733 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18734 JSJitInfo::Method,
18735 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18736 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18737 false, /* isInfallible. False in setters. */
18738 false, /* isMovable. Not relevant for setters. */
18739 false, /* isEliminatable. Not relevant for setters. */
18740 false, /* isAlwaysInSlot. Only relevant for getters. */
18741 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18742 false, /* isTypedMethod. Only relevant for methods. */
18743 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18744};
18745
18746MOZ_CAN_RUN_SCRIPT static bool
18747passOptionalUnionUTF8String(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18748{
18749 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalUnionUTF8String");
18750 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18753( cx, "TestJSImplInterface"
, "passOptionalUnionUTF8String", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18751 "TestJSImplInterface", "passOptionalUnionUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18753( cx, "TestJSImplInterface"
, "passOptionalUnionUTF8String", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18752 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18753( cx, "TestJSImplInterface"
, "passOptionalUnionUTF8String", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18753 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18753( cx, "TestJSImplInterface"
, "passOptionalUnionUTF8String", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18754
18755 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18756 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18757 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18758 if (objIsXray) {
18759 unwrappedObj.emplace(cx, obj);
18760 }
18761 Optional<UTF8StringOrLong> arg0;
18762 if (args.hasDefined(0)) {
18763 arg0.Construct();
18764 if (!arg0.Value().Init(cx, args[0], "Argument 1", true)) {
18765 return false;
18766 }
18767 }
18768 if (objIsXray) {
18769 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18770 // we know Xrays have no dynamic unwrap behavior.
18771 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18772 if (!unwrappedObj.ref()) {
18773 return false;
18774 }
18775 }
18776 FastErrorResult rv;
18777 // NOTE: This assert does NOT call the function.
18778 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnionUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18779 MOZ_KnownLive(self)(self)->PassOptionalUnionUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18780 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnionUTF8String"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnionUTF8String"
)), 0))
) {
18781 return false;
18782 }
18783 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18783); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18783; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18784 args.rval().setUndefined();
18785 return true;
18786}
18787
18788static const JSJitInfo passOptionalUnionUTF8String_methodinfo = {
18789 { (JSJitGetterOp)passOptionalUnionUTF8String },
18790 { prototypes::id::TestJSImplInterface },
18791 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18792 JSJitInfo::Method,
18793 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18794 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18795 false, /* isInfallible. False in setters. */
18796 false, /* isMovable. Not relevant for setters. */
18797 false, /* isEliminatable. Not relevant for setters. */
18798 false, /* isAlwaysInSlot. Only relevant for getters. */
18799 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18800 false, /* isTypedMethod. Only relevant for methods. */
18801 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18802};
18803
18804MOZ_CAN_RUN_SCRIPT static bool
18805passOptionalUnionUTF8StringWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18806{
18807 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalUnionUTF8StringWithDefaultValue");
18808 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18811( cx, "TestJSImplInterface"
, "passOptionalUnionUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18809 "TestJSImplInterface", "passOptionalUnionUTF8StringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18811( cx, "TestJSImplInterface"
, "passOptionalUnionUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18810 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18811( cx, "TestJSImplInterface"
, "passOptionalUnionUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
18811 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18811( cx, "TestJSImplInterface"
, "passOptionalUnionUTF8StringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
18812
18813 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18814 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18815 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18816 if (objIsXray) {
18817 unwrappedObj.emplace(cx, obj);
18818 }
18819 UTF8StringOrLong arg0;
18820 if (!(args.hasDefined(0))) {
18821 arg0.SetStringLiteral("abc");
18822 } else {
18823 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
18824 return false;
18825 }
18826 }
18827 if (objIsXray) {
18828 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18829 // we know Xrays have no dynamic unwrap behavior.
18830 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18831 if (!unwrappedObj.ref()) {
18832 return false;
18833 }
18834 }
18835 FastErrorResult rv;
18836 // NOTE: This assert does NOT call the function.
18837 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnionUTF8StringWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18838 MOZ_KnownLive(self)(self)->PassOptionalUnionUTF8StringWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18839 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnionUTF8StringWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnionUTF8StringWithDefaultValue"
)), 0))
) {
18840 return false;
18841 }
18842 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18842); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18842; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18843 args.rval().setUndefined();
18844 return true;
18845}
18846
18847static const JSJitInfo passOptionalUnionUTF8StringWithDefaultValue_methodinfo = {
18848 { (JSJitGetterOp)passOptionalUnionUTF8StringWithDefaultValue },
18849 { prototypes::id::TestJSImplInterface },
18850 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18851 JSJitInfo::Method,
18852 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18853 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18854 false, /* isInfallible. False in setters. */
18855 false, /* isMovable. Not relevant for setters. */
18856 false, /* isEliminatable. Not relevant for setters. */
18857 false, /* isAlwaysInSlot. Only relevant for getters. */
18858 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18859 false, /* isTypedMethod. Only relevant for methods. */
18860 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18861};
18862
18863MOZ_CAN_RUN_SCRIPT static bool
18864passSVS(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18865{
18866 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18869( cx, "TestJSImplInterface"
, "passSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
18867 "TestJSImplInterface", "passSVS", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18869( cx, "TestJSImplInterface"
, "passSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
18868 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18869( cx, "TestJSImplInterface"
, "passSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
18869 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18869( cx, "TestJSImplInterface"
, "passSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
18870
18871 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18872 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSVS", 1)) {
18873 return false;
18874 }
18875 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18876 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18877 if (objIsXray) {
18878 unwrappedObj.emplace(cx, obj);
18879 }
18880 binding_detail::FakeString<char16_t> arg0;
18881 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
18882 return false;
18883 }
18884 if (!NormalizeUSVString(arg0)) {
18885 JS_ReportOutOfMemory(cx);
18886 return false;
18887 }
18888 if (objIsXray) {
18889 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18890 // we know Xrays have no dynamic unwrap behavior.
18891 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18892 if (!unwrappedObj.ref()) {
18893 return false;
18894 }
18895 }
18896 FastErrorResult rv;
18897 // NOTE: This assert does NOT call the function.
18898 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSVS(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18899 MOZ_KnownLive(self)(self)->PassSVS(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18900 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSVS"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSVS"
)), 0))
) {
18901 return false;
18902 }
18903 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18903); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18903; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18904 args.rval().setUndefined();
18905 return true;
18906}
18907
18908static const JSJitInfo passSVS_methodinfo = {
18909 { (JSJitGetterOp)passSVS },
18910 { prototypes::id::TestJSImplInterface },
18911 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18912 JSJitInfo::Method,
18913 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18914 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18915 false, /* isInfallible. False in setters. */
18916 false, /* isMovable. Not relevant for setters. */
18917 false, /* isEliminatable. Not relevant for setters. */
18918 false, /* isAlwaysInSlot. Only relevant for getters. */
18919 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18920 false, /* isTypedMethod. Only relevant for methods. */
18921 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18922};
18923
18924MOZ_CAN_RUN_SCRIPT static bool
18925passNullableSVS(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18926{
18927 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18930( cx, "TestJSImplInterface"
, "passNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18928 "TestJSImplInterface", "passNullableSVS", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18930( cx, "TestJSImplInterface"
, "passNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18929 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18930( cx, "TestJSImplInterface"
, "passNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18930 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18930( cx, "TestJSImplInterface"
, "passNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18931
18932 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18933 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableSVS", 1)) {
18934 return false;
18935 }
18936 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18937 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18938 if (objIsXray) {
18939 unwrappedObj.emplace(cx, obj);
18940 }
18941 binding_detail::FakeString<char16_t> arg0;
18942 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0)) {
18943 return false;
18944 }
18945 if (!NormalizeUSVString(arg0)) {
18946 JS_ReportOutOfMemory(cx);
18947 return false;
18948 }
18949 if (objIsXray) {
18950 // Since our object is an Xray, we can just CheckedUnwrapStatic:
18951 // we know Xrays have no dynamic unwrap behavior.
18952 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
18953 if (!unwrappedObj.ref()) {
18954 return false;
18955 }
18956 }
18957 FastErrorResult rv;
18958 // NOTE: This assert does NOT call the function.
18959 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableSVS(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
18960 MOZ_KnownLive(self)(self)->PassNullableSVS(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
18961 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableSVS"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableSVS"
)), 0))
) {
18962 return false;
18963 }
18964 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 18964); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 18964; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
18965 args.rval().setUndefined();
18966 return true;
18967}
18968
18969static const JSJitInfo passNullableSVS_methodinfo = {
18970 { (JSJitGetterOp)passNullableSVS },
18971 { prototypes::id::TestJSImplInterface },
18972 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
18973 JSJitInfo::Method,
18974 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
18975 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
18976 false, /* isInfallible. False in setters. */
18977 false, /* isMovable. Not relevant for setters. */
18978 false, /* isEliminatable. Not relevant for setters. */
18979 false, /* isAlwaysInSlot. Only relevant for getters. */
18980 false, /* isLazilyCachedInSlot. Only relevant for getters. */
18981 false, /* isTypedMethod. Only relevant for methods. */
18982 0 /* Reserved slot index, if we're stored in a slot, else 0. */
18983};
18984
18985MOZ_CAN_RUN_SCRIPT static bool
18986passOptionalSVS(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
18987{
18988 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject18991( cx, "TestJSImplInterface"
, "passOptionalSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18989 "TestJSImplInterface", "passOptionalSVS", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject18991( cx, "TestJSImplInterface"
, "passOptionalSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18990 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject18991( cx, "TestJSImplInterface"
, "passOptionalSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
18991 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject18991( cx, "TestJSImplInterface"
, "passOptionalSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
18992
18993 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
18994 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
18995 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
18996 if (objIsXray) {
18997 unwrappedObj.emplace(cx, obj);
18998 }
18999 Optional<nsAString> arg0;
19000 binding_detail::FakeString<char16_t> arg0_holder;
19001 if (args.hasDefined(0)) {
19002 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0_holder)) {
19003 return false;
19004 }
19005 if (!NormalizeUSVString(arg0_holder)) {
19006 JS_ReportOutOfMemory(cx);
19007 return false;
19008 }
19009 arg0 = &arg0_holder;
19010 }
19011 if (objIsXray) {
19012 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19013 // we know Xrays have no dynamic unwrap behavior.
19014 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19015 if (!unwrappedObj.ref()) {
19016 return false;
19017 }
19018 }
19019 FastErrorResult rv;
19020 // NOTE: This assert does NOT call the function.
19021 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSVS(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19022 MOZ_KnownLive(self)(self)->PassOptionalSVS(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19023 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSVS"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSVS"
)), 0))
) {
19024 return false;
19025 }
19026 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19026); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19026; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19027 args.rval().setUndefined();
19028 return true;
19029}
19030
19031static const JSJitInfo passOptionalSVS_methodinfo = {
19032 { (JSJitGetterOp)passOptionalSVS },
19033 { prototypes::id::TestJSImplInterface },
19034 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19035 JSJitInfo::Method,
19036 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19037 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19038 false, /* isInfallible. False in setters. */
19039 false, /* isMovable. Not relevant for setters. */
19040 false, /* isEliminatable. Not relevant for setters. */
19041 false, /* isAlwaysInSlot. Only relevant for getters. */
19042 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19043 false, /* isTypedMethod. Only relevant for methods. */
19044 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19045};
19046
19047MOZ_CAN_RUN_SCRIPT static bool
19048passOptionalSVSWithDefaultValue(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19049{
19050 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19053( cx, "TestJSImplInterface"
, "passOptionalSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19051 "TestJSImplInterface", "passOptionalSVSWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19053( cx, "TestJSImplInterface"
, "passOptionalSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19052 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19053( cx, "TestJSImplInterface"
, "passOptionalSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19053 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19053( cx, "TestJSImplInterface"
, "passOptionalSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
19054
19055 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19056 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19057 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19058 if (objIsXray) {
19059 unwrappedObj.emplace(cx, obj);
19060 }
19061 binding_detail::FakeString<char16_t> arg0;
19062 if (args.hasDefined(0)) {
19063 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
19064 return false;
19065 }
19066 if (!NormalizeUSVString(arg0)) {
19067 JS_ReportOutOfMemory(cx);
19068 return false;
19069 }
19070 } else {
19071 arg0.AssignLiteral(u"abc");
19072 }
19073 if (objIsXray) {
19074 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19075 // we know Xrays have no dynamic unwrap behavior.
19076 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19077 if (!unwrappedObj.ref()) {
19078 return false;
19079 }
19080 }
19081 FastErrorResult rv;
19082 // NOTE: This assert does NOT call the function.
19083 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSVSWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19084 MOZ_KnownLive(self)(self)->PassOptionalSVSWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19085 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSVSWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSVSWithDefaultValue"
)), 0))
) {
19086 return false;
19087 }
19088 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19088); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19088; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19089 args.rval().setUndefined();
19090 return true;
19091}
19092
19093static const JSJitInfo passOptionalSVSWithDefaultValue_methodinfo = {
19094 { (JSJitGetterOp)passOptionalSVSWithDefaultValue },
19095 { prototypes::id::TestJSImplInterface },
19096 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19097 JSJitInfo::Method,
19098 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19099 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19100 false, /* isInfallible. False in setters. */
19101 false, /* isMovable. Not relevant for setters. */
19102 false, /* isEliminatable. Not relevant for setters. */
19103 false, /* isAlwaysInSlot. Only relevant for getters. */
19104 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19105 false, /* isTypedMethod. Only relevant for methods. */
19106 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19107};
19108
19109MOZ_CAN_RUN_SCRIPT static bool
19110passOptionalNullableSVS(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19111{
19112 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19115( cx, "TestJSImplInterface"
, "passOptionalNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19113 "TestJSImplInterface", "passOptionalNullableSVS", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19115( cx, "TestJSImplInterface"
, "passOptionalNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19114 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19115( cx, "TestJSImplInterface"
, "passOptionalNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19115 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19115( cx, "TestJSImplInterface"
, "passOptionalNullableSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19116
19117 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19118 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19119 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19120 if (objIsXray) {
19121 unwrappedObj.emplace(cx, obj);
19122 }
19123 Optional<nsAString> arg0;
19124 binding_detail::FakeString<char16_t> arg0_holder;
19125 if (args.hasDefined(0)) {
19126 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0_holder)) {
19127 return false;
19128 }
19129 if (!NormalizeUSVString(arg0_holder)) {
19130 JS_ReportOutOfMemory(cx);
19131 return false;
19132 }
19133 arg0 = &arg0_holder;
19134 }
19135 if (objIsXray) {
19136 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19137 // we know Xrays have no dynamic unwrap behavior.
19138 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19139 if (!unwrappedObj.ref()) {
19140 return false;
19141 }
19142 }
19143 FastErrorResult rv;
19144 // NOTE: This assert does NOT call the function.
19145 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSVS(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19146 MOZ_KnownLive(self)(self)->PassOptionalNullableSVS(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19147 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSVS"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSVS"
)), 0))
) {
19148 return false;
19149 }
19150 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19150); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19150; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19151 args.rval().setUndefined();
19152 return true;
19153}
19154
19155static const JSJitInfo passOptionalNullableSVS_methodinfo = {
19156 { (JSJitGetterOp)passOptionalNullableSVS },
19157 { prototypes::id::TestJSImplInterface },
19158 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19159 JSJitInfo::Method,
19160 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19161 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19162 false, /* isInfallible. False in setters. */
19163 false, /* isMovable. Not relevant for setters. */
19164 false, /* isEliminatable. Not relevant for setters. */
19165 false, /* isAlwaysInSlot. Only relevant for getters. */
19166 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19167 false, /* isTypedMethod. Only relevant for methods. */
19168 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19169};
19170
19171MOZ_CAN_RUN_SCRIPT static bool
19172passOptionalNullableSVSWithDefaultValue(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19173{
19174 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19177( cx, "TestJSImplInterface"
, "passOptionalNullableSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19175 "TestJSImplInterface", "passOptionalNullableSVSWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19177( cx, "TestJSImplInterface"
, "passOptionalNullableSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19176 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19177( cx, "TestJSImplInterface"
, "passOptionalNullableSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19177 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19177( cx, "TestJSImplInterface"
, "passOptionalNullableSVSWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
19178
19179 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19180 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19181 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19182 if (objIsXray) {
19183 unwrappedObj.emplace(cx, obj);
19184 }
19185 binding_detail::FakeString<char16_t> arg0;
19186 if (args.hasDefined(0)) {
19187 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0)) {
19188 return false;
19189 }
19190 if (!NormalizeUSVString(arg0)) {
19191 JS_ReportOutOfMemory(cx);
19192 return false;
19193 }
19194 } else {
19195 arg0.SetIsVoid(true);
19196 }
19197 if (objIsXray) {
19198 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19199 // we know Xrays have no dynamic unwrap behavior.
19200 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19201 if (!unwrappedObj.ref()) {
19202 return false;
19203 }
19204 }
19205 FastErrorResult rv;
19206 // NOTE: This assert does NOT call the function.
19207 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSVSWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19208 MOZ_KnownLive(self)(self)->PassOptionalNullableSVSWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19209 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSVSWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSVSWithDefaultValue"
)), 0))
) {
19210 return false;
19211 }
19212 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19212); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19212; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19213 args.rval().setUndefined();
19214 return true;
19215}
19216
19217static const JSJitInfo passOptionalNullableSVSWithDefaultValue_methodinfo = {
19218 { (JSJitGetterOp)passOptionalNullableSVSWithDefaultValue },
19219 { prototypes::id::TestJSImplInterface },
19220 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19221 JSJitInfo::Method,
19222 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19223 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19224 false, /* isInfallible. False in setters. */
19225 false, /* isMovable. Not relevant for setters. */
19226 false, /* isEliminatable. Not relevant for setters. */
19227 false, /* isAlwaysInSlot. Only relevant for getters. */
19228 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19229 false, /* isTypedMethod. Only relevant for methods. */
19230 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19231};
19232
19233MOZ_CAN_RUN_SCRIPT static bool
19234passVariadicSVS(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19235{
19236 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19239( cx, "TestJSImplInterface"
, "passVariadicSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19237 "TestJSImplInterface", "passVariadicSVS", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19239( cx, "TestJSImplInterface"
, "passVariadicSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19238 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19239( cx, "TestJSImplInterface"
, "passVariadicSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19239 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19239( cx, "TestJSImplInterface"
, "passVariadicSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19240
19241 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19242 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19243 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19244 if (objIsXray) {
19245 unwrappedObj.emplace(cx, obj);
19246 }
19247 AutoSequence<nsString> arg0;
19248 if (args.length() > 0) {
19249 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
19250 JS_ReportOutOfMemory(cx);
19251 return false;
19252 }
19253 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
19254 // OK to do infallible append here, since we ensured capacity already.
19255 nsString& slot = *arg0.AppendElement();
19256 if (!ConvertJSValueToString(cx, args[variadicArg], eStringify, eStringify, slot)) {
19257 return false;
19258 }
19259 if (!NormalizeUSVString(slot)) {
19260 JS_ReportOutOfMemory(cx);
19261 return false;
19262 }
19263 }
19264 }
19265 if (objIsXray) {
19266 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19267 // we know Xrays have no dynamic unwrap behavior.
19268 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19269 if (!unwrappedObj.ref()) {
19270 return false;
19271 }
19272 }
19273 FastErrorResult rv;
19274 // NOTE: This assert does NOT call the function.
19275 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicSVS(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19276 MOZ_KnownLive(self)(self)->PassVariadicSVS(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19277 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicSVS"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicSVS"
)), 0))
) {
19278 return false;
19279 }
19280 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19280); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19280; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19281 args.rval().setUndefined();
19282 return true;
19283}
19284
19285static const JSJitInfo passVariadicSVS_methodinfo = {
19286 { (JSJitGetterOp)passVariadicSVS },
19287 { prototypes::id::TestJSImplInterface },
19288 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19289 JSJitInfo::Method,
19290 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19291 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19292 false, /* isInfallible. False in setters. */
19293 false, /* isMovable. Not relevant for setters. */
19294 false, /* isEliminatable. Not relevant for setters. */
19295 false, /* isAlwaysInSlot. Only relevant for getters. */
19296 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19297 false, /* isTypedMethod. Only relevant for methods. */
19298 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19299};
19300
19301MOZ_CAN_RUN_SCRIPT static bool
19302receiveSVS(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19303{
19304 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19307( cx, "TestJSImplInterface"
, "receiveSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19305 "TestJSImplInterface", "receiveSVS", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19307( cx, "TestJSImplInterface"
, "receiveSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19306 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19307( cx, "TestJSImplInterface"
, "receiveSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19307 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19307( cx, "TestJSImplInterface"
, "receiveSVS", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19308
19309 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19310 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19311 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19312 if (objIsXray) {
19313 unwrappedObj.emplace(cx, obj);
19314 }
19315 if (objIsXray) {
19316 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19317 // we know Xrays have no dynamic unwrap behavior.
19318 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19319 if (!unwrappedObj.ref()) {
19320 return false;
19321 }
19322 }
19323 FastErrorResult rv;
19324 DOMString result;
19325 // NOTE: This assert does NOT call the function.
19326 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveSVS(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19327 MOZ_KnownLive(self)(self)->ReceiveSVS(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19328 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveSVS"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveSVS"
)), 0))
) {
19329 return false;
19330 }
19331 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19331); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19331; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19332 if (!xpc::NonVoidStringToJsval(cx, result, args.rval())) {
19333 return false;
19334 }
19335 return true;
19336}
19337
19338static const JSJitInfo receiveSVS_methodinfo = {
19339 { (JSJitGetterOp)receiveSVS },
19340 { prototypes::id::TestJSImplInterface },
19341 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19342 JSJitInfo::Method,
19343 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19344 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
19345 false, /* isInfallible. False in setters. */
19346 false, /* isMovable. Not relevant for setters. */
19347 false, /* isEliminatable. Not relevant for setters. */
19348 false, /* isAlwaysInSlot. Only relevant for getters. */
19349 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19350 false, /* isTypedMethod. Only relevant for methods. */
19351 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19352};
19353
19354MOZ_CAN_RUN_SCRIPT static bool
19355passJSString(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19356{
19357 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19360( cx, "TestJSImplInterface"
, "passJSString", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19358 "TestJSImplInterface", "passJSString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19360( cx, "TestJSImplInterface"
, "passJSString", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19359 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19360( cx, "TestJSImplInterface"
, "passJSString", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19360 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19360( cx, "TestJSImplInterface"
, "passJSString", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19361
19362 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19363 if (!args.requireAtLeast(cx, "TestJSImplInterface.passJSString", 1)) {
19364 return false;
19365 }
19366 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19367 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19368 if (objIsXray) {
19369 unwrappedObj.emplace(cx, obj);
19370 }
19371 JS::Rooted<JSString*> arg0(cx);
19372 if (!(arg0 = ConvertJSValueToJSString(cx, args[0]))) {
19373 return false;
19374 }
19375 if (objIsXray) {
19376 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19377 // we know Xrays have no dynamic unwrap behavior.
19378 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19379 if (!unwrappedObj.ref()) {
19380 return false;
19381 }
19382 }
19383 FastErrorResult rv;
19384 // NOTE: This assert does NOT call the function.
19385 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassJSString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19386 MOZ_KnownLive(self)(self)->PassJSString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19387 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passJSString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passJSString"
)), 0))
) {
19388 return false;
19389 }
19390 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19390); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19390; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19391 args.rval().setUndefined();
19392 return true;
19393}
19394
19395static const JSJitInfo passJSString_methodinfo = {
19396 { (JSJitGetterOp)passJSString },
19397 { prototypes::id::TestJSImplInterface },
19398 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19399 JSJitInfo::Method,
19400 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19401 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19402 false, /* isInfallible. False in setters. */
19403 false, /* isMovable. Not relevant for setters. */
19404 false, /* isEliminatable. Not relevant for setters. */
19405 false, /* isAlwaysInSlot. Only relevant for getters. */
19406 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19407 false, /* isTypedMethod. Only relevant for methods. */
19408 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19409};
19410
19411MOZ_CAN_RUN_SCRIPT static bool
19412passOptionalJSStringWithDefaultValue(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19413{
19414 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19417( cx, "TestJSImplInterface"
, "passOptionalJSStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19415 "TestJSImplInterface", "passOptionalJSStringWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19417( cx, "TestJSImplInterface"
, "passOptionalJSStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19416 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19417( cx, "TestJSImplInterface"
, "passOptionalJSStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19417 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19417( cx, "TestJSImplInterface"
, "passOptionalJSStringWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
19418
19419 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19420 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19421 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19422 if (objIsXray) {
19423 unwrappedObj.emplace(cx, obj);
19424 }
19425 JS::Rooted<JSString*> arg0(cx);
19426 if (args.hasDefined(0)) {
19427 if (!(arg0 = ConvertJSValueToJSString(cx, args[0]))) {
19428 return false;
19429 }
19430 } else {
19431 static const char data[] = { 'a', 'b', 'c', 0 };
19432 arg0 = JS_NewStringCopyN(cx, data, ArrayLength(data) - 1);
19433 if (!arg0) {
19434 return false;
19435 }
19436 }
19437 if (objIsXray) {
19438 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19439 // we know Xrays have no dynamic unwrap behavior.
19440 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19441 if (!unwrappedObj.ref()) {
19442 return false;
19443 }
19444 }
19445 FastErrorResult rv;
19446 // NOTE: This assert does NOT call the function.
19447 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalJSStringWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19448 MOZ_KnownLive(self)(self)->PassOptionalJSStringWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19449 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalJSStringWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalJSStringWithDefaultValue"
)), 0))
) {
19450 return false;
19451 }
19452 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19452); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19452; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19453 args.rval().setUndefined();
19454 return true;
19455}
19456
19457static const JSJitInfo passOptionalJSStringWithDefaultValue_methodinfo = {
19458 { (JSJitGetterOp)passOptionalJSStringWithDefaultValue },
19459 { prototypes::id::TestJSImplInterface },
19460 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19461 JSJitInfo::Method,
19462 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19463 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19464 false, /* isInfallible. False in setters. */
19465 false, /* isMovable. Not relevant for setters. */
19466 false, /* isEliminatable. Not relevant for setters. */
19467 false, /* isAlwaysInSlot. Only relevant for getters. */
19468 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19469 false, /* isTypedMethod. Only relevant for methods. */
19470 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19471};
19472
19473MOZ_CAN_RUN_SCRIPT static bool
19474receiveJSString(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19475{
19476 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19479( cx, "TestJSImplInterface"
, "receiveJSString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19477 "TestJSImplInterface", "receiveJSString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19479( cx, "TestJSImplInterface"
, "receiveJSString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19478 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19479( cx, "TestJSImplInterface"
, "receiveJSString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19479 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19479( cx, "TestJSImplInterface"
, "receiveJSString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19480
19481 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19482 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19483 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19484 if (objIsXray) {
19485 unwrappedObj.emplace(cx, obj);
19486 }
19487 if (objIsXray) {
19488 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19489 // we know Xrays have no dynamic unwrap behavior.
19490 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19491 if (!unwrappedObj.ref()) {
19492 return false;
19493 }
19494 }
19495 FastErrorResult rv;
19496 JS::Rooted<JSString*> result(cx);
19497 // NOTE: This assert does NOT call the function.
19498 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveJSString(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19499 MOZ_KnownLive(self)(self)->ReceiveJSString(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19500 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveJSString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveJSString"
)), 0))
) {
19501 return false;
19502 }
19503 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19503); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19503; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19504 args.rval().setString(result);
19505 if (!MaybeWrapStringValue(cx, args.rval())) {
19506 return false;
19507 }
19508 return true;
19509}
19510
19511static const JSJitInfo receiveJSString_methodinfo = {
19512 { (JSJitGetterOp)receiveJSString },
19513 { prototypes::id::TestJSImplInterface },
19514 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19515 JSJitInfo::Method,
19516 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19517 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
19518 false, /* isInfallible. False in setters. */
19519 false, /* isMovable. Not relevant for setters. */
19520 false, /* isEliminatable. Not relevant for setters. */
19521 false, /* isAlwaysInSlot. Only relevant for getters. */
19522 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19523 false, /* isTypedMethod. Only relevant for methods. */
19524 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19525};
19526
19527MOZ_CAN_RUN_SCRIPT static bool
19528get_readonlyJSStringAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
19529{
19530 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19533( cx, "TestJSImplInterface"
, "readonlyJSStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19531 "TestJSImplInterface", "readonlyJSStringAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19533( cx, "TestJSImplInterface"
, "readonlyJSStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19532 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject19533( cx, "TestJSImplInterface"
, "readonlyJSStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19533 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19533( cx, "TestJSImplInterface"
, "readonlyJSStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19534
19535 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19536 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19537 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19538 if (objIsXray) {
19539 unwrappedObj.emplace(cx, obj);
19540 }
19541 if (objIsXray) {
19542 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19543 // we know Xrays have no dynamic unwrap behavior.
19544 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19545 if (!unwrappedObj.ref()) {
19546 return false;
19547 }
19548 }
19549 FastErrorResult rv;
19550 JS::Rooted<JSString*> result(cx);
19551 // NOTE: This assert does NOT call the function.
19552 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetReadonlyJSStringAttr(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19553 MOZ_KnownLive(self)(self)->GetReadonlyJSStringAttr(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19554 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyJSStringAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyJSStringAttr getter"
)), 0))
) {
19555 return false;
19556 }
19557 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19557); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19557; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19558 args.rval().setString(result);
19559 if (!MaybeWrapStringValue(cx, args.rval())) {
19560 return false;
19561 }
19562 return true;
19563}
19564
19565static const JSJitInfo readonlyJSStringAttr_getterinfo = {
19566 { get_readonlyJSStringAttr },
19567 { prototypes::id::TestJSImplInterface },
19568 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19569 JSJitInfo::Getter,
19570 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19571 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
19572 false, /* isInfallible. False in setters. */
19573 false, /* isMovable. Not relevant for setters. */
19574 false, /* isEliminatable. Not relevant for setters. */
19575 false, /* isAlwaysInSlot. Only relevant for getters. */
19576 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19577 false, /* isTypedMethod. Only relevant for methods. */
19578 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19579};
19580
19581MOZ_CAN_RUN_SCRIPT static bool
19582get_jsStringAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
19583{
19584 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19587( cx, "TestJSImplInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19585 "TestJSImplInterface", "jsStringAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19587( cx, "TestJSImplInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19586 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject19587( cx, "TestJSImplInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19587 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19587( cx, "TestJSImplInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19588
19589 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19590 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19591 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19592 if (objIsXray) {
19593 unwrappedObj.emplace(cx, obj);
19594 }
19595 if (objIsXray) {
19596 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19597 // we know Xrays have no dynamic unwrap behavior.
19598 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19599 if (!unwrappedObj.ref()) {
19600 return false;
19601 }
19602 }
19603 FastErrorResult rv;
19604 JS::Rooted<JSString*> result(cx);
19605 // NOTE: This assert does NOT call the function.
19606 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetJsStringAttr(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19607 MOZ_KnownLive(self)(self)->GetJsStringAttr(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19608 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.jsStringAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.jsStringAttr getter"
)), 0))
) {
19609 return false;
19610 }
19611 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19611); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19611; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19612 args.rval().setString(result);
19613 if (!MaybeWrapStringValue(cx, args.rval())) {
19614 return false;
19615 }
19616 return true;
19617}
19618
19619MOZ_CAN_RUN_SCRIPT static bool
19620set_jsStringAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
19621{
19622 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19625( cx, "TestJSImplInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19623 "TestJSImplInterface", "jsStringAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19625( cx, "TestJSImplInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19624 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject19625( cx, "TestJSImplInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19625 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19625( cx, "TestJSImplInterface"
, "jsStringAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19626
19627 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19628 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19629 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19630 if (objIsXray) {
19631 unwrappedObj.emplace(cx, obj);
19632 }
19633 JS::Rooted<JSString*> arg0(cx);
19634 if (!(arg0 = ConvertJSValueToJSString(cx, args[0]))) {
19635 return false;
19636 }
19637 if (objIsXray) {
19638 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19639 // we know Xrays have no dynamic unwrap behavior.
19640 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19641 if (!unwrappedObj.ref()) {
19642 return false;
19643 }
19644 }
19645 FastErrorResult rv;
19646 // NOTE: This assert does NOT call the function.
19647 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetJsStringAttr(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19648 MOZ_KnownLive(self)(self)->SetJsStringAttr(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19649 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.jsStringAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.jsStringAttr setter"
)), 0))
) {
19650 return false;
19651 }
19652 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19652); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19652; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19653
19654 return true;
19655}
19656
19657static const JSJitInfo jsStringAttr_getterinfo = {
19658 { get_jsStringAttr },
19659 { prototypes::id::TestJSImplInterface },
19660 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19661 JSJitInfo::Getter,
19662 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19663 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
19664 false, /* isInfallible. False in setters. */
19665 false, /* isMovable. Not relevant for setters. */
19666 false, /* isEliminatable. Not relevant for setters. */
19667 false, /* isAlwaysInSlot. Only relevant for getters. */
19668 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19669 false, /* isTypedMethod. Only relevant for methods. */
19670 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19671};
19672static const JSJitInfo jsStringAttr_setterinfo = {
19673 { (JSJitGetterOp)set_jsStringAttr },
19674 { prototypes::id::TestJSImplInterface },
19675 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19676 JSJitInfo::Setter,
19677 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19678 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19679 false, /* isInfallible. False in setters. */
19680 false, /* isMovable. Not relevant for setters. */
19681 false, /* isEliminatable. Not relevant for setters. */
19682 false, /* isAlwaysInSlot. Only relevant for getters. */
19683 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19684 false, /* isTypedMethod. Only relevant for methods. */
19685 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19686};
19687
19688MOZ_CAN_RUN_SCRIPT static bool
19689passEnum(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19690{
19691 BindingCallContext cx(cx_, "TestJSImplInterface.passEnum");
19692 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19695( cx, "TestJSImplInterface"
, "passEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
19693 "TestJSImplInterface", "passEnum", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19695( cx, "TestJSImplInterface"
, "passEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
19694 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19695( cx, "TestJSImplInterface"
, "passEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
19695 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19695( cx, "TestJSImplInterface"
, "passEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
19696
19697 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19698 if (!args.requireAtLeast(cx, "TestJSImplInterface.passEnum", 1)) {
19699 return false;
19700 }
19701 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19702 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19703 if (objIsXray) {
19704 unwrappedObj.emplace(cx, obj);
19705 }
19706 MyTestEnum arg0;
19707 {
19708 int index;
19709 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
19710 binding_detail::EnumStrings<MyTestEnum>::Values,
19711 "MyTestEnum", "argument 1",
19712 &index)) {
19713 return false;
19714 }
19715 MOZ_ASSERT(index >= 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(index >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(index >= 0))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("index >= 0",
"../TestJSImplGenBinding.cpp", 19715); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 19715; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
19716 arg0 = static_cast<MyTestEnum>(index);
19717 }
19718 if (objIsXray) {
19719 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19720 // we know Xrays have no dynamic unwrap behavior.
19721 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19722 if (!unwrappedObj.ref()) {
19723 return false;
19724 }
19725 }
19726 FastErrorResult rv;
19727 // NOTE: This assert does NOT call the function.
19728 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassEnum(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19729 MOZ_KnownLive(self)(self)->PassEnum(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19730 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passEnum"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passEnum"
)), 0))
) {
19731 return false;
19732 }
19733 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19733); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19733; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19734 args.rval().setUndefined();
19735 return true;
19736}
19737
19738static const JSJitInfo passEnum_methodinfo = {
19739 { (JSJitGetterOp)passEnum },
19740 { prototypes::id::TestJSImplInterface },
19741 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19742 JSJitInfo::Method,
19743 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19744 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19745 false, /* isInfallible. False in setters. */
19746 false, /* isMovable. Not relevant for setters. */
19747 false, /* isEliminatable. Not relevant for setters. */
19748 false, /* isAlwaysInSlot. Only relevant for getters. */
19749 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19750 false, /* isTypedMethod. Only relevant for methods. */
19751 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19752};
19753
19754MOZ_CAN_RUN_SCRIPT static bool
19755passNullableEnum(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19756{
19757 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableEnum");
19758 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19761( cx, "TestJSImplInterface"
, "passNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19759 "TestJSImplInterface", "passNullableEnum", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19761( cx, "TestJSImplInterface"
, "passNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19760 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19761( cx, "TestJSImplInterface"
, "passNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19761 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19761( cx, "TestJSImplInterface"
, "passNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19762
19763 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19764 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableEnum", 1)) {
19765 return false;
19766 }
19767 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19768 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19769 if (objIsXray) {
19770 unwrappedObj.emplace(cx, obj);
19771 }
19772 Nullable<MyTestEnum> arg0;
19773 if (args[0].isNullOrUndefined()) {
19774 arg0.SetNull();
19775 } else {
19776 {
19777 int index;
19778 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
19779 binding_detail::EnumStrings<MyTestEnum>::Values,
19780 "MyTestEnum", "argument 1",
19781 &index)) {
19782 return false;
19783 }
19784 MOZ_ASSERT(index >= 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(index >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(index >= 0))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("index >= 0",
"../TestJSImplGenBinding.cpp", 19784); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 19784; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
19785 arg0.SetValue() = static_cast<MyTestEnum>(index);
19786 }
19787 }
19788 if (objIsXray) {
19789 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19790 // we know Xrays have no dynamic unwrap behavior.
19791 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19792 if (!unwrappedObj.ref()) {
19793 return false;
19794 }
19795 }
19796 FastErrorResult rv;
19797 // NOTE: This assert does NOT call the function.
19798 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableEnum(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19799 MOZ_KnownLive(self)(self)->PassNullableEnum(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19800 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableEnum"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableEnum"
)), 0))
) {
19801 return false;
19802 }
19803 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19803); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19803; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19804 args.rval().setUndefined();
19805 return true;
19806}
19807
19808static const JSJitInfo passNullableEnum_methodinfo = {
19809 { (JSJitGetterOp)passNullableEnum },
19810 { prototypes::id::TestJSImplInterface },
19811 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19812 JSJitInfo::Method,
19813 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19814 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19815 false, /* isInfallible. False in setters. */
19816 false, /* isMovable. Not relevant for setters. */
19817 false, /* isEliminatable. Not relevant for setters. */
19818 false, /* isAlwaysInSlot. Only relevant for getters. */
19819 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19820 false, /* isTypedMethod. Only relevant for methods. */
19821 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19822};
19823
19824MOZ_CAN_RUN_SCRIPT static bool
19825passOptionalEnum(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19826{
19827 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalEnum");
19828 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19831( cx, "TestJSImplInterface"
, "passOptionalEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19829 "TestJSImplInterface", "passOptionalEnum", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19831( cx, "TestJSImplInterface"
, "passOptionalEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19830 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19831( cx, "TestJSImplInterface"
, "passOptionalEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19831 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19831( cx, "TestJSImplInterface"
, "passOptionalEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19832
19833 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19834 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19835 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19836 if (objIsXray) {
19837 unwrappedObj.emplace(cx, obj);
19838 }
19839 Optional<MyTestEnum> arg0;
19840 if (args.hasDefined(0)) {
19841 arg0.Construct();
19842 {
19843 int index;
19844 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
19845 binding_detail::EnumStrings<MyTestEnum>::Values,
19846 "MyTestEnum", "argument 1",
19847 &index)) {
19848 return false;
19849 }
19850 MOZ_ASSERT(index >= 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(index >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(index >= 0))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("index >= 0",
"../TestJSImplGenBinding.cpp", 19850); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 19850; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
19851 arg0.Value() = static_cast<MyTestEnum>(index);
19852 }
19853 }
19854 if (objIsXray) {
19855 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19856 // we know Xrays have no dynamic unwrap behavior.
19857 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19858 if (!unwrappedObj.ref()) {
19859 return false;
19860 }
19861 }
19862 FastErrorResult rv;
19863 // NOTE: This assert does NOT call the function.
19864 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalEnum(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19865 MOZ_KnownLive(self)(self)->PassOptionalEnum(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19866 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalEnum"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalEnum"
)), 0))
) {
19867 return false;
19868 }
19869 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19869); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19869; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19870 args.rval().setUndefined();
19871 return true;
19872}
19873
19874static const JSJitInfo passOptionalEnum_methodinfo = {
19875 { (JSJitGetterOp)passOptionalEnum },
19876 { prototypes::id::TestJSImplInterface },
19877 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19878 JSJitInfo::Method,
19879 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19880 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19881 false, /* isInfallible. False in setters. */
19882 false, /* isMovable. Not relevant for setters. */
19883 false, /* isEliminatable. Not relevant for setters. */
19884 false, /* isAlwaysInSlot. Only relevant for getters. */
19885 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19886 false, /* isTypedMethod. Only relevant for methods. */
19887 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19888};
19889
19890MOZ_CAN_RUN_SCRIPT static bool
19891passEnumWithDefault(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19892{
19893 BindingCallContext cx(cx_, "TestJSImplInterface.passEnumWithDefault");
19894 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19897( cx, "TestJSImplInterface"
, "passEnumWithDefault", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19895 "TestJSImplInterface", "passEnumWithDefault", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19897( cx, "TestJSImplInterface"
, "passEnumWithDefault", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19896 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19897( cx, "TestJSImplInterface"
, "passEnumWithDefault", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
19897 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19897( cx, "TestJSImplInterface"
, "passEnumWithDefault", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
19898
19899 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19900 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19901 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19902 if (objIsXray) {
19903 unwrappedObj.emplace(cx, obj);
19904 }
19905 MyTestEnum arg0;
19906 if (args.hasDefined(0)) {
19907 {
19908 int index;
19909 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
19910 binding_detail::EnumStrings<MyTestEnum>::Values,
19911 "MyTestEnum", "argument 1",
19912 &index)) {
19913 return false;
19914 }
19915 MOZ_ASSERT(index >= 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(index >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(index >= 0))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("index >= 0",
"../TestJSImplGenBinding.cpp", 19915); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 19915; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
19916 arg0 = static_cast<MyTestEnum>(index);
19917 }
19918 } else {
19919 arg0 = MyTestEnum::A;
19920 }
19921 if (objIsXray) {
19922 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19923 // we know Xrays have no dynamic unwrap behavior.
19924 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19925 if (!unwrappedObj.ref()) {
19926 return false;
19927 }
19928 }
19929 FastErrorResult rv;
19930 // NOTE: This assert does NOT call the function.
19931 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassEnumWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
19932 MOZ_KnownLive(self)(self)->PassEnumWithDefault(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
19933 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passEnumWithDefault"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passEnumWithDefault"
)), 0))
) {
19934 return false;
19935 }
19936 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 19936); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 19936; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
19937 args.rval().setUndefined();
19938 return true;
19939}
19940
19941static const JSJitInfo passEnumWithDefault_methodinfo = {
19942 { (JSJitGetterOp)passEnumWithDefault },
19943 { prototypes::id::TestJSImplInterface },
19944 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
19945 JSJitInfo::Method,
19946 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
19947 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
19948 false, /* isInfallible. False in setters. */
19949 false, /* isMovable. Not relevant for setters. */
19950 false, /* isEliminatable. Not relevant for setters. */
19951 false, /* isAlwaysInSlot. Only relevant for getters. */
19952 false, /* isLazilyCachedInSlot. Only relevant for getters. */
19953 false, /* isTypedMethod. Only relevant for methods. */
19954 0 /* Reserved slot index, if we're stored in a slot, else 0. */
19955};
19956
19957MOZ_CAN_RUN_SCRIPT static bool
19958passOptionalNullableEnum(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
19959{
19960 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableEnum");
19961 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject19964( cx, "TestJSImplInterface"
, "passOptionalNullableEnum", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19962 "TestJSImplInterface", "passOptionalNullableEnum", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject19964( cx, "TestJSImplInterface"
, "passOptionalNullableEnum", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19963 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject19964( cx, "TestJSImplInterface"
, "passOptionalNullableEnum", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
19964 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject19964( cx, "TestJSImplInterface"
, "passOptionalNullableEnum", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
19965
19966 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
19967 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
19968 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
19969 if (objIsXray) {
19970 unwrappedObj.emplace(cx, obj);
19971 }
19972 Optional<Nullable<MyTestEnum>> arg0;
19973 if (args.hasDefined(0)) {
19974 arg0.Construct();
19975 if (args[0].isNullOrUndefined()) {
19976 arg0.Value().SetNull();
19977 } else {
19978 {
19979 int index;
19980 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
19981 binding_detail::EnumStrings<MyTestEnum>::Values,
19982 "MyTestEnum", "argument 1",
19983 &index)) {
19984 return false;
19985 }
19986 MOZ_ASSERT(index >= 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(index >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(index >= 0))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("index >= 0",
"../TestJSImplGenBinding.cpp", 19986); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 19986; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
19987 arg0.Value().SetValue() = static_cast<MyTestEnum>(index);
19988 }
19989 }
19990 }
19991 if (objIsXray) {
19992 // Since our object is an Xray, we can just CheckedUnwrapStatic:
19993 // we know Xrays have no dynamic unwrap behavior.
19994 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
19995 if (!unwrappedObj.ref()) {
19996 return false;
19997 }
19998 }
19999 FastErrorResult rv;
20000 // NOTE: This assert does NOT call the function.
20001 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableEnum(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
20002 MOZ_KnownLive(self)(self)->PassOptionalNullableEnum(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
20003 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableEnum"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableEnum"
)), 0))
) {
20004 return false;
20005 }
20006 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20006); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20006; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20007 args.rval().setUndefined();
20008 return true;
20009}
20010
20011static const JSJitInfo passOptionalNullableEnum_methodinfo = {
20012 { (JSJitGetterOp)passOptionalNullableEnum },
20013 { prototypes::id::TestJSImplInterface },
20014 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20015 JSJitInfo::Method,
20016 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20017 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20018 false, /* isInfallible. False in setters. */
20019 false, /* isMovable. Not relevant for setters. */
20020 false, /* isEliminatable. Not relevant for setters. */
20021 false, /* isAlwaysInSlot. Only relevant for getters. */
20022 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20023 false, /* isTypedMethod. Only relevant for methods. */
20024 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20025};
20026
20027MOZ_CAN_RUN_SCRIPT static bool
20028passOptionalNullableEnumWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20029{
20030 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableEnumWithDefaultValue");
20031 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20034( cx, "TestJSImplInterface"
, "passOptionalNullableEnumWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20032 "TestJSImplInterface", "passOptionalNullableEnumWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20034( cx, "TestJSImplInterface"
, "passOptionalNullableEnumWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20033 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20034( cx, "TestJSImplInterface"
, "passOptionalNullableEnumWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20034 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20034( cx, "TestJSImplInterface"
, "passOptionalNullableEnumWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
20035
20036 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20037 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20038 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20039 if (objIsXray) {
20040 unwrappedObj.emplace(cx, obj);
20041 }
20042 Nullable<MyTestEnum> arg0;
20043 if (args.hasDefined(0)) {
20044 if (args[0].isNullOrUndefined()) {
20045 arg0.SetNull();
20046 } else {
20047 {
20048 int index;
20049 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
20050 binding_detail::EnumStrings<MyTestEnum>::Values,
20051 "MyTestEnum", "argument 1",
20052 &index)) {
20053 return false;
20054 }
20055 MOZ_ASSERT(index >= 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(index >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(index >= 0))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("index >= 0",
"../TestJSImplGenBinding.cpp", 20055); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 20055; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
20056 arg0.SetValue() = static_cast<MyTestEnum>(index);
20057 }
20058 }
20059 } else {
20060 arg0.SetNull();
20061 }
20062 if (objIsXray) {
20063 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20064 // we know Xrays have no dynamic unwrap behavior.
20065 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20066 if (!unwrappedObj.ref()) {
20067 return false;
20068 }
20069 }
20070 FastErrorResult rv;
20071 // NOTE: This assert does NOT call the function.
20072 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableEnumWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
20073 MOZ_KnownLive(self)(self)->PassOptionalNullableEnumWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
20074 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableEnumWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableEnumWithDefaultValue"
)), 0))
) {
20075 return false;
20076 }
20077 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20077); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20077; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20078 args.rval().setUndefined();
20079 return true;
20080}
20081
20082static const JSJitInfo passOptionalNullableEnumWithDefaultValue_methodinfo = {
20083 { (JSJitGetterOp)passOptionalNullableEnumWithDefaultValue },
20084 { prototypes::id::TestJSImplInterface },
20085 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20086 JSJitInfo::Method,
20087 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20088 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20089 false, /* isInfallible. False in setters. */
20090 false, /* isMovable. Not relevant for setters. */
20091 false, /* isEliminatable. Not relevant for setters. */
20092 false, /* isAlwaysInSlot. Only relevant for getters. */
20093 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20094 false, /* isTypedMethod. Only relevant for methods. */
20095 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20096};
20097
20098MOZ_CAN_RUN_SCRIPT static bool
20099passOptionalNullableEnumWithDefaultValue2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20100{
20101 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableEnumWithDefaultValue2");
20102 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20105( cx, "TestJSImplInterface"
, "passOptionalNullableEnumWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20103 "TestJSImplInterface", "passOptionalNullableEnumWithDefaultValue2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20105( cx, "TestJSImplInterface"
, "passOptionalNullableEnumWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20104 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20105( cx, "TestJSImplInterface"
, "passOptionalNullableEnumWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20105 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20105( cx, "TestJSImplInterface"
, "passOptionalNullableEnumWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
20106
20107 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20108 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20109 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20110 if (objIsXray) {
20111 unwrappedObj.emplace(cx, obj);
20112 }
20113 Nullable<MyTestEnum> arg0;
20114 if (args.hasDefined(0)) {
20115 if (args[0].isNullOrUndefined()) {
20116 arg0.SetNull();
20117 } else {
20118 {
20119 int index;
20120 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
20121 binding_detail::EnumStrings<MyTestEnum>::Values,
20122 "MyTestEnum", "argument 1",
20123 &index)) {
20124 return false;
20125 }
20126 MOZ_ASSERT(index >= 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(index >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(index >= 0))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("index >= 0",
"../TestJSImplGenBinding.cpp", 20126); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 20126; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
20127 arg0.SetValue() = static_cast<MyTestEnum>(index);
20128 }
20129 }
20130 } else {
20131 arg0.SetValue() = MyTestEnum::A;
20132 }
20133 if (objIsXray) {
20134 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20135 // we know Xrays have no dynamic unwrap behavior.
20136 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20137 if (!unwrappedObj.ref()) {
20138 return false;
20139 }
20140 }
20141 FastErrorResult rv;
20142 // NOTE: This assert does NOT call the function.
20143 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableEnumWithDefaultValue2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
20144 MOZ_KnownLive(self)(self)->PassOptionalNullableEnumWithDefaultValue2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
20145 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableEnumWithDefaultValue2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableEnumWithDefaultValue2"
)), 0))
) {
20146 return false;
20147 }
20148 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20148); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20148; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20149 args.rval().setUndefined();
20150 return true;
20151}
20152
20153static const JSJitInfo passOptionalNullableEnumWithDefaultValue2_methodinfo = {
20154 { (JSJitGetterOp)passOptionalNullableEnumWithDefaultValue2 },
20155 { prototypes::id::TestJSImplInterface },
20156 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20157 JSJitInfo::Method,
20158 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20159 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20160 false, /* isInfallible. False in setters. */
20161 false, /* isMovable. Not relevant for setters. */
20162 false, /* isEliminatable. Not relevant for setters. */
20163 false, /* isAlwaysInSlot. Only relevant for getters. */
20164 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20165 false, /* isTypedMethod. Only relevant for methods. */
20166 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20167};
20168
20169MOZ_CAN_RUN_SCRIPT static bool
20170receiveEnum(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20171{
20172 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20175( cx, "TestJSImplInterface"
, "receiveEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20173 "TestJSImplInterface", "receiveEnum", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20175( cx, "TestJSImplInterface"
, "receiveEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20174 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20175( cx, "TestJSImplInterface"
, "receiveEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20175 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20175( cx, "TestJSImplInterface"
, "receiveEnum", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
20176
20177 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20178 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20179 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20180 if (objIsXray) {
20181 unwrappedObj.emplace(cx, obj);
20182 }
20183 if (objIsXray) {
20184 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20185 // we know Xrays have no dynamic unwrap behavior.
20186 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20187 if (!unwrappedObj.ref()) {
20188 return false;
20189 }
20190 }
20191 FastErrorResult rv;
20192 MyTestEnum result(MOZ_KnownLive(self)(self)->ReceiveEnum(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
20193 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveEnum"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveEnum"
)), 0))
) {
20194 return false;
20195 }
20196 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20196); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20196; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20197 if (!ToJSValue(cx, result, args.rval())) {
20198 return false;
20199 }
20200 return true;
20201}
20202
20203static const JSJitInfo receiveEnum_methodinfo = {
20204 { (JSJitGetterOp)receiveEnum },
20205 { prototypes::id::TestJSImplInterface },
20206 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20207 JSJitInfo::Method,
20208 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20209 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
20210 false, /* isInfallible. False in setters. */
20211 false, /* isMovable. Not relevant for setters. */
20212 false, /* isEliminatable. Not relevant for setters. */
20213 false, /* isAlwaysInSlot. Only relevant for getters. */
20214 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20215 false, /* isTypedMethod. Only relevant for methods. */
20216 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20217};
20218
20219MOZ_CAN_RUN_SCRIPT static bool
20220receiveNullableEnum(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20221{
20222 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20225( cx, "TestJSImplInterface"
, "receiveNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20223 "TestJSImplInterface", "receiveNullableEnum", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20225( cx, "TestJSImplInterface"
, "receiveNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20224 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20225( cx, "TestJSImplInterface"
, "receiveNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20225 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20225( cx, "TestJSImplInterface"
, "receiveNullableEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
20226
20227 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20228 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20229 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20230 if (objIsXray) {
20231 unwrappedObj.emplace(cx, obj);
20232 }
20233 if (objIsXray) {
20234 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20235 // we know Xrays have no dynamic unwrap behavior.
20236 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20237 if (!unwrappedObj.ref()) {
20238 return false;
20239 }
20240 }
20241 FastErrorResult rv;
20242 Nullable<MyTestEnum> result(MOZ_KnownLive(self)(self)->ReceiveNullableEnum(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
20243 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableEnum"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableEnum"
)), 0))
) {
20244 return false;
20245 }
20246 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20246); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20246; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20247 if (result.IsNull()) {
20248 args.rval().setNull();
20249 return true;
20250 } else {
20251 if (!ToJSValue(cx, result.Value(), args.rval())) {
20252 return false;
20253 }
20254 return true;
20255 }
20256}
20257
20258static const JSJitInfo receiveNullableEnum_methodinfo = {
20259 { (JSJitGetterOp)receiveNullableEnum },
20260 { prototypes::id::TestJSImplInterface },
20261 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20262 JSJitInfo::Method,
20263 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20264 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
20265 false, /* isInfallible. False in setters. */
20266 false, /* isMovable. Not relevant for setters. */
20267 false, /* isEliminatable. Not relevant for setters. */
20268 false, /* isAlwaysInSlot. Only relevant for getters. */
20269 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20270 false, /* isTypedMethod. Only relevant for methods. */
20271 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20272};
20273
20274MOZ_CAN_RUN_SCRIPT static bool
20275get_enumAttribute(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
20276{
20277 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20280( cx, "TestJSImplInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20278 "TestJSImplInterface", "enumAttribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20280( cx, "TestJSImplInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20279 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject20280( cx, "TestJSImplInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20280 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20280( cx, "TestJSImplInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
20281
20282 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20283 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20284 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20285 if (objIsXray) {
20286 unwrappedObj.emplace(cx, obj);
20287 }
20288 if (objIsXray) {
20289 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20290 // we know Xrays have no dynamic unwrap behavior.
20291 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20292 if (!unwrappedObj.ref()) {
20293 return false;
20294 }
20295 }
20296 FastErrorResult rv;
20297 MyTestEnum result(MOZ_KnownLive(self)(self)->GetEnumAttribute(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
20298 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.enumAttribute getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.enumAttribute getter"
)), 0))
) {
20299 return false;
20300 }
20301 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20301); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20301; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20302 if (!ToJSValue(cx, result, args.rval())) {
20303 return false;
20304 }
20305 return true;
20306}
20307
20308MOZ_CAN_RUN_SCRIPT static bool
20309set_enumAttribute(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
20310{
20311 BindingCallContext cx(cx_, "TestJSImplInterface.enumAttribute setter");
20312 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20315( cx, "TestJSImplInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20313 "TestJSImplInterface", "enumAttribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20315( cx, "TestJSImplInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20314 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject20315( cx, "TestJSImplInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20315 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20315( cx, "TestJSImplInterface"
, "enumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
20316
20317 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20318 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20319 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20320 if (objIsXray) {
20321 unwrappedObj.emplace(cx, obj);
20322 }
20323 MyTestEnum arg0;
20324 {
20325 int index;
20326 if (!binding_detail::FindEnumStringIndex<false>(cx, args[0],
20327 binding_detail::EnumStrings<MyTestEnum>::Values,
20328 "MyTestEnum", "value being assigned",
20329 &index)) {
20330 return false;
20331 }
20332 if (index < 0) {
20333 return true;
20334 }
20335 arg0 = static_cast<MyTestEnum>(index);
20336 }
20337 if (objIsXray) {
20338 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20339 // we know Xrays have no dynamic unwrap behavior.
20340 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20341 if (!unwrappedObj.ref()) {
20342 return false;
20343 }
20344 }
20345 FastErrorResult rv;
20346 // NOTE: This assert does NOT call the function.
20347 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetEnumAttribute(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
20348 MOZ_KnownLive(self)(self)->SetEnumAttribute(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
20349 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.enumAttribute setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.enumAttribute setter"
)), 0))
) {
20350 return false;
20351 }
20352 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20352); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20352; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20353
20354 return true;
20355}
20356
20357static const JSJitInfo enumAttribute_getterinfo = {
20358 { get_enumAttribute },
20359 { prototypes::id::TestJSImplInterface },
20360 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20361 JSJitInfo::Getter,
20362 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20363 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
20364 false, /* isInfallible. False in setters. */
20365 false, /* isMovable. Not relevant for setters. */
20366 false, /* isEliminatable. Not relevant for setters. */
20367 false, /* isAlwaysInSlot. Only relevant for getters. */
20368 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20369 false, /* isTypedMethod. Only relevant for methods. */
20370 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20371};
20372static const JSJitInfo enumAttribute_setterinfo = {
20373 { (JSJitGetterOp)set_enumAttribute },
20374 { prototypes::id::TestJSImplInterface },
20375 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20376 JSJitInfo::Setter,
20377 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20378 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20379 false, /* isInfallible. False in setters. */
20380 false, /* isMovable. Not relevant for setters. */
20381 false, /* isEliminatable. Not relevant for setters. */
20382 false, /* isAlwaysInSlot. Only relevant for getters. */
20383 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20384 false, /* isTypedMethod. Only relevant for methods. */
20385 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20386};
20387
20388MOZ_CAN_RUN_SCRIPT static bool
20389get_readonlyEnumAttribute(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
20390{
20391 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20394( cx, "TestJSImplInterface"
, "readonlyEnumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20392 "TestJSImplInterface", "readonlyEnumAttribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20394( cx, "TestJSImplInterface"
, "readonlyEnumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20393 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject20394( cx, "TestJSImplInterface"
, "readonlyEnumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20394 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20394( cx, "TestJSImplInterface"
, "readonlyEnumAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
20395
20396 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20397 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20398 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20399 if (objIsXray) {
20400 unwrappedObj.emplace(cx, obj);
20401 }
20402 if (objIsXray) {
20403 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20404 // we know Xrays have no dynamic unwrap behavior.
20405 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20406 if (!unwrappedObj.ref()) {
20407 return false;
20408 }
20409 }
20410 FastErrorResult rv;
20411 MyTestEnum result(MOZ_KnownLive(self)(self)->GetReadonlyEnumAttribute(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
20412 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyEnumAttribute getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.readonlyEnumAttribute getter"
)), 0))
) {
20413 return false;
20414 }
20415 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20415); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20415; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20416 if (!ToJSValue(cx, result, args.rval())) {
20417 return false;
20418 }
20419 return true;
20420}
20421
20422static const JSJitInfo readonlyEnumAttribute_getterinfo = {
20423 { get_readonlyEnumAttribute },
20424 { prototypes::id::TestJSImplInterface },
20425 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20426 JSJitInfo::Getter,
20427 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20428 JSVAL_TYPE_STRING, /* returnType. Not relevant for setters. */
20429 false, /* isInfallible. False in setters. */
20430 false, /* isMovable. Not relevant for setters. */
20431 false, /* isEliminatable. Not relevant for setters. */
20432 false, /* isAlwaysInSlot. Only relevant for getters. */
20433 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20434 false, /* isTypedMethod. Only relevant for methods. */
20435 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20436};
20437
20438MOZ_CAN_RUN_SCRIPT static bool
20439passCallback(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20440{
20441 BindingCallContext cx(cx_, "TestJSImplInterface.passCallback");
20442 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20445( cx, "TestJSImplInterface"
, "passCallback", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20443 "TestJSImplInterface", "passCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20445( cx, "TestJSImplInterface"
, "passCallback", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20444 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20445( cx, "TestJSImplInterface"
, "passCallback", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20445 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20445( cx, "TestJSImplInterface"
, "passCallback", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
20446
20447 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20448 if (!args.requireAtLeast(cx, "TestJSImplInterface.passCallback", 1)) {
20449 return false;
20450 }
20451 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20452 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20453 if (objIsXray) {
20454 unwrappedObj.emplace(cx, obj);
20455 }
20456 RootedCallback<OwningNonNull<binding_detail::FastMyTestCallback>> arg0(cx);
20457 if (args[0].isObject()) {
20458 if (JS::IsCallable(&args[0].toObject())) {
20459 { // scope for tempRoot and tempGlobalRoot if needed
20460 arg0 = new binding_detail::FastMyTestCallback(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
20461 }
20462 } else {
20463 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Argument 1");
20464 return false;
20465 }
20466 } else {
20467 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
20468 return false;
20469 }
20470 if (objIsXray) {
20471 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20472 // we know Xrays have no dynamic unwrap behavior.
20473 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20474 if (!unwrappedObj.ref()) {
20475 return false;
20476 }
20477 }
20478 FastErrorResult rv;
20479 // NOTE: This assert does NOT call the function.
20480 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassCallback(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
20481 MOZ_KnownLive(self)(self)->PassCallback(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
20482 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passCallback"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passCallback"
)), 0))
) {
20483 return false;
20484 }
20485 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20485); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20485; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20486 args.rval().setUndefined();
20487 return true;
20488}
20489
20490static const JSJitInfo passCallback_methodinfo = {
20491 { (JSJitGetterOp)passCallback },
20492 { prototypes::id::TestJSImplInterface },
20493 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20494 JSJitInfo::Method,
20495 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20496 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20497 false, /* isInfallible. False in setters. */
20498 false, /* isMovable. Not relevant for setters. */
20499 false, /* isEliminatable. Not relevant for setters. */
20500 false, /* isAlwaysInSlot. Only relevant for getters. */
20501 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20502 false, /* isTypedMethod. Only relevant for methods. */
20503 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20504};
20505
20506MOZ_CAN_RUN_SCRIPT static bool
20507passNullableCallback(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20508{
20509 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableCallback");
20510 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20513( cx, "TestJSImplInterface"
, "passNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20511 "TestJSImplInterface", "passNullableCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20513( cx, "TestJSImplInterface"
, "passNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20512 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20513( cx, "TestJSImplInterface"
, "passNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20513 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20513( cx, "TestJSImplInterface"
, "passNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
20514
20515 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20516 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableCallback", 1)) {
20517 return false;
20518 }
20519 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20520 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20521 if (objIsXray) {
20522 unwrappedObj.emplace(cx, obj);
20523 }
20524 RootedCallback<RefPtr<binding_detail::FastMyTestCallback>> arg0(cx);
20525 if (args[0].isObject()) {
20526 if (JS::IsCallable(&args[0].toObject())) {
20527 { // scope for tempRoot and tempGlobalRoot if needed
20528 arg0 = new binding_detail::FastMyTestCallback(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
20529 }
20530 } else {
20531 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Argument 1");
20532 return false;
20533 }
20534 } else if (args[0].isNullOrUndefined()) {
20535 arg0 = nullptr;
20536 } else {
20537 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
20538 return false;
20539 }
20540 if (objIsXray) {
20541 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20542 // we know Xrays have no dynamic unwrap behavior.
20543 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20544 if (!unwrappedObj.ref()) {
20545 return false;
20546 }
20547 }
20548 FastErrorResult rv;
20549 // NOTE: This assert does NOT call the function.
20550 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableCallback(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
20551 MOZ_KnownLive(self)(self)->PassNullableCallback(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
20552 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableCallback"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableCallback"
)), 0))
) {
20553 return false;
20554 }
20555 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20555); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20555; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20556 args.rval().setUndefined();
20557 return true;
20558}
20559
20560static const JSJitInfo passNullableCallback_methodinfo = {
20561 { (JSJitGetterOp)passNullableCallback },
20562 { prototypes::id::TestJSImplInterface },
20563 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20564 JSJitInfo::Method,
20565 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20566 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20567 false, /* isInfallible. False in setters. */
20568 false, /* isMovable. Not relevant for setters. */
20569 false, /* isEliminatable. Not relevant for setters. */
20570 false, /* isAlwaysInSlot. Only relevant for getters. */
20571 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20572 false, /* isTypedMethod. Only relevant for methods. */
20573 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20574};
20575
20576MOZ_CAN_RUN_SCRIPT static bool
20577passOptionalCallback(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20578{
20579 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalCallback");
20580 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20583( cx, "TestJSImplInterface"
, "passOptionalCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20581 "TestJSImplInterface", "passOptionalCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20583( cx, "TestJSImplInterface"
, "passOptionalCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20582 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20583( cx, "TestJSImplInterface"
, "passOptionalCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20583 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20583( cx, "TestJSImplInterface"
, "passOptionalCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
20584
20585 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20586 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20587 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20588 if (objIsXray) {
20589 unwrappedObj.emplace(cx, obj);
20590 }
20591 Optional<OwningNonNull<MyTestCallback>> arg0;
20592 if (args.hasDefined(0)) {
20593 arg0.Construct();
20594 if (args[0].isObject()) {
20595 if (JS::IsCallable(&args[0].toObject())) {
20596 { // scope for tempRoot and tempGlobalRoot if needed
20597 JS::Rooted<JSObject*> tempRoot(cx, &args[0].toObject());
20598 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
20599 arg0.Value() = new MyTestCallback(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
20600 }
20601 } else {
20602 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Argument 1");
20603 return false;
20604 }
20605 } else {
20606 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
20607 return false;
20608 }
20609 }
20610 if (objIsXray) {
20611 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20612 // we know Xrays have no dynamic unwrap behavior.
20613 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20614 if (!unwrappedObj.ref()) {
20615 return false;
20616 }
20617 }
20618 FastErrorResult rv;
20619 // NOTE: This assert does NOT call the function.
20620 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalCallback(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
20621 MOZ_KnownLive(self)(self)->PassOptionalCallback(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
20622 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalCallback"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalCallback"
)), 0))
) {
20623 return false;
20624 }
20625 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20625); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20625; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20626 args.rval().setUndefined();
20627 return true;
20628}
20629
20630static const JSJitInfo passOptionalCallback_methodinfo = {
20631 { (JSJitGetterOp)passOptionalCallback },
20632 { prototypes::id::TestJSImplInterface },
20633 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20634 JSJitInfo::Method,
20635 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20636 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20637 false, /* isInfallible. False in setters. */
20638 false, /* isMovable. Not relevant for setters. */
20639 false, /* isEliminatable. Not relevant for setters. */
20640 false, /* isAlwaysInSlot. Only relevant for getters. */
20641 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20642 false, /* isTypedMethod. Only relevant for methods. */
20643 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20644};
20645
20646MOZ_CAN_RUN_SCRIPT static bool
20647passOptionalNullableCallback(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20648{
20649 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableCallback");
20650 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20653( cx, "TestJSImplInterface"
, "passOptionalNullableCallback", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20651 "TestJSImplInterface", "passOptionalNullableCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20653( cx, "TestJSImplInterface"
, "passOptionalNullableCallback", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20652 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20653( cx, "TestJSImplInterface"
, "passOptionalNullableCallback", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20653 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20653( cx, "TestJSImplInterface"
, "passOptionalNullableCallback", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
20654
20655 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20656 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20657 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20658 if (objIsXray) {
20659 unwrappedObj.emplace(cx, obj);
20660 }
20661 Optional<RefPtr<MyTestCallback>> arg0;
20662 if (args.hasDefined(0)) {
20663 arg0.Construct();
20664 if (args[0].isObject()) {
20665 if (JS::IsCallable(&args[0].toObject())) {
20666 { // scope for tempRoot and tempGlobalRoot if needed
20667 JS::Rooted<JSObject*> tempRoot(cx, &args[0].toObject());
20668 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
20669 arg0.Value() = new MyTestCallback(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
20670 }
20671 } else {
20672 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Argument 1");
20673 return false;
20674 }
20675 } else if (args[0].isNullOrUndefined()) {
20676 arg0.Value() = nullptr;
20677 } else {
20678 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
20679 return false;
20680 }
20681 }
20682 if (objIsXray) {
20683 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20684 // we know Xrays have no dynamic unwrap behavior.
20685 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20686 if (!unwrappedObj.ref()) {
20687 return false;
20688 }
20689 }
20690 FastErrorResult rv;
20691 // NOTE: This assert does NOT call the function.
20692 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableCallback(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
20693 MOZ_KnownLive(self)(self)->PassOptionalNullableCallback(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
20694 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableCallback"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableCallback"
)), 0))
) {
20695 return false;
20696 }
20697 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20697); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20697; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20698 args.rval().setUndefined();
20699 return true;
20700}
20701
20702static const JSJitInfo passOptionalNullableCallback_methodinfo = {
20703 { (JSJitGetterOp)passOptionalNullableCallback },
20704 { prototypes::id::TestJSImplInterface },
20705 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20706 JSJitInfo::Method,
20707 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20708 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20709 false, /* isInfallible. False in setters. */
20710 false, /* isMovable. Not relevant for setters. */
20711 false, /* isEliminatable. Not relevant for setters. */
20712 false, /* isAlwaysInSlot. Only relevant for getters. */
20713 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20714 false, /* isTypedMethod. Only relevant for methods. */
20715 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20716};
20717
20718MOZ_CAN_RUN_SCRIPT static bool
20719passOptionalNullableCallbackWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20720{
20721 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableCallbackWithDefaultValue");
20722 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20725( cx, "TestJSImplInterface"
, "passOptionalNullableCallbackWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20723 "TestJSImplInterface", "passOptionalNullableCallbackWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20725( cx, "TestJSImplInterface"
, "passOptionalNullableCallbackWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20724 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20725( cx, "TestJSImplInterface"
, "passOptionalNullableCallbackWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
20725 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20725( cx, "TestJSImplInterface"
, "passOptionalNullableCallbackWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
20726
20727 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20728 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20729 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20730 if (objIsXray) {
20731 unwrappedObj.emplace(cx, obj);
20732 }
20733 RootedCallback<RefPtr<binding_detail::FastMyTestCallback>> arg0(cx);
20734 if (args.hasDefined(0)) {
20735 if (args[0].isObject()) {
20736 if (JS::IsCallable(&args[0].toObject())) {
20737 { // scope for tempRoot and tempGlobalRoot if needed
20738 arg0 = new binding_detail::FastMyTestCallback(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
20739 }
20740 } else {
20741 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Argument 1");
20742 return false;
20743 }
20744 } else if (args[0].isNullOrUndefined()) {
20745 arg0 = nullptr;
20746 } else {
20747 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
20748 return false;
20749 }
20750 } else {
20751 arg0 = nullptr;
20752 }
20753 if (objIsXray) {
20754 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20755 // we know Xrays have no dynamic unwrap behavior.
20756 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20757 if (!unwrappedObj.ref()) {
20758 return false;
20759 }
20760 }
20761 FastErrorResult rv;
20762 // NOTE: This assert does NOT call the function.
20763 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableCallbackWithDefaultValue(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
20764 MOZ_KnownLive(self)(self)->PassOptionalNullableCallbackWithDefaultValue(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
20765 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableCallbackWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableCallbackWithDefaultValue"
)), 0))
) {
20766 return false;
20767 }
20768 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20768); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20768; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20769 args.rval().setUndefined();
20770 return true;
20771}
20772
20773static const JSJitInfo passOptionalNullableCallbackWithDefaultValue_methodinfo = {
20774 { (JSJitGetterOp)passOptionalNullableCallbackWithDefaultValue },
20775 { prototypes::id::TestJSImplInterface },
20776 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20777 JSJitInfo::Method,
20778 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20779 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20780 false, /* isInfallible. False in setters. */
20781 false, /* isMovable. Not relevant for setters. */
20782 false, /* isEliminatable. Not relevant for setters. */
20783 false, /* isAlwaysInSlot. Only relevant for getters. */
20784 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20785 false, /* isTypedMethod. Only relevant for methods. */
20786 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20787};
20788
20789MOZ_CAN_RUN_SCRIPT static bool
20790receiveCallback(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20791{
20792 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20795( cx, "TestJSImplInterface"
, "receiveCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20793 "TestJSImplInterface", "receiveCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20795( cx, "TestJSImplInterface"
, "receiveCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20794 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20795( cx, "TestJSImplInterface"
, "receiveCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20795 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20795( cx, "TestJSImplInterface"
, "receiveCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
20796
20797 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20798 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20799 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20800 if (objIsXray) {
20801 unwrappedObj.emplace(cx, obj);
20802 }
20803 if (objIsXray) {
20804 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20805 // we know Xrays have no dynamic unwrap behavior.
20806 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20807 if (!unwrappedObj.ref()) {
20808 return false;
20809 }
20810 }
20811 FastErrorResult rv;
20812 RefPtr<MyTestCallback> result(MOZ_KnownLive(self)(self)->ReceiveCallback(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
20813 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveCallback"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveCallback"
)), 0))
) {
20814 return false;
20815 }
20816 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20816); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20816; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20817 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
20818 if (!MaybeWrapObjectValue(cx, args.rval())) {
20819 return false;
20820 }
20821 return true;
20822}
20823
20824static const JSJitInfo receiveCallback_methodinfo = {
20825 { (JSJitGetterOp)receiveCallback },
20826 { prototypes::id::TestJSImplInterface },
20827 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20828 JSJitInfo::Method,
20829 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20830 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
20831 false, /* isInfallible. False in setters. */
20832 false, /* isMovable. Not relevant for setters. */
20833 false, /* isEliminatable. Not relevant for setters. */
20834 false, /* isAlwaysInSlot. Only relevant for getters. */
20835 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20836 false, /* isTypedMethod. Only relevant for methods. */
20837 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20838};
20839
20840MOZ_CAN_RUN_SCRIPT static bool
20841receiveNullableCallback(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20842{
20843 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20846( cx, "TestJSImplInterface"
, "receiveNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20844 "TestJSImplInterface", "receiveNullableCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20846( cx, "TestJSImplInterface"
, "receiveNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20845 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20846( cx, "TestJSImplInterface"
, "receiveNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
20846 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20846( cx, "TestJSImplInterface"
, "receiveNullableCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
20847
20848 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20849 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20850 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20851 if (objIsXray) {
20852 unwrappedObj.emplace(cx, obj);
20853 }
20854 if (objIsXray) {
20855 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20856 // we know Xrays have no dynamic unwrap behavior.
20857 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20858 if (!unwrappedObj.ref()) {
20859 return false;
20860 }
20861 }
20862 FastErrorResult rv;
20863 RefPtr<MyTestCallback> result(MOZ_KnownLive(self)(self)->ReceiveNullableCallback(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
20864 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableCallback"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableCallback"
)), 0))
) {
20865 return false;
20866 }
20867 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20867); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20867; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20868 if (result) {
20869 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
20870 if (!MaybeWrapObjectOrNullValue(cx, args.rval())) {
20871 return false;
20872 }
20873 return true;
20874 } else {
20875 args.rval().setNull();
20876 return true;
20877 }
20878}
20879
20880static const JSJitInfo receiveNullableCallback_methodinfo = {
20881 { (JSJitGetterOp)receiveNullableCallback },
20882 { prototypes::id::TestJSImplInterface },
20883 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20884 JSJitInfo::Method,
20885 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20886 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
20887 false, /* isInfallible. False in setters. */
20888 false, /* isMovable. Not relevant for setters. */
20889 false, /* isEliminatable. Not relevant for setters. */
20890 false, /* isAlwaysInSlot. Only relevant for getters. */
20891 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20892 false, /* isTypedMethod. Only relevant for methods. */
20893 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20894};
20895
20896MOZ_CAN_RUN_SCRIPT static bool
20897passOptionalNullableTreatAsNullCallbackWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20898{
20899 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableTreatAsNullCallbackWithDefaultValue");
20900 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20903( cx, "TestJSImplInterface"
, "passOptionalNullableTreatAsNullCallbackWithDefaultValue", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
20901 "TestJSImplInterface", "passOptionalNullableTreatAsNullCallbackWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20903( cx, "TestJSImplInterface"
, "passOptionalNullableTreatAsNullCallbackWithDefaultValue", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
20902 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20903( cx, "TestJSImplInterface"
, "passOptionalNullableTreatAsNullCallbackWithDefaultValue", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
20903 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20903( cx, "TestJSImplInterface"
, "passOptionalNullableTreatAsNullCallbackWithDefaultValue", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
20904
20905 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20906 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20907 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20908 if (objIsXray) {
20909 unwrappedObj.emplace(cx, obj);
20910 }
20911 RootedCallback<RefPtr<binding_detail::FastTestTreatAsNullCallback>> arg0(cx);
20912 if (args.hasDefined(0)) {
20913 if (args[0].isObject()) {
20914 if (JS::IsCallable(&args[0].toObject())) {
20915 { // scope for tempRoot and tempGlobalRoot if needed
20916 arg0 = new binding_detail::FastTestTreatAsNullCallback(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
20917 }
20918 } else {
20919 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Argument 1");
20920 return false;
20921 }
20922 } else if (args[0].isNullOrUndefined()) {
20923 arg0 = nullptr;
20924 } else {
20925 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
20926 return false;
20927 }
20928 } else {
20929 arg0 = nullptr;
20930 }
20931 if (objIsXray) {
20932 // Since our object is an Xray, we can just CheckedUnwrapStatic:
20933 // we know Xrays have no dynamic unwrap behavior.
20934 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
20935 if (!unwrappedObj.ref()) {
20936 return false;
20937 }
20938 }
20939 FastErrorResult rv;
20940 // NOTE: This assert does NOT call the function.
20941 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableTreatAsNullCallbackWithDefaultValue(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
20942 MOZ_KnownLive(self)(self)->PassOptionalNullableTreatAsNullCallbackWithDefaultValue(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
20943 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableTreatAsNullCallbackWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableTreatAsNullCallbackWithDefaultValue"
)), 0))
) {
20944 return false;
20945 }
20946 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 20946); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 20946; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
20947 args.rval().setUndefined();
20948 return true;
20949}
20950
20951static const JSJitInfo passOptionalNullableTreatAsNullCallbackWithDefaultValue_methodinfo = {
20952 { (JSJitGetterOp)passOptionalNullableTreatAsNullCallbackWithDefaultValue },
20953 { prototypes::id::TestJSImplInterface },
20954 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
20955 JSJitInfo::Method,
20956 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
20957 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
20958 false, /* isInfallible. False in setters. */
20959 false, /* isMovable. Not relevant for setters. */
20960 false, /* isEliminatable. Not relevant for setters. */
20961 false, /* isAlwaysInSlot. Only relevant for getters. */
20962 false, /* isLazilyCachedInSlot. Only relevant for getters. */
20963 false, /* isTypedMethod. Only relevant for methods. */
20964 0 /* Reserved slot index, if we're stored in a slot, else 0. */
20965};
20966
20967MOZ_CAN_RUN_SCRIPT static bool
20968passAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
20969{
20970 BindingCallContext cx(cx_, "TestJSImplInterface.passAny");
20971 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject20974( cx, "TestJSImplInterface"
, "passAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
20972 "TestJSImplInterface", "passAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject20974( cx, "TestJSImplInterface"
, "passAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
20973 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject20974( cx, "TestJSImplInterface"
, "passAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
20974 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject20974( cx, "TestJSImplInterface"
, "passAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
20975
20976 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
20977 if (!args.requireAtLeast(cx, "TestJSImplInterface.passAny", 1)) {
20978 return false;
20979 }
20980 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
20981 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
20982 if (objIsXray) {
20983 unwrappedObj.emplace(cx, obj);
20984 }
20985 JS::Rooted<JS::Value> arg0(cx);
20986#ifdef __clang__1
20987#pragma clang diagnostic push
20988#pragma clang diagnostic ignored "-Wunreachable-code"
20989#pragma clang diagnostic ignored "-Wunreachable-code-return"
20990#endif // __clang__
20991 if ((true) && !CallerSubsumes(args[0])) {
20992 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 1");
20993 return false;
20994 }
20995#ifdef __clang__1
20996#pragma clang diagnostic pop
20997#endif // __clang__
20998 arg0 = args[0];
20999 if (objIsXray) {
21000 // Since our object is an Xray, we can just CheckedUnwrapStatic:
21001 // we know Xrays have no dynamic unwrap behavior.
21002 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
21003 if (!unwrappedObj.ref()) {
21004 return false;
21005 }
21006 }
21007 FastErrorResult rv;
21008 // NOTE: This assert does NOT call the function.
21009 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassAny(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
21010 MOZ_KnownLive(self)(self)->PassAny(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
21011 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passAny"
)), 0))
) {
21012 return false;
21013 }
21014 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 21014); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21014; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21015 args.rval().setUndefined();
21016 return true;
21017}
21018
21019static const JSJitInfo passAny_methodinfo = {
21020 { (JSJitGetterOp)passAny },
21021 { prototypes::id::TestJSImplInterface },
21022 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
21023 JSJitInfo::Method,
21024 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21025 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21026 false, /* isInfallible. False in setters. */
21027 false, /* isMovable. Not relevant for setters. */
21028 false, /* isEliminatable. Not relevant for setters. */
21029 false, /* isAlwaysInSlot. Only relevant for getters. */
21030 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21031 false, /* isTypedMethod. Only relevant for methods. */
21032 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21033};
21034
21035MOZ_CAN_RUN_SCRIPT static bool
21036passVariadicAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21037{
21038 BindingCallContext cx(cx_, "TestJSImplInterface.passVariadicAny");
21039 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21042( cx, "TestJSImplInterface"
, "passVariadicAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21040 "TestJSImplInterface", "passVariadicAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21042( cx, "TestJSImplInterface"
, "passVariadicAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21041 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21042( cx, "TestJSImplInterface"
, "passVariadicAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21042 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21042( cx, "TestJSImplInterface"
, "passVariadicAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
21043
21044 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
21045 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
21046 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
21047 if (objIsXray) {
21048 unwrappedObj.emplace(cx, obj);
21049 }
21050 AutoSequence<JS::Value> arg0;
21051 SequenceRooter<JS::Value> arg0_holder(cx, &arg0);
21052 if (args.length() > 0) {
21053 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
21054 JS_ReportOutOfMemory(cx);
21055 return false;
21056 }
21057 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
21058 // OK to do infallible append here, since we ensured capacity already.
21059 JS::Value& slot = *arg0.AppendElement();
21060#ifdef __clang__1
21061#pragma clang diagnostic push
21062#pragma clang diagnostic ignored "-Wunreachable-code"
21063#pragma clang diagnostic ignored "-Wunreachable-code-return"
21064#endif // __clang__
21065 if ((true) && !CallerSubsumes(args[variadicArg])) {
21066 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 1");
21067 return false;
21068 }
21069#ifdef __clang__1
21070#pragma clang diagnostic pop
21071#endif // __clang__
21072 slot = args[variadicArg];
21073 }
21074 }
21075 if (objIsXray) {
21076 // Since our object is an Xray, we can just CheckedUnwrapStatic:
21077 // we know Xrays have no dynamic unwrap behavior.
21078 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
21079 if (!unwrappedObj.ref()) {
21080 return false;
21081 }
21082 }
21083 FastErrorResult rv;
21084 // NOTE: This assert does NOT call the function.
21085 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
21086 MOZ_KnownLive(self)(self)->PassVariadicAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
21087 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicAny"
)), 0))
) {
21088 return false;
21089 }
21090 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 21090); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21090; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21091 args.rval().setUndefined();
21092 return true;
21093}
21094
21095static const JSJitInfo passVariadicAny_methodinfo = {
21096 { (JSJitGetterOp)passVariadicAny },
21097 { prototypes::id::TestJSImplInterface },
21098 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
21099 JSJitInfo::Method,
21100 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21101 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21102 false, /* isInfallible. False in setters. */
21103 false, /* isMovable. Not relevant for setters. */
21104 false, /* isEliminatable. Not relevant for setters. */
21105 false, /* isAlwaysInSlot. Only relevant for getters. */
21106 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21107 false, /* isTypedMethod. Only relevant for methods. */
21108 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21109};
21110
21111MOZ_CAN_RUN_SCRIPT static bool
21112passOptionalAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21113{
21114 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalAny");
21115 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21118( cx, "TestJSImplInterface"
, "passOptionalAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21116 "TestJSImplInterface", "passOptionalAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21118( cx, "TestJSImplInterface"
, "passOptionalAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21117 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21118( cx, "TestJSImplInterface"
, "passOptionalAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21118 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21118( cx, "TestJSImplInterface"
, "passOptionalAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
21119
21120 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
21121 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
21122 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
21123 if (objIsXray) {
21124 unwrappedObj.emplace(cx, obj);
21125 }
21126 JS::Rooted<JS::Value> arg0(cx);
21127 if (args.hasDefined(0)) {
21128#ifdef __clang__1
21129#pragma clang diagnostic push
21130#pragma clang diagnostic ignored "-Wunreachable-code"
21131#pragma clang diagnostic ignored "-Wunreachable-code-return"
21132#endif // __clang__
21133 if ((true) && !CallerSubsumes(args[0])) {
21134 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 1");
21135 return false;
21136 }
21137#ifdef __clang__1
21138#pragma clang diagnostic pop
21139#endif // __clang__
21140 arg0 = args[0];
21141 } else {
21142 arg0 = JS::UndefinedValue();
21143 }
21144 if (objIsXray) {
21145 // Since our object is an Xray, we can just CheckedUnwrapStatic:
21146 // we know Xrays have no dynamic unwrap behavior.
21147 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
21148 if (!unwrappedObj.ref()) {
21149 return false;
21150 }
21151 }
21152 FastErrorResult rv;
21153 // NOTE: This assert does NOT call the function.
21154 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalAny(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
21155 MOZ_KnownLive(self)(self)->PassOptionalAny(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
21156 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalAny"
)), 0))
) {
21157 return false;
21158 }
21159 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 21159); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21159; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21160 args.rval().setUndefined();
21161 return true;
21162}
21163
21164static const JSJitInfo passOptionalAny_methodinfo = {
21165 { (JSJitGetterOp)passOptionalAny },
21166 { prototypes::id::TestJSImplInterface },
21167 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
21168 JSJitInfo::Method,
21169 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21170 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21171 false, /* isInfallible. False in setters. */
21172 false, /* isMovable. Not relevant for setters. */
21173 false, /* isEliminatable. Not relevant for setters. */
21174 false, /* isAlwaysInSlot. Only relevant for getters. */
21175 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21176 false, /* isTypedMethod. Only relevant for methods. */
21177 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21178};
21179
21180MOZ_CAN_RUN_SCRIPT static bool
21181passAnyDefaultNull(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21182{
21183 BindingCallContext cx(cx_, "TestJSImplInterface.passAnyDefaultNull");
21184 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21187( cx, "TestJSImplInterface"
, "passAnyDefaultNull", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21185 "TestJSImplInterface", "passAnyDefaultNull", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21187( cx, "TestJSImplInterface"
, "passAnyDefaultNull", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21186 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21187( cx, "TestJSImplInterface"
, "passAnyDefaultNull", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21187 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21187( cx, "TestJSImplInterface"
, "passAnyDefaultNull", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
21188
21189 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
21190 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
21191 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
21192 if (objIsXray) {
21193 unwrappedObj.emplace(cx, obj);
21194 }
21195 JS::Rooted<JS::Value> arg0(cx);
21196 if (args.hasDefined(0)) {
21197#ifdef __clang__1
21198#pragma clang diagnostic push
21199#pragma clang diagnostic ignored "-Wunreachable-code"
21200#pragma clang diagnostic ignored "-Wunreachable-code-return"
21201#endif // __clang__
21202 if ((true) && !CallerSubsumes(args[0])) {
21203 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 1");
21204 return false;
21205 }
21206#ifdef __clang__1
21207#pragma clang diagnostic pop
21208#endif // __clang__
21209 arg0 = args[0];
21210 } else {
21211 arg0 = JS::NullValue();
21212 }
21213 if (objIsXray) {
21214 // Since our object is an Xray, we can just CheckedUnwrapStatic:
21215 // we know Xrays have no dynamic unwrap behavior.
21216 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
21217 if (!unwrappedObj.ref()) {
21218 return false;
21219 }
21220 }
21221 FastErrorResult rv;
21222 // NOTE: This assert does NOT call the function.
21223 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassAnyDefaultNull(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
21224 MOZ_KnownLive(self)(self)->PassAnyDefaultNull(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
21225 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passAnyDefaultNull"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passAnyDefaultNull"
)), 0))
) {
21226 return false;
21227 }
21228 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 21228); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21228; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21229 args.rval().setUndefined();
21230 return true;
21231}
21232
21233static const JSJitInfo passAnyDefaultNull_methodinfo = {
21234 { (JSJitGetterOp)passAnyDefaultNull },
21235 { prototypes::id::TestJSImplInterface },
21236 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
21237 JSJitInfo::Method,
21238 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21239 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21240 false, /* isInfallible. False in setters. */
21241 false, /* isMovable. Not relevant for setters. */
21242 false, /* isEliminatable. Not relevant for setters. */
21243 false, /* isAlwaysInSlot. Only relevant for getters. */
21244 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21245 false, /* isTypedMethod. Only relevant for methods. */
21246 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21247};
21248
21249MOZ_CAN_RUN_SCRIPT static bool
21250passSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21251{
21252 BindingCallContext cx(cx_, "TestJSImplInterface.passSequenceOfAny");
21253 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21256( cx, "TestJSImplInterface"
, "passSequenceOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21254 "TestJSImplInterface", "passSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21256( cx, "TestJSImplInterface"
, "passSequenceOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21255 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21256( cx, "TestJSImplInterface"
, "passSequenceOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
21256 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21256( cx, "TestJSImplInterface"
, "passSequenceOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
21257
21258 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
21259 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequenceOfAny", 1)) {
21260 return false;
21261 }
21262 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
21263 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
21264 if (objIsXray) {
21265 unwrappedObj.emplace(cx, obj);
21266 }
21267 binding_detail::AutoSequence<JS::Value> arg0;
21268 SequenceRooter<JS::Value> arg0_holder(cx, &arg0);
21269 if (args[0].isObject()) {
21270 JS::ForOfIterator iter(cx);
21271 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
21272 return false;
21273 }
21274 if (!iter.valueIsIterable()) {
21275 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21276 return false;
21277 }
21278 binding_detail::AutoSequence<JS::Value> &arr = arg0;
21279 JS::Rooted<JS::Value> temp(cx);
21280 while (true) {
21281 bool done;
21282 if (!iter.next(&temp, &done)) {
21283 return false;
21284 }
21285 if (done) {
21286 break;
21287 }
21288 JS::Value* slotPtr = arr.AppendElement(mozilla::fallible);
21289 if (!slotPtr) {
21290 JS_ReportOutOfMemory(cx);
21291 return false;
21292 }
21293 JS::Value& slot = *slotPtr;
21294#ifdef __clang__1
21295#pragma clang diagnostic push
21296#pragma clang diagnostic ignored "-Wunreachable-code"
21297#pragma clang diagnostic ignored "-Wunreachable-code-return"
21298#endif // __clang__
21299 if ((true) && !CallerSubsumes(temp)) {
21300 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of argument 1");
21301 return false;
21302 }
21303#ifdef __clang__1
21304#pragma clang diagnostic pop
21305#endif // __clang__
21306 slot = temp;
21307 }
21308 } else {
21309 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21310 return false;
21311 }
21312 if (objIsXray) {
21313 // Since our object is an Xray, we can just CheckedUnwrapStatic:
21314 // we know Xrays have no dynamic unwrap behavior.
21315 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
21316 if (!unwrappedObj.ref()) {
21317 return false;
21318 }
21319 }
21320 FastErrorResult rv;
21321 // NOTE: This assert does NOT call the function.
21322 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
21323 MOZ_KnownLive(self)(self)->PassSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
21324 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfAny"
)), 0))
) {
21325 return false;
21326 }
21327 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 21327); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21327; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21328 args.rval().setUndefined();
21329 return true;
21330}
21331
21332static const JSJitInfo passSequenceOfAny_methodinfo = {
21333 { (JSJitGetterOp)passSequenceOfAny },
21334 { prototypes::id::TestJSImplInterface },
21335 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
21336 JSJitInfo::Method,
21337 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21338 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21339 false, /* isInfallible. False in setters. */
21340 false, /* isMovable. Not relevant for setters. */
21341 false, /* isEliminatable. Not relevant for setters. */
21342 false, /* isAlwaysInSlot. Only relevant for getters. */
21343 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21344 false, /* isTypedMethod. Only relevant for methods. */
21345 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21346};
21347
21348MOZ_CAN_RUN_SCRIPT static bool
21349passNullableSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21350{
21351 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableSequenceOfAny");
21352 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21355( cx, "TestJSImplInterface"
, "passNullableSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21353 "TestJSImplInterface", "passNullableSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21355( cx, "TestJSImplInterface"
, "passNullableSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21354 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21355( cx, "TestJSImplInterface"
, "passNullableSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21355 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21355( cx, "TestJSImplInterface"
, "passNullableSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
21356
21357 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
21358 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableSequenceOfAny", 1)) {
21359 return false;
21360 }
21361 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
21362 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
21363 if (objIsXray) {
21364 unwrappedObj.emplace(cx, obj);
21365 }
21366 Nullable<Sequence<JS::Value>> arg0;
21367 SequenceRooter<JS::Value> arg0_holder(cx, &arg0.SetValue());
21368 if (args[0].isObject()) {
21369 JS::ForOfIterator iter(cx);
21370 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
21371 return false;
21372 }
21373 if (!iter.valueIsIterable()) {
21374 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21375 return false;
21376 }
21377 Sequence<JS::Value> &arr = arg0.SetValue();
21378 JS::Rooted<JS::Value> temp(cx);
21379 while (true) {
21380 bool done;
21381 if (!iter.next(&temp, &done)) {
21382 return false;
21383 }
21384 if (done) {
21385 break;
21386 }
21387 JS::Value* slotPtr = arr.AppendElement(mozilla::fallible);
21388 if (!slotPtr) {
21389 JS_ReportOutOfMemory(cx);
21390 return false;
21391 }
21392 JS::Value& slot = *slotPtr;
21393#ifdef __clang__1
21394#pragma clang diagnostic push
21395#pragma clang diagnostic ignored "-Wunreachable-code"
21396#pragma clang diagnostic ignored "-Wunreachable-code-return"
21397#endif // __clang__
21398 if ((true) && !CallerSubsumes(temp)) {
21399 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of argument 1");
21400 return false;
21401 }
21402#ifdef __clang__1
21403#pragma clang diagnostic pop
21404#endif // __clang__
21405 slot = temp;
21406 }
21407 } else if (args[0].isNullOrUndefined()) {
21408 arg0.SetNull();
21409 } else {
21410 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21411 return false;
21412 }
21413 if (objIsXray) {
21414 // Since our object is an Xray, we can just CheckedUnwrapStatic:
21415 // we know Xrays have no dynamic unwrap behavior.
21416 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
21417 if (!unwrappedObj.ref()) {
21418 return false;
21419 }
21420 }
21421 FastErrorResult rv;
21422 // NOTE: This assert does NOT call the function.
21423 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
21424 MOZ_KnownLive(self)(self)->PassNullableSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
21425 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableSequenceOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableSequenceOfAny"
)), 0))
) {
21426 return false;
21427 }
21428 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 21428); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21428; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21429 args.rval().setUndefined();
21430 return true;
21431}
21432
21433static const JSJitInfo passNullableSequenceOfAny_methodinfo = {
21434 { (JSJitGetterOp)passNullableSequenceOfAny },
21435 { prototypes::id::TestJSImplInterface },
21436 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
21437 JSJitInfo::Method,
21438 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21439 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21440 false, /* isInfallible. False in setters. */
21441 false, /* isMovable. Not relevant for setters. */
21442 false, /* isEliminatable. Not relevant for setters. */
21443 false, /* isAlwaysInSlot. Only relevant for getters. */
21444 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21445 false, /* isTypedMethod. Only relevant for methods. */
21446 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21447};
21448
21449MOZ_CAN_RUN_SCRIPT static bool
21450passOptionalSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21451{
21452 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalSequenceOfAny");
21453 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21456( cx, "TestJSImplInterface"
, "passOptionalSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21454 "TestJSImplInterface", "passOptionalSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21456( cx, "TestJSImplInterface"
, "passOptionalSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21455 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21456( cx, "TestJSImplInterface"
, "passOptionalSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21456 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21456( cx, "TestJSImplInterface"
, "passOptionalSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
21457
21458 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
21459 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
21460 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
21461 if (objIsXray) {
21462 unwrappedObj.emplace(cx, obj);
21463 }
21464 Optional<Sequence<JS::Value>> arg0;
21465 Maybe<SequenceRooter<JS::Value>> arg0_holder;
21466 if (args.hasDefined(0)) {
21467 arg0.Construct();
21468 arg0_holder.emplace(cx, &arg0.Value());
21469 if (args[0].isObject()) {
21470 JS::ForOfIterator iter(cx);
21471 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
21472 return false;
21473 }
21474 if (!iter.valueIsIterable()) {
21475 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21476 return false;
21477 }
21478 Sequence<JS::Value> &arr = arg0.Value();
21479 JS::Rooted<JS::Value> temp(cx);
21480 while (true) {
21481 bool done;
21482 if (!iter.next(&temp, &done)) {
21483 return false;
21484 }
21485 if (done) {
21486 break;
21487 }
21488 JS::Value* slotPtr = arr.AppendElement(mozilla::fallible);
21489 if (!slotPtr) {
21490 JS_ReportOutOfMemory(cx);
21491 return false;
21492 }
21493 JS::Value& slot = *slotPtr;
21494#ifdef __clang__1
21495#pragma clang diagnostic push
21496#pragma clang diagnostic ignored "-Wunreachable-code"
21497#pragma clang diagnostic ignored "-Wunreachable-code-return"
21498#endif // __clang__
21499 if ((true) && !CallerSubsumes(temp)) {
21500 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of argument 1");
21501 return false;
21502 }
21503#ifdef __clang__1
21504#pragma clang diagnostic pop
21505#endif // __clang__
21506 slot = temp;
21507 }
21508 } else {
21509 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21510 return false;
21511 }
21512 }
21513 if (objIsXray) {
21514 // Since our object is an Xray, we can just CheckedUnwrapStatic:
21515 // we know Xrays have no dynamic unwrap behavior.
21516 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
21517 if (!unwrappedObj.ref()) {
21518 return false;
21519 }
21520 }
21521 FastErrorResult rv;
21522 // NOTE: This assert does NOT call the function.
21523 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
21524 MOZ_KnownLive(self)(self)->PassOptionalSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
21525 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSequenceOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSequenceOfAny"
)), 0))
) {
21526 return false;
21527 }
21528 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 21528); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21528; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21529 args.rval().setUndefined();
21530 return true;
21531}
21532
21533static const JSJitInfo passOptionalSequenceOfAny_methodinfo = {
21534 { (JSJitGetterOp)passOptionalSequenceOfAny },
21535 { prototypes::id::TestJSImplInterface },
21536 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
21537 JSJitInfo::Method,
21538 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21539 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21540 false, /* isInfallible. False in setters. */
21541 false, /* isMovable. Not relevant for setters. */
21542 false, /* isEliminatable. Not relevant for setters. */
21543 false, /* isAlwaysInSlot. Only relevant for getters. */
21544 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21545 false, /* isTypedMethod. Only relevant for methods. */
21546 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21547};
21548
21549MOZ_CAN_RUN_SCRIPT static bool
21550passOptionalNullableSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21551{
21552 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableSequenceOfAny");
21553 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21556( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21554 "TestJSImplInterface", "passOptionalNullableSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21556( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21555 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21556( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21556 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21556( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
21557
21558 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
21559 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
21560 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
21561 if (objIsXray) {
21562 unwrappedObj.emplace(cx, obj);
21563 }
21564 Optional<Nullable<Sequence<JS::Value>>> arg0;
21565 Maybe<SequenceRooter<JS::Value>> arg0_holder;
21566 if (args.hasDefined(0)) {
21567 arg0.Construct();
21568 arg0_holder.emplace(cx, &arg0.Value().SetValue());
21569 if (args[0].isObject()) {
21570 JS::ForOfIterator iter(cx);
21571 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
21572 return false;
21573 }
21574 if (!iter.valueIsIterable()) {
21575 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21576 return false;
21577 }
21578 Sequence<JS::Value> &arr = arg0.Value().SetValue();
21579 JS::Rooted<JS::Value> temp(cx);
21580 while (true) {
21581 bool done;
21582 if (!iter.next(&temp, &done)) {
21583 return false;
21584 }
21585 if (done) {
21586 break;
21587 }
21588 JS::Value* slotPtr = arr.AppendElement(mozilla::fallible);
21589 if (!slotPtr) {
21590 JS_ReportOutOfMemory(cx);
21591 return false;
21592 }
21593 JS::Value& slot = *slotPtr;
21594#ifdef __clang__1
21595#pragma clang diagnostic push
21596#pragma clang diagnostic ignored "-Wunreachable-code"
21597#pragma clang diagnostic ignored "-Wunreachable-code-return"
21598#endif // __clang__
21599 if ((true) && !CallerSubsumes(temp)) {
21600 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of argument 1");
21601 return false;
21602 }
21603#ifdef __clang__1
21604#pragma clang diagnostic pop
21605#endif // __clang__
21606 slot = temp;
21607 }
21608 } else if (args[0].isNullOrUndefined()) {
21609 arg0.Value().SetNull();
21610 } else {
21611 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21612 return false;
21613 }
21614 }
21615 if (objIsXray) {
21616 // Since our object is an Xray, we can just CheckedUnwrapStatic:
21617 // we know Xrays have no dynamic unwrap behavior.
21618 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
21619 if (!unwrappedObj.ref()) {
21620 return false;
21621 }
21622 }
21623 FastErrorResult rv;
21624 // NOTE: This assert does NOT call the function.
21625 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
21626 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
21627 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceOfAny"
)), 0))
) {
21628 return false;
21629 }
21630 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 21630); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21630; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21631 args.rval().setUndefined();
21632 return true;
21633}
21634
21635static const JSJitInfo passOptionalNullableSequenceOfAny_methodinfo = {
21636 { (JSJitGetterOp)passOptionalNullableSequenceOfAny },
21637 { prototypes::id::TestJSImplInterface },
21638 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
21639 JSJitInfo::Method,
21640 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21641 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21642 false, /* isInfallible. False in setters. */
21643 false, /* isMovable. Not relevant for setters. */
21644 false, /* isEliminatable. Not relevant for setters. */
21645 false, /* isAlwaysInSlot. Only relevant for getters. */
21646 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21647 false, /* isTypedMethod. Only relevant for methods. */
21648 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21649};
21650
21651MOZ_CAN_RUN_SCRIPT static bool
21652passOptionalSequenceOfAnyWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21653{
21654 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalSequenceOfAnyWithDefaultValue");
21655 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21658( cx, "TestJSImplInterface"
, "passOptionalSequenceOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21656 "TestJSImplInterface", "passOptionalSequenceOfAnyWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21658( cx, "TestJSImplInterface"
, "passOptionalSequenceOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21657 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21658( cx, "TestJSImplInterface"
, "passOptionalSequenceOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21658 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21658( cx, "TestJSImplInterface"
, "passOptionalSequenceOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
21659
21660 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
21661 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
21662 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
21663 if (objIsXray) {
21664 unwrappedObj.emplace(cx, obj);
21665 }
21666 Nullable<Sequence<JS::Value>> arg0;
21667 SequenceRooter<JS::Value> arg0_holder(cx, &arg0.SetValue());
21668 if (args.hasDefined(0)) {
21669 if (args[0].isObject()) {
21670 JS::ForOfIterator iter(cx);
21671 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
21672 return false;
21673 }
21674 if (!iter.valueIsIterable()) {
21675 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21676 return false;
21677 }
21678 Sequence<JS::Value> &arr = arg0.SetValue();
21679 JS::Rooted<JS::Value> temp(cx);
21680 while (true) {
21681 bool done;
21682 if (!iter.next(&temp, &done)) {
21683 return false;
21684 }
21685 if (done) {
21686 break;
21687 }
21688 JS::Value* slotPtr = arr.AppendElement(mozilla::fallible);
21689 if (!slotPtr) {
21690 JS_ReportOutOfMemory(cx);
21691 return false;
21692 }
21693 JS::Value& slot = *slotPtr;
21694#ifdef __clang__1
21695#pragma clang diagnostic push
21696#pragma clang diagnostic ignored "-Wunreachable-code"
21697#pragma clang diagnostic ignored "-Wunreachable-code-return"
21698#endif // __clang__
21699 if ((true) && !CallerSubsumes(temp)) {
21700 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of argument 1");
21701 return false;
21702 }
21703#ifdef __clang__1
21704#pragma clang diagnostic pop
21705#endif // __clang__
21706 slot = temp;
21707 }
21708 } else if (args[0].isNullOrUndefined()) {
21709 arg0.SetNull();
21710 } else {
21711 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21712 return false;
21713 }
21714 } else {
21715 arg0.SetNull();
21716 }
21717 if (objIsXray) {
21718 // Since our object is an Xray, we can just CheckedUnwrapStatic:
21719 // we know Xrays have no dynamic unwrap behavior.
21720 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
21721 if (!unwrappedObj.ref()) {
21722 return false;
21723 }
21724 }
21725 FastErrorResult rv;
21726 // NOTE: This assert does NOT call the function.
21727 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalSequenceOfAnyWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
21728 MOZ_KnownLive(self)(self)->PassOptionalSequenceOfAnyWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
21729 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSequenceOfAnyWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalSequenceOfAnyWithDefaultValue"
)), 0))
) {
21730 return false;
21731 }
21732 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 21732); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21732; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21733 args.rval().setUndefined();
21734 return true;
21735}
21736
21737static const JSJitInfo passOptionalSequenceOfAnyWithDefaultValue_methodinfo = {
21738 { (JSJitGetterOp)passOptionalSequenceOfAnyWithDefaultValue },
21739 { prototypes::id::TestJSImplInterface },
21740 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
21741 JSJitInfo::Method,
21742 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21743 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21744 false, /* isInfallible. False in setters. */
21745 false, /* isMovable. Not relevant for setters. */
21746 false, /* isEliminatable. Not relevant for setters. */
21747 false, /* isAlwaysInSlot. Only relevant for getters. */
21748 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21749 false, /* isTypedMethod. Only relevant for methods. */
21750 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21751};
21752
21753MOZ_CAN_RUN_SCRIPT static bool
21754passSequenceOfSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21755{
21756 BindingCallContext cx(cx_, "TestJSImplInterface.passSequenceOfSequenceOfAny");
21757 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21760( cx, "TestJSImplInterface"
, "passSequenceOfSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21758 "TestJSImplInterface", "passSequenceOfSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21760( cx, "TestJSImplInterface"
, "passSequenceOfSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21759 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21760( cx, "TestJSImplInterface"
, "passSequenceOfSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21760 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21760( cx, "TestJSImplInterface"
, "passSequenceOfSequenceOfAny", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
21761
21762 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
21763 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequenceOfSequenceOfAny", 1)) {
21764 return false;
21765 }
21766 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
21767 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
21768 if (objIsXray) {
21769 unwrappedObj.emplace(cx, obj);
21770 }
21771 binding_detail::AutoSequence<Sequence<JS::Value>> arg0;
21772 SequenceRooter<Sequence<JS::Value>> arg0_holder(cx, &arg0);
21773 if (args[0].isObject()) {
21774 JS::ForOfIterator iter(cx);
21775 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
21776 return false;
21777 }
21778 if (!iter.valueIsIterable()) {
21779 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21780 return false;
21781 }
21782 binding_detail::AutoSequence<Sequence<JS::Value>> &arr = arg0;
21783 JS::Rooted<JS::Value> temp(cx);
21784 while (true) {
21785 bool done;
21786 if (!iter.next(&temp, &done)) {
21787 return false;
21788 }
21789 if (done) {
21790 break;
21791 }
21792 Sequence<JS::Value>* slotPtr = arr.AppendElement(mozilla::fallible);
21793 if (!slotPtr) {
21794 JS_ReportOutOfMemory(cx);
21795 return false;
21796 }
21797 Sequence<JS::Value>& slot = *slotPtr;
21798 if (temp.isObject()) {
21799 JS::ForOfIterator iter1(cx);
21800 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
21801 return false;
21802 }
21803 if (!iter1.valueIsIterable()) {
21804 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
21805 return false;
21806 }
21807 Sequence<JS::Value> &arr1 = slot;
21808 JS::Rooted<JS::Value> temp1(cx);
21809 while (true) {
21810 bool done1;
21811 if (!iter1.next(&temp1, &done1)) {
21812 return false;
21813 }
21814 if (done1) {
21815 break;
21816 }
21817 JS::Value* slotPtr1 = arr1.AppendElement(mozilla::fallible);
21818 if (!slotPtr1) {
21819 JS_ReportOutOfMemory(cx);
21820 return false;
21821 }
21822 JS::Value& slot1 = *slotPtr1;
21823#ifdef __clang__1
21824#pragma clang diagnostic push
21825#pragma clang diagnostic ignored "-Wunreachable-code"
21826#pragma clang diagnostic ignored "-Wunreachable-code-return"
21827#endif // __clang__
21828 if ((true) && !CallerSubsumes(temp1)) {
21829 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of element of argument 1");
21830 return false;
21831 }
21832#ifdef __clang__1
21833#pragma clang diagnostic pop
21834#endif // __clang__
21835 slot1 = temp1;
21836 }
21837 } else {
21838 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
21839 return false;
21840 }
21841 }
21842 } else {
21843 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21844 return false;
21845 }
21846 if (objIsXray) {
21847 // Since our object is an Xray, we can just CheckedUnwrapStatic:
21848 // we know Xrays have no dynamic unwrap behavior.
21849 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
21850 if (!unwrappedObj.ref()) {
21851 return false;
21852 }
21853 }
21854 FastErrorResult rv;
21855 // NOTE: This assert does NOT call the function.
21856 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
21857 MOZ_KnownLive(self)(self)->PassSequenceOfSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
21858 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfSequenceOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfSequenceOfAny"
)), 0))
) {
21859 return false;
21860 }
21861 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 21861); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21861; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21862 args.rval().setUndefined();
21863 return true;
21864}
21865
21866static const JSJitInfo passSequenceOfSequenceOfAny_methodinfo = {
21867 { (JSJitGetterOp)passSequenceOfSequenceOfAny },
21868 { prototypes::id::TestJSImplInterface },
21869 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
21870 JSJitInfo::Method,
21871 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
21872 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
21873 false, /* isInfallible. False in setters. */
21874 false, /* isMovable. Not relevant for setters. */
21875 false, /* isEliminatable. Not relevant for setters. */
21876 false, /* isAlwaysInSlot. Only relevant for getters. */
21877 false, /* isLazilyCachedInSlot. Only relevant for getters. */
21878 false, /* isTypedMethod. Only relevant for methods. */
21879 0 /* Reserved slot index, if we're stored in a slot, else 0. */
21880};
21881
21882MOZ_CAN_RUN_SCRIPT static bool
21883passSequenceOfNullableSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
21884{
21885 BindingCallContext cx(cx_, "TestJSImplInterface.passSequenceOfNullableSequenceOfAny");
21886 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject21889( cx, "TestJSImplInterface"
, "passSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21887 "TestJSImplInterface", "passSequenceOfNullableSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject21889( cx, "TestJSImplInterface"
, "passSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21888 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject21889( cx, "TestJSImplInterface"
, "passSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
21889 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject21889( cx, "TestJSImplInterface"
, "passSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
21890
21891 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
21892 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequenceOfNullableSequenceOfAny", 1)) {
21893 return false;
21894 }
21895 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
21896 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
21897 if (objIsXray) {
21898 unwrappedObj.emplace(cx, obj);
21899 }
21900 binding_detail::AutoSequence<Nullable<Sequence<JS::Value>>> arg0;
21901 SequenceRooter<Nullable<Sequence<JS::Value>>> arg0_holder(cx, &arg0);
21902 if (args[0].isObject()) {
21903 JS::ForOfIterator iter(cx);
21904 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
21905 return false;
21906 }
21907 if (!iter.valueIsIterable()) {
21908 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21909 return false;
21910 }
21911 binding_detail::AutoSequence<Nullable<Sequence<JS::Value>>> &arr = arg0;
21912 JS::Rooted<JS::Value> temp(cx);
21913 while (true) {
21914 bool done;
21915 if (!iter.next(&temp, &done)) {
21916 return false;
21917 }
21918 if (done) {
21919 break;
21920 }
21921 Nullable<Sequence<JS::Value>>* slotPtr = arr.AppendElement(mozilla::fallible);
21922 if (!slotPtr) {
21923 JS_ReportOutOfMemory(cx);
21924 return false;
21925 }
21926 Nullable<Sequence<JS::Value>>& slot = *slotPtr;
21927 if (temp.isObject()) {
21928 JS::ForOfIterator iter1(cx);
21929 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
21930 return false;
21931 }
21932 if (!iter1.valueIsIterable()) {
21933 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
21934 return false;
21935 }
21936 Sequence<JS::Value> &arr1 = slot.SetValue();
21937 JS::Rooted<JS::Value> temp1(cx);
21938 while (true) {
21939 bool done1;
21940 if (!iter1.next(&temp1, &done1)) {
21941 return false;
21942 }
21943 if (done1) {
21944 break;
21945 }
21946 JS::Value* slotPtr1 = arr1.AppendElement(mozilla::fallible);
21947 if (!slotPtr1) {
21948 JS_ReportOutOfMemory(cx);
21949 return false;
21950 }
21951 JS::Value& slot1 = *slotPtr1;
21952#ifdef __clang__1
21953#pragma clang diagnostic push
21954#pragma clang diagnostic ignored "-Wunreachable-code"
21955#pragma clang diagnostic ignored "-Wunreachable-code-return"
21956#endif // __clang__
21957 if ((true) && !CallerSubsumes(temp1)) {
21958 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of element of argument 1");
21959 return false;
21960 }
21961#ifdef __clang__1
21962#pragma clang diagnostic pop
21963#endif // __clang__
21964 slot1 = temp1;
21965 }
21966 } else if (temp.isNullOrUndefined()) {
21967 slot.SetNull();
21968 } else {
21969 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
21970 return false;
21971 }
21972 }
21973 } else {
21974 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
21975 return false;
21976 }
21977 if (objIsXray) {
21978 // Since our object is an Xray, we can just CheckedUnwrapStatic:
21979 // we know Xrays have no dynamic unwrap behavior.
21980 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
21981 if (!unwrappedObj.ref()) {
21982 return false;
21983 }
21984 }
21985 FastErrorResult rv;
21986 // NOTE: This assert does NOT call the function.
21987 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfNullableSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
21988 MOZ_KnownLive(self)(self)->PassSequenceOfNullableSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
21989 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfNullableSequenceOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfNullableSequenceOfAny"
)), 0))
) {
21990 return false;
21991 }
21992 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 21992); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 21992; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
21993 args.rval().setUndefined();
21994 return true;
21995}
21996
21997static const JSJitInfo passSequenceOfNullableSequenceOfAny_methodinfo = {
21998 { (JSJitGetterOp)passSequenceOfNullableSequenceOfAny },
21999 { prototypes::id::TestJSImplInterface },
22000 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
22001 JSJitInfo::Method,
22002 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22003 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22004 false, /* isInfallible. False in setters. */
22005 false, /* isMovable. Not relevant for setters. */
22006 false, /* isEliminatable. Not relevant for setters. */
22007 false, /* isAlwaysInSlot. Only relevant for getters. */
22008 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22009 false, /* isTypedMethod. Only relevant for methods. */
22010 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22011};
22012
22013MOZ_CAN_RUN_SCRIPT static bool
22014passNullableSequenceOfNullableSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22015{
22016 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableSequenceOfNullableSequenceOfAny");
22017 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22020( cx, "TestJSImplInterface"
, "passNullableSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
22018 "TestJSImplInterface", "passNullableSequenceOfNullableSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22020( cx, "TestJSImplInterface"
, "passNullableSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
22019 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22020( cx, "TestJSImplInterface"
, "passNullableSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
22020 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22020( cx, "TestJSImplInterface"
, "passNullableSequenceOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
22021
22022 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
22023 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableSequenceOfNullableSequenceOfAny", 1)) {
22024 return false;
22025 }
22026 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
22027 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
22028 if (objIsXray) {
22029 unwrappedObj.emplace(cx, obj);
22030 }
22031 Nullable<Sequence<Nullable<Sequence<JS::Value>>>> arg0;
22032 SequenceRooter<Nullable<Sequence<JS::Value>>> arg0_holder(cx, &arg0.SetValue());
22033 if (args[0].isObject()) {
22034 JS::ForOfIterator iter(cx);
22035 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
22036 return false;
22037 }
22038 if (!iter.valueIsIterable()) {
22039 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
22040 return false;
22041 }
22042 Sequence<Nullable<Sequence<JS::Value>>> &arr = arg0.SetValue();
22043 JS::Rooted<JS::Value> temp(cx);
22044 while (true) {
22045 bool done;
22046 if (!iter.next(&temp, &done)) {
22047 return false;
22048 }
22049 if (done) {
22050 break;
22051 }
22052 Nullable<Sequence<JS::Value>>* slotPtr = arr.AppendElement(mozilla::fallible);
22053 if (!slotPtr) {
22054 JS_ReportOutOfMemory(cx);
22055 return false;
22056 }
22057 Nullable<Sequence<JS::Value>>& slot = *slotPtr;
22058 if (temp.isObject()) {
22059 JS::ForOfIterator iter1(cx);
22060 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
22061 return false;
22062 }
22063 if (!iter1.valueIsIterable()) {
22064 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
22065 return false;
22066 }
22067 Sequence<JS::Value> &arr1 = slot.SetValue();
22068 JS::Rooted<JS::Value> temp1(cx);
22069 while (true) {
22070 bool done1;
22071 if (!iter1.next(&temp1, &done1)) {
22072 return false;
22073 }
22074 if (done1) {
22075 break;
22076 }
22077 JS::Value* slotPtr1 = arr1.AppendElement(mozilla::fallible);
22078 if (!slotPtr1) {
22079 JS_ReportOutOfMemory(cx);
22080 return false;
22081 }
22082 JS::Value& slot1 = *slotPtr1;
22083#ifdef __clang__1
22084#pragma clang diagnostic push
22085#pragma clang diagnostic ignored "-Wunreachable-code"
22086#pragma clang diagnostic ignored "-Wunreachable-code-return"
22087#endif // __clang__
22088 if ((true) && !CallerSubsumes(temp1)) {
22089 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of element of argument 1");
22090 return false;
22091 }
22092#ifdef __clang__1
22093#pragma clang diagnostic pop
22094#endif // __clang__
22095 slot1 = temp1;
22096 }
22097 } else if (temp.isNullOrUndefined()) {
22098 slot.SetNull();
22099 } else {
22100 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
22101 return false;
22102 }
22103 }
22104 } else if (args[0].isNullOrUndefined()) {
22105 arg0.SetNull();
22106 } else {
22107 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
22108 return false;
22109 }
22110 if (objIsXray) {
22111 // Since our object is an Xray, we can just CheckedUnwrapStatic:
22112 // we know Xrays have no dynamic unwrap behavior.
22113 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
22114 if (!unwrappedObj.ref()) {
22115 return false;
22116 }
22117 }
22118 FastErrorResult rv;
22119 // NOTE: This assert does NOT call the function.
22120 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableSequenceOfNullableSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
22121 MOZ_KnownLive(self)(self)->PassNullableSequenceOfNullableSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
22122 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableSequenceOfNullableSequenceOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableSequenceOfNullableSequenceOfAny"
)), 0))
) {
22123 return false;
22124 }
22125 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 22125); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22125; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22126 args.rval().setUndefined();
22127 return true;
22128}
22129
22130static const JSJitInfo passNullableSequenceOfNullableSequenceOfAny_methodinfo = {
22131 { (JSJitGetterOp)passNullableSequenceOfNullableSequenceOfAny },
22132 { prototypes::id::TestJSImplInterface },
22133 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
22134 JSJitInfo::Method,
22135 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22136 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22137 false, /* isInfallible. False in setters. */
22138 false, /* isMovable. Not relevant for setters. */
22139 false, /* isEliminatable. Not relevant for setters. */
22140 false, /* isAlwaysInSlot. Only relevant for getters. */
22141 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22142 false, /* isTypedMethod. Only relevant for methods. */
22143 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22144};
22145
22146MOZ_CAN_RUN_SCRIPT static bool
22147passOptionalNullableSequenceOfNullableSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22148{
22149 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableSequenceOfNullableSequenceOfAny");
22150 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22153( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfAny", JS::
ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame::
Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
22151 "TestJSImplInterface", "passOptionalNullableSequenceOfNullableSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22153( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfAny", JS::
ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame::
Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
22152 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22153( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfAny", JS::
ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame::
Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
22153 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22153( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfAny", JS::
ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame::
Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
22154
22155 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
22156 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
22157 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
22158 if (objIsXray) {
22159 unwrappedObj.emplace(cx, obj);
22160 }
22161 Optional<Nullable<Sequence<Nullable<Sequence<JS::Value>>>>> arg0;
22162 Maybe<SequenceRooter<Nullable<Sequence<JS::Value>>>> arg0_holder;
22163 if (args.hasDefined(0)) {
22164 arg0.Construct();
22165 arg0_holder.emplace(cx, &arg0.Value().SetValue());
22166 if (args[0].isObject()) {
22167 JS::ForOfIterator iter(cx);
22168 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
22169 return false;
22170 }
22171 if (!iter.valueIsIterable()) {
22172 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
22173 return false;
22174 }
22175 Sequence<Nullable<Sequence<JS::Value>>> &arr = arg0.Value().SetValue();
22176 JS::Rooted<JS::Value> temp(cx);
22177 while (true) {
22178 bool done;
22179 if (!iter.next(&temp, &done)) {
22180 return false;
22181 }
22182 if (done) {
22183 break;
22184 }
22185 Nullable<Sequence<JS::Value>>* slotPtr = arr.AppendElement(mozilla::fallible);
22186 if (!slotPtr) {
22187 JS_ReportOutOfMemory(cx);
22188 return false;
22189 }
22190 Nullable<Sequence<JS::Value>>& slot = *slotPtr;
22191 if (temp.isObject()) {
22192 JS::ForOfIterator iter1(cx);
22193 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
22194 return false;
22195 }
22196 if (!iter1.valueIsIterable()) {
22197 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
22198 return false;
22199 }
22200 Sequence<JS::Value> &arr1 = slot.SetValue();
22201 JS::Rooted<JS::Value> temp1(cx);
22202 while (true) {
22203 bool done1;
22204 if (!iter1.next(&temp1, &done1)) {
22205 return false;
22206 }
22207 if (done1) {
22208 break;
22209 }
22210 JS::Value* slotPtr1 = arr1.AppendElement(mozilla::fallible);
22211 if (!slotPtr1) {
22212 JS_ReportOutOfMemory(cx);
22213 return false;
22214 }
22215 JS::Value& slot1 = *slotPtr1;
22216#ifdef __clang__1
22217#pragma clang diagnostic push
22218#pragma clang diagnostic ignored "-Wunreachable-code"
22219#pragma clang diagnostic ignored "-Wunreachable-code-return"
22220#endif // __clang__
22221 if ((true) && !CallerSubsumes(temp1)) {
22222 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of element of argument 1");
22223 return false;
22224 }
22225#ifdef __clang__1
22226#pragma clang diagnostic pop
22227#endif // __clang__
22228 slot1 = temp1;
22229 }
22230 } else if (temp.isNullOrUndefined()) {
22231 slot.SetNull();
22232 } else {
22233 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
22234 return false;
22235 }
22236 }
22237 } else if (args[0].isNullOrUndefined()) {
22238 arg0.Value().SetNull();
22239 } else {
22240 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
22241 return false;
22242 }
22243 }
22244 if (objIsXray) {
22245 // Since our object is an Xray, we can just CheckedUnwrapStatic:
22246 // we know Xrays have no dynamic unwrap behavior.
22247 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
22248 if (!unwrappedObj.ref()) {
22249 return false;
22250 }
22251 }
22252 FastErrorResult rv;
22253 // NOTE: This assert does NOT call the function.
22254 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
22255 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
22256 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceOfNullableSequenceOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceOfNullableSequenceOfAny"
)), 0))
) {
22257 return false;
22258 }
22259 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 22259); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22259; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22260 args.rval().setUndefined();
22261 return true;
22262}
22263
22264static const JSJitInfo passOptionalNullableSequenceOfNullableSequenceOfAny_methodinfo = {
22265 { (JSJitGetterOp)passOptionalNullableSequenceOfNullableSequenceOfAny },
22266 { prototypes::id::TestJSImplInterface },
22267 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
22268 JSJitInfo::Method,
22269 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22270 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22271 false, /* isInfallible. False in setters. */
22272 false, /* isMovable. Not relevant for setters. */
22273 false, /* isEliminatable. Not relevant for setters. */
22274 false, /* isAlwaysInSlot. Only relevant for getters. */
22275 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22276 false, /* isTypedMethod. Only relevant for methods. */
22277 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22278};
22279
22280MOZ_CAN_RUN_SCRIPT static bool
22281passRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22282{
22283 BindingCallContext cx(cx_, "TestJSImplInterface.passRecordOfAny");
22284 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22287( cx, "TestJSImplInterface"
, "passRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22285 "TestJSImplInterface", "passRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22287( cx, "TestJSImplInterface"
, "passRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22286 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22287( cx, "TestJSImplInterface"
, "passRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22287 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22287( cx, "TestJSImplInterface"
, "passRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22288
22289 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
22290 if (!args.requireAtLeast(cx, "TestJSImplInterface.passRecordOfAny", 1)) {
22291 return false;
22292 }
22293 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
22294 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
22295 if (objIsXray) {
22296 unwrappedObj.emplace(cx, obj);
22297 }
22298 Record<nsString, JS::Value> arg0;
22299 RecordRooter<nsString, JS::Value> arg0_holder(cx, &arg0);
22300 if (args[0].isObject()) {
22301 auto& recordEntries = arg0.Entries();
22302
22303 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
22304 JS::RootedVector<jsid> ids(cx);
22305 if (!js::GetPropertyKeys(cx, recordObj,
22306 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
22307 return false;
22308 }
22309 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
22310 JS_ReportOutOfMemory(cx);
22311 return false;
22312 }
22313 JS::Rooted<JS::Value> propNameValue(cx);
22314 JS::Rooted<JS::Value> temp(cx);
22315 JS::Rooted<jsid> curId(cx);
22316 JS::Rooted<JS::Value> idVal(cx);
22317 // Use a hashset to keep track of ids seen, to avoid
22318 // introducing nasty O(N^2) behavior scanning for them all the
22319 // time. Ideally we'd use a data structure with O(1) lookup
22320 // _and_ ordering for the MozMap, but we don't have one lying
22321 // around.
22322 nsTHashtable<nsStringHashKey> idsSeen;
22323 for (size_t i = 0; i < ids.length(); ++i) {
22324 curId = ids[i];
22325
22326 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
22327 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
22328 &desc)) {
22329 return false;
22330 }
22331
22332 if (desc.isNothing() || !desc->enumerable()) {
22333 continue;
22334 }
22335
22336 idVal = js::IdToValue(curId);
22337 nsString propName;
22338 // This will just throw if idVal is a Symbol, like the spec says
22339 // to do.
22340 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
22341 return false;
22342 }
22343
22344 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
22345 return false;
22346 }
22347
22348 Record<nsString, JS::Value>::EntryType* entry;
22349 if (!idsSeen.EnsureInserted(propName)) {
22350 // Find the existing entry.
22351 auto idx = recordEntries.IndexOf(propName);
22352 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 22353); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 22353; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
22353 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 22353); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 22353; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
22354 // Now blow it away to make it look like it was just added
22355 // to the array, because it's not obvious that it's
22356 // safe to write to its already-initialized mValue via our
22357 // normal codegen conversions. For example, the value
22358 // could be a union and this would change its type, but
22359 // codegen assumes we won't do that.
22360 entry = recordEntries.ReconstructElementAt(idx);
22361 } else {
22362 // Safe to do an infallible append here, because we did a
22363 // SetCapacity above to the right capacity.
22364 entry = recordEntries.AppendElement();
22365 }
22366 entry->mKey = propName;
22367 JS::Value& slot = entry->mValue;
22368#ifdef __clang__1
22369#pragma clang diagnostic push
22370#pragma clang diagnostic ignored "-Wunreachable-code"
22371#pragma clang diagnostic ignored "-Wunreachable-code-return"
22372#endif // __clang__
22373 if ((true) && !CallerSubsumes(temp)) {
22374 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("value in argument 1");
22375 return false;
22376 }
22377#ifdef __clang__1
22378#pragma clang diagnostic pop
22379#endif // __clang__
22380 slot = temp;
22381 }
22382 } else {
22383 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
22384 return false;
22385 }
22386 if (objIsXray) {
22387 // Since our object is an Xray, we can just CheckedUnwrapStatic:
22388 // we know Xrays have no dynamic unwrap behavior.
22389 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
22390 if (!unwrappedObj.ref()) {
22391 return false;
22392 }
22393 }
22394 FastErrorResult rv;
22395 // NOTE: This assert does NOT call the function.
22396 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
22397 MOZ_KnownLive(self)(self)->PassRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
22398 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfAny"
)), 0))
) {
22399 return false;
22400 }
22401 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 22401); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22401; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22402 args.rval().setUndefined();
22403 return true;
22404}
22405
22406static const JSJitInfo passRecordOfAny_methodinfo = {
22407 { (JSJitGetterOp)passRecordOfAny },
22408 { prototypes::id::TestJSImplInterface },
22409 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
22410 JSJitInfo::Method,
22411 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22412 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22413 false, /* isInfallible. False in setters. */
22414 false, /* isMovable. Not relevant for setters. */
22415 false, /* isEliminatable. Not relevant for setters. */
22416 false, /* isAlwaysInSlot. Only relevant for getters. */
22417 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22418 false, /* isTypedMethod. Only relevant for methods. */
22419 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22420};
22421
22422MOZ_CAN_RUN_SCRIPT static bool
22423passNullableRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22424{
22425 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableRecordOfAny");
22426 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22429( cx, "TestJSImplInterface"
, "passNullableRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22427 "TestJSImplInterface", "passNullableRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22429( cx, "TestJSImplInterface"
, "passNullableRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22428 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22429( cx, "TestJSImplInterface"
, "passNullableRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22429 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22429( cx, "TestJSImplInterface"
, "passNullableRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22430
22431 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
22432 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableRecordOfAny", 1)) {
22433 return false;
22434 }
22435 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
22436 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
22437 if (objIsXray) {
22438 unwrappedObj.emplace(cx, obj);
22439 }
22440 Nullable<Record<nsString, JS::Value>> arg0;
22441 RecordRooter<nsString, JS::Value> arg0_holder(cx, &arg0.SetValue());
22442 if (args[0].isObject()) {
22443 auto& recordEntries = arg0.SetValue().Entries();
22444
22445 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
22446 JS::RootedVector<jsid> ids(cx);
22447 if (!js::GetPropertyKeys(cx, recordObj,
22448 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
22449 return false;
22450 }
22451 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
22452 JS_ReportOutOfMemory(cx);
22453 return false;
22454 }
22455 JS::Rooted<JS::Value> propNameValue(cx);
22456 JS::Rooted<JS::Value> temp(cx);
22457 JS::Rooted<jsid> curId(cx);
22458 JS::Rooted<JS::Value> idVal(cx);
22459 // Use a hashset to keep track of ids seen, to avoid
22460 // introducing nasty O(N^2) behavior scanning for them all the
22461 // time. Ideally we'd use a data structure with O(1) lookup
22462 // _and_ ordering for the MozMap, but we don't have one lying
22463 // around.
22464 nsTHashtable<nsStringHashKey> idsSeen;
22465 for (size_t i = 0; i < ids.length(); ++i) {
22466 curId = ids[i];
22467
22468 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
22469 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
22470 &desc)) {
22471 return false;
22472 }
22473
22474 if (desc.isNothing() || !desc->enumerable()) {
22475 continue;
22476 }
22477
22478 idVal = js::IdToValue(curId);
22479 nsString propName;
22480 // This will just throw if idVal is a Symbol, like the spec says
22481 // to do.
22482 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
22483 return false;
22484 }
22485
22486 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
22487 return false;
22488 }
22489
22490 Record<nsString, JS::Value>::EntryType* entry;
22491 if (!idsSeen.EnsureInserted(propName)) {
22492 // Find the existing entry.
22493 auto idx = recordEntries.IndexOf(propName);
22494 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 22495); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 22495; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
22495 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 22495); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 22495; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
22496 // Now blow it away to make it look like it was just added
22497 // to the array, because it's not obvious that it's
22498 // safe to write to its already-initialized mValue via our
22499 // normal codegen conversions. For example, the value
22500 // could be a union and this would change its type, but
22501 // codegen assumes we won't do that.
22502 entry = recordEntries.ReconstructElementAt(idx);
22503 } else {
22504 // Safe to do an infallible append here, because we did a
22505 // SetCapacity above to the right capacity.
22506 entry = recordEntries.AppendElement();
22507 }
22508 entry->mKey = propName;
22509 JS::Value& slot = entry->mValue;
22510#ifdef __clang__1
22511#pragma clang diagnostic push
22512#pragma clang diagnostic ignored "-Wunreachable-code"
22513#pragma clang diagnostic ignored "-Wunreachable-code-return"
22514#endif // __clang__
22515 if ((true) && !CallerSubsumes(temp)) {
22516 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("value in argument 1");
22517 return false;
22518 }
22519#ifdef __clang__1
22520#pragma clang diagnostic pop
22521#endif // __clang__
22522 slot = temp;
22523 }
22524 } else if (args[0].isNullOrUndefined()) {
22525 arg0.SetNull();
22526 } else {
22527 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
22528 return false;
22529 }
22530 if (objIsXray) {
22531 // Since our object is an Xray, we can just CheckedUnwrapStatic:
22532 // we know Xrays have no dynamic unwrap behavior.
22533 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
22534 if (!unwrappedObj.ref()) {
22535 return false;
22536 }
22537 }
22538 FastErrorResult rv;
22539 // NOTE: This assert does NOT call the function.
22540 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
22541 MOZ_KnownLive(self)(self)->PassNullableRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
22542 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableRecordOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableRecordOfAny"
)), 0))
) {
22543 return false;
22544 }
22545 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 22545); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22545; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22546 args.rval().setUndefined();
22547 return true;
22548}
22549
22550static const JSJitInfo passNullableRecordOfAny_methodinfo = {
22551 { (JSJitGetterOp)passNullableRecordOfAny },
22552 { prototypes::id::TestJSImplInterface },
22553 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
22554 JSJitInfo::Method,
22555 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22556 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22557 false, /* isInfallible. False in setters. */
22558 false, /* isMovable. Not relevant for setters. */
22559 false, /* isEliminatable. Not relevant for setters. */
22560 false, /* isAlwaysInSlot. Only relevant for getters. */
22561 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22562 false, /* isTypedMethod. Only relevant for methods. */
22563 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22564};
22565
22566MOZ_CAN_RUN_SCRIPT static bool
22567passOptionalRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22568{
22569 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalRecordOfAny");
22570 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22573( cx, "TestJSImplInterface"
, "passOptionalRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22571 "TestJSImplInterface", "passOptionalRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22573( cx, "TestJSImplInterface"
, "passOptionalRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22572 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22573( cx, "TestJSImplInterface"
, "passOptionalRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
22573 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22573( cx, "TestJSImplInterface"
, "passOptionalRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
22574
22575 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
22576 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
22577 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
22578 if (objIsXray) {
22579 unwrappedObj.emplace(cx, obj);
22580 }
22581 Optional<Record<nsString, JS::Value>> arg0;
22582 Maybe<RecordRooter<nsString, JS::Value>> arg0_holder;
22583 if (args.hasDefined(0)) {
22584 arg0.Construct();
22585 arg0_holder.emplace(cx, &arg0.Value());
22586 if (args[0].isObject()) {
22587 auto& recordEntries = arg0.Value().Entries();
22588
22589 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
22590 JS::RootedVector<jsid> ids(cx);
22591 if (!js::GetPropertyKeys(cx, recordObj,
22592 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
22593 return false;
22594 }
22595 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
22596 JS_ReportOutOfMemory(cx);
22597 return false;
22598 }
22599 JS::Rooted<JS::Value> propNameValue(cx);
22600 JS::Rooted<JS::Value> temp(cx);
22601 JS::Rooted<jsid> curId(cx);
22602 JS::Rooted<JS::Value> idVal(cx);
22603 // Use a hashset to keep track of ids seen, to avoid
22604 // introducing nasty O(N^2) behavior scanning for them all the
22605 // time. Ideally we'd use a data structure with O(1) lookup
22606 // _and_ ordering for the MozMap, but we don't have one lying
22607 // around.
22608 nsTHashtable<nsStringHashKey> idsSeen;
22609 for (size_t i = 0; i < ids.length(); ++i) {
22610 curId = ids[i];
22611
22612 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
22613 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
22614 &desc)) {
22615 return false;
22616 }
22617
22618 if (desc.isNothing() || !desc->enumerable()) {
22619 continue;
22620 }
22621
22622 idVal = js::IdToValue(curId);
22623 nsString propName;
22624 // This will just throw if idVal is a Symbol, like the spec says
22625 // to do.
22626 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
22627 return false;
22628 }
22629
22630 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
22631 return false;
22632 }
22633
22634 Record<nsString, JS::Value>::EntryType* entry;
22635 if (!idsSeen.EnsureInserted(propName)) {
22636 // Find the existing entry.
22637 auto idx = recordEntries.IndexOf(propName);
22638 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 22639); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 22639; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
22639 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 22639); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 22639; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
22640 // Now blow it away to make it look like it was just added
22641 // to the array, because it's not obvious that it's
22642 // safe to write to its already-initialized mValue via our
22643 // normal codegen conversions. For example, the value
22644 // could be a union and this would change its type, but
22645 // codegen assumes we won't do that.
22646 entry = recordEntries.ReconstructElementAt(idx);
22647 } else {
22648 // Safe to do an infallible append here, because we did a
22649 // SetCapacity above to the right capacity.
22650 entry = recordEntries.AppendElement();
22651 }
22652 entry->mKey = propName;
22653 JS::Value& slot = entry->mValue;
22654#ifdef __clang__1
22655#pragma clang diagnostic push
22656#pragma clang diagnostic ignored "-Wunreachable-code"
22657#pragma clang diagnostic ignored "-Wunreachable-code-return"
22658#endif // __clang__
22659 if ((true) && !CallerSubsumes(temp)) {
22660 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("value in argument 1");
22661 return false;
22662 }
22663#ifdef __clang__1
22664#pragma clang diagnostic pop
22665#endif // __clang__
22666 slot = temp;
22667 }
22668 } else {
22669 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
22670 return false;
22671 }
22672 }
22673 if (objIsXray) {
22674 // Since our object is an Xray, we can just CheckedUnwrapStatic:
22675 // we know Xrays have no dynamic unwrap behavior.
22676 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
22677 if (!unwrappedObj.ref()) {
22678 return false;
22679 }
22680 }
22681 FastErrorResult rv;
22682 // NOTE: This assert does NOT call the function.
22683 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
22684 MOZ_KnownLive(self)(self)->PassOptionalRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
22685 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalRecordOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalRecordOfAny"
)), 0))
) {
22686 return false;
22687 }
22688 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 22688); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22688; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22689 args.rval().setUndefined();
22690 return true;
22691}
22692
22693static const JSJitInfo passOptionalRecordOfAny_methodinfo = {
22694 { (JSJitGetterOp)passOptionalRecordOfAny },
22695 { prototypes::id::TestJSImplInterface },
22696 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
22697 JSJitInfo::Method,
22698 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22699 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22700 false, /* isInfallible. False in setters. */
22701 false, /* isMovable. Not relevant for setters. */
22702 false, /* isEliminatable. Not relevant for setters. */
22703 false, /* isAlwaysInSlot. Only relevant for getters. */
22704 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22705 false, /* isTypedMethod. Only relevant for methods. */
22706 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22707};
22708
22709MOZ_CAN_RUN_SCRIPT static bool
22710passOptionalNullableRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22711{
22712 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableRecordOfAny");
22713 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22716( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
22714 "TestJSImplInterface", "passOptionalNullableRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22716( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
22715 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22716( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
22716 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22716( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
22717
22718 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
22719 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
22720 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
22721 if (objIsXray) {
22722 unwrappedObj.emplace(cx, obj);
22723 }
22724 Optional<Nullable<Record<nsString, JS::Value>>> arg0;
22725 Maybe<RecordRooter<nsString, JS::Value>> arg0_holder;
22726 if (args.hasDefined(0)) {
22727 arg0.Construct();
22728 arg0_holder.emplace(cx, &arg0.Value().SetValue());
22729 if (args[0].isObject()) {
22730 auto& recordEntries = arg0.Value().SetValue().Entries();
22731
22732 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
22733 JS::RootedVector<jsid> ids(cx);
22734 if (!js::GetPropertyKeys(cx, recordObj,
22735 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
22736 return false;
22737 }
22738 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
22739 JS_ReportOutOfMemory(cx);
22740 return false;
22741 }
22742 JS::Rooted<JS::Value> propNameValue(cx);
22743 JS::Rooted<JS::Value> temp(cx);
22744 JS::Rooted<jsid> curId(cx);
22745 JS::Rooted<JS::Value> idVal(cx);
22746 // Use a hashset to keep track of ids seen, to avoid
22747 // introducing nasty O(N^2) behavior scanning for them all the
22748 // time. Ideally we'd use a data structure with O(1) lookup
22749 // _and_ ordering for the MozMap, but we don't have one lying
22750 // around.
22751 nsTHashtable<nsStringHashKey> idsSeen;
22752 for (size_t i = 0; i < ids.length(); ++i) {
22753 curId = ids[i];
22754
22755 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
22756 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
22757 &desc)) {
22758 return false;
22759 }
22760
22761 if (desc.isNothing() || !desc->enumerable()) {
22762 continue;
22763 }
22764
22765 idVal = js::IdToValue(curId);
22766 nsString propName;
22767 // This will just throw if idVal is a Symbol, like the spec says
22768 // to do.
22769 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
22770 return false;
22771 }
22772
22773 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
22774 return false;
22775 }
22776
22777 Record<nsString, JS::Value>::EntryType* entry;
22778 if (!idsSeen.EnsureInserted(propName)) {
22779 // Find the existing entry.
22780 auto idx = recordEntries.IndexOf(propName);
22781 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 22782); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 22782; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
22782 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 22782); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 22782; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
22783 // Now blow it away to make it look like it was just added
22784 // to the array, because it's not obvious that it's
22785 // safe to write to its already-initialized mValue via our
22786 // normal codegen conversions. For example, the value
22787 // could be a union and this would change its type, but
22788 // codegen assumes we won't do that.
22789 entry = recordEntries.ReconstructElementAt(idx);
22790 } else {
22791 // Safe to do an infallible append here, because we did a
22792 // SetCapacity above to the right capacity.
22793 entry = recordEntries.AppendElement();
22794 }
22795 entry->mKey = propName;
22796 JS::Value& slot = entry->mValue;
22797#ifdef __clang__1
22798#pragma clang diagnostic push
22799#pragma clang diagnostic ignored "-Wunreachable-code"
22800#pragma clang diagnostic ignored "-Wunreachable-code-return"
22801#endif // __clang__
22802 if ((true) && !CallerSubsumes(temp)) {
22803 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("value in argument 1");
22804 return false;
22805 }
22806#ifdef __clang__1
22807#pragma clang diagnostic pop
22808#endif // __clang__
22809 slot = temp;
22810 }
22811 } else if (args[0].isNullOrUndefined()) {
22812 arg0.Value().SetNull();
22813 } else {
22814 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
22815 return false;
22816 }
22817 }
22818 if (objIsXray) {
22819 // Since our object is an Xray, we can just CheckedUnwrapStatic:
22820 // we know Xrays have no dynamic unwrap behavior.
22821 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
22822 if (!unwrappedObj.ref()) {
22823 return false;
22824 }
22825 }
22826 FastErrorResult rv;
22827 // NOTE: This assert does NOT call the function.
22828 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
22829 MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
22830 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableRecordOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableRecordOfAny"
)), 0))
) {
22831 return false;
22832 }
22833 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 22833); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22833; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22834 args.rval().setUndefined();
22835 return true;
22836}
22837
22838static const JSJitInfo passOptionalNullableRecordOfAny_methodinfo = {
22839 { (JSJitGetterOp)passOptionalNullableRecordOfAny },
22840 { prototypes::id::TestJSImplInterface },
22841 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
22842 JSJitInfo::Method,
22843 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22844 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22845 false, /* isInfallible. False in setters. */
22846 false, /* isMovable. Not relevant for setters. */
22847 false, /* isEliminatable. Not relevant for setters. */
22848 false, /* isAlwaysInSlot. Only relevant for getters. */
22849 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22850 false, /* isTypedMethod. Only relevant for methods. */
22851 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22852};
22853
22854MOZ_CAN_RUN_SCRIPT static bool
22855passOptionalRecordOfAnyWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
22856{
22857 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalRecordOfAnyWithDefaultValue");
22858 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject22861( cx, "TestJSImplInterface"
, "passOptionalRecordOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
22859 "TestJSImplInterface", "passOptionalRecordOfAnyWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject22861( cx, "TestJSImplInterface"
, "passOptionalRecordOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
22860 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject22861( cx, "TestJSImplInterface"
, "passOptionalRecordOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
22861 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject22861( cx, "TestJSImplInterface"
, "passOptionalRecordOfAnyWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
22862
22863 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
22864 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
22865 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
22866 if (objIsXray) {
22867 unwrappedObj.emplace(cx, obj);
22868 }
22869 Nullable<Record<nsString, JS::Value>> arg0;
22870 RecordRooter<nsString, JS::Value> arg0_holder(cx, &arg0.SetValue());
22871 if (args.hasDefined(0)) {
22872 if (args[0].isObject()) {
22873 auto& recordEntries = arg0.SetValue().Entries();
22874
22875 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
22876 JS::RootedVector<jsid> ids(cx);
22877 if (!js::GetPropertyKeys(cx, recordObj,
22878 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
22879 return false;
22880 }
22881 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
22882 JS_ReportOutOfMemory(cx);
22883 return false;
22884 }
22885 JS::Rooted<JS::Value> propNameValue(cx);
22886 JS::Rooted<JS::Value> temp(cx);
22887 JS::Rooted<jsid> curId(cx);
22888 JS::Rooted<JS::Value> idVal(cx);
22889 // Use a hashset to keep track of ids seen, to avoid
22890 // introducing nasty O(N^2) behavior scanning for them all the
22891 // time. Ideally we'd use a data structure with O(1) lookup
22892 // _and_ ordering for the MozMap, but we don't have one lying
22893 // around.
22894 nsTHashtable<nsStringHashKey> idsSeen;
22895 for (size_t i = 0; i < ids.length(); ++i) {
22896 curId = ids[i];
22897
22898 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
22899 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
22900 &desc)) {
22901 return false;
22902 }
22903
22904 if (desc.isNothing() || !desc->enumerable()) {
22905 continue;
22906 }
22907
22908 idVal = js::IdToValue(curId);
22909 nsString propName;
22910 // This will just throw if idVal is a Symbol, like the spec says
22911 // to do.
22912 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
22913 return false;
22914 }
22915
22916 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
22917 return false;
22918 }
22919
22920 Record<nsString, JS::Value>::EntryType* entry;
22921 if (!idsSeen.EnsureInserted(propName)) {
22922 // Find the existing entry.
22923 auto idx = recordEntries.IndexOf(propName);
22924 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 22925); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 22925; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
22925 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 22925); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 22925; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
22926 // Now blow it away to make it look like it was just added
22927 // to the array, because it's not obvious that it's
22928 // safe to write to its already-initialized mValue via our
22929 // normal codegen conversions. For example, the value
22930 // could be a union and this would change its type, but
22931 // codegen assumes we won't do that.
22932 entry = recordEntries.ReconstructElementAt(idx);
22933 } else {
22934 // Safe to do an infallible append here, because we did a
22935 // SetCapacity above to the right capacity.
22936 entry = recordEntries.AppendElement();
22937 }
22938 entry->mKey = propName;
22939 JS::Value& slot = entry->mValue;
22940#ifdef __clang__1
22941#pragma clang diagnostic push
22942#pragma clang diagnostic ignored "-Wunreachable-code"
22943#pragma clang diagnostic ignored "-Wunreachable-code-return"
22944#endif // __clang__
22945 if ((true) && !CallerSubsumes(temp)) {
22946 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("value in argument 1");
22947 return false;
22948 }
22949#ifdef __clang__1
22950#pragma clang diagnostic pop
22951#endif // __clang__
22952 slot = temp;
22953 }
22954 } else if (args[0].isNullOrUndefined()) {
22955 arg0.SetNull();
22956 } else {
22957 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
22958 return false;
22959 }
22960 } else {
22961 arg0.SetNull();
22962 }
22963 if (objIsXray) {
22964 // Since our object is an Xray, we can just CheckedUnwrapStatic:
22965 // we know Xrays have no dynamic unwrap behavior.
22966 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
22967 if (!unwrappedObj.ref()) {
22968 return false;
22969 }
22970 }
22971 FastErrorResult rv;
22972 // NOTE: This assert does NOT call the function.
22973 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalRecordOfAnyWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
22974 MOZ_KnownLive(self)(self)->PassOptionalRecordOfAnyWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
22975 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalRecordOfAnyWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalRecordOfAnyWithDefaultValue"
)), 0))
) {
22976 return false;
22977 }
22978 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 22978); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 22978; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
22979 args.rval().setUndefined();
22980 return true;
22981}
22982
22983static const JSJitInfo passOptionalRecordOfAnyWithDefaultValue_methodinfo = {
22984 { (JSJitGetterOp)passOptionalRecordOfAnyWithDefaultValue },
22985 { prototypes::id::TestJSImplInterface },
22986 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
22987 JSJitInfo::Method,
22988 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
22989 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
22990 false, /* isInfallible. False in setters. */
22991 false, /* isMovable. Not relevant for setters. */
22992 false, /* isEliminatable. Not relevant for setters. */
22993 false, /* isAlwaysInSlot. Only relevant for getters. */
22994 false, /* isLazilyCachedInSlot. Only relevant for getters. */
22995 false, /* isTypedMethod. Only relevant for methods. */
22996 0 /* Reserved slot index, if we're stored in a slot, else 0. */
22997};
22998
22999MOZ_CAN_RUN_SCRIPT static bool
23000passRecordOfRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23001{
23002 BindingCallContext cx(cx_, "TestJSImplInterface.passRecordOfRecordOfAny");
23003 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23006( cx, "TestJSImplInterface"
, "passRecordOfRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23004 "TestJSImplInterface", "passRecordOfRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23006( cx, "TestJSImplInterface"
, "passRecordOfRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23005 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23006( cx, "TestJSImplInterface"
, "passRecordOfRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
23006 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23006( cx, "TestJSImplInterface"
, "passRecordOfRecordOfAny", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
23007
23008 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
23009 if (!args.requireAtLeast(cx, "TestJSImplInterface.passRecordOfRecordOfAny", 1)) {
23010 return false;
23011 }
23012 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
23013 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
23014 if (objIsXray) {
23015 unwrappedObj.emplace(cx, obj);
23016 }
23017 Record<nsString, Record<nsString, JS::Value>> arg0;
23018 RecordRooter<nsString, Record<nsString, JS::Value>> arg0_holder(cx, &arg0);
23019 if (args[0].isObject()) {
23020 auto& recordEntries = arg0.Entries();
23021
23022 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
23023 JS::RootedVector<jsid> ids(cx);
23024 if (!js::GetPropertyKeys(cx, recordObj,
23025 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
23026 return false;
23027 }
23028 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
23029 JS_ReportOutOfMemory(cx);
23030 return false;
23031 }
23032 JS::Rooted<JS::Value> propNameValue(cx);
23033 JS::Rooted<JS::Value> temp(cx);
23034 JS::Rooted<jsid> curId(cx);
23035 JS::Rooted<JS::Value> idVal(cx);
23036 // Use a hashset to keep track of ids seen, to avoid
23037 // introducing nasty O(N^2) behavior scanning for them all the
23038 // time. Ideally we'd use a data structure with O(1) lookup
23039 // _and_ ordering for the MozMap, but we don't have one lying
23040 // around.
23041 nsTHashtable<nsStringHashKey> idsSeen;
23042 for (size_t i = 0; i < ids.length(); ++i) {
23043 curId = ids[i];
23044
23045 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
23046 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
23047 &desc)) {
23048 return false;
23049 }
23050
23051 if (desc.isNothing() || !desc->enumerable()) {
23052 continue;
23053 }
23054
23055 idVal = js::IdToValue(curId);
23056 nsString propName;
23057 // This will just throw if idVal is a Symbol, like the spec says
23058 // to do.
23059 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
23060 return false;
23061 }
23062
23063 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
23064 return false;
23065 }
23066
23067 Record<nsString, Record<nsString, JS::Value>>::EntryType* entry;
23068 if (!idsSeen.EnsureInserted(propName)) {
23069 // Find the existing entry.
23070 auto idx = recordEntries.IndexOf(propName);
23071 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23072); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23072; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
23072 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23072); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23072; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
23073 // Now blow it away to make it look like it was just added
23074 // to the array, because it's not obvious that it's
23075 // safe to write to its already-initialized mValue via our
23076 // normal codegen conversions. For example, the value
23077 // could be a union and this would change its type, but
23078 // codegen assumes we won't do that.
23079 entry = recordEntries.ReconstructElementAt(idx);
23080 } else {
23081 // Safe to do an infallible append here, because we did a
23082 // SetCapacity above to the right capacity.
23083 entry = recordEntries.AppendElement();
23084 }
23085 entry->mKey = propName;
23086 Record<nsString, JS::Value>& slot = entry->mValue;
23087 if (temp.isObject()) {
23088 auto& recordEntries = slot.Entries();
23089
23090 JS::Rooted<JSObject*> recordObj(cx, &temp.toObject());
23091 JS::RootedVector<jsid> ids(cx);
23092 if (!js::GetPropertyKeys(cx, recordObj,
23093 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
23094 return false;
23095 }
23096 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
23097 JS_ReportOutOfMemory(cx);
23098 return false;
23099 }
23100 JS::Rooted<JS::Value> propNameValue(cx);
23101 JS::Rooted<JS::Value> temp(cx);
23102 JS::Rooted<jsid> curId(cx);
23103 JS::Rooted<JS::Value> idVal(cx);
23104 // Use a hashset to keep track of ids seen, to avoid
23105 // introducing nasty O(N^2) behavior scanning for them all the
23106 // time. Ideally we'd use a data structure with O(1) lookup
23107 // _and_ ordering for the MozMap, but we don't have one lying
23108 // around.
23109 nsTHashtable<nsStringHashKey> idsSeen;
23110 for (size_t i = 0; i < ids.length(); ++i) {
23111 curId = ids[i];
23112
23113 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
23114 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
23115 &desc)) {
23116 return false;
23117 }
23118
23119 if (desc.isNothing() || !desc->enumerable()) {
23120 continue;
23121 }
23122
23123 idVal = js::IdToValue(curId);
23124 nsString propName;
23125 // This will just throw if idVal is a Symbol, like the spec says
23126 // to do.
23127 if (!ConvertJSValueToString(cx, idVal, "key of value in argument 1", propName)) {
23128 return false;
23129 }
23130
23131 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
23132 return false;
23133 }
23134
23135 Record<nsString, JS::Value>::EntryType* entry;
23136 if (!idsSeen.EnsureInserted(propName)) {
23137 // Find the existing entry.
23138 auto idx = recordEntries.IndexOf(propName);
23139 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23140); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23140; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
23140 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23140); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23140; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
23141 // Now blow it away to make it look like it was just added
23142 // to the array, because it's not obvious that it's
23143 // safe to write to its already-initialized mValue via our
23144 // normal codegen conversions. For example, the value
23145 // could be a union and this would change its type, but
23146 // codegen assumes we won't do that.
23147 entry = recordEntries.ReconstructElementAt(idx);
23148 } else {
23149 // Safe to do an infallible append here, because we did a
23150 // SetCapacity above to the right capacity.
23151 entry = recordEntries.AppendElement();
23152 }
23153 entry->mKey = propName;
23154 JS::Value& slot = entry->mValue;
23155#ifdef __clang__1
23156#pragma clang diagnostic push
23157#pragma clang diagnostic ignored "-Wunreachable-code"
23158#pragma clang diagnostic ignored "-Wunreachable-code-return"
23159#endif // __clang__
23160 if ((true) && !CallerSubsumes(temp)) {
23161 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("value in value in argument 1");
23162 return false;
23163 }
23164#ifdef __clang__1
23165#pragma clang diagnostic pop
23166#endif // __clang__
23167 slot = temp;
23168 }
23169 } else {
23170 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
23171 return false;
23172 }
23173 }
23174 } else {
23175 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
23176 return false;
23177 }
23178 if (objIsXray) {
23179 // Since our object is an Xray, we can just CheckedUnwrapStatic:
23180 // we know Xrays have no dynamic unwrap behavior.
23181 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
23182 if (!unwrappedObj.ref()) {
23183 return false;
23184 }
23185 }
23186 FastErrorResult rv;
23187 // NOTE: This assert does NOT call the function.
23188 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
23189 MOZ_KnownLive(self)(self)->PassRecordOfRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
23190 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfRecordOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfRecordOfAny"
)), 0))
) {
23191 return false;
23192 }
23193 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 23193); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23193; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23194 args.rval().setUndefined();
23195 return true;
23196}
23197
23198static const JSJitInfo passRecordOfRecordOfAny_methodinfo = {
23199 { (JSJitGetterOp)passRecordOfRecordOfAny },
23200 { prototypes::id::TestJSImplInterface },
23201 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
23202 JSJitInfo::Method,
23203 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23204 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23205 false, /* isInfallible. False in setters. */
23206 false, /* isMovable. Not relevant for setters. */
23207 false, /* isEliminatable. Not relevant for setters. */
23208 false, /* isAlwaysInSlot. Only relevant for getters. */
23209 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23210 false, /* isTypedMethod. Only relevant for methods. */
23211 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23212};
23213
23214MOZ_CAN_RUN_SCRIPT static bool
23215passRecordOfNullableRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23216{
23217 BindingCallContext cx(cx_, "TestJSImplInterface.passRecordOfNullableRecordOfAny");
23218 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23221( cx, "TestJSImplInterface"
, "passRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23219 "TestJSImplInterface", "passRecordOfNullableRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23221( cx, "TestJSImplInterface"
, "passRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23220 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23221( cx, "TestJSImplInterface"
, "passRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23221 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23221( cx, "TestJSImplInterface"
, "passRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
23222
23223 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
23224 if (!args.requireAtLeast(cx, "TestJSImplInterface.passRecordOfNullableRecordOfAny", 1)) {
23225 return false;
23226 }
23227 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
23228 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
23229 if (objIsXray) {
23230 unwrappedObj.emplace(cx, obj);
23231 }
23232 Record<nsString, Nullable<Record<nsString, JS::Value>>> arg0;
23233 RecordRooter<nsString, Nullable<Record<nsString, JS::Value>>> arg0_holder(cx, &arg0);
23234 if (args[0].isObject()) {
23235 auto& recordEntries = arg0.Entries();
23236
23237 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
23238 JS::RootedVector<jsid> ids(cx);
23239 if (!js::GetPropertyKeys(cx, recordObj,
23240 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
23241 return false;
23242 }
23243 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
23244 JS_ReportOutOfMemory(cx);
23245 return false;
23246 }
23247 JS::Rooted<JS::Value> propNameValue(cx);
23248 JS::Rooted<JS::Value> temp(cx);
23249 JS::Rooted<jsid> curId(cx);
23250 JS::Rooted<JS::Value> idVal(cx);
23251 // Use a hashset to keep track of ids seen, to avoid
23252 // introducing nasty O(N^2) behavior scanning for them all the
23253 // time. Ideally we'd use a data structure with O(1) lookup
23254 // _and_ ordering for the MozMap, but we don't have one lying
23255 // around.
23256 nsTHashtable<nsStringHashKey> idsSeen;
23257 for (size_t i = 0; i < ids.length(); ++i) {
23258 curId = ids[i];
23259
23260 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
23261 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
23262 &desc)) {
23263 return false;
23264 }
23265
23266 if (desc.isNothing() || !desc->enumerable()) {
23267 continue;
23268 }
23269
23270 idVal = js::IdToValue(curId);
23271 nsString propName;
23272 // This will just throw if idVal is a Symbol, like the spec says
23273 // to do.
23274 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
23275 return false;
23276 }
23277
23278 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
23279 return false;
23280 }
23281
23282 Record<nsString, Nullable<Record<nsString, JS::Value>>>::EntryType* entry;
23283 if (!idsSeen.EnsureInserted(propName)) {
23284 // Find the existing entry.
23285 auto idx = recordEntries.IndexOf(propName);
23286 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23287); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23287; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
23287 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23287); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23287; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
23288 // Now blow it away to make it look like it was just added
23289 // to the array, because it's not obvious that it's
23290 // safe to write to its already-initialized mValue via our
23291 // normal codegen conversions. For example, the value
23292 // could be a union and this would change its type, but
23293 // codegen assumes we won't do that.
23294 entry = recordEntries.ReconstructElementAt(idx);
23295 } else {
23296 // Safe to do an infallible append here, because we did a
23297 // SetCapacity above to the right capacity.
23298 entry = recordEntries.AppendElement();
23299 }
23300 entry->mKey = propName;
23301 Nullable<Record<nsString, JS::Value>>& slot = entry->mValue;
23302 if (temp.isObject()) {
23303 auto& recordEntries = slot.SetValue().Entries();
23304
23305 JS::Rooted<JSObject*> recordObj(cx, &temp.toObject());
23306 JS::RootedVector<jsid> ids(cx);
23307 if (!js::GetPropertyKeys(cx, recordObj,
23308 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
23309 return false;
23310 }
23311 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
23312 JS_ReportOutOfMemory(cx);
23313 return false;
23314 }
23315 JS::Rooted<JS::Value> propNameValue(cx);
23316 JS::Rooted<JS::Value> temp(cx);
23317 JS::Rooted<jsid> curId(cx);
23318 JS::Rooted<JS::Value> idVal(cx);
23319 // Use a hashset to keep track of ids seen, to avoid
23320 // introducing nasty O(N^2) behavior scanning for them all the
23321 // time. Ideally we'd use a data structure with O(1) lookup
23322 // _and_ ordering for the MozMap, but we don't have one lying
23323 // around.
23324 nsTHashtable<nsStringHashKey> idsSeen;
23325 for (size_t i = 0; i < ids.length(); ++i) {
23326 curId = ids[i];
23327
23328 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
23329 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
23330 &desc)) {
23331 return false;
23332 }
23333
23334 if (desc.isNothing() || !desc->enumerable()) {
23335 continue;
23336 }
23337
23338 idVal = js::IdToValue(curId);
23339 nsString propName;
23340 // This will just throw if idVal is a Symbol, like the spec says
23341 // to do.
23342 if (!ConvertJSValueToString(cx, idVal, "key of value in argument 1", propName)) {
23343 return false;
23344 }
23345
23346 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
23347 return false;
23348 }
23349
23350 Record<nsString, JS::Value>::EntryType* entry;
23351 if (!idsSeen.EnsureInserted(propName)) {
23352 // Find the existing entry.
23353 auto idx = recordEntries.IndexOf(propName);
23354 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23355); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23355; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
23355 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23355); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23355; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
23356 // Now blow it away to make it look like it was just added
23357 // to the array, because it's not obvious that it's
23358 // safe to write to its already-initialized mValue via our
23359 // normal codegen conversions. For example, the value
23360 // could be a union and this would change its type, but
23361 // codegen assumes we won't do that.
23362 entry = recordEntries.ReconstructElementAt(idx);
23363 } else {
23364 // Safe to do an infallible append here, because we did a
23365 // SetCapacity above to the right capacity.
23366 entry = recordEntries.AppendElement();
23367 }
23368 entry->mKey = propName;
23369 JS::Value& slot = entry->mValue;
23370#ifdef __clang__1
23371#pragma clang diagnostic push
23372#pragma clang diagnostic ignored "-Wunreachable-code"
23373#pragma clang diagnostic ignored "-Wunreachable-code-return"
23374#endif // __clang__
23375 if ((true) && !CallerSubsumes(temp)) {
23376 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("value in value in argument 1");
23377 return false;
23378 }
23379#ifdef __clang__1
23380#pragma clang diagnostic pop
23381#endif // __clang__
23382 slot = temp;
23383 }
23384 } else if (temp.isNullOrUndefined()) {
23385 slot.SetNull();
23386 } else {
23387 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
23388 return false;
23389 }
23390 }
23391 } else {
23392 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
23393 return false;
23394 }
23395 if (objIsXray) {
23396 // Since our object is an Xray, we can just CheckedUnwrapStatic:
23397 // we know Xrays have no dynamic unwrap behavior.
23398 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
23399 if (!unwrappedObj.ref()) {
23400 return false;
23401 }
23402 }
23403 FastErrorResult rv;
23404 // NOTE: This assert does NOT call the function.
23405 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfNullableRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
23406 MOZ_KnownLive(self)(self)->PassRecordOfNullableRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
23407 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfNullableRecordOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfNullableRecordOfAny"
)), 0))
) {
23408 return false;
23409 }
23410 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 23410); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23410; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23411 args.rval().setUndefined();
23412 return true;
23413}
23414
23415static const JSJitInfo passRecordOfNullableRecordOfAny_methodinfo = {
23416 { (JSJitGetterOp)passRecordOfNullableRecordOfAny },
23417 { prototypes::id::TestJSImplInterface },
23418 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
23419 JSJitInfo::Method,
23420 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23421 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23422 false, /* isInfallible. False in setters. */
23423 false, /* isMovable. Not relevant for setters. */
23424 false, /* isEliminatable. Not relevant for setters. */
23425 false, /* isAlwaysInSlot. Only relevant for getters. */
23426 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23427 false, /* isTypedMethod. Only relevant for methods. */
23428 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23429};
23430
23431MOZ_CAN_RUN_SCRIPT static bool
23432passNullableRecordOfNullableRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23433{
23434 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableRecordOfNullableRecordOfAny");
23435 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23438( cx, "TestJSImplInterface"
, "passNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23436 "TestJSImplInterface", "passNullableRecordOfNullableRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23438( cx, "TestJSImplInterface"
, "passNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23437 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23438( cx, "TestJSImplInterface"
, "passNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23438 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23438( cx, "TestJSImplInterface"
, "passNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
23439
23440 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
23441 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableRecordOfNullableRecordOfAny", 1)) {
23442 return false;
23443 }
23444 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
23445 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
23446 if (objIsXray) {
23447 unwrappedObj.emplace(cx, obj);
23448 }
23449 Nullable<Record<nsString, Nullable<Record<nsString, JS::Value>>>> arg0;
23450 RecordRooter<nsString, Nullable<Record<nsString, JS::Value>>> arg0_holder(cx, &arg0.SetValue());
23451 if (args[0].isObject()) {
23452 auto& recordEntries = arg0.SetValue().Entries();
23453
23454 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
23455 JS::RootedVector<jsid> ids(cx);
23456 if (!js::GetPropertyKeys(cx, recordObj,
23457 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
23458 return false;
23459 }
23460 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
23461 JS_ReportOutOfMemory(cx);
23462 return false;
23463 }
23464 JS::Rooted<JS::Value> propNameValue(cx);
23465 JS::Rooted<JS::Value> temp(cx);
23466 JS::Rooted<jsid> curId(cx);
23467 JS::Rooted<JS::Value> idVal(cx);
23468 // Use a hashset to keep track of ids seen, to avoid
23469 // introducing nasty O(N^2) behavior scanning for them all the
23470 // time. Ideally we'd use a data structure with O(1) lookup
23471 // _and_ ordering for the MozMap, but we don't have one lying
23472 // around.
23473 nsTHashtable<nsStringHashKey> idsSeen;
23474 for (size_t i = 0; i < ids.length(); ++i) {
23475 curId = ids[i];
23476
23477 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
23478 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
23479 &desc)) {
23480 return false;
23481 }
23482
23483 if (desc.isNothing() || !desc->enumerable()) {
23484 continue;
23485 }
23486
23487 idVal = js::IdToValue(curId);
23488 nsString propName;
23489 // This will just throw if idVal is a Symbol, like the spec says
23490 // to do.
23491 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
23492 return false;
23493 }
23494
23495 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
23496 return false;
23497 }
23498
23499 Record<nsString, Nullable<Record<nsString, JS::Value>>>::EntryType* entry;
23500 if (!idsSeen.EnsureInserted(propName)) {
23501 // Find the existing entry.
23502 auto idx = recordEntries.IndexOf(propName);
23503 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23504); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23504; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
23504 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23504); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23504; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
23505 // Now blow it away to make it look like it was just added
23506 // to the array, because it's not obvious that it's
23507 // safe to write to its already-initialized mValue via our
23508 // normal codegen conversions. For example, the value
23509 // could be a union and this would change its type, but
23510 // codegen assumes we won't do that.
23511 entry = recordEntries.ReconstructElementAt(idx);
23512 } else {
23513 // Safe to do an infallible append here, because we did a
23514 // SetCapacity above to the right capacity.
23515 entry = recordEntries.AppendElement();
23516 }
23517 entry->mKey = propName;
23518 Nullable<Record<nsString, JS::Value>>& slot = entry->mValue;
23519 if (temp.isObject()) {
23520 auto& recordEntries = slot.SetValue().Entries();
23521
23522 JS::Rooted<JSObject*> recordObj(cx, &temp.toObject());
23523 JS::RootedVector<jsid> ids(cx);
23524 if (!js::GetPropertyKeys(cx, recordObj,
23525 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
23526 return false;
23527 }
23528 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
23529 JS_ReportOutOfMemory(cx);
23530 return false;
23531 }
23532 JS::Rooted<JS::Value> propNameValue(cx);
23533 JS::Rooted<JS::Value> temp(cx);
23534 JS::Rooted<jsid> curId(cx);
23535 JS::Rooted<JS::Value> idVal(cx);
23536 // Use a hashset to keep track of ids seen, to avoid
23537 // introducing nasty O(N^2) behavior scanning for them all the
23538 // time. Ideally we'd use a data structure with O(1) lookup
23539 // _and_ ordering for the MozMap, but we don't have one lying
23540 // around.
23541 nsTHashtable<nsStringHashKey> idsSeen;
23542 for (size_t i = 0; i < ids.length(); ++i) {
23543 curId = ids[i];
23544
23545 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
23546 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
23547 &desc)) {
23548 return false;
23549 }
23550
23551 if (desc.isNothing() || !desc->enumerable()) {
23552 continue;
23553 }
23554
23555 idVal = js::IdToValue(curId);
23556 nsString propName;
23557 // This will just throw if idVal is a Symbol, like the spec says
23558 // to do.
23559 if (!ConvertJSValueToString(cx, idVal, "key of value in argument 1", propName)) {
23560 return false;
23561 }
23562
23563 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
23564 return false;
23565 }
23566
23567 Record<nsString, JS::Value>::EntryType* entry;
23568 if (!idsSeen.EnsureInserted(propName)) {
23569 // Find the existing entry.
23570 auto idx = recordEntries.IndexOf(propName);
23571 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23572); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23572; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
23572 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23572); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23572; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
23573 // Now blow it away to make it look like it was just added
23574 // to the array, because it's not obvious that it's
23575 // safe to write to its already-initialized mValue via our
23576 // normal codegen conversions. For example, the value
23577 // could be a union and this would change its type, but
23578 // codegen assumes we won't do that.
23579 entry = recordEntries.ReconstructElementAt(idx);
23580 } else {
23581 // Safe to do an infallible append here, because we did a
23582 // SetCapacity above to the right capacity.
23583 entry = recordEntries.AppendElement();
23584 }
23585 entry->mKey = propName;
23586 JS::Value& slot = entry->mValue;
23587#ifdef __clang__1
23588#pragma clang diagnostic push
23589#pragma clang diagnostic ignored "-Wunreachable-code"
23590#pragma clang diagnostic ignored "-Wunreachable-code-return"
23591#endif // __clang__
23592 if ((true) && !CallerSubsumes(temp)) {
23593 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("value in value in argument 1");
23594 return false;
23595 }
23596#ifdef __clang__1
23597#pragma clang diagnostic pop
23598#endif // __clang__
23599 slot = temp;
23600 }
23601 } else if (temp.isNullOrUndefined()) {
23602 slot.SetNull();
23603 } else {
23604 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
23605 return false;
23606 }
23607 }
23608 } else if (args[0].isNullOrUndefined()) {
23609 arg0.SetNull();
23610 } else {
23611 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
23612 return false;
23613 }
23614 if (objIsXray) {
23615 // Since our object is an Xray, we can just CheckedUnwrapStatic:
23616 // we know Xrays have no dynamic unwrap behavior.
23617 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
23618 if (!unwrappedObj.ref()) {
23619 return false;
23620 }
23621 }
23622 FastErrorResult rv;
23623 // NOTE: This assert does NOT call the function.
23624 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableRecordOfNullableRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
23625 MOZ_KnownLive(self)(self)->PassNullableRecordOfNullableRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
23626 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableRecordOfNullableRecordOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableRecordOfNullableRecordOfAny"
)), 0))
) {
23627 return false;
23628 }
23629 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 23629); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23629; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23630 args.rval().setUndefined();
23631 return true;
23632}
23633
23634static const JSJitInfo passNullableRecordOfNullableRecordOfAny_methodinfo = {
23635 { (JSJitGetterOp)passNullableRecordOfNullableRecordOfAny },
23636 { prototypes::id::TestJSImplInterface },
23637 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
23638 JSJitInfo::Method,
23639 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23640 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23641 false, /* isInfallible. False in setters. */
23642 false, /* isMovable. Not relevant for setters. */
23643 false, /* isEliminatable. Not relevant for setters. */
23644 false, /* isAlwaysInSlot. Only relevant for getters. */
23645 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23646 false, /* isTypedMethod. Only relevant for methods. */
23647 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23648};
23649
23650MOZ_CAN_RUN_SCRIPT static bool
23651passOptionalNullableRecordOfNullableRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23652{
23653 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableRecordOfNullableRecordOfAny");
23654 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23657( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23655 "TestJSImplInterface", "passOptionalNullableRecordOfNullableRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23657( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23656 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23657( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23657 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23657( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
23658
23659 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
23660 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
23661 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
23662 if (objIsXray) {
23663 unwrappedObj.emplace(cx, obj);
23664 }
23665 Optional<Nullable<Record<nsString, Nullable<Record<nsString, JS::Value>>>>> arg0;
23666 Maybe<RecordRooter<nsString, Nullable<Record<nsString, JS::Value>>>> arg0_holder;
23667 if (args.hasDefined(0)) {
23668 arg0.Construct();
23669 arg0_holder.emplace(cx, &arg0.Value().SetValue());
23670 if (args[0].isObject()) {
23671 auto& recordEntries = arg0.Value().SetValue().Entries();
23672
23673 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
23674 JS::RootedVector<jsid> ids(cx);
23675 if (!js::GetPropertyKeys(cx, recordObj,
23676 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
23677 return false;
23678 }
23679 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
23680 JS_ReportOutOfMemory(cx);
23681 return false;
23682 }
23683 JS::Rooted<JS::Value> propNameValue(cx);
23684 JS::Rooted<JS::Value> temp(cx);
23685 JS::Rooted<jsid> curId(cx);
23686 JS::Rooted<JS::Value> idVal(cx);
23687 // Use a hashset to keep track of ids seen, to avoid
23688 // introducing nasty O(N^2) behavior scanning for them all the
23689 // time. Ideally we'd use a data structure with O(1) lookup
23690 // _and_ ordering for the MozMap, but we don't have one lying
23691 // around.
23692 nsTHashtable<nsStringHashKey> idsSeen;
23693 for (size_t i = 0; i < ids.length(); ++i) {
23694 curId = ids[i];
23695
23696 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
23697 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
23698 &desc)) {
23699 return false;
23700 }
23701
23702 if (desc.isNothing() || !desc->enumerable()) {
23703 continue;
23704 }
23705
23706 idVal = js::IdToValue(curId);
23707 nsString propName;
23708 // This will just throw if idVal is a Symbol, like the spec says
23709 // to do.
23710 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
23711 return false;
23712 }
23713
23714 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
23715 return false;
23716 }
23717
23718 Record<nsString, Nullable<Record<nsString, JS::Value>>>::EntryType* entry;
23719 if (!idsSeen.EnsureInserted(propName)) {
23720 // Find the existing entry.
23721 auto idx = recordEntries.IndexOf(propName);
23722 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23723); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23723; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
23723 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23723); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23723; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
23724 // Now blow it away to make it look like it was just added
23725 // to the array, because it's not obvious that it's
23726 // safe to write to its already-initialized mValue via our
23727 // normal codegen conversions. For example, the value
23728 // could be a union and this would change its type, but
23729 // codegen assumes we won't do that.
23730 entry = recordEntries.ReconstructElementAt(idx);
23731 } else {
23732 // Safe to do an infallible append here, because we did a
23733 // SetCapacity above to the right capacity.
23734 entry = recordEntries.AppendElement();
23735 }
23736 entry->mKey = propName;
23737 Nullable<Record<nsString, JS::Value>>& slot = entry->mValue;
23738 if (temp.isObject()) {
23739 auto& recordEntries = slot.SetValue().Entries();
23740
23741 JS::Rooted<JSObject*> recordObj(cx, &temp.toObject());
23742 JS::RootedVector<jsid> ids(cx);
23743 if (!js::GetPropertyKeys(cx, recordObj,
23744 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
23745 return false;
23746 }
23747 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
23748 JS_ReportOutOfMemory(cx);
23749 return false;
23750 }
23751 JS::Rooted<JS::Value> propNameValue(cx);
23752 JS::Rooted<JS::Value> temp(cx);
23753 JS::Rooted<jsid> curId(cx);
23754 JS::Rooted<JS::Value> idVal(cx);
23755 // Use a hashset to keep track of ids seen, to avoid
23756 // introducing nasty O(N^2) behavior scanning for them all the
23757 // time. Ideally we'd use a data structure with O(1) lookup
23758 // _and_ ordering for the MozMap, but we don't have one lying
23759 // around.
23760 nsTHashtable<nsStringHashKey> idsSeen;
23761 for (size_t i = 0; i < ids.length(); ++i) {
23762 curId = ids[i];
23763
23764 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
23765 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
23766 &desc)) {
23767 return false;
23768 }
23769
23770 if (desc.isNothing() || !desc->enumerable()) {
23771 continue;
23772 }
23773
23774 idVal = js::IdToValue(curId);
23775 nsString propName;
23776 // This will just throw if idVal is a Symbol, like the spec says
23777 // to do.
23778 if (!ConvertJSValueToString(cx, idVal, "key of value in argument 1", propName)) {
23779 return false;
23780 }
23781
23782 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
23783 return false;
23784 }
23785
23786 Record<nsString, JS::Value>::EntryType* entry;
23787 if (!idsSeen.EnsureInserted(propName)) {
23788 // Find the existing entry.
23789 auto idx = recordEntries.IndexOf(propName);
23790 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23791); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23791; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
23791 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23791); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23791; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
23792 // Now blow it away to make it look like it was just added
23793 // to the array, because it's not obvious that it's
23794 // safe to write to its already-initialized mValue via our
23795 // normal codegen conversions. For example, the value
23796 // could be a union and this would change its type, but
23797 // codegen assumes we won't do that.
23798 entry = recordEntries.ReconstructElementAt(idx);
23799 } else {
23800 // Safe to do an infallible append here, because we did a
23801 // SetCapacity above to the right capacity.
23802 entry = recordEntries.AppendElement();
23803 }
23804 entry->mKey = propName;
23805 JS::Value& slot = entry->mValue;
23806#ifdef __clang__1
23807#pragma clang diagnostic push
23808#pragma clang diagnostic ignored "-Wunreachable-code"
23809#pragma clang diagnostic ignored "-Wunreachable-code-return"
23810#endif // __clang__
23811 if ((true) && !CallerSubsumes(temp)) {
23812 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("value in value in argument 1");
23813 return false;
23814 }
23815#ifdef __clang__1
23816#pragma clang diagnostic pop
23817#endif // __clang__
23818 slot = temp;
23819 }
23820 } else if (temp.isNullOrUndefined()) {
23821 slot.SetNull();
23822 } else {
23823 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
23824 return false;
23825 }
23826 }
23827 } else if (args[0].isNullOrUndefined()) {
23828 arg0.Value().SetNull();
23829 } else {
23830 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
23831 return false;
23832 }
23833 }
23834 if (objIsXray) {
23835 // Since our object is an Xray, we can just CheckedUnwrapStatic:
23836 // we know Xrays have no dynamic unwrap behavior.
23837 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
23838 if (!unwrappedObj.ref()) {
23839 return false;
23840 }
23841 }
23842 FastErrorResult rv;
23843 // NOTE: This assert does NOT call the function.
23844 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfNullableRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
23845 MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfNullableRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
23846 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableRecordOfNullableRecordOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableRecordOfNullableRecordOfAny"
)), 0))
) {
23847 return false;
23848 }
23849 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 23849); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 23849; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
23850 args.rval().setUndefined();
23851 return true;
23852}
23853
23854static const JSJitInfo passOptionalNullableRecordOfNullableRecordOfAny_methodinfo = {
23855 { (JSJitGetterOp)passOptionalNullableRecordOfNullableRecordOfAny },
23856 { prototypes::id::TestJSImplInterface },
23857 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
23858 JSJitInfo::Method,
23859 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
23860 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
23861 false, /* isInfallible. False in setters. */
23862 false, /* isMovable. Not relevant for setters. */
23863 false, /* isEliminatable. Not relevant for setters. */
23864 false, /* isAlwaysInSlot. Only relevant for getters. */
23865 false, /* isLazilyCachedInSlot. Only relevant for getters. */
23866 false, /* isTypedMethod. Only relevant for methods. */
23867 0 /* Reserved slot index, if we're stored in a slot, else 0. */
23868};
23869
23870MOZ_CAN_RUN_SCRIPT static bool
23871passOptionalNullableRecordOfNullableSequenceOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
23872{
23873 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableRecordOfNullableSequenceOfAny");
23874 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject23877( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23875 "TestJSImplInterface", "passOptionalNullableRecordOfNullableSequenceOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject23877( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23876 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject23877( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
23877 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject23877( cx, "TestJSImplInterface"
, "passOptionalNullableRecordOfNullableSequenceOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
23878
23879 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
23880 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
23881 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
23882 if (objIsXray) {
23883 unwrappedObj.emplace(cx, obj);
23884 }
23885 Optional<Nullable<Record<nsString, Nullable<Sequence<JS::Value>>>>> arg0;
23886 Maybe<RecordRooter<nsString, Nullable<Sequence<JS::Value>>>> arg0_holder;
23887 if (args.hasDefined(0)) {
23888 arg0.Construct();
23889 arg0_holder.emplace(cx, &arg0.Value().SetValue());
23890 if (args[0].isObject()) {
23891 auto& recordEntries = arg0.Value().SetValue().Entries();
23892
23893 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
23894 JS::RootedVector<jsid> ids(cx);
23895 if (!js::GetPropertyKeys(cx, recordObj,
23896 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
23897 return false;
23898 }
23899 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
23900 JS_ReportOutOfMemory(cx);
23901 return false;
23902 }
23903 JS::Rooted<JS::Value> propNameValue(cx);
23904 JS::Rooted<JS::Value> temp(cx);
23905 JS::Rooted<jsid> curId(cx);
23906 JS::Rooted<JS::Value> idVal(cx);
23907 // Use a hashset to keep track of ids seen, to avoid
23908 // introducing nasty O(N^2) behavior scanning for them all the
23909 // time. Ideally we'd use a data structure with O(1) lookup
23910 // _and_ ordering for the MozMap, but we don't have one lying
23911 // around.
23912 nsTHashtable<nsStringHashKey> idsSeen;
23913 for (size_t i = 0; i < ids.length(); ++i) {
23914 curId = ids[i];
23915
23916 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
23917 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
23918 &desc)) {
23919 return false;
23920 }
23921
23922 if (desc.isNothing() || !desc->enumerable()) {
23923 continue;
23924 }
23925
23926 idVal = js::IdToValue(curId);
23927 nsString propName;
23928 // This will just throw if idVal is a Symbol, like the spec says
23929 // to do.
23930 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
23931 return false;
23932 }
23933
23934 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
23935 return false;
23936 }
23937
23938 Record<nsString, Nullable<Sequence<JS::Value>>>::EntryType* entry;
23939 if (!idsSeen.EnsureInserted(propName)) {
23940 // Find the existing entry.
23941 auto idx = recordEntries.IndexOf(propName);
23942 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23943); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23943; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
23943 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 23943); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 23943; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
23944 // Now blow it away to make it look like it was just added
23945 // to the array, because it's not obvious that it's
23946 // safe to write to its already-initialized mValue via our
23947 // normal codegen conversions. For example, the value
23948 // could be a union and this would change its type, but
23949 // codegen assumes we won't do that.
23950 entry = recordEntries.ReconstructElementAt(idx);
23951 } else {
23952 // Safe to do an infallible append here, because we did a
23953 // SetCapacity above to the right capacity.
23954 entry = recordEntries.AppendElement();
23955 }
23956 entry->mKey = propName;
23957 Nullable<Sequence<JS::Value>>& slot = entry->mValue;
23958 if (temp.isObject()) {
23959 JS::ForOfIterator iter1(cx);
23960 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
23961 return false;
23962 }
23963 if (!iter1.valueIsIterable()) {
23964 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value in argument 1", "sequence");
23965 return false;
23966 }
23967 Sequence<JS::Value> &arr1 = slot.SetValue();
23968 JS::Rooted<JS::Value> temp1(cx);
23969 while (true) {
23970 bool done1;
23971 if (!iter1.next(&temp1, &done1)) {
23972 return false;
23973 }
23974 if (done1) {
23975 break;
23976 }
23977 JS::Value* slotPtr1 = arr1.AppendElement(mozilla::fallible);
23978 if (!slotPtr1) {
23979 JS_ReportOutOfMemory(cx);
23980 return false;
23981 }
23982 JS::Value& slot1 = *slotPtr1;
23983#ifdef __clang__1
23984#pragma clang diagnostic push
23985#pragma clang diagnostic ignored "-Wunreachable-code"
23986#pragma clang diagnostic ignored "-Wunreachable-code-return"
23987#endif // __clang__
23988 if ((true) && !CallerSubsumes(temp1)) {
23989 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of value in argument 1");
23990 return false;
23991 }
23992#ifdef __clang__1
23993#pragma clang diagnostic pop
23994#endif // __clang__
23995 slot1 = temp1;
23996 }
23997 } else if (temp.isNullOrUndefined()) {
23998 slot.SetNull();
23999 } else {
24000 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Value in argument 1", "sequence");
24001 return false;
24002 }
24003 }
24004 } else if (args[0].isNullOrUndefined()) {
24005 arg0.Value().SetNull();
24006 } else {
24007 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
24008 return false;
24009 }
24010 }
24011 if (objIsXray) {
24012 // Since our object is an Xray, we can just CheckedUnwrapStatic:
24013 // we know Xrays have no dynamic unwrap behavior.
24014 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
24015 if (!unwrappedObj.ref()) {
24016 return false;
24017 }
24018 }
24019 FastErrorResult rv;
24020 // NOTE: This assert does NOT call the function.
24021 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfNullableSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
24022 MOZ_KnownLive(self)(self)->PassOptionalNullableRecordOfNullableSequenceOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
24023 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableRecordOfNullableSequenceOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableRecordOfNullableSequenceOfAny"
)), 0))
) {
24024 return false;
24025 }
24026 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 24026); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24026; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24027 args.rval().setUndefined();
24028 return true;
24029}
24030
24031static const JSJitInfo passOptionalNullableRecordOfNullableSequenceOfAny_methodinfo = {
24032 { (JSJitGetterOp)passOptionalNullableRecordOfNullableSequenceOfAny },
24033 { prototypes::id::TestJSImplInterface },
24034 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
24035 JSJitInfo::Method,
24036 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24037 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24038 false, /* isInfallible. False in setters. */
24039 false, /* isMovable. Not relevant for setters. */
24040 false, /* isEliminatable. Not relevant for setters. */
24041 false, /* isAlwaysInSlot. Only relevant for getters. */
24042 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24043 false, /* isTypedMethod. Only relevant for methods. */
24044 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24045};
24046
24047MOZ_CAN_RUN_SCRIPT static bool
24048passOptionalNullableSequenceOfNullableRecordOfAny(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24049{
24050 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableSequenceOfNullableRecordOfAny");
24051 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24054( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24052 "TestJSImplInterface", "passOptionalNullableSequenceOfNullableRecordOfAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24054( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24053 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24054( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24054 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24054( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableRecordOfAny", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24055
24056 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
24057 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
24058 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
24059 if (objIsXray) {
24060 unwrappedObj.emplace(cx, obj);
24061 }
24062 Optional<Nullable<Sequence<Nullable<Record<nsString, JS::Value>>>>> arg0;
24063 Maybe<SequenceRooter<Nullable<Record<nsString, JS::Value>>>> arg0_holder;
24064 if (args.hasDefined(0)) {
24065 arg0.Construct();
24066 arg0_holder.emplace(cx, &arg0.Value().SetValue());
24067 if (args[0].isObject()) {
24068 JS::ForOfIterator iter(cx);
24069 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
24070 return false;
24071 }
24072 if (!iter.valueIsIterable()) {
24073 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
24074 return false;
24075 }
24076 Sequence<Nullable<Record<nsString, JS::Value>>> &arr = arg0.Value().SetValue();
24077 JS::Rooted<JS::Value> temp(cx);
24078 while (true) {
24079 bool done;
24080 if (!iter.next(&temp, &done)) {
24081 return false;
24082 }
24083 if (done) {
24084 break;
24085 }
24086 Nullable<Record<nsString, JS::Value>>* slotPtr = arr.AppendElement(mozilla::fallible);
24087 if (!slotPtr) {
24088 JS_ReportOutOfMemory(cx);
24089 return false;
24090 }
24091 Nullable<Record<nsString, JS::Value>>& slot = *slotPtr;
24092 if (temp.isObject()) {
24093 auto& recordEntries = slot.SetValue().Entries();
24094
24095 JS::Rooted<JSObject*> recordObj(cx, &temp.toObject());
24096 JS::RootedVector<jsid> ids(cx);
24097 if (!js::GetPropertyKeys(cx, recordObj,
24098 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
24099 return false;
24100 }
24101 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
24102 JS_ReportOutOfMemory(cx);
24103 return false;
24104 }
24105 JS::Rooted<JS::Value> propNameValue(cx);
24106 JS::Rooted<JS::Value> temp(cx);
24107 JS::Rooted<jsid> curId(cx);
24108 JS::Rooted<JS::Value> idVal(cx);
24109 // Use a hashset to keep track of ids seen, to avoid
24110 // introducing nasty O(N^2) behavior scanning for them all the
24111 // time. Ideally we'd use a data structure with O(1) lookup
24112 // _and_ ordering for the MozMap, but we don't have one lying
24113 // around.
24114 nsTHashtable<nsStringHashKey> idsSeen;
24115 for (size_t i = 0; i < ids.length(); ++i) {
24116 curId = ids[i];
24117
24118 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
24119 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
24120 &desc)) {
24121 return false;
24122 }
24123
24124 if (desc.isNothing() || !desc->enumerable()) {
24125 continue;
24126 }
24127
24128 idVal = js::IdToValue(curId);
24129 nsString propName;
24130 // This will just throw if idVal is a Symbol, like the spec says
24131 // to do.
24132 if (!ConvertJSValueToString(cx, idVal, "key of element of argument 1", propName)) {
24133 return false;
24134 }
24135
24136 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
24137 return false;
24138 }
24139
24140 Record<nsString, JS::Value>::EntryType* entry;
24141 if (!idsSeen.EnsureInserted(propName)) {
24142 // Find the existing entry.
24143 auto idx = recordEntries.IndexOf(propName);
24144 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 24145); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 24145; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
24145 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 24145); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 24145; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
24146 // Now blow it away to make it look like it was just added
24147 // to the array, because it's not obvious that it's
24148 // safe to write to its already-initialized mValue via our
24149 // normal codegen conversions. For example, the value
24150 // could be a union and this would change its type, but
24151 // codegen assumes we won't do that.
24152 entry = recordEntries.ReconstructElementAt(idx);
24153 } else {
24154 // Safe to do an infallible append here, because we did a
24155 // SetCapacity above to the right capacity.
24156 entry = recordEntries.AppendElement();
24157 }
24158 entry->mKey = propName;
24159 JS::Value& slot = entry->mValue;
24160#ifdef __clang__1
24161#pragma clang diagnostic push
24162#pragma clang diagnostic ignored "-Wunreachable-code"
24163#pragma clang diagnostic ignored "-Wunreachable-code-return"
24164#endif // __clang__
24165 if ((true) && !CallerSubsumes(temp)) {
24166 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("value in element of argument 1");
24167 return false;
24168 }
24169#ifdef __clang__1
24170#pragma clang diagnostic pop
24171#endif // __clang__
24172 slot = temp;
24173 }
24174 } else if (temp.isNullOrUndefined()) {
24175 slot.SetNull();
24176 } else {
24177 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
24178 return false;
24179 }
24180 }
24181 } else if (args[0].isNullOrUndefined()) {
24182 arg0.Value().SetNull();
24183 } else {
24184 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
24185 return false;
24186 }
24187 }
24188 if (objIsXray) {
24189 // Since our object is an Xray, we can just CheckedUnwrapStatic:
24190 // we know Xrays have no dynamic unwrap behavior.
24191 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
24192 if (!unwrappedObj.ref()) {
24193 return false;
24194 }
24195 }
24196 FastErrorResult rv;
24197 // NOTE: This assert does NOT call the function.
24198 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
24199 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableRecordOfAny(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
24200 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceOfNullableRecordOfAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceOfNullableRecordOfAny"
)), 0))
) {
24201 return false;
24202 }
24203 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 24203); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24203; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24204 args.rval().setUndefined();
24205 return true;
24206}
24207
24208static const JSJitInfo passOptionalNullableSequenceOfNullableRecordOfAny_methodinfo = {
24209 { (JSJitGetterOp)passOptionalNullableSequenceOfNullableRecordOfAny },
24210 { prototypes::id::TestJSImplInterface },
24211 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
24212 JSJitInfo::Method,
24213 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24214 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24215 false, /* isInfallible. False in setters. */
24216 false, /* isMovable. Not relevant for setters. */
24217 false, /* isEliminatable. Not relevant for setters. */
24218 false, /* isAlwaysInSlot. Only relevant for getters. */
24219 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24220 false, /* isTypedMethod. Only relevant for methods. */
24221 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24222};
24223
24224MOZ_CAN_RUN_SCRIPT static bool
24225receiveAny(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24226{
24227 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24230( cx, "TestJSImplInterface"
, "receiveAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24228 "TestJSImplInterface", "receiveAny", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24230( cx, "TestJSImplInterface"
, "receiveAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24229 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24230( cx, "TestJSImplInterface"
, "receiveAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24230 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24230( cx, "TestJSImplInterface"
, "receiveAny", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
24231
24232 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
24233 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
24234 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
24235 if (objIsXray) {
24236 unwrappedObj.emplace(cx, obj);
24237 }
24238 if (objIsXray) {
24239 // Since our object is an Xray, we can just CheckedUnwrapStatic:
24240 // we know Xrays have no dynamic unwrap behavior.
24241 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
24242 if (!unwrappedObj.ref()) {
24243 return false;
24244 }
24245 }
24246 FastErrorResult rv;
24247 JS::Rooted<JS::Value> result(cx);
24248 // NOTE: This assert does NOT call the function.
24249 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveAny(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
24250 MOZ_KnownLive(self)(self)->ReceiveAny(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
24251 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveAny"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveAny"
)), 0))
) {
24252 return false;
24253 }
24254 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 24254); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24254; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24255 JS::ExposeValueToActiveJS(result);
24256 args.rval().set(result);
24257 if (!MaybeWrapValue(cx, args.rval())) {
24258 return false;
24259 }
24260 return true;
24261}
24262
24263static const JSJitInfo receiveAny_methodinfo = {
24264 { (JSJitGetterOp)receiveAny },
24265 { prototypes::id::TestJSImplInterface },
24266 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
24267 JSJitInfo::Method,
24268 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24269 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
24270 false, /* isInfallible. False in setters. */
24271 false, /* isMovable. Not relevant for setters. */
24272 false, /* isEliminatable. Not relevant for setters. */
24273 false, /* isAlwaysInSlot. Only relevant for getters. */
24274 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24275 false, /* isTypedMethod. Only relevant for methods. */
24276 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24277};
24278
24279MOZ_CAN_RUN_SCRIPT static bool
24280passObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24281{
24282 BindingCallContext cx(cx_, "TestJSImplInterface.passObject");
24283 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24286( cx, "TestJSImplInterface"
, "passObject", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24284 "TestJSImplInterface", "passObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24286( cx, "TestJSImplInterface"
, "passObject", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24285 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24286( cx, "TestJSImplInterface"
, "passObject", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24286 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24286( cx, "TestJSImplInterface"
, "passObject", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
24287
24288 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
24289 if (!args.requireAtLeast(cx, "TestJSImplInterface.passObject", 1)) {
24290 return false;
24291 }
24292 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
24293 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
24294 if (objIsXray) {
24295 unwrappedObj.emplace(cx, obj);
24296 }
24297 JS::Rooted<JSObject*> arg0(cx);
24298 if (args[0].isObject()) {
24299#ifdef __clang__1
24300#pragma clang diagnostic push
24301#pragma clang diagnostic ignored "-Wunreachable-code"
24302#pragma clang diagnostic ignored "-Wunreachable-code-return"
24303#endif // __clang__
24304 if ((true) && !CallerSubsumes(args[0])) {
24305 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 1");
24306 return false;
24307 }
24308#ifdef __clang__1
24309#pragma clang diagnostic pop
24310#endif // __clang__
24311 arg0 = &args[0].toObject();
24312 } else {
24313 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
24314 return false;
24315 }
24316 if (objIsXray) {
24317 // Since our object is an Xray, we can just CheckedUnwrapStatic:
24318 // we know Xrays have no dynamic unwrap behavior.
24319 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
24320 if (!unwrappedObj.ref()) {
24321 return false;
24322 }
24323 }
24324 FastErrorResult rv;
24325 // NOTE: This assert does NOT call the function.
24326 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassObject(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
24327 MOZ_KnownLive(self)(self)->PassObject(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
24328 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passObject"
)), 0))
) {
24329 return false;
24330 }
24331 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 24331); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24331; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24332 args.rval().setUndefined();
24333 return true;
24334}
24335
24336static const JSJitInfo passObject_methodinfo = {
24337 { (JSJitGetterOp)passObject },
24338 { prototypes::id::TestJSImplInterface },
24339 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
24340 JSJitInfo::Method,
24341 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24342 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24343 false, /* isInfallible. False in setters. */
24344 false, /* isMovable. Not relevant for setters. */
24345 false, /* isEliminatable. Not relevant for setters. */
24346 false, /* isAlwaysInSlot. Only relevant for getters. */
24347 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24348 false, /* isTypedMethod. Only relevant for methods. */
24349 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24350};
24351
24352MOZ_CAN_RUN_SCRIPT static bool
24353passVariadicObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24354{
24355 BindingCallContext cx(cx_, "TestJSImplInterface.passVariadicObject");
24356 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24359( cx, "TestJSImplInterface"
, "passVariadicObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24357 "TestJSImplInterface", "passVariadicObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24359( cx, "TestJSImplInterface"
, "passVariadicObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24358 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24359( cx, "TestJSImplInterface"
, "passVariadicObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24359 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24359( cx, "TestJSImplInterface"
, "passVariadicObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
24360
24361 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
24362 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
24363 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
24364 if (objIsXray) {
24365 unwrappedObj.emplace(cx, obj);
24366 }
24367 AutoSequence<JSObject*> arg0;
24368 SequenceRooter<JSObject*> arg0_holder(cx, &arg0);
24369 if (args.length() > 0) {
24370 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
24371 JS_ReportOutOfMemory(cx);
24372 return false;
24373 }
24374 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
24375 // OK to do infallible append here, since we ensured capacity already.
24376 JSObject*& slot = *arg0.AppendElement(nullptr);
24377 if (args[variadicArg].isObject()) {
24378#ifdef __clang__1
24379#pragma clang diagnostic push
24380#pragma clang diagnostic ignored "-Wunreachable-code"
24381#pragma clang diagnostic ignored "-Wunreachable-code-return"
24382#endif // __clang__
24383 if ((true) && !CallerSubsumes(args[variadicArg])) {
24384 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 1");
24385 return false;
24386 }
24387#ifdef __clang__1
24388#pragma clang diagnostic pop
24389#endif // __clang__
24390 slot = &args[variadicArg].toObject();
24391 } else {
24392 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
24393 return false;
24394 }
24395 }
24396 }
24397 if (objIsXray) {
24398 // Since our object is an Xray, we can just CheckedUnwrapStatic:
24399 // we know Xrays have no dynamic unwrap behavior.
24400 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
24401 if (!unwrappedObj.ref()) {
24402 return false;
24403 }
24404 }
24405 FastErrorResult rv;
24406 // NOTE: This assert does NOT call the function.
24407 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
24408 MOZ_KnownLive(self)(self)->PassVariadicObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
24409 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicObject"
)), 0))
) {
24410 return false;
24411 }
24412 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 24412); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24412; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24413 args.rval().setUndefined();
24414 return true;
24415}
24416
24417static const JSJitInfo passVariadicObject_methodinfo = {
24418 { (JSJitGetterOp)passVariadicObject },
24419 { prototypes::id::TestJSImplInterface },
24420 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
24421 JSJitInfo::Method,
24422 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24423 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24424 false, /* isInfallible. False in setters. */
24425 false, /* isMovable. Not relevant for setters. */
24426 false, /* isEliminatable. Not relevant for setters. */
24427 false, /* isAlwaysInSlot. Only relevant for getters. */
24428 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24429 false, /* isTypedMethod. Only relevant for methods. */
24430 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24431};
24432
24433MOZ_CAN_RUN_SCRIPT static bool
24434passNullableObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24435{
24436 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableObject");
24437 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24440( cx, "TestJSImplInterface"
, "passNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24438 "TestJSImplInterface", "passNullableObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24440( cx, "TestJSImplInterface"
, "passNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24439 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24440( cx, "TestJSImplInterface"
, "passNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24440 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24440( cx, "TestJSImplInterface"
, "passNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
24441
24442 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
24443 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableObject", 1)) {
24444 return false;
24445 }
24446 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
24447 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
24448 if (objIsXray) {
24449 unwrappedObj.emplace(cx, obj);
24450 }
24451 JS::Rooted<JSObject*> arg0(cx);
24452 if (args[0].isObject()) {
24453#ifdef __clang__1
24454#pragma clang diagnostic push
24455#pragma clang diagnostic ignored "-Wunreachable-code"
24456#pragma clang diagnostic ignored "-Wunreachable-code-return"
24457#endif // __clang__
24458 if ((true) && !CallerSubsumes(args[0])) {
24459 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 1");
24460 return false;
24461 }
24462#ifdef __clang__1
24463#pragma clang diagnostic pop
24464#endif // __clang__
24465 arg0 = &args[0].toObject();
24466 } else if (args[0].isNullOrUndefined()) {
24467 arg0 = nullptr;
24468 } else {
24469 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
24470 return false;
24471 }
24472 if (objIsXray) {
24473 // Since our object is an Xray, we can just CheckedUnwrapStatic:
24474 // we know Xrays have no dynamic unwrap behavior.
24475 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
24476 if (!unwrappedObj.ref()) {
24477 return false;
24478 }
24479 }
24480 FastErrorResult rv;
24481 // NOTE: This assert does NOT call the function.
24482 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableObject(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
24483 MOZ_KnownLive(self)(self)->PassNullableObject(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
24484 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableObject"
)), 0))
) {
24485 return false;
24486 }
24487 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 24487); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24487; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24488 args.rval().setUndefined();
24489 return true;
24490}
24491
24492static const JSJitInfo passNullableObject_methodinfo = {
24493 { (JSJitGetterOp)passNullableObject },
24494 { prototypes::id::TestJSImplInterface },
24495 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
24496 JSJitInfo::Method,
24497 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24498 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24499 false, /* isInfallible. False in setters. */
24500 false, /* isMovable. Not relevant for setters. */
24501 false, /* isEliminatable. Not relevant for setters. */
24502 false, /* isAlwaysInSlot. Only relevant for getters. */
24503 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24504 false, /* isTypedMethod. Only relevant for methods. */
24505 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24506};
24507
24508MOZ_CAN_RUN_SCRIPT static bool
24509passVariadicNullableObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24510{
24511 BindingCallContext cx(cx_, "TestJSImplInterface.passVariadicNullableObject");
24512 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24515( cx, "TestJSImplInterface"
, "passVariadicNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24513 "TestJSImplInterface", "passVariadicNullableObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24515( cx, "TestJSImplInterface"
, "passVariadicNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24514 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24515( cx, "TestJSImplInterface"
, "passVariadicNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24515 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24515( cx, "TestJSImplInterface"
, "passVariadicNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24516
24517 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
24518 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
24519 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
24520 if (objIsXray) {
24521 unwrappedObj.emplace(cx, obj);
24522 }
24523 AutoSequence<JSObject*> arg0;
24524 SequenceRooter<JSObject*> arg0_holder(cx, &arg0);
24525 if (args.length() > 0) {
24526 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
24527 JS_ReportOutOfMemory(cx);
24528 return false;
24529 }
24530 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
24531 // OK to do infallible append here, since we ensured capacity already.
24532 JSObject*& slot = *arg0.AppendElement(nullptr);
24533 if (args[variadicArg].isObject()) {
24534#ifdef __clang__1
24535#pragma clang diagnostic push
24536#pragma clang diagnostic ignored "-Wunreachable-code"
24537#pragma clang diagnostic ignored "-Wunreachable-code-return"
24538#endif // __clang__
24539 if ((true) && !CallerSubsumes(args[variadicArg])) {
24540 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 1");
24541 return false;
24542 }
24543#ifdef __clang__1
24544#pragma clang diagnostic pop
24545#endif // __clang__
24546 slot = &args[variadicArg].toObject();
24547 } else {
24548 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
24549 return false;
24550 }
24551 }
24552 }
24553 if (objIsXray) {
24554 // Since our object is an Xray, we can just CheckedUnwrapStatic:
24555 // we know Xrays have no dynamic unwrap behavior.
24556 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
24557 if (!unwrappedObj.ref()) {
24558 return false;
24559 }
24560 }
24561 FastErrorResult rv;
24562 // NOTE: This assert does NOT call the function.
24563 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicNullableObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
24564 MOZ_KnownLive(self)(self)->PassVariadicNullableObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
24565 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicNullableObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicNullableObject"
)), 0))
) {
24566 return false;
24567 }
24568 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 24568); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24568; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24569 args.rval().setUndefined();
24570 return true;
24571}
24572
24573static const JSJitInfo passVariadicNullableObject_methodinfo = {
24574 { (JSJitGetterOp)passVariadicNullableObject },
24575 { prototypes::id::TestJSImplInterface },
24576 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
24577 JSJitInfo::Method,
24578 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24579 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24580 false, /* isInfallible. False in setters. */
24581 false, /* isMovable. Not relevant for setters. */
24582 false, /* isEliminatable. Not relevant for setters. */
24583 false, /* isAlwaysInSlot. Only relevant for getters. */
24584 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24585 false, /* isTypedMethod. Only relevant for methods. */
24586 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24587};
24588
24589MOZ_CAN_RUN_SCRIPT static bool
24590passOptionalObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24591{
24592 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalObject");
24593 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24596( cx, "TestJSImplInterface"
, "passOptionalObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24594 "TestJSImplInterface", "passOptionalObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24596( cx, "TestJSImplInterface"
, "passOptionalObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24595 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24596( cx, "TestJSImplInterface"
, "passOptionalObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24596 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24596( cx, "TestJSImplInterface"
, "passOptionalObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
24597
24598 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
24599 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
24600 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
24601 if (objIsXray) {
24602 unwrappedObj.emplace(cx, obj);
24603 }
24604 Optional<JS::Handle<JSObject*>> arg0;
24605 if (args.hasDefined(0)) {
24606 arg0.Construct(cx);
24607 if (args[0].isObject()) {
24608#ifdef __clang__1
24609#pragma clang diagnostic push
24610#pragma clang diagnostic ignored "-Wunreachable-code"
24611#pragma clang diagnostic ignored "-Wunreachable-code-return"
24612#endif // __clang__
24613 if ((true) && !CallerSubsumes(args[0])) {
24614 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 1");
24615 return false;
24616 }
24617#ifdef __clang__1
24618#pragma clang diagnostic pop
24619#endif // __clang__
24620 arg0.Value() = &args[0].toObject();
24621 } else {
24622 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
24623 return false;
24624 }
24625 }
24626 if (objIsXray) {
24627 // Since our object is an Xray, we can just CheckedUnwrapStatic:
24628 // we know Xrays have no dynamic unwrap behavior.
24629 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
24630 if (!unwrappedObj.ref()) {
24631 return false;
24632 }
24633 }
24634 FastErrorResult rv;
24635 // NOTE: This assert does NOT call the function.
24636 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
24637 MOZ_KnownLive(self)(self)->PassOptionalObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
24638 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalObject"
)), 0))
) {
24639 return false;
24640 }
24641 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 24641); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24641; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24642 args.rval().setUndefined();
24643 return true;
24644}
24645
24646static const JSJitInfo passOptionalObject_methodinfo = {
24647 { (JSJitGetterOp)passOptionalObject },
24648 { prototypes::id::TestJSImplInterface },
24649 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
24650 JSJitInfo::Method,
24651 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24652 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24653 false, /* isInfallible. False in setters. */
24654 false, /* isMovable. Not relevant for setters. */
24655 false, /* isEliminatable. Not relevant for setters. */
24656 false, /* isAlwaysInSlot. Only relevant for getters. */
24657 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24658 false, /* isTypedMethod. Only relevant for methods. */
24659 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24660};
24661
24662MOZ_CAN_RUN_SCRIPT static bool
24663passOptionalNullableObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24664{
24665 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableObject");
24666 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24669( cx, "TestJSImplInterface"
, "passOptionalNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24667 "TestJSImplInterface", "passOptionalNullableObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24669( cx, "TestJSImplInterface"
, "passOptionalNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24668 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24669( cx, "TestJSImplInterface"
, "passOptionalNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24669 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24669( cx, "TestJSImplInterface"
, "passOptionalNullableObject", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24670
24671 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
24672 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
24673 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
24674 if (objIsXray) {
24675 unwrappedObj.emplace(cx, obj);
24676 }
24677 Optional<JS::Handle<JSObject*>> arg0;
24678 if (args.hasDefined(0)) {
24679 arg0.Construct(cx);
24680 if (args[0].isObject()) {
24681#ifdef __clang__1
24682#pragma clang diagnostic push
24683#pragma clang diagnostic ignored "-Wunreachable-code"
24684#pragma clang diagnostic ignored "-Wunreachable-code-return"
24685#endif // __clang__
24686 if ((true) && !CallerSubsumes(args[0])) {
24687 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 1");
24688 return false;
24689 }
24690#ifdef __clang__1
24691#pragma clang diagnostic pop
24692#endif // __clang__
24693 arg0.Value() = &args[0].toObject();
24694 } else if (args[0].isNullOrUndefined()) {
24695 arg0.Value() = nullptr;
24696 } else {
24697 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
24698 return false;
24699 }
24700 }
24701 if (objIsXray) {
24702 // Since our object is an Xray, we can just CheckedUnwrapStatic:
24703 // we know Xrays have no dynamic unwrap behavior.
24704 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
24705 if (!unwrappedObj.ref()) {
24706 return false;
24707 }
24708 }
24709 FastErrorResult rv;
24710 // NOTE: This assert does NOT call the function.
24711 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
24712 MOZ_KnownLive(self)(self)->PassOptionalNullableObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
24713 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableObject"
)), 0))
) {
24714 return false;
24715 }
24716 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 24716); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24716; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24717 args.rval().setUndefined();
24718 return true;
24719}
24720
24721static const JSJitInfo passOptionalNullableObject_methodinfo = {
24722 { (JSJitGetterOp)passOptionalNullableObject },
24723 { prototypes::id::TestJSImplInterface },
24724 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
24725 JSJitInfo::Method,
24726 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24727 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24728 false, /* isInfallible. False in setters. */
24729 false, /* isMovable. Not relevant for setters. */
24730 false, /* isEliminatable. Not relevant for setters. */
24731 false, /* isAlwaysInSlot. Only relevant for getters. */
24732 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24733 false, /* isTypedMethod. Only relevant for methods. */
24734 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24735};
24736
24737MOZ_CAN_RUN_SCRIPT static bool
24738passOptionalNullableObjectWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24739{
24740 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableObjectWithDefaultValue");
24741 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24744( cx, "TestJSImplInterface"
, "passOptionalNullableObjectWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24742 "TestJSImplInterface", "passOptionalNullableObjectWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24744( cx, "TestJSImplInterface"
, "passOptionalNullableObjectWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24743 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24744( cx, "TestJSImplInterface"
, "passOptionalNullableObjectWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24744 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24744( cx, "TestJSImplInterface"
, "passOptionalNullableObjectWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24745
24746 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
24747 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
24748 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
24749 if (objIsXray) {
24750 unwrappedObj.emplace(cx, obj);
24751 }
24752 JS::Rooted<JSObject*> arg0(cx);
24753 if (args.hasDefined(0)) {
24754 if (args[0].isObject()) {
24755#ifdef __clang__1
24756#pragma clang diagnostic push
24757#pragma clang diagnostic ignored "-Wunreachable-code"
24758#pragma clang diagnostic ignored "-Wunreachable-code-return"
24759#endif // __clang__
24760 if ((true) && !CallerSubsumes(args[0])) {
24761 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 1");
24762 return false;
24763 }
24764#ifdef __clang__1
24765#pragma clang diagnostic pop
24766#endif // __clang__
24767 arg0 = &args[0].toObject();
24768 } else if (args[0].isNullOrUndefined()) {
24769 arg0 = nullptr;
24770 } else {
24771 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
24772 return false;
24773 }
24774 } else {
24775 arg0 = nullptr;
24776 }
24777 if (objIsXray) {
24778 // Since our object is an Xray, we can just CheckedUnwrapStatic:
24779 // we know Xrays have no dynamic unwrap behavior.
24780 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
24781 if (!unwrappedObj.ref()) {
24782 return false;
24783 }
24784 }
24785 FastErrorResult rv;
24786 // NOTE: This assert does NOT call the function.
24787 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableObjectWithDefaultValue(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
24788 MOZ_KnownLive(self)(self)->PassOptionalNullableObjectWithDefaultValue(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
24789 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableObjectWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableObjectWithDefaultValue"
)), 0))
) {
24790 return false;
24791 }
24792 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 24792); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24792; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24793 args.rval().setUndefined();
24794 return true;
24795}
24796
24797static const JSJitInfo passOptionalNullableObjectWithDefaultValue_methodinfo = {
24798 { (JSJitGetterOp)passOptionalNullableObjectWithDefaultValue },
24799 { prototypes::id::TestJSImplInterface },
24800 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
24801 JSJitInfo::Method,
24802 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24803 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24804 false, /* isInfallible. False in setters. */
24805 false, /* isMovable. Not relevant for setters. */
24806 false, /* isEliminatable. Not relevant for setters. */
24807 false, /* isAlwaysInSlot. Only relevant for getters. */
24808 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24809 false, /* isTypedMethod. Only relevant for methods. */
24810 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24811};
24812
24813MOZ_CAN_RUN_SCRIPT static bool
24814passSequenceOfObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24815{
24816 BindingCallContext cx(cx_, "TestJSImplInterface.passSequenceOfObject");
24817 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24820( cx, "TestJSImplInterface"
, "passSequenceOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24818 "TestJSImplInterface", "passSequenceOfObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24820( cx, "TestJSImplInterface"
, "passSequenceOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24819 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24820( cx, "TestJSImplInterface"
, "passSequenceOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
24820 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24820( cx, "TestJSImplInterface"
, "passSequenceOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
24821
24822 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
24823 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequenceOfObject", 1)) {
24824 return false;
24825 }
24826 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
24827 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
24828 if (objIsXray) {
24829 unwrappedObj.emplace(cx, obj);
24830 }
24831 binding_detail::AutoSequence<JSObject*> arg0;
24832 SequenceRooter<JSObject*> arg0_holder(cx, &arg0);
24833 if (args[0].isObject()) {
24834 JS::ForOfIterator iter(cx);
24835 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
24836 return false;
24837 }
24838 if (!iter.valueIsIterable()) {
24839 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
24840 return false;
24841 }
24842 binding_detail::AutoSequence<JSObject*> &arr = arg0;
24843 JS::Rooted<JS::Value> temp(cx);
24844 while (true) {
24845 bool done;
24846 if (!iter.next(&temp, &done)) {
24847 return false;
24848 }
24849 if (done) {
24850 break;
24851 }
24852 JSObject** slotPtr = arr.AppendElement(nullptr, mozilla::fallible);
24853 if (!slotPtr) {
24854 JS_ReportOutOfMemory(cx);
24855 return false;
24856 }
24857 JSObject*& slot = *slotPtr;
24858 if (temp.isObject()) {
24859#ifdef __clang__1
24860#pragma clang diagnostic push
24861#pragma clang diagnostic ignored "-Wunreachable-code"
24862#pragma clang diagnostic ignored "-Wunreachable-code-return"
24863#endif // __clang__
24864 if ((true) && !CallerSubsumes(temp)) {
24865 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of argument 1");
24866 return false;
24867 }
24868#ifdef __clang__1
24869#pragma clang diagnostic pop
24870#endif // __clang__
24871 slot = &temp.toObject();
24872 } else {
24873 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
24874 return false;
24875 }
24876 }
24877 } else {
24878 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
24879 return false;
24880 }
24881 if (objIsXray) {
24882 // Since our object is an Xray, we can just CheckedUnwrapStatic:
24883 // we know Xrays have no dynamic unwrap behavior.
24884 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
24885 if (!unwrappedObj.ref()) {
24886 return false;
24887 }
24888 }
24889 FastErrorResult rv;
24890 // NOTE: This assert does NOT call the function.
24891 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
24892 MOZ_KnownLive(self)(self)->PassSequenceOfObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
24893 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfObject"
)), 0))
) {
24894 return false;
24895 }
24896 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 24896); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 24896; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
24897 args.rval().setUndefined();
24898 return true;
24899}
24900
24901static const JSJitInfo passSequenceOfObject_methodinfo = {
24902 { (JSJitGetterOp)passSequenceOfObject },
24903 { prototypes::id::TestJSImplInterface },
24904 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
24905 JSJitInfo::Method,
24906 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
24907 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
24908 false, /* isInfallible. False in setters. */
24909 false, /* isMovable. Not relevant for setters. */
24910 false, /* isEliminatable. Not relevant for setters. */
24911 false, /* isAlwaysInSlot. Only relevant for getters. */
24912 false, /* isLazilyCachedInSlot. Only relevant for getters. */
24913 false, /* isTypedMethod. Only relevant for methods. */
24914 0 /* Reserved slot index, if we're stored in a slot, else 0. */
24915};
24916
24917MOZ_CAN_RUN_SCRIPT static bool
24918passSequenceOfNullableObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
24919{
24920 BindingCallContext cx(cx_, "TestJSImplInterface.passSequenceOfNullableObject");
24921 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject24924( cx, "TestJSImplInterface"
, "passSequenceOfNullableObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24922 "TestJSImplInterface", "passSequenceOfNullableObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject24924( cx, "TestJSImplInterface"
, "passSequenceOfNullableObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24923 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject24924( cx, "TestJSImplInterface"
, "passSequenceOfNullableObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
24924 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject24924( cx, "TestJSImplInterface"
, "passSequenceOfNullableObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
24925
24926 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
24927 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequenceOfNullableObject", 1)) {
24928 return false;
24929 }
24930 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
24931 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
24932 if (objIsXray) {
24933 unwrappedObj.emplace(cx, obj);
24934 }
24935 binding_detail::AutoSequence<JSObject*> arg0;
24936 SequenceRooter<JSObject*> arg0_holder(cx, &arg0);
24937 if (args[0].isObject()) {
24938 JS::ForOfIterator iter(cx);
24939 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
24940 return false;
24941 }
24942 if (!iter.valueIsIterable()) {
24943 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
24944 return false;
24945 }
24946 binding_detail::AutoSequence<JSObject*> &arr = arg0;
24947 JS::Rooted<JS::Value> temp(cx);
24948 while (true) {
24949 bool done;
24950 if (!iter.next(&temp, &done)) {
24951 return false;
24952 }
24953 if (done) {
24954 break;
24955 }
24956 JSObject** slotPtr = arr.AppendElement(nullptr, mozilla::fallible);
24957 if (!slotPtr) {
24958 JS_ReportOutOfMemory(cx);
24959 return false;
24960 }
24961 JSObject*& slot = *slotPtr;
24962 if (temp.isObject()) {
24963#ifdef __clang__1
24964#pragma clang diagnostic push
24965#pragma clang diagnostic ignored "-Wunreachable-code"
24966#pragma clang diagnostic ignored "-Wunreachable-code-return"
24967#endif // __clang__
24968 if ((true) && !CallerSubsumes(temp)) {
24969 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of argument 1");
24970 return false;
24971 }
24972#ifdef __clang__1
24973#pragma clang diagnostic pop
24974#endif // __clang__
24975 slot = &temp.toObject();
24976 } else if (temp.isNullOrUndefined()) {
24977 slot = nullptr;
24978 } else {
24979 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
24980 return false;
24981 }
24982 }
24983 } else {
24984 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
24985 return false;
24986 }
24987 if (objIsXray) {
24988 // Since our object is an Xray, we can just CheckedUnwrapStatic:
24989 // we know Xrays have no dynamic unwrap behavior.
24990 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
24991 if (!unwrappedObj.ref()) {
24992 return false;
24993 }
24994 }
24995 FastErrorResult rv;
24996 // NOTE: This assert does NOT call the function.
24997 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfNullableObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
24998 MOZ_KnownLive(self)(self)->PassSequenceOfNullableObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
24999 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfNullableObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfNullableObject"
)), 0))
) {
25000 return false;
25001 }
25002 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 25002); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25002; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25003 args.rval().setUndefined();
25004 return true;
25005}
25006
25007static const JSJitInfo passSequenceOfNullableObject_methodinfo = {
25008 { (JSJitGetterOp)passSequenceOfNullableObject },
25009 { prototypes::id::TestJSImplInterface },
25010 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
25011 JSJitInfo::Method,
25012 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25013 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25014 false, /* isInfallible. False in setters. */
25015 false, /* isMovable. Not relevant for setters. */
25016 false, /* isEliminatable. Not relevant for setters. */
25017 false, /* isAlwaysInSlot. Only relevant for getters. */
25018 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25019 false, /* isTypedMethod. Only relevant for methods. */
25020 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25021};
25022
25023MOZ_CAN_RUN_SCRIPT static bool
25024passNullableSequenceOfObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25025{
25026 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableSequenceOfObject");
25027 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25030( cx, "TestJSImplInterface"
, "passNullableSequenceOfObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25028 "TestJSImplInterface", "passNullableSequenceOfObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25030( cx, "TestJSImplInterface"
, "passNullableSequenceOfObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25029 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25030( cx, "TestJSImplInterface"
, "passNullableSequenceOfObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
25030 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25030( cx, "TestJSImplInterface"
, "passNullableSequenceOfObject", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
25031
25032 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
25033 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableSequenceOfObject", 1)) {
25034 return false;
25035 }
25036 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
25037 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
25038 if (objIsXray) {
25039 unwrappedObj.emplace(cx, obj);
25040 }
25041 Nullable<Sequence<JSObject*>> arg0;
25042 SequenceRooter<JSObject*> arg0_holder(cx, &arg0.SetValue());
25043 if (args[0].isObject()) {
25044 JS::ForOfIterator iter(cx);
25045 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
25046 return false;
25047 }
25048 if (!iter.valueIsIterable()) {
25049 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
25050 return false;
25051 }
25052 Sequence<JSObject*> &arr = arg0.SetValue();
25053 JS::Rooted<JS::Value> temp(cx);
25054 while (true) {
25055 bool done;
25056 if (!iter.next(&temp, &done)) {
25057 return false;
25058 }
25059 if (done) {
25060 break;
25061 }
25062 JSObject** slotPtr = arr.AppendElement(nullptr, mozilla::fallible);
25063 if (!slotPtr) {
25064 JS_ReportOutOfMemory(cx);
25065 return false;
25066 }
25067 JSObject*& slot = *slotPtr;
25068 if (temp.isObject()) {
25069#ifdef __clang__1
25070#pragma clang diagnostic push
25071#pragma clang diagnostic ignored "-Wunreachable-code"
25072#pragma clang diagnostic ignored "-Wunreachable-code-return"
25073#endif // __clang__
25074 if ((true) && !CallerSubsumes(temp)) {
25075 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of argument 1");
25076 return false;
25077 }
25078#ifdef __clang__1
25079#pragma clang diagnostic pop
25080#endif // __clang__
25081 slot = &temp.toObject();
25082 } else {
25083 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of argument 1");
25084 return false;
25085 }
25086 }
25087 } else if (args[0].isNullOrUndefined()) {
25088 arg0.SetNull();
25089 } else {
25090 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
25091 return false;
25092 }
25093 if (objIsXray) {
25094 // Since our object is an Xray, we can just CheckedUnwrapStatic:
25095 // we know Xrays have no dynamic unwrap behavior.
25096 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
25097 if (!unwrappedObj.ref()) {
25098 return false;
25099 }
25100 }
25101 FastErrorResult rv;
25102 // NOTE: This assert does NOT call the function.
25103 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableSequenceOfObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
25104 MOZ_KnownLive(self)(self)->PassNullableSequenceOfObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
25105 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableSequenceOfObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableSequenceOfObject"
)), 0))
) {
25106 return false;
25107 }
25108 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 25108); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25108; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25109 args.rval().setUndefined();
25110 return true;
25111}
25112
25113static const JSJitInfo passNullableSequenceOfObject_methodinfo = {
25114 { (JSJitGetterOp)passNullableSequenceOfObject },
25115 { prototypes::id::TestJSImplInterface },
25116 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
25117 JSJitInfo::Method,
25118 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25119 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25120 false, /* isInfallible. False in setters. */
25121 false, /* isMovable. Not relevant for setters. */
25122 false, /* isEliminatable. Not relevant for setters. */
25123 false, /* isAlwaysInSlot. Only relevant for getters. */
25124 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25125 false, /* isTypedMethod. Only relevant for methods. */
25126 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25127};
25128
25129MOZ_CAN_RUN_SCRIPT static bool
25130passOptionalNullableSequenceOfNullableSequenceOfObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25131{
25132 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableSequenceOfNullableSequenceOfObject");
25133 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25136( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfObject", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
25134 "TestJSImplInterface", "passOptionalNullableSequenceOfNullableSequenceOfObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25136( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfObject", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
25135 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25136( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfObject", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
25136 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25136( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfObject", JS
::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
25137
25138 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
25139 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
25140 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
25141 if (objIsXray) {
25142 unwrappedObj.emplace(cx, obj);
25143 }
25144 Optional<Nullable<Sequence<Nullable<Sequence<JSObject*>>>>> arg0;
25145 Maybe<SequenceRooter<Nullable<Sequence<JSObject*>>>> arg0_holder;
25146 if (args.hasDefined(0)) {
25147 arg0.Construct();
25148 arg0_holder.emplace(cx, &arg0.Value().SetValue());
25149 if (args[0].isObject()) {
25150 JS::ForOfIterator iter(cx);
25151 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
25152 return false;
25153 }
25154 if (!iter.valueIsIterable()) {
25155 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
25156 return false;
25157 }
25158 Sequence<Nullable<Sequence<JSObject*>>> &arr = arg0.Value().SetValue();
25159 JS::Rooted<JS::Value> temp(cx);
25160 while (true) {
25161 bool done;
25162 if (!iter.next(&temp, &done)) {
25163 return false;
25164 }
25165 if (done) {
25166 break;
25167 }
25168 Nullable<Sequence<JSObject*>>* slotPtr = arr.AppendElement(mozilla::fallible);
25169 if (!slotPtr) {
25170 JS_ReportOutOfMemory(cx);
25171 return false;
25172 }
25173 Nullable<Sequence<JSObject*>>& slot = *slotPtr;
25174 if (temp.isObject()) {
25175 JS::ForOfIterator iter1(cx);
25176 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
25177 return false;
25178 }
25179 if (!iter1.valueIsIterable()) {
25180 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
25181 return false;
25182 }
25183 Sequence<JSObject*> &arr1 = slot.SetValue();
25184 JS::Rooted<JS::Value> temp1(cx);
25185 while (true) {
25186 bool done1;
25187 if (!iter1.next(&temp1, &done1)) {
25188 return false;
25189 }
25190 if (done1) {
25191 break;
25192 }
25193 JSObject** slotPtr1 = arr1.AppendElement(nullptr, mozilla::fallible);
25194 if (!slotPtr1) {
25195 JS_ReportOutOfMemory(cx);
25196 return false;
25197 }
25198 JSObject*& slot1 = *slotPtr1;
25199 if (temp1.isObject()) {
25200#ifdef __clang__1
25201#pragma clang diagnostic push
25202#pragma clang diagnostic ignored "-Wunreachable-code"
25203#pragma clang diagnostic ignored "-Wunreachable-code-return"
25204#endif // __clang__
25205 if ((true) && !CallerSubsumes(temp1)) {
25206 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of element of argument 1");
25207 return false;
25208 }
25209#ifdef __clang__1
25210#pragma clang diagnostic pop
25211#endif // __clang__
25212 slot1 = &temp1.toObject();
25213 } else {
25214 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of element of argument 1");
25215 return false;
25216 }
25217 }
25218 } else if (temp.isNullOrUndefined()) {
25219 slot.SetNull();
25220 } else {
25221 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
25222 return false;
25223 }
25224 }
25225 } else if (args[0].isNullOrUndefined()) {
25226 arg0.Value().SetNull();
25227 } else {
25228 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
25229 return false;
25230 }
25231 }
25232 if (objIsXray) {
25233 // Since our object is an Xray, we can just CheckedUnwrapStatic:
25234 // we know Xrays have no dynamic unwrap behavior.
25235 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
25236 if (!unwrappedObj.ref()) {
25237 return false;
25238 }
25239 }
25240 FastErrorResult rv;
25241 // NOTE: This assert does NOT call the function.
25242 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableSequenceOfObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
25243 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableSequenceOfObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
25244 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceOfNullableSequenceOfObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceOfNullableSequenceOfObject"
)), 0))
) {
25245 return false;
25246 }
25247 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 25247); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25247; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25248 args.rval().setUndefined();
25249 return true;
25250}
25251
25252static const JSJitInfo passOptionalNullableSequenceOfNullableSequenceOfObject_methodinfo = {
25253 { (JSJitGetterOp)passOptionalNullableSequenceOfNullableSequenceOfObject },
25254 { prototypes::id::TestJSImplInterface },
25255 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
25256 JSJitInfo::Method,
25257 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25258 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25259 false, /* isInfallible. False in setters. */
25260 false, /* isMovable. Not relevant for setters. */
25261 false, /* isEliminatable. Not relevant for setters. */
25262 false, /* isAlwaysInSlot. Only relevant for getters. */
25263 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25264 false, /* isTypedMethod. Only relevant for methods. */
25265 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25266};
25267
25268MOZ_CAN_RUN_SCRIPT static bool
25269passOptionalNullableSequenceOfNullableSequenceOfNullableObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25270{
25271 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableSequenceOfNullableSequenceOfNullableObject");
25272 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25275( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfNullableObject"
, JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
25273 "TestJSImplInterface", "passOptionalNullableSequenceOfNullableSequenceOfNullableObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25275( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfNullableObject"
, JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
25274 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25275( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfNullableObject"
, JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
25275 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25275( cx, "TestJSImplInterface"
, "passOptionalNullableSequenceOfNullableSequenceOfNullableObject"
, JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
25276
25277 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
25278 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
25279 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
25280 if (objIsXray) {
25281 unwrappedObj.emplace(cx, obj);
25282 }
25283 Optional<Nullable<Sequence<Nullable<Sequence<JSObject*>>>>> arg0;
25284 Maybe<SequenceRooter<Nullable<Sequence<JSObject*>>>> arg0_holder;
25285 if (args.hasDefined(0)) {
25286 arg0.Construct();
25287 arg0_holder.emplace(cx, &arg0.Value().SetValue());
25288 if (args[0].isObject()) {
25289 JS::ForOfIterator iter(cx);
25290 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
25291 return false;
25292 }
25293 if (!iter.valueIsIterable()) {
25294 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
25295 return false;
25296 }
25297 Sequence<Nullable<Sequence<JSObject*>>> &arr = arg0.Value().SetValue();
25298 JS::Rooted<JS::Value> temp(cx);
25299 while (true) {
25300 bool done;
25301 if (!iter.next(&temp, &done)) {
25302 return false;
25303 }
25304 if (done) {
25305 break;
25306 }
25307 Nullable<Sequence<JSObject*>>* slotPtr = arr.AppendElement(mozilla::fallible);
25308 if (!slotPtr) {
25309 JS_ReportOutOfMemory(cx);
25310 return false;
25311 }
25312 Nullable<Sequence<JSObject*>>& slot = *slotPtr;
25313 if (temp.isObject()) {
25314 JS::ForOfIterator iter1(cx);
25315 if (!iter1.init(temp, JS::ForOfIterator::AllowNonIterable)) {
25316 return false;
25317 }
25318 if (!iter1.valueIsIterable()) {
25319 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
25320 return false;
25321 }
25322 Sequence<JSObject*> &arr1 = slot.SetValue();
25323 JS::Rooted<JS::Value> temp1(cx);
25324 while (true) {
25325 bool done1;
25326 if (!iter1.next(&temp1, &done1)) {
25327 return false;
25328 }
25329 if (done1) {
25330 break;
25331 }
25332 JSObject** slotPtr1 = arr1.AppendElement(nullptr, mozilla::fallible);
25333 if (!slotPtr1) {
25334 JS_ReportOutOfMemory(cx);
25335 return false;
25336 }
25337 JSObject*& slot1 = *slotPtr1;
25338 if (temp1.isObject()) {
25339#ifdef __clang__1
25340#pragma clang diagnostic push
25341#pragma clang diagnostic ignored "-Wunreachable-code"
25342#pragma clang diagnostic ignored "-Wunreachable-code-return"
25343#endif // __clang__
25344 if ((true) && !CallerSubsumes(temp1)) {
25345 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of element of argument 1");
25346 return false;
25347 }
25348#ifdef __clang__1
25349#pragma clang diagnostic pop
25350#endif // __clang__
25351 slot1 = &temp1.toObject();
25352 } else if (temp1.isNullOrUndefined()) {
25353 slot1 = nullptr;
25354 } else {
25355 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of element of argument 1");
25356 return false;
25357 }
25358 }
25359 } else if (temp.isNullOrUndefined()) {
25360 slot.SetNull();
25361 } else {
25362 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Element of argument 1", "sequence");
25363 return false;
25364 }
25365 }
25366 } else if (args[0].isNullOrUndefined()) {
25367 arg0.Value().SetNull();
25368 } else {
25369 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
25370 return false;
25371 }
25372 }
25373 if (objIsXray) {
25374 // Since our object is an Xray, we can just CheckedUnwrapStatic:
25375 // we know Xrays have no dynamic unwrap behavior.
25376 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
25377 if (!unwrappedObj.ref()) {
25378 return false;
25379 }
25380 }
25381 FastErrorResult rv;
25382 // NOTE: This assert does NOT call the function.
25383 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
25384 MOZ_KnownLive(self)(self)->PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
25385 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceOfNullableSequenceOfNullableObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableSequenceOfNullableSequenceOfNullableObject"
)), 0))
) {
25386 return false;
25387 }
25388 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 25388); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25388; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25389 args.rval().setUndefined();
25390 return true;
25391}
25392
25393static const JSJitInfo passOptionalNullableSequenceOfNullableSequenceOfNullableObject_methodinfo = {
25394 { (JSJitGetterOp)passOptionalNullableSequenceOfNullableSequenceOfNullableObject },
25395 { prototypes::id::TestJSImplInterface },
25396 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
25397 JSJitInfo::Method,
25398 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25399 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25400 false, /* isInfallible. False in setters. */
25401 false, /* isMovable. Not relevant for setters. */
25402 false, /* isEliminatable. Not relevant for setters. */
25403 false, /* isAlwaysInSlot. Only relevant for getters. */
25404 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25405 false, /* isTypedMethod. Only relevant for methods. */
25406 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25407};
25408
25409MOZ_CAN_RUN_SCRIPT static bool
25410passRecordOfObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25411{
25412 BindingCallContext cx(cx_, "TestJSImplInterface.passRecordOfObject");
25413 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25416( cx, "TestJSImplInterface"
, "passRecordOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25414 "TestJSImplInterface", "passRecordOfObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25416( cx, "TestJSImplInterface"
, "passRecordOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25415 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25416( cx, "TestJSImplInterface"
, "passRecordOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25416 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25416( cx, "TestJSImplInterface"
, "passRecordOfObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
25417
25418 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
25419 if (!args.requireAtLeast(cx, "TestJSImplInterface.passRecordOfObject", 1)) {
25420 return false;
25421 }
25422 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
25423 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
25424 if (objIsXray) {
25425 unwrappedObj.emplace(cx, obj);
25426 }
25427 Record<nsString, JSObject*> arg0;
25428 RecordRooter<nsString, JSObject*> arg0_holder(cx, &arg0);
25429 if (args[0].isObject()) {
25430 auto& recordEntries = arg0.Entries();
25431
25432 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
25433 JS::RootedVector<jsid> ids(cx);
25434 if (!js::GetPropertyKeys(cx, recordObj,
25435 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
25436 return false;
25437 }
25438 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
25439 JS_ReportOutOfMemory(cx);
25440 return false;
25441 }
25442 JS::Rooted<JS::Value> propNameValue(cx);
25443 JS::Rooted<JS::Value> temp(cx);
25444 JS::Rooted<jsid> curId(cx);
25445 JS::Rooted<JS::Value> idVal(cx);
25446 // Use a hashset to keep track of ids seen, to avoid
25447 // introducing nasty O(N^2) behavior scanning for them all the
25448 // time. Ideally we'd use a data structure with O(1) lookup
25449 // _and_ ordering for the MozMap, but we don't have one lying
25450 // around.
25451 nsTHashtable<nsStringHashKey> idsSeen;
25452 for (size_t i = 0; i < ids.length(); ++i) {
25453 curId = ids[i];
25454
25455 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
25456 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
25457 &desc)) {
25458 return false;
25459 }
25460
25461 if (desc.isNothing() || !desc->enumerable()) {
25462 continue;
25463 }
25464
25465 idVal = js::IdToValue(curId);
25466 nsString propName;
25467 // This will just throw if idVal is a Symbol, like the spec says
25468 // to do.
25469 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
25470 return false;
25471 }
25472
25473 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
25474 return false;
25475 }
25476
25477 Record<nsString, JSObject*>::EntryType* entry;
25478 if (!idsSeen.EnsureInserted(propName)) {
25479 // Find the existing entry.
25480 auto idx = recordEntries.IndexOf(propName);
25481 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 25482); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 25482; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
25482 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 25482); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 25482; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
25483 // Now blow it away to make it look like it was just added
25484 // to the array, because it's not obvious that it's
25485 // safe to write to its already-initialized mValue via our
25486 // normal codegen conversions. For example, the value
25487 // could be a union and this would change its type, but
25488 // codegen assumes we won't do that.
25489 entry = recordEntries.ReconstructElementAt(idx);
25490 } else {
25491 // Safe to do an infallible append here, because we did a
25492 // SetCapacity above to the right capacity.
25493 entry = recordEntries.AppendElement();
25494 }
25495 entry->mKey = propName;
25496 JSObject*& slot = entry->mValue;
25497 if (temp.isObject()) {
25498#ifdef __clang__1
25499#pragma clang diagnostic push
25500#pragma clang diagnostic ignored "-Wunreachable-code"
25501#pragma clang diagnostic ignored "-Wunreachable-code-return"
25502#endif // __clang__
25503 if ((true) && !CallerSubsumes(temp)) {
25504 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("value in argument 1");
25505 return false;
25506 }
25507#ifdef __clang__1
25508#pragma clang diagnostic pop
25509#endif // __clang__
25510 slot = &temp.toObject();
25511 } else {
25512 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value in argument 1");
25513 return false;
25514 }
25515 }
25516 } else {
25517 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
25518 return false;
25519 }
25520 if (objIsXray) {
25521 // Since our object is an Xray, we can just CheckedUnwrapStatic:
25522 // we know Xrays have no dynamic unwrap behavior.
25523 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
25524 if (!unwrappedObj.ref()) {
25525 return false;
25526 }
25527 }
25528 FastErrorResult rv;
25529 // NOTE: This assert does NOT call the function.
25530 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
25531 MOZ_KnownLive(self)(self)->PassRecordOfObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
25532 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfObject"
)), 0))
) {
25533 return false;
25534 }
25535 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 25535); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25535; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25536 args.rval().setUndefined();
25537 return true;
25538}
25539
25540static const JSJitInfo passRecordOfObject_methodinfo = {
25541 { (JSJitGetterOp)passRecordOfObject },
25542 { prototypes::id::TestJSImplInterface },
25543 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
25544 JSJitInfo::Method,
25545 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25546 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25547 false, /* isInfallible. False in setters. */
25548 false, /* isMovable. Not relevant for setters. */
25549 false, /* isEliminatable. Not relevant for setters. */
25550 false, /* isAlwaysInSlot. Only relevant for getters. */
25551 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25552 false, /* isTypedMethod. Only relevant for methods. */
25553 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25554};
25555
25556MOZ_CAN_RUN_SCRIPT static bool
25557receiveObject(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25558{
25559 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25562( cx, "TestJSImplInterface"
, "receiveObject", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25560 "TestJSImplInterface", "receiveObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25562( cx, "TestJSImplInterface"
, "receiveObject", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25561 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25562( cx, "TestJSImplInterface"
, "receiveObject", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25562 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25562( cx, "TestJSImplInterface"
, "receiveObject", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
25563
25564 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
25565 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
25566 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
25567 if (objIsXray) {
25568 unwrappedObj.emplace(cx, obj);
25569 }
25570 if (objIsXray) {
25571 // Since our object is an Xray, we can just CheckedUnwrapStatic:
25572 // we know Xrays have no dynamic unwrap behavior.
25573 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
25574 if (!unwrappedObj.ref()) {
25575 return false;
25576 }
25577 }
25578 FastErrorResult rv;
25579 JS::Rooted<JSObject*> result(cx);
25580 // NOTE: This assert does NOT call the function.
25581 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveObject(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
25582 MOZ_KnownLive(self)(self)->ReceiveObject(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
25583 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveObject"
)), 0))
) {
25584 return false;
25585 }
25586 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 25586); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25586; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25587 JS::ExposeObjectToActiveJS(result);
25588 args.rval().setObject(*result);
25589 if (!MaybeWrapObjectValue(cx, args.rval())) {
25590 return false;
25591 }
25592 return true;
25593}
25594
25595static const JSJitInfo receiveObject_methodinfo = {
25596 { (JSJitGetterOp)receiveObject },
25597 { prototypes::id::TestJSImplInterface },
25598 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
25599 JSJitInfo::Method,
25600 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25601 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
25602 false, /* isInfallible. False in setters. */
25603 false, /* isMovable. Not relevant for setters. */
25604 false, /* isEliminatable. Not relevant for setters. */
25605 false, /* isAlwaysInSlot. Only relevant for getters. */
25606 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25607 false, /* isTypedMethod. Only relevant for methods. */
25608 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25609};
25610
25611MOZ_CAN_RUN_SCRIPT static bool
25612receiveNullableObject(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25613{
25614 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25617( cx, "TestJSImplInterface"
, "receiveNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25615 "TestJSImplInterface", "receiveNullableObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25617( cx, "TestJSImplInterface"
, "receiveNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25616 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25617( cx, "TestJSImplInterface"
, "receiveNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25617 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25617( cx, "TestJSImplInterface"
, "receiveNullableObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
25618
25619 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
25620 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
25621 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
25622 if (objIsXray) {
25623 unwrappedObj.emplace(cx, obj);
25624 }
25625 if (objIsXray) {
25626 // Since our object is an Xray, we can just CheckedUnwrapStatic:
25627 // we know Xrays have no dynamic unwrap behavior.
25628 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
25629 if (!unwrappedObj.ref()) {
25630 return false;
25631 }
25632 }
25633 FastErrorResult rv;
25634 JS::Rooted<JSObject*> result(cx);
25635 // NOTE: This assert does NOT call the function.
25636 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableObject(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
25637 MOZ_KnownLive(self)(self)->ReceiveNullableObject(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
25638 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableObject"
)), 0))
) {
25639 return false;
25640 }
25641 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 25641); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25641; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25642 if (result) {
25643 JS::ExposeObjectToActiveJS(result);
25644 }
25645 args.rval().setObjectOrNull(result);
25646 if (!MaybeWrapObjectOrNullValue(cx, args.rval())) {
25647 return false;
25648 }
25649 return true;
25650}
25651
25652static const JSJitInfo receiveNullableObject_methodinfo = {
25653 { (JSJitGetterOp)receiveNullableObject },
25654 { prototypes::id::TestJSImplInterface },
25655 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
25656 JSJitInfo::Method,
25657 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25658 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
25659 false, /* isInfallible. False in setters. */
25660 false, /* isMovable. Not relevant for setters. */
25661 false, /* isEliminatable. Not relevant for setters. */
25662 false, /* isAlwaysInSlot. Only relevant for getters. */
25663 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25664 false, /* isTypedMethod. Only relevant for methods. */
25665 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25666};
25667
25668MOZ_CAN_RUN_SCRIPT static bool
25669passUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25670{
25671 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion");
25672 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25675( cx, "TestJSImplInterface"
, "passUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
25673 "TestJSImplInterface", "passUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25675( cx, "TestJSImplInterface"
, "passUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
25674 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25675( cx, "TestJSImplInterface"
, "passUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
25675 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25675( cx, "TestJSImplInterface"
, "passUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
25676
25677 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
25678 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion", 1)) {
25679 return false;
25680 }
25681 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
25682 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
25683 if (objIsXray) {
25684 unwrappedObj.emplace(cx, obj);
25685 }
25686 ObjectOrLong arg0;
25687 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
25688 return false;
25689 }
25690 if (objIsXray) {
25691 // Since our object is an Xray, we can just CheckedUnwrapStatic:
25692 // we know Xrays have no dynamic unwrap behavior.
25693 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
25694 if (!unwrappedObj.ref()) {
25695 return false;
25696 }
25697 }
25698 FastErrorResult rv;
25699 // NOTE: This assert does NOT call the function.
25700 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
25701 MOZ_KnownLive(self)(self)->PassUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
25702 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion"
)), 0))
) {
25703 return false;
25704 }
25705 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 25705); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25705; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25706 args.rval().setUndefined();
25707 return true;
25708}
25709
25710static const JSJitInfo passUnion_methodinfo = {
25711 { (JSJitGetterOp)passUnion },
25712 { prototypes::id::TestJSImplInterface },
25713 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
25714 JSJitInfo::Method,
25715 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25716 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25717 false, /* isInfallible. False in setters. */
25718 false, /* isMovable. Not relevant for setters. */
25719 false, /* isEliminatable. Not relevant for setters. */
25720 false, /* isAlwaysInSlot. Only relevant for getters. */
25721 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25722 false, /* isTypedMethod. Only relevant for methods. */
25723 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25724};
25725
25726MOZ_CAN_RUN_SCRIPT static bool
25727passUnion2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25728{
25729 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion2");
25730 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25733( cx, "TestJSImplInterface"
, "passUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25731 "TestJSImplInterface", "passUnion2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25733( cx, "TestJSImplInterface"
, "passUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25732 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25733( cx, "TestJSImplInterface"
, "passUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25733 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25733( cx, "TestJSImplInterface"
, "passUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
25734
25735 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
25736 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion2", 1)) {
25737 return false;
25738 }
25739 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
25740 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
25741 if (objIsXray) {
25742 unwrappedObj.emplace(cx, obj);
25743 }
25744 LongOrBoolean arg0;
25745 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
25746 return false;
25747 }
25748 if (objIsXray) {
25749 // Since our object is an Xray, we can just CheckedUnwrapStatic:
25750 // we know Xrays have no dynamic unwrap behavior.
25751 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
25752 if (!unwrappedObj.ref()) {
25753 return false;
25754 }
25755 }
25756 FastErrorResult rv;
25757 // NOTE: This assert does NOT call the function.
25758 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
25759 MOZ_KnownLive(self)(self)->PassUnion2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
25760 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion2"
)), 0))
) {
25761 return false;
25762 }
25763 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 25763); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25763; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25764 args.rval().setUndefined();
25765 return true;
25766}
25767
25768static const JSJitInfo passUnion2_methodinfo = {
25769 { (JSJitGetterOp)passUnion2 },
25770 { prototypes::id::TestJSImplInterface },
25771 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
25772 JSJitInfo::Method,
25773 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25774 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25775 false, /* isInfallible. False in setters. */
25776 false, /* isMovable. Not relevant for setters. */
25777 false, /* isEliminatable. Not relevant for setters. */
25778 false, /* isAlwaysInSlot. Only relevant for getters. */
25779 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25780 false, /* isTypedMethod. Only relevant for methods. */
25781 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25782};
25783
25784MOZ_CAN_RUN_SCRIPT static bool
25785passUnion3(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25786{
25787 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion3");
25788 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25791( cx, "TestJSImplInterface"
, "passUnion3", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25789 "TestJSImplInterface", "passUnion3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25791( cx, "TestJSImplInterface"
, "passUnion3", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25790 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25791( cx, "TestJSImplInterface"
, "passUnion3", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25791 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25791( cx, "TestJSImplInterface"
, "passUnion3", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
25792
25793 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
25794 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion3", 1)) {
25795 return false;
25796 }
25797 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
25798 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
25799 if (objIsXray) {
25800 unwrappedObj.emplace(cx, obj);
25801 }
25802 ObjectOrLongOrBoolean arg0;
25803 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
25804 return false;
25805 }
25806 if (objIsXray) {
25807 // Since our object is an Xray, we can just CheckedUnwrapStatic:
25808 // we know Xrays have no dynamic unwrap behavior.
25809 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
25810 if (!unwrappedObj.ref()) {
25811 return false;
25812 }
25813 }
25814 FastErrorResult rv;
25815 // NOTE: This assert does NOT call the function.
25816 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion3(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
25817 MOZ_KnownLive(self)(self)->PassUnion3(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
25818 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion3"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion3"
)), 0))
) {
25819 return false;
25820 }
25821 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 25821); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25821; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25822 args.rval().setUndefined();
25823 return true;
25824}
25825
25826static const JSJitInfo passUnion3_methodinfo = {
25827 { (JSJitGetterOp)passUnion3 },
25828 { prototypes::id::TestJSImplInterface },
25829 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
25830 JSJitInfo::Method,
25831 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25832 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25833 false, /* isInfallible. False in setters. */
25834 false, /* isMovable. Not relevant for setters. */
25835 false, /* isEliminatable. Not relevant for setters. */
25836 false, /* isAlwaysInSlot. Only relevant for getters. */
25837 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25838 false, /* isTypedMethod. Only relevant for methods. */
25839 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25840};
25841
25842MOZ_CAN_RUN_SCRIPT static bool
25843passUnion4(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25844{
25845 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion4");
25846 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25849( cx, "TestJSImplInterface"
, "passUnion4", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25847 "TestJSImplInterface", "passUnion4", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25849( cx, "TestJSImplInterface"
, "passUnion4", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25848 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25849( cx, "TestJSImplInterface"
, "passUnion4", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25849 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25849( cx, "TestJSImplInterface"
, "passUnion4", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
25850
25851 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
25852 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion4", 1)) {
25853 return false;
25854 }
25855 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
25856 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
25857 if (objIsXray) {
25858 unwrappedObj.emplace(cx, obj);
25859 }
25860 NodeOrLongOrBoolean arg0;
25861 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
25862 return false;
25863 }
25864 if (objIsXray) {
25865 // Since our object is an Xray, we can just CheckedUnwrapStatic:
25866 // we know Xrays have no dynamic unwrap behavior.
25867 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
25868 if (!unwrappedObj.ref()) {
25869 return false;
25870 }
25871 }
25872 FastErrorResult rv;
25873 // NOTE: This assert does NOT call the function.
25874 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion4(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
25875 MOZ_KnownLive(self)(self)->PassUnion4(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
25876 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion4"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion4"
)), 0))
) {
25877 return false;
25878 }
25879 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 25879); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25879; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25880 args.rval().setUndefined();
25881 return true;
25882}
25883
25884static const JSJitInfo passUnion4_methodinfo = {
25885 { (JSJitGetterOp)passUnion4 },
25886 { prototypes::id::TestJSImplInterface },
25887 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
25888 JSJitInfo::Method,
25889 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25890 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25891 false, /* isInfallible. False in setters. */
25892 false, /* isMovable. Not relevant for setters. */
25893 false, /* isEliminatable. Not relevant for setters. */
25894 false, /* isAlwaysInSlot. Only relevant for getters. */
25895 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25896 false, /* isTypedMethod. Only relevant for methods. */
25897 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25898};
25899
25900MOZ_CAN_RUN_SCRIPT static bool
25901passUnion5(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25902{
25903 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion5");
25904 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25907( cx, "TestJSImplInterface"
, "passUnion5", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25905 "TestJSImplInterface", "passUnion5", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25907( cx, "TestJSImplInterface"
, "passUnion5", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25906 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25907( cx, "TestJSImplInterface"
, "passUnion5", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25907 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25907( cx, "TestJSImplInterface"
, "passUnion5", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
25908
25909 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
25910 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion5", 1)) {
25911 return false;
25912 }
25913 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
25914 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
25915 if (objIsXray) {
25916 unwrappedObj.emplace(cx, obj);
25917 }
25918 ObjectOrBoolean arg0;
25919 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
25920 return false;
25921 }
25922 if (objIsXray) {
25923 // Since our object is an Xray, we can just CheckedUnwrapStatic:
25924 // we know Xrays have no dynamic unwrap behavior.
25925 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
25926 if (!unwrappedObj.ref()) {
25927 return false;
25928 }
25929 }
25930 FastErrorResult rv;
25931 // NOTE: This assert does NOT call the function.
25932 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion5(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
25933 MOZ_KnownLive(self)(self)->PassUnion5(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
25934 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion5"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion5"
)), 0))
) {
25935 return false;
25936 }
25937 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 25937); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25937; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25938 args.rval().setUndefined();
25939 return true;
25940}
25941
25942static const JSJitInfo passUnion5_methodinfo = {
25943 { (JSJitGetterOp)passUnion5 },
25944 { prototypes::id::TestJSImplInterface },
25945 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
25946 JSJitInfo::Method,
25947 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
25948 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
25949 false, /* isInfallible. False in setters. */
25950 false, /* isMovable. Not relevant for setters. */
25951 false, /* isEliminatable. Not relevant for setters. */
25952 false, /* isAlwaysInSlot. Only relevant for getters. */
25953 false, /* isLazilyCachedInSlot. Only relevant for getters. */
25954 false, /* isTypedMethod. Only relevant for methods. */
25955 0 /* Reserved slot index, if we're stored in a slot, else 0. */
25956};
25957
25958MOZ_CAN_RUN_SCRIPT static bool
25959passUnion6(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
25960{
25961 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion6");
25962 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject25965( cx, "TestJSImplInterface"
, "passUnion6", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25963 "TestJSImplInterface", "passUnion6", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject25965( cx, "TestJSImplInterface"
, "passUnion6", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25964 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject25965( cx, "TestJSImplInterface"
, "passUnion6", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
25965 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject25965( cx, "TestJSImplInterface"
, "passUnion6", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
25966
25967 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
25968 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion6", 1)) {
25969 return false;
25970 }
25971 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
25972 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
25973 if (objIsXray) {
25974 unwrappedObj.emplace(cx, obj);
25975 }
25976 ObjectOrString arg0;
25977 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
25978 return false;
25979 }
25980 if (objIsXray) {
25981 // Since our object is an Xray, we can just CheckedUnwrapStatic:
25982 // we know Xrays have no dynamic unwrap behavior.
25983 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
25984 if (!unwrappedObj.ref()) {
25985 return false;
25986 }
25987 }
25988 FastErrorResult rv;
25989 // NOTE: This assert does NOT call the function.
25990 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion6(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
25991 MOZ_KnownLive(self)(self)->PassUnion6(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
25992 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion6"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion6"
)), 0))
) {
25993 return false;
25994 }
25995 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 25995); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 25995; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
25996 args.rval().setUndefined();
25997 return true;
25998}
25999
26000static const JSJitInfo passUnion6_methodinfo = {
26001 { (JSJitGetterOp)passUnion6 },
26002 { prototypes::id::TestJSImplInterface },
26003 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26004 JSJitInfo::Method,
26005 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26006 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26007 false, /* isInfallible. False in setters. */
26008 false, /* isMovable. Not relevant for setters. */
26009 false, /* isEliminatable. Not relevant for setters. */
26010 false, /* isAlwaysInSlot. Only relevant for getters. */
26011 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26012 false, /* isTypedMethod. Only relevant for methods. */
26013 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26014};
26015
26016MOZ_CAN_RUN_SCRIPT static bool
26017passUnion7(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26018{
26019 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion7");
26020 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26023( cx, "TestJSImplInterface"
, "passUnion7", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26021 "TestJSImplInterface", "passUnion7", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26023( cx, "TestJSImplInterface"
, "passUnion7", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26022 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26023( cx, "TestJSImplInterface"
, "passUnion7", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26023 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26023( cx, "TestJSImplInterface"
, "passUnion7", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26024
26025 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26026 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion7", 1)) {
26027 return false;
26028 }
26029 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26030 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26031 if (objIsXray) {
26032 unwrappedObj.emplace(cx, obj);
26033 }
26034 ObjectOrStringOrLong arg0;
26035 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26036 return false;
26037 }
26038 if (objIsXray) {
26039 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26040 // we know Xrays have no dynamic unwrap behavior.
26041 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26042 if (!unwrappedObj.ref()) {
26043 return false;
26044 }
26045 }
26046 FastErrorResult rv;
26047 // NOTE: This assert does NOT call the function.
26048 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion7(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26049 MOZ_KnownLive(self)(self)->PassUnion7(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26050 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion7"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion7"
)), 0))
) {
26051 return false;
26052 }
26053 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26053); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26053; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26054 args.rval().setUndefined();
26055 return true;
26056}
26057
26058static const JSJitInfo passUnion7_methodinfo = {
26059 { (JSJitGetterOp)passUnion7 },
26060 { prototypes::id::TestJSImplInterface },
26061 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26062 JSJitInfo::Method,
26063 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26064 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26065 false, /* isInfallible. False in setters. */
26066 false, /* isMovable. Not relevant for setters. */
26067 false, /* isEliminatable. Not relevant for setters. */
26068 false, /* isAlwaysInSlot. Only relevant for getters. */
26069 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26070 false, /* isTypedMethod. Only relevant for methods. */
26071 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26072};
26073
26074MOZ_CAN_RUN_SCRIPT static bool
26075passUnion8(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26076{
26077 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion8");
26078 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26081( cx, "TestJSImplInterface"
, "passUnion8", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26079 "TestJSImplInterface", "passUnion8", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26081( cx, "TestJSImplInterface"
, "passUnion8", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26080 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26081( cx, "TestJSImplInterface"
, "passUnion8", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26081 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26081( cx, "TestJSImplInterface"
, "passUnion8", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26082
26083 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26084 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion8", 1)) {
26085 return false;
26086 }
26087 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26088 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26089 if (objIsXray) {
26090 unwrappedObj.emplace(cx, obj);
26091 }
26092 ObjectOrStringOrBoolean arg0;
26093 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26094 return false;
26095 }
26096 if (objIsXray) {
26097 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26098 // we know Xrays have no dynamic unwrap behavior.
26099 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26100 if (!unwrappedObj.ref()) {
26101 return false;
26102 }
26103 }
26104 FastErrorResult rv;
26105 // NOTE: This assert does NOT call the function.
26106 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion8(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26107 MOZ_KnownLive(self)(self)->PassUnion8(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26108 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion8"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion8"
)), 0))
) {
26109 return false;
26110 }
26111 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26111); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26111; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26112 args.rval().setUndefined();
26113 return true;
26114}
26115
26116static const JSJitInfo passUnion8_methodinfo = {
26117 { (JSJitGetterOp)passUnion8 },
26118 { prototypes::id::TestJSImplInterface },
26119 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26120 JSJitInfo::Method,
26121 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26122 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26123 false, /* isInfallible. False in setters. */
26124 false, /* isMovable. Not relevant for setters. */
26125 false, /* isEliminatable. Not relevant for setters. */
26126 false, /* isAlwaysInSlot. Only relevant for getters. */
26127 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26128 false, /* isTypedMethod. Only relevant for methods. */
26129 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26130};
26131
26132MOZ_CAN_RUN_SCRIPT static bool
26133passUnion9(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26134{
26135 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion9");
26136 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26139( cx, "TestJSImplInterface"
, "passUnion9", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26137 "TestJSImplInterface", "passUnion9", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26139( cx, "TestJSImplInterface"
, "passUnion9", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26138 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26139( cx, "TestJSImplInterface"
, "passUnion9", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26139 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26139( cx, "TestJSImplInterface"
, "passUnion9", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26140
26141 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26142 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion9", 1)) {
26143 return false;
26144 }
26145 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26146 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26147 if (objIsXray) {
26148 unwrappedObj.emplace(cx, obj);
26149 }
26150 ObjectOrStringOrLongOrBoolean arg0;
26151 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26152 return false;
26153 }
26154 if (objIsXray) {
26155 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26156 // we know Xrays have no dynamic unwrap behavior.
26157 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26158 if (!unwrappedObj.ref()) {
26159 return false;
26160 }
26161 }
26162 FastErrorResult rv;
26163 // NOTE: This assert does NOT call the function.
26164 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion9(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26165 MOZ_KnownLive(self)(self)->PassUnion9(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26166 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion9"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion9"
)), 0))
) {
26167 return false;
26168 }
26169 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26169); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26169; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26170 args.rval().setUndefined();
26171 return true;
26172}
26173
26174static const JSJitInfo passUnion9_methodinfo = {
26175 { (JSJitGetterOp)passUnion9 },
26176 { prototypes::id::TestJSImplInterface },
26177 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26178 JSJitInfo::Method,
26179 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26180 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26181 false, /* isInfallible. False in setters. */
26182 false, /* isMovable. Not relevant for setters. */
26183 false, /* isEliminatable. Not relevant for setters. */
26184 false, /* isAlwaysInSlot. Only relevant for getters. */
26185 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26186 false, /* isTypedMethod. Only relevant for methods. */
26187 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26188};
26189
26190MOZ_CAN_RUN_SCRIPT static bool
26191passUnion10(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26192{
26193 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion10");
26194 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26197( cx, "TestJSImplInterface"
, "passUnion10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26195 "TestJSImplInterface", "passUnion10", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26197( cx, "TestJSImplInterface"
, "passUnion10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26196 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26197( cx, "TestJSImplInterface"
, "passUnion10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26197 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26197( cx, "TestJSImplInterface"
, "passUnion10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26198
26199 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26200 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26201 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26202 if (objIsXray) {
26203 unwrappedObj.emplace(cx, obj);
26204 }
26205 EventInitOrLong arg0;
26206 if (!(args.hasDefined(0))) {
26207 if (!arg0.RawSetAsEventInit().Init(cx, JS::NullHandleValue, "Member of (EventInit or long)")) {
26208 return false;
26209 }
26210 } else {
26211 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26212 return false;
26213 }
26214 }
26215 if (objIsXray) {
26216 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26217 // we know Xrays have no dynamic unwrap behavior.
26218 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26219 if (!unwrappedObj.ref()) {
26220 return false;
26221 }
26222 }
26223 FastErrorResult rv;
26224 // NOTE: This assert does NOT call the function.
26225 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion10(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26226 MOZ_KnownLive(self)(self)->PassUnion10(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26227 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion10"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion10"
)), 0))
) {
26228 return false;
26229 }
26230 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26230); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26230; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26231 args.rval().setUndefined();
26232 return true;
26233}
26234
26235static const JSJitInfo passUnion10_methodinfo = {
26236 { (JSJitGetterOp)passUnion10 },
26237 { prototypes::id::TestJSImplInterface },
26238 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26239 JSJitInfo::Method,
26240 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26241 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26242 false, /* isInfallible. False in setters. */
26243 false, /* isMovable. Not relevant for setters. */
26244 false, /* isEliminatable. Not relevant for setters. */
26245 false, /* isAlwaysInSlot. Only relevant for getters. */
26246 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26247 false, /* isTypedMethod. Only relevant for methods. */
26248 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26249};
26250
26251MOZ_CAN_RUN_SCRIPT static bool
26252passUnion11(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26253{
26254 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion11");
26255 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26258( cx, "TestJSImplInterface"
, "passUnion11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26256 "TestJSImplInterface", "passUnion11", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26258( cx, "TestJSImplInterface"
, "passUnion11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26257 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26258( cx, "TestJSImplInterface"
, "passUnion11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26258 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26258( cx, "TestJSImplInterface"
, "passUnion11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26259
26260 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26261 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26262 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26263 if (objIsXray) {
26264 unwrappedObj.emplace(cx, obj);
26265 }
26266 CustomEventInitOrLong arg0;
26267 if (!(args.hasDefined(0))) {
26268 if (!arg0.RawSetAsCustomEventInit(cx).Init(cx, JS::NullHandleValue, "Member of (CustomEventInit or long)")) {
26269 return false;
26270 }
26271 } else {
26272 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26273 return false;
26274 }
26275 }
26276 if (objIsXray) {
26277 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26278 // we know Xrays have no dynamic unwrap behavior.
26279 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26280 if (!unwrappedObj.ref()) {
26281 return false;
26282 }
26283 }
26284 FastErrorResult rv;
26285 // NOTE: This assert does NOT call the function.
26286 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion11(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26287 MOZ_KnownLive(self)(self)->PassUnion11(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26288 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion11"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion11"
)), 0))
) {
26289 return false;
26290 }
26291 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26291); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26291; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26292 args.rval().setUndefined();
26293 return true;
26294}
26295
26296static const JSJitInfo passUnion11_methodinfo = {
26297 { (JSJitGetterOp)passUnion11 },
26298 { prototypes::id::TestJSImplInterface },
26299 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26300 JSJitInfo::Method,
26301 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26302 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26303 false, /* isInfallible. False in setters. */
26304 false, /* isMovable. Not relevant for setters. */
26305 false, /* isEliminatable. Not relevant for setters. */
26306 false, /* isAlwaysInSlot. Only relevant for getters. */
26307 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26308 false, /* isTypedMethod. Only relevant for methods. */
26309 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26310};
26311
26312MOZ_CAN_RUN_SCRIPT static bool
26313passUnion12(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26314{
26315 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion12");
26316 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26319( cx, "TestJSImplInterface"
, "passUnion12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26317 "TestJSImplInterface", "passUnion12", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26319( cx, "TestJSImplInterface"
, "passUnion12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26318 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26319( cx, "TestJSImplInterface"
, "passUnion12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26319 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26319( cx, "TestJSImplInterface"
, "passUnion12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26320
26321 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26322 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26323 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26324 if (objIsXray) {
26325 unwrappedObj.emplace(cx, obj);
26326 }
26327 EventInitOrLong arg0;
26328 if (!(args.hasDefined(0))) {
26329 arg0.RawSetAsLong() = 5;
26330 } else {
26331 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26332 return false;
26333 }
26334 }
26335 if (objIsXray) {
26336 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26337 // we know Xrays have no dynamic unwrap behavior.
26338 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26339 if (!unwrappedObj.ref()) {
26340 return false;
26341 }
26342 }
26343 FastErrorResult rv;
26344 // NOTE: This assert does NOT call the function.
26345 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion12(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26346 MOZ_KnownLive(self)(self)->PassUnion12(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26347 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion12"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion12"
)), 0))
) {
26348 return false;
26349 }
26350 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26350); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26350; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26351 args.rval().setUndefined();
26352 return true;
26353}
26354
26355static const JSJitInfo passUnion12_methodinfo = {
26356 { (JSJitGetterOp)passUnion12 },
26357 { prototypes::id::TestJSImplInterface },
26358 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26359 JSJitInfo::Method,
26360 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26361 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26362 false, /* isInfallible. False in setters. */
26363 false, /* isMovable. Not relevant for setters. */
26364 false, /* isEliminatable. Not relevant for setters. */
26365 false, /* isAlwaysInSlot. Only relevant for getters. */
26366 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26367 false, /* isTypedMethod. Only relevant for methods. */
26368 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26369};
26370
26371MOZ_CAN_RUN_SCRIPT static bool
26372passUnion13(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26373{
26374 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion13");
26375 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26378( cx, "TestJSImplInterface"
, "passUnion13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26376 "TestJSImplInterface", "passUnion13", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26378( cx, "TestJSImplInterface"
, "passUnion13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26377 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26378( cx, "TestJSImplInterface"
, "passUnion13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26378 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26378( cx, "TestJSImplInterface"
, "passUnion13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26379
26380 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26381 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26382 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26383 if (objIsXray) {
26384 unwrappedObj.emplace(cx, obj);
26385 }
26386 ObjectOrLongOrNull arg0;
26387 if (!(args.hasDefined(0))) {
26388 arg0.SetNull();
26389 } else {
26390 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26391 return false;
26392 }
26393 }
26394 if (objIsXray) {
26395 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26396 // we know Xrays have no dynamic unwrap behavior.
26397 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26398 if (!unwrappedObj.ref()) {
26399 return false;
26400 }
26401 }
26402 FastErrorResult rv;
26403 // NOTE: This assert does NOT call the function.
26404 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion13(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26405 MOZ_KnownLive(self)(self)->PassUnion13(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26406 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion13"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion13"
)), 0))
) {
26407 return false;
26408 }
26409 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26409); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26409; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26410 args.rval().setUndefined();
26411 return true;
26412}
26413
26414static const JSJitInfo passUnion13_methodinfo = {
26415 { (JSJitGetterOp)passUnion13 },
26416 { prototypes::id::TestJSImplInterface },
26417 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26418 JSJitInfo::Method,
26419 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26420 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26421 false, /* isInfallible. False in setters. */
26422 false, /* isMovable. Not relevant for setters. */
26423 false, /* isEliminatable. Not relevant for setters. */
26424 false, /* isAlwaysInSlot. Only relevant for getters. */
26425 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26426 false, /* isTypedMethod. Only relevant for methods. */
26427 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26428};
26429
26430MOZ_CAN_RUN_SCRIPT static bool
26431passUnion14(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26432{
26433 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion14");
26434 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26437( cx, "TestJSImplInterface"
, "passUnion14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26435 "TestJSImplInterface", "passUnion14", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26437( cx, "TestJSImplInterface"
, "passUnion14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26436 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26437( cx, "TestJSImplInterface"
, "passUnion14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26437 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26437( cx, "TestJSImplInterface"
, "passUnion14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26438
26439 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26440 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26441 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26442 if (objIsXray) {
26443 unwrappedObj.emplace(cx, obj);
26444 }
26445 ObjectOrLongOrNull arg0;
26446 if (!(args.hasDefined(0))) {
26447 arg0.RawSetAsLong() = 5;
26448 } else {
26449 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26450 return false;
26451 }
26452 }
26453 if (objIsXray) {
26454 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26455 // we know Xrays have no dynamic unwrap behavior.
26456 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26457 if (!unwrappedObj.ref()) {
26458 return false;
26459 }
26460 }
26461 FastErrorResult rv;
26462 // NOTE: This assert does NOT call the function.
26463 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion14(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26464 MOZ_KnownLive(self)(self)->PassUnion14(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26465 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion14"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion14"
)), 0))
) {
26466 return false;
26467 }
26468 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26468); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26468; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26469 args.rval().setUndefined();
26470 return true;
26471}
26472
26473static const JSJitInfo passUnion14_methodinfo = {
26474 { (JSJitGetterOp)passUnion14 },
26475 { prototypes::id::TestJSImplInterface },
26476 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26477 JSJitInfo::Method,
26478 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26479 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26480 false, /* isInfallible. False in setters. */
26481 false, /* isMovable. Not relevant for setters. */
26482 false, /* isEliminatable. Not relevant for setters. */
26483 false, /* isAlwaysInSlot. Only relevant for getters. */
26484 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26485 false, /* isTypedMethod. Only relevant for methods. */
26486 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26487};
26488
26489MOZ_CAN_RUN_SCRIPT static bool
26490passUnion15(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26491{
26492 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion15");
26493 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26496( cx, "TestJSImplInterface"
, "passUnion15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26494 "TestJSImplInterface", "passUnion15", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26496( cx, "TestJSImplInterface"
, "passUnion15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26495 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26496( cx, "TestJSImplInterface"
, "passUnion15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26496 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26496( cx, "TestJSImplInterface"
, "passUnion15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26497
26498 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26499 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion15", 1)) {
26500 return false;
26501 }
26502 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26503 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26504 if (objIsXray) {
26505 unwrappedObj.emplace(cx, obj);
26506 }
26507 LongSequenceOrLong arg0;
26508 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26509 return false;
26510 }
26511 if (objIsXray) {
26512 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26513 // we know Xrays have no dynamic unwrap behavior.
26514 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26515 if (!unwrappedObj.ref()) {
26516 return false;
26517 }
26518 }
26519 FastErrorResult rv;
26520 // NOTE: This assert does NOT call the function.
26521 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion15(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26522 MOZ_KnownLive(self)(self)->PassUnion15(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26523 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion15"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion15"
)), 0))
) {
26524 return false;
26525 }
26526 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26526); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26526; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26527 args.rval().setUndefined();
26528 return true;
26529}
26530
26531static const JSJitInfo passUnion15_methodinfo = {
26532 { (JSJitGetterOp)passUnion15 },
26533 { prototypes::id::TestJSImplInterface },
26534 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26535 JSJitInfo::Method,
26536 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26537 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26538 false, /* isInfallible. False in setters. */
26539 false, /* isMovable. Not relevant for setters. */
26540 false, /* isEliminatable. Not relevant for setters. */
26541 false, /* isAlwaysInSlot. Only relevant for getters. */
26542 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26543 false, /* isTypedMethod. Only relevant for methods. */
26544 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26545};
26546
26547MOZ_CAN_RUN_SCRIPT static bool
26548passUnion16(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26549{
26550 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion16");
26551 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26554( cx, "TestJSImplInterface"
, "passUnion16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26552 "TestJSImplInterface", "passUnion16", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26554( cx, "TestJSImplInterface"
, "passUnion16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26553 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26554( cx, "TestJSImplInterface"
, "passUnion16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26554 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26554( cx, "TestJSImplInterface"
, "passUnion16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26555
26556 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26557 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26558 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26559 if (objIsXray) {
26560 unwrappedObj.emplace(cx, obj);
26561 }
26562 Optional<LongSequenceOrLong> arg0;
26563 if (args.hasDefined(0)) {
26564 arg0.Construct();
26565 if (!arg0.Value().Init(cx, args[0], "Argument 1", true)) {
26566 return false;
26567 }
26568 }
26569 if (objIsXray) {
26570 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26571 // we know Xrays have no dynamic unwrap behavior.
26572 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26573 if (!unwrappedObj.ref()) {
26574 return false;
26575 }
26576 }
26577 FastErrorResult rv;
26578 // NOTE: This assert does NOT call the function.
26579 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion16(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26580 MOZ_KnownLive(self)(self)->PassUnion16(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26581 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion16"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion16"
)), 0))
) {
26582 return false;
26583 }
26584 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26584); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26584; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26585 args.rval().setUndefined();
26586 return true;
26587}
26588
26589static const JSJitInfo passUnion16_methodinfo = {
26590 { (JSJitGetterOp)passUnion16 },
26591 { prototypes::id::TestJSImplInterface },
26592 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26593 JSJitInfo::Method,
26594 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26595 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26596 false, /* isInfallible. False in setters. */
26597 false, /* isMovable. Not relevant for setters. */
26598 false, /* isEliminatable. Not relevant for setters. */
26599 false, /* isAlwaysInSlot. Only relevant for getters. */
26600 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26601 false, /* isTypedMethod. Only relevant for methods. */
26602 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26603};
26604
26605MOZ_CAN_RUN_SCRIPT static bool
26606passUnion17(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26607{
26608 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion17");
26609 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26612( cx, "TestJSImplInterface"
, "passUnion17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26610 "TestJSImplInterface", "passUnion17", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26612( cx, "TestJSImplInterface"
, "passUnion17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26611 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26612( cx, "TestJSImplInterface"
, "passUnion17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26612 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26612( cx, "TestJSImplInterface"
, "passUnion17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26613
26614 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26615 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26616 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26617 if (objIsXray) {
26618 unwrappedObj.emplace(cx, obj);
26619 }
26620 LongSequenceOrNullOrLong arg0;
26621 if (!(args.hasDefined(0))) {
26622 arg0.RawSetAsLong() = 5;
26623 } else {
26624 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26625 return false;
26626 }
26627 }
26628 if (objIsXray) {
26629 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26630 // we know Xrays have no dynamic unwrap behavior.
26631 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26632 if (!unwrappedObj.ref()) {
26633 return false;
26634 }
26635 }
26636 FastErrorResult rv;
26637 // NOTE: This assert does NOT call the function.
26638 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion17(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26639 MOZ_KnownLive(self)(self)->PassUnion17(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26640 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion17"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion17"
)), 0))
) {
26641 return false;
26642 }
26643 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26643); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26643; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26644 args.rval().setUndefined();
26645 return true;
26646}
26647
26648static const JSJitInfo passUnion17_methodinfo = {
26649 { (JSJitGetterOp)passUnion17 },
26650 { prototypes::id::TestJSImplInterface },
26651 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26652 JSJitInfo::Method,
26653 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26654 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26655 false, /* isInfallible. False in setters. */
26656 false, /* isMovable. Not relevant for setters. */
26657 false, /* isEliminatable. Not relevant for setters. */
26658 false, /* isAlwaysInSlot. Only relevant for getters. */
26659 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26660 false, /* isTypedMethod. Only relevant for methods. */
26661 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26662};
26663
26664MOZ_CAN_RUN_SCRIPT static bool
26665passUnion18(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26666{
26667 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion18");
26668 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26671( cx, "TestJSImplInterface"
, "passUnion18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26669 "TestJSImplInterface", "passUnion18", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26671( cx, "TestJSImplInterface"
, "passUnion18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26670 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26671( cx, "TestJSImplInterface"
, "passUnion18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26671 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26671( cx, "TestJSImplInterface"
, "passUnion18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26672
26673 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26674 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion18", 1)) {
26675 return false;
26676 }
26677 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26678 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26679 if (objIsXray) {
26680 unwrappedObj.emplace(cx, obj);
26681 }
26682 ObjectSequenceOrLong arg0;
26683 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26684 return false;
26685 }
26686 if (objIsXray) {
26687 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26688 // we know Xrays have no dynamic unwrap behavior.
26689 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26690 if (!unwrappedObj.ref()) {
26691 return false;
26692 }
26693 }
26694 FastErrorResult rv;
26695 // NOTE: This assert does NOT call the function.
26696 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion18(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26697 MOZ_KnownLive(self)(self)->PassUnion18(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26698 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion18"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion18"
)), 0))
) {
26699 return false;
26700 }
26701 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26701); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26701; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26702 args.rval().setUndefined();
26703 return true;
26704}
26705
26706static const JSJitInfo passUnion18_methodinfo = {
26707 { (JSJitGetterOp)passUnion18 },
26708 { prototypes::id::TestJSImplInterface },
26709 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26710 JSJitInfo::Method,
26711 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26712 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26713 false, /* isInfallible. False in setters. */
26714 false, /* isMovable. Not relevant for setters. */
26715 false, /* isEliminatable. Not relevant for setters. */
26716 false, /* isAlwaysInSlot. Only relevant for getters. */
26717 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26718 false, /* isTypedMethod. Only relevant for methods. */
26719 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26720};
26721
26722MOZ_CAN_RUN_SCRIPT static bool
26723passUnion19(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26724{
26725 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion19");
26726 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26729( cx, "TestJSImplInterface"
, "passUnion19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26727 "TestJSImplInterface", "passUnion19", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26729( cx, "TestJSImplInterface"
, "passUnion19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26728 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26729( cx, "TestJSImplInterface"
, "passUnion19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26729 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26729( cx, "TestJSImplInterface"
, "passUnion19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26730
26731 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26732 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26733 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26734 if (objIsXray) {
26735 unwrappedObj.emplace(cx, obj);
26736 }
26737 Optional<ObjectSequenceOrLong> arg0;
26738 if (args.hasDefined(0)) {
26739 arg0.Construct();
26740 if (!arg0.Value().Init(cx, args[0], "Argument 1", true)) {
26741 return false;
26742 }
26743 }
26744 if (objIsXray) {
26745 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26746 // we know Xrays have no dynamic unwrap behavior.
26747 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26748 if (!unwrappedObj.ref()) {
26749 return false;
26750 }
26751 }
26752 FastErrorResult rv;
26753 // NOTE: This assert does NOT call the function.
26754 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion19(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26755 MOZ_KnownLive(self)(self)->PassUnion19(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26756 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion19"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion19"
)), 0))
) {
26757 return false;
26758 }
26759 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26759); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26759; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26760 args.rval().setUndefined();
26761 return true;
26762}
26763
26764static const JSJitInfo passUnion19_methodinfo = {
26765 { (JSJitGetterOp)passUnion19 },
26766 { prototypes::id::TestJSImplInterface },
26767 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26768 JSJitInfo::Method,
26769 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26770 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26771 false, /* isInfallible. False in setters. */
26772 false, /* isMovable. Not relevant for setters. */
26773 false, /* isEliminatable. Not relevant for setters. */
26774 false, /* isAlwaysInSlot. Only relevant for getters. */
26775 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26776 false, /* isTypedMethod. Only relevant for methods. */
26777 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26778};
26779
26780MOZ_CAN_RUN_SCRIPT static bool
26781passUnion20(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26782{
26783 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion20");
26784 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26787( cx, "TestJSImplInterface"
, "passUnion20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26785 "TestJSImplInterface", "passUnion20", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26787( cx, "TestJSImplInterface"
, "passUnion20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26786 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26787( cx, "TestJSImplInterface"
, "passUnion20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26787 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26787( cx, "TestJSImplInterface"
, "passUnion20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26788
26789 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26790 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26791 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26792 if (objIsXray) {
26793 unwrappedObj.emplace(cx, obj);
26794 }
26795 ObjectSequenceOrLong arg0;
26796 if (!(args.hasDefined(0))) {
26797 Unused << arg0.RawSetAsObjectSequence(cx);
26798 } else {
26799 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26800 return false;
26801 }
26802 }
26803 if (objIsXray) {
26804 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26805 // we know Xrays have no dynamic unwrap behavior.
26806 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26807 if (!unwrappedObj.ref()) {
26808 return false;
26809 }
26810 }
26811 FastErrorResult rv;
26812 // NOTE: This assert does NOT call the function.
26813 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion20(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26814 MOZ_KnownLive(self)(self)->PassUnion20(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26815 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion20"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion20"
)), 0))
) {
26816 return false;
26817 }
26818 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26818); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26818; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26819 args.rval().setUndefined();
26820 return true;
26821}
26822
26823static const JSJitInfo passUnion20_methodinfo = {
26824 { (JSJitGetterOp)passUnion20 },
26825 { prototypes::id::TestJSImplInterface },
26826 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26827 JSJitInfo::Method,
26828 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26829 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26830 false, /* isInfallible. False in setters. */
26831 false, /* isMovable. Not relevant for setters. */
26832 false, /* isEliminatable. Not relevant for setters. */
26833 false, /* isAlwaysInSlot. Only relevant for getters. */
26834 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26835 false, /* isTypedMethod. Only relevant for methods. */
26836 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26837};
26838
26839MOZ_CAN_RUN_SCRIPT static bool
26840passUnion21(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26841{
26842 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion21");
26843 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26846( cx, "TestJSImplInterface"
, "passUnion21", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26844 "TestJSImplInterface", "passUnion21", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26846( cx, "TestJSImplInterface"
, "passUnion21", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26845 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26846( cx, "TestJSImplInterface"
, "passUnion21", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26846 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26846( cx, "TestJSImplInterface"
, "passUnion21", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26847
26848 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26849 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion21", 1)) {
26850 return false;
26851 }
26852 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26853 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26854 if (objIsXray) {
26855 unwrappedObj.emplace(cx, obj);
26856 }
26857 StringLongRecordOrLong arg0;
26858 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26859 return false;
26860 }
26861 if (objIsXray) {
26862 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26863 // we know Xrays have no dynamic unwrap behavior.
26864 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26865 if (!unwrappedObj.ref()) {
26866 return false;
26867 }
26868 }
26869 FastErrorResult rv;
26870 // NOTE: This assert does NOT call the function.
26871 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion21(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26872 MOZ_KnownLive(self)(self)->PassUnion21(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26873 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion21"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion21"
)), 0))
) {
26874 return false;
26875 }
26876 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26876); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26876; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26877 args.rval().setUndefined();
26878 return true;
26879}
26880
26881static const JSJitInfo passUnion21_methodinfo = {
26882 { (JSJitGetterOp)passUnion21 },
26883 { prototypes::id::TestJSImplInterface },
26884 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26885 JSJitInfo::Method,
26886 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26887 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26888 false, /* isInfallible. False in setters. */
26889 false, /* isMovable. Not relevant for setters. */
26890 false, /* isEliminatable. Not relevant for setters. */
26891 false, /* isAlwaysInSlot. Only relevant for getters. */
26892 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26893 false, /* isTypedMethod. Only relevant for methods. */
26894 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26895};
26896
26897MOZ_CAN_RUN_SCRIPT static bool
26898passUnion22(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26899{
26900 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion22");
26901 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26904( cx, "TestJSImplInterface"
, "passUnion22", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26902 "TestJSImplInterface", "passUnion22", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26904( cx, "TestJSImplInterface"
, "passUnion22", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26903 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26904( cx, "TestJSImplInterface"
, "passUnion22", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26904 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26904( cx, "TestJSImplInterface"
, "passUnion22", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26905
26906 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26907 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion22", 1)) {
26908 return false;
26909 }
26910 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26911 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26912 if (objIsXray) {
26913 unwrappedObj.emplace(cx, obj);
26914 }
26915 StringObjectRecordOrLong arg0;
26916 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26917 return false;
26918 }
26919 if (objIsXray) {
26920 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26921 // we know Xrays have no dynamic unwrap behavior.
26922 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26923 if (!unwrappedObj.ref()) {
26924 return false;
26925 }
26926 }
26927 FastErrorResult rv;
26928 // NOTE: This assert does NOT call the function.
26929 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion22(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26930 MOZ_KnownLive(self)(self)->PassUnion22(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26931 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion22"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion22"
)), 0))
) {
26932 return false;
26933 }
26934 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26934); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26934; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26935 args.rval().setUndefined();
26936 return true;
26937}
26938
26939static const JSJitInfo passUnion22_methodinfo = {
26940 { (JSJitGetterOp)passUnion22 },
26941 { prototypes::id::TestJSImplInterface },
26942 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
26943 JSJitInfo::Method,
26944 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
26945 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
26946 false, /* isInfallible. False in setters. */
26947 false, /* isMovable. Not relevant for setters. */
26948 false, /* isEliminatable. Not relevant for setters. */
26949 false, /* isAlwaysInSlot. Only relevant for getters. */
26950 false, /* isLazilyCachedInSlot. Only relevant for getters. */
26951 false, /* isTypedMethod. Only relevant for methods. */
26952 0 /* Reserved slot index, if we're stored in a slot, else 0. */
26953};
26954
26955MOZ_CAN_RUN_SCRIPT static bool
26956passUnion23(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
26957{
26958 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion23");
26959 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject26962( cx, "TestJSImplInterface"
, "passUnion23", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26960 "TestJSImplInterface", "passUnion23", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject26962( cx, "TestJSImplInterface"
, "passUnion23", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26961 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject26962( cx, "TestJSImplInterface"
, "passUnion23", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
26962 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject26962( cx, "TestJSImplInterface"
, "passUnion23", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
26963
26964 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
26965 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion23", 1)) {
26966 return false;
26967 }
26968 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
26969 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
26970 if (objIsXray) {
26971 unwrappedObj.emplace(cx, obj);
26972 }
26973 ImageDataSequenceOrLong arg0;
26974 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
26975 return false;
26976 }
26977 if (objIsXray) {
26978 // Since our object is an Xray, we can just CheckedUnwrapStatic:
26979 // we know Xrays have no dynamic unwrap behavior.
26980 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
26981 if (!unwrappedObj.ref()) {
26982 return false;
26983 }
26984 }
26985 FastErrorResult rv;
26986 // NOTE: This assert does NOT call the function.
26987 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion23(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
26988 MOZ_KnownLive(self)(self)->PassUnion23(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
26989 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion23"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion23"
)), 0))
) {
26990 return false;
26991 }
26992 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 26992); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 26992; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
26993 args.rval().setUndefined();
26994 return true;
26995}
26996
26997static const JSJitInfo passUnion23_methodinfo = {
26998 { (JSJitGetterOp)passUnion23 },
26999 { prototypes::id::TestJSImplInterface },
27000 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27001 JSJitInfo::Method,
27002 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27003 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27004 false, /* isInfallible. False in setters. */
27005 false, /* isMovable. Not relevant for setters. */
27006 false, /* isEliminatable. Not relevant for setters. */
27007 false, /* isAlwaysInSlot. Only relevant for getters. */
27008 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27009 false, /* isTypedMethod. Only relevant for methods. */
27010 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27011};
27012
27013MOZ_CAN_RUN_SCRIPT static bool
27014passUnion24(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27015{
27016 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion24");
27017 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27020( cx, "TestJSImplInterface"
, "passUnion24", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27018 "TestJSImplInterface", "passUnion24", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27020( cx, "TestJSImplInterface"
, "passUnion24", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27019 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27020( cx, "TestJSImplInterface"
, "passUnion24", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27020 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27020( cx, "TestJSImplInterface"
, "passUnion24", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27021
27022 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27023 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion24", 1)) {
27024 return false;
27025 }
27026 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27027 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27028 if (objIsXray) {
27029 unwrappedObj.emplace(cx, obj);
27030 }
27031 ImageDataOrNullSequenceOrLong arg0;
27032 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
27033 return false;
27034 }
27035 if (objIsXray) {
27036 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27037 // we know Xrays have no dynamic unwrap behavior.
27038 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27039 if (!unwrappedObj.ref()) {
27040 return false;
27041 }
27042 }
27043 FastErrorResult rv;
27044 // NOTE: This assert does NOT call the function.
27045 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion24(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27046 MOZ_KnownLive(self)(self)->PassUnion24(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27047 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion24"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion24"
)), 0))
) {
27048 return false;
27049 }
27050 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27050); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27050; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27051 args.rval().setUndefined();
27052 return true;
27053}
27054
27055static const JSJitInfo passUnion24_methodinfo = {
27056 { (JSJitGetterOp)passUnion24 },
27057 { prototypes::id::TestJSImplInterface },
27058 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27059 JSJitInfo::Method,
27060 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27061 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27062 false, /* isInfallible. False in setters. */
27063 false, /* isMovable. Not relevant for setters. */
27064 false, /* isEliminatable. Not relevant for setters. */
27065 false, /* isAlwaysInSlot. Only relevant for getters. */
27066 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27067 false, /* isTypedMethod. Only relevant for methods. */
27068 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27069};
27070
27071MOZ_CAN_RUN_SCRIPT static bool
27072passUnion25(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27073{
27074 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion25");
27075 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27078( cx, "TestJSImplInterface"
, "passUnion25", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27076 "TestJSImplInterface", "passUnion25", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27078( cx, "TestJSImplInterface"
, "passUnion25", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27077 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27078( cx, "TestJSImplInterface"
, "passUnion25", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27078 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27078( cx, "TestJSImplInterface"
, "passUnion25", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27079
27080 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27081 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion25", 1)) {
27082 return false;
27083 }
27084 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27085 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27086 if (objIsXray) {
27087 unwrappedObj.emplace(cx, obj);
27088 }
27089 ImageDataSequenceSequenceOrLong arg0;
27090 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
27091 return false;
27092 }
27093 if (objIsXray) {
27094 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27095 // we know Xrays have no dynamic unwrap behavior.
27096 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27097 if (!unwrappedObj.ref()) {
27098 return false;
27099 }
27100 }
27101 FastErrorResult rv;
27102 // NOTE: This assert does NOT call the function.
27103 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion25(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27104 MOZ_KnownLive(self)(self)->PassUnion25(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27105 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion25"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion25"
)), 0))
) {
27106 return false;
27107 }
27108 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27108); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27108; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27109 args.rval().setUndefined();
27110 return true;
27111}
27112
27113static const JSJitInfo passUnion25_methodinfo = {
27114 { (JSJitGetterOp)passUnion25 },
27115 { prototypes::id::TestJSImplInterface },
27116 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27117 JSJitInfo::Method,
27118 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27119 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27120 false, /* isInfallible. False in setters. */
27121 false, /* isMovable. Not relevant for setters. */
27122 false, /* isEliminatable. Not relevant for setters. */
27123 false, /* isAlwaysInSlot. Only relevant for getters. */
27124 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27125 false, /* isTypedMethod. Only relevant for methods. */
27126 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27127};
27128
27129MOZ_CAN_RUN_SCRIPT static bool
27130passUnion26(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27131{
27132 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion26");
27133 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27136( cx, "TestJSImplInterface"
, "passUnion26", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27134 "TestJSImplInterface", "passUnion26", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27136( cx, "TestJSImplInterface"
, "passUnion26", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27135 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27136( cx, "TestJSImplInterface"
, "passUnion26", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27136 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27136( cx, "TestJSImplInterface"
, "passUnion26", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27137
27138 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27139 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnion26", 1)) {
27140 return false;
27141 }
27142 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27143 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27144 if (objIsXray) {
27145 unwrappedObj.emplace(cx, obj);
27146 }
27147 ImageDataOrNullSequenceSequenceOrLong arg0;
27148 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
27149 return false;
27150 }
27151 if (objIsXray) {
27152 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27153 // we know Xrays have no dynamic unwrap behavior.
27154 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27155 if (!unwrappedObj.ref()) {
27156 return false;
27157 }
27158 }
27159 FastErrorResult rv;
27160 // NOTE: This assert does NOT call the function.
27161 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion26(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27162 MOZ_KnownLive(self)(self)->PassUnion26(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27163 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion26"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion26"
)), 0))
) {
27164 return false;
27165 }
27166 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27166); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27166; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27167 args.rval().setUndefined();
27168 return true;
27169}
27170
27171static const JSJitInfo passUnion26_methodinfo = {
27172 { (JSJitGetterOp)passUnion26 },
27173 { prototypes::id::TestJSImplInterface },
27174 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27175 JSJitInfo::Method,
27176 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27177 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27178 false, /* isInfallible. False in setters. */
27179 false, /* isMovable. Not relevant for setters. */
27180 false, /* isEliminatable. Not relevant for setters. */
27181 false, /* isAlwaysInSlot. Only relevant for getters. */
27182 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27183 false, /* isTypedMethod. Only relevant for methods. */
27184 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27185};
27186
27187MOZ_CAN_RUN_SCRIPT static bool
27188passUnion27(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27189{
27190 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion27");
27191 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27194( cx, "TestJSImplInterface"
, "passUnion27", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27192 "TestJSImplInterface", "passUnion27", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27194( cx, "TestJSImplInterface"
, "passUnion27", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27193 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27194( cx, "TestJSImplInterface"
, "passUnion27", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27194 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27194( cx, "TestJSImplInterface"
, "passUnion27", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27195
27196 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27197 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27198 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27199 if (objIsXray) {
27200 unwrappedObj.emplace(cx, obj);
27201 }
27202 StringSequenceOrEventInit arg0;
27203 if (!(args.hasDefined(0))) {
27204 if (!arg0.RawSetAsEventInit().Init(cx, JS::NullHandleValue, "Member of (sequence<DOMString> or EventInit)")) {
27205 return false;
27206 }
27207 } else {
27208 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
27209 return false;
27210 }
27211 }
27212 if (objIsXray) {
27213 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27214 // we know Xrays have no dynamic unwrap behavior.
27215 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27216 if (!unwrappedObj.ref()) {
27217 return false;
27218 }
27219 }
27220 FastErrorResult rv;
27221 // NOTE: This assert does NOT call the function.
27222 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion27(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27223 MOZ_KnownLive(self)(self)->PassUnion27(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27224 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion27"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion27"
)), 0))
) {
27225 return false;
27226 }
27227 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27227); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27227; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27228 args.rval().setUndefined();
27229 return true;
27230}
27231
27232static const JSJitInfo passUnion27_methodinfo = {
27233 { (JSJitGetterOp)passUnion27 },
27234 { prototypes::id::TestJSImplInterface },
27235 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27236 JSJitInfo::Method,
27237 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27238 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27239 false, /* isInfallible. False in setters. */
27240 false, /* isMovable. Not relevant for setters. */
27241 false, /* isEliminatable. Not relevant for setters. */
27242 false, /* isAlwaysInSlot. Only relevant for getters. */
27243 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27244 false, /* isTypedMethod. Only relevant for methods. */
27245 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27246};
27247
27248MOZ_CAN_RUN_SCRIPT static bool
27249passUnion28(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27250{
27251 BindingCallContext cx(cx_, "TestJSImplInterface.passUnion28");
27252 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27255( cx, "TestJSImplInterface"
, "passUnion28", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27253 "TestJSImplInterface", "passUnion28", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27255( cx, "TestJSImplInterface"
, "passUnion28", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27254 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27255( cx, "TestJSImplInterface"
, "passUnion28", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27255 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27255( cx, "TestJSImplInterface"
, "passUnion28", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27256
27257 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27258 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27259 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27260 if (objIsXray) {
27261 unwrappedObj.emplace(cx, obj);
27262 }
27263 EventInitOrStringSequence arg0;
27264 if (!(args.hasDefined(0))) {
27265 if (!arg0.RawSetAsEventInit().Init(cx, JS::NullHandleValue, "Member of (EventInit or sequence<DOMString>)")) {
27266 return false;
27267 }
27268 } else {
27269 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
27270 return false;
27271 }
27272 }
27273 if (objIsXray) {
27274 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27275 // we know Xrays have no dynamic unwrap behavior.
27276 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27277 if (!unwrappedObj.ref()) {
27278 return false;
27279 }
27280 }
27281 FastErrorResult rv;
27282 // NOTE: This assert does NOT call the function.
27283 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnion28(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27284 MOZ_KnownLive(self)(self)->PassUnion28(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27285 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion28"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnion28"
)), 0))
) {
27286 return false;
27287 }
27288 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27288); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27288; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27289 args.rval().setUndefined();
27290 return true;
27291}
27292
27293static const JSJitInfo passUnion28_methodinfo = {
27294 { (JSJitGetterOp)passUnion28 },
27295 { prototypes::id::TestJSImplInterface },
27296 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27297 JSJitInfo::Method,
27298 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27299 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27300 false, /* isInfallible. False in setters. */
27301 false, /* isMovable. Not relevant for setters. */
27302 false, /* isEliminatable. Not relevant for setters. */
27303 false, /* isAlwaysInSlot. Only relevant for getters. */
27304 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27305 false, /* isTypedMethod. Only relevant for methods. */
27306 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27307};
27308
27309MOZ_CAN_RUN_SCRIPT static bool
27310passUnionWithCallback(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27311{
27312 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithCallback");
27313 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27316( cx, "TestJSImplInterface"
, "passUnionWithCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27314 "TestJSImplInterface", "passUnionWithCallback", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27316( cx, "TestJSImplInterface"
, "passUnionWithCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27315 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27316( cx, "TestJSImplInterface"
, "passUnionWithCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27316 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27316( cx, "TestJSImplInterface"
, "passUnionWithCallback", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27317
27318 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27319 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithCallback", 1)) {
27320 return false;
27321 }
27322 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27323 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27324 if (objIsXray) {
27325 unwrappedObj.emplace(cx, obj);
27326 }
27327 EventHandlerNonNullOrNullOrLong arg0;
27328 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
27329 return false;
27330 }
27331 if (objIsXray) {
27332 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27333 // we know Xrays have no dynamic unwrap behavior.
27334 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27335 if (!unwrappedObj.ref()) {
27336 return false;
27337 }
27338 }
27339 FastErrorResult rv;
27340 // NOTE: This assert does NOT call the function.
27341 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithCallback(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27342 MOZ_KnownLive(self)(self)->PassUnionWithCallback(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27343 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithCallback"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithCallback"
)), 0))
) {
27344 return false;
27345 }
27346 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27346); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27346; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27347 args.rval().setUndefined();
27348 return true;
27349}
27350
27351static const JSJitInfo passUnionWithCallback_methodinfo = {
27352 { (JSJitGetterOp)passUnionWithCallback },
27353 { prototypes::id::TestJSImplInterface },
27354 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27355 JSJitInfo::Method,
27356 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27357 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27358 false, /* isInfallible. False in setters. */
27359 false, /* isMovable. Not relevant for setters. */
27360 false, /* isEliminatable. Not relevant for setters. */
27361 false, /* isAlwaysInSlot. Only relevant for getters. */
27362 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27363 false, /* isTypedMethod. Only relevant for methods. */
27364 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27365};
27366
27367MOZ_CAN_RUN_SCRIPT static bool
27368passUnionWithByteString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27369{
27370 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithByteString");
27371 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27374( cx, "TestJSImplInterface"
, "passUnionWithByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27372 "TestJSImplInterface", "passUnionWithByteString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27374( cx, "TestJSImplInterface"
, "passUnionWithByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27373 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27374( cx, "TestJSImplInterface"
, "passUnionWithByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27374 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27374( cx, "TestJSImplInterface"
, "passUnionWithByteString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27375
27376 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27377 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithByteString", 1)) {
27378 return false;
27379 }
27380 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27381 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27382 if (objIsXray) {
27383 unwrappedObj.emplace(cx, obj);
27384 }
27385 ByteStringOrLong arg0;
27386 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
27387 return false;
27388 }
27389 if (objIsXray) {
27390 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27391 // we know Xrays have no dynamic unwrap behavior.
27392 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27393 if (!unwrappedObj.ref()) {
27394 return false;
27395 }
27396 }
27397 FastErrorResult rv;
27398 // NOTE: This assert does NOT call the function.
27399 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27400 MOZ_KnownLive(self)(self)->PassUnionWithByteString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27401 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithByteString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithByteString"
)), 0))
) {
27402 return false;
27403 }
27404 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27404); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27404; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27405 args.rval().setUndefined();
27406 return true;
27407}
27408
27409static const JSJitInfo passUnionWithByteString_methodinfo = {
27410 { (JSJitGetterOp)passUnionWithByteString },
27411 { prototypes::id::TestJSImplInterface },
27412 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27413 JSJitInfo::Method,
27414 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27415 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27416 false, /* isInfallible. False in setters. */
27417 false, /* isMovable. Not relevant for setters. */
27418 false, /* isEliminatable. Not relevant for setters. */
27419 false, /* isAlwaysInSlot. Only relevant for getters. */
27420 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27421 false, /* isTypedMethod. Only relevant for methods. */
27422 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27423};
27424
27425MOZ_CAN_RUN_SCRIPT static bool
27426passUnionWithUTF8String(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27427{
27428 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithUTF8String");
27429 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27432( cx, "TestJSImplInterface"
, "passUnionWithUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27430 "TestJSImplInterface", "passUnionWithUTF8String", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27432( cx, "TestJSImplInterface"
, "passUnionWithUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27431 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27432( cx, "TestJSImplInterface"
, "passUnionWithUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27432 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27432( cx, "TestJSImplInterface"
, "passUnionWithUTF8String", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27433
27434 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27435 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithUTF8String", 1)) {
27436 return false;
27437 }
27438 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27439 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27440 if (objIsXray) {
27441 unwrappedObj.emplace(cx, obj);
27442 }
27443 UTF8StringOrLong arg0;
27444 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
27445 return false;
27446 }
27447 if (objIsXray) {
27448 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27449 // we know Xrays have no dynamic unwrap behavior.
27450 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27451 if (!unwrappedObj.ref()) {
27452 return false;
27453 }
27454 }
27455 FastErrorResult rv;
27456 // NOTE: This assert does NOT call the function.
27457 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27458 MOZ_KnownLive(self)(self)->PassUnionWithUTF8String(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27459 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithUTF8String"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithUTF8String"
)), 0))
) {
27460 return false;
27461 }
27462 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27462); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27462; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27463 args.rval().setUndefined();
27464 return true;
27465}
27466
27467static const JSJitInfo passUnionWithUTF8String_methodinfo = {
27468 { (JSJitGetterOp)passUnionWithUTF8String },
27469 { prototypes::id::TestJSImplInterface },
27470 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27471 JSJitInfo::Method,
27472 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27473 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27474 false, /* isInfallible. False in setters. */
27475 false, /* isMovable. Not relevant for setters. */
27476 false, /* isEliminatable. Not relevant for setters. */
27477 false, /* isAlwaysInSlot. Only relevant for getters. */
27478 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27479 false, /* isTypedMethod. Only relevant for methods. */
27480 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27481};
27482
27483MOZ_CAN_RUN_SCRIPT static bool
27484passUnionWithRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27485{
27486 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithRecord");
27487 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27490( cx, "TestJSImplInterface"
, "passUnionWithRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27488 "TestJSImplInterface", "passUnionWithRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27490( cx, "TestJSImplInterface"
, "passUnionWithRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27489 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27490( cx, "TestJSImplInterface"
, "passUnionWithRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27490 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27490( cx, "TestJSImplInterface"
, "passUnionWithRecord", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27491
27492 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27493 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithRecord", 1)) {
27494 return false;
27495 }
27496 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27497 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27498 if (objIsXray) {
27499 unwrappedObj.emplace(cx, obj);
27500 }
27501 StringStringRecordOrString arg0;
27502 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
27503 return false;
27504 }
27505 if (objIsXray) {
27506 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27507 // we know Xrays have no dynamic unwrap behavior.
27508 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27509 if (!unwrappedObj.ref()) {
27510 return false;
27511 }
27512 }
27513 FastErrorResult rv;
27514 // NOTE: This assert does NOT call the function.
27515 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27516 MOZ_KnownLive(self)(self)->PassUnionWithRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27517 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithRecord"
)), 0))
) {
27518 return false;
27519 }
27520 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27520); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27520; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27521 args.rval().setUndefined();
27522 return true;
27523}
27524
27525static const JSJitInfo passUnionWithRecord_methodinfo = {
27526 { (JSJitGetterOp)passUnionWithRecord },
27527 { prototypes::id::TestJSImplInterface },
27528 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27529 JSJitInfo::Method,
27530 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27531 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27532 false, /* isInfallible. False in setters. */
27533 false, /* isMovable. Not relevant for setters. */
27534 false, /* isEliminatable. Not relevant for setters. */
27535 false, /* isAlwaysInSlot. Only relevant for getters. */
27536 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27537 false, /* isTypedMethod. Only relevant for methods. */
27538 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27539};
27540
27541MOZ_CAN_RUN_SCRIPT static bool
27542passUnionWithRecordAndSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27543{
27544 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithRecordAndSequence");
27545 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27548( cx, "TestJSImplInterface"
, "passUnionWithRecordAndSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27546 "TestJSImplInterface", "passUnionWithRecordAndSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27548( cx, "TestJSImplInterface"
, "passUnionWithRecordAndSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27547 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27548( cx, "TestJSImplInterface"
, "passUnionWithRecordAndSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27548 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27548( cx, "TestJSImplInterface"
, "passUnionWithRecordAndSequence", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
27549
27550 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27551 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithRecordAndSequence", 1)) {
27552 return false;
27553 }
27554 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27555 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27556 if (objIsXray) {
27557 unwrappedObj.emplace(cx, obj);
27558 }
27559 StringStringRecordOrStringSequence arg0;
27560 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
27561 return false;
27562 }
27563 if (objIsXray) {
27564 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27565 // we know Xrays have no dynamic unwrap behavior.
27566 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27567 if (!unwrappedObj.ref()) {
27568 return false;
27569 }
27570 }
27571 FastErrorResult rv;
27572 // NOTE: This assert does NOT call the function.
27573 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithRecordAndSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27574 MOZ_KnownLive(self)(self)->PassUnionWithRecordAndSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27575 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithRecordAndSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithRecordAndSequence"
)), 0))
) {
27576 return false;
27577 }
27578 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27578); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27578; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27579 args.rval().setUndefined();
27580 return true;
27581}
27582
27583static const JSJitInfo passUnionWithRecordAndSequence_methodinfo = {
27584 { (JSJitGetterOp)passUnionWithRecordAndSequence },
27585 { prototypes::id::TestJSImplInterface },
27586 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27587 JSJitInfo::Method,
27588 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27589 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27590 false, /* isInfallible. False in setters. */
27591 false, /* isMovable. Not relevant for setters. */
27592 false, /* isEliminatable. Not relevant for setters. */
27593 false, /* isAlwaysInSlot. Only relevant for getters. */
27594 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27595 false, /* isTypedMethod. Only relevant for methods. */
27596 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27597};
27598
27599MOZ_CAN_RUN_SCRIPT static bool
27600passUnionWithSequenceAndRecord(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27601{
27602 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithSequenceAndRecord");
27603 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27606( cx, "TestJSImplInterface"
, "passUnionWithSequenceAndRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27604 "TestJSImplInterface", "passUnionWithSequenceAndRecord", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27606( cx, "TestJSImplInterface"
, "passUnionWithSequenceAndRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27605 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27606( cx, "TestJSImplInterface"
, "passUnionWithSequenceAndRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27606 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27606( cx, "TestJSImplInterface"
, "passUnionWithSequenceAndRecord", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
27607
27608 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27609 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithSequenceAndRecord", 1)) {
27610 return false;
27611 }
27612 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27613 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27614 if (objIsXray) {
27615 unwrappedObj.emplace(cx, obj);
27616 }
27617 StringSequenceOrStringStringRecord arg0;
27618 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
27619 return false;
27620 }
27621 if (objIsXray) {
27622 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27623 // we know Xrays have no dynamic unwrap behavior.
27624 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27625 if (!unwrappedObj.ref()) {
27626 return false;
27627 }
27628 }
27629 FastErrorResult rv;
27630 // NOTE: This assert does NOT call the function.
27631 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithSequenceAndRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27632 MOZ_KnownLive(self)(self)->PassUnionWithSequenceAndRecord(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27633 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithSequenceAndRecord"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithSequenceAndRecord"
)), 0))
) {
27634 return false;
27635 }
27636 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27636); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27636; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27637 args.rval().setUndefined();
27638 return true;
27639}
27640
27641static const JSJitInfo passUnionWithSequenceAndRecord_methodinfo = {
27642 { (JSJitGetterOp)passUnionWithSequenceAndRecord },
27643 { prototypes::id::TestJSImplInterface },
27644 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27645 JSJitInfo::Method,
27646 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27647 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27648 false, /* isInfallible. False in setters. */
27649 false, /* isMovable. Not relevant for setters. */
27650 false, /* isEliminatable. Not relevant for setters. */
27651 false, /* isAlwaysInSlot. Only relevant for getters. */
27652 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27653 false, /* isTypedMethod. Only relevant for methods. */
27654 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27655};
27656
27657MOZ_CAN_RUN_SCRIPT static bool
27658passUnionWithSVS(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27659{
27660 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithSVS");
27661 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27664( cx, "TestJSImplInterface"
, "passUnionWithSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27662 "TestJSImplInterface", "passUnionWithSVS", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27664( cx, "TestJSImplInterface"
, "passUnionWithSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27663 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27664( cx, "TestJSImplInterface"
, "passUnionWithSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27664 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27664( cx, "TestJSImplInterface"
, "passUnionWithSVS", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27665
27666 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27667 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithSVS", 1)) {
27668 return false;
27669 }
27670 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27671 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27672 if (objIsXray) {
27673 unwrappedObj.emplace(cx, obj);
27674 }
27675 USVStringOrLong arg0;
27676 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
27677 return false;
27678 }
27679 if (objIsXray) {
27680 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27681 // we know Xrays have no dynamic unwrap behavior.
27682 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27683 if (!unwrappedObj.ref()) {
27684 return false;
27685 }
27686 }
27687 FastErrorResult rv;
27688 // NOTE: This assert does NOT call the function.
27689 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithSVS(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27690 MOZ_KnownLive(self)(self)->PassUnionWithSVS(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27691 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithSVS"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithSVS"
)), 0))
) {
27692 return false;
27693 }
27694 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27694); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27694; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27695 args.rval().setUndefined();
27696 return true;
27697}
27698
27699static const JSJitInfo passUnionWithSVS_methodinfo = {
27700 { (JSJitGetterOp)passUnionWithSVS },
27701 { prototypes::id::TestJSImplInterface },
27702 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27703 JSJitInfo::Method,
27704 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27705 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27706 false, /* isInfallible. False in setters. */
27707 false, /* isMovable. Not relevant for setters. */
27708 false, /* isEliminatable. Not relevant for setters. */
27709 false, /* isAlwaysInSlot. Only relevant for getters. */
27710 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27711 false, /* isTypedMethod. Only relevant for methods. */
27712 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27713};
27714
27715MOZ_CAN_RUN_SCRIPT static bool
27716passUnionWithNullable(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27717{
27718 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithNullable");
27719 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27722( cx, "TestJSImplInterface"
, "passUnionWithNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27720 "TestJSImplInterface", "passUnionWithNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27722( cx, "TestJSImplInterface"
, "passUnionWithNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27721 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27722( cx, "TestJSImplInterface"
, "passUnionWithNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27722 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27722( cx, "TestJSImplInterface"
, "passUnionWithNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27723
27724 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27725 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithNullable", 1)) {
27726 return false;
27727 }
27728 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27729 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27730 if (objIsXray) {
27731 unwrappedObj.emplace(cx, obj);
27732 }
27733 ObjectOrNullOrLong arg0;
27734 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
27735 return false;
27736 }
27737 if (objIsXray) {
27738 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27739 // we know Xrays have no dynamic unwrap behavior.
27740 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27741 if (!unwrappedObj.ref()) {
27742 return false;
27743 }
27744 }
27745 FastErrorResult rv;
27746 // NOTE: This assert does NOT call the function.
27747 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithNullable(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27748 MOZ_KnownLive(self)(self)->PassUnionWithNullable(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27749 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithNullable"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithNullable"
)), 0))
) {
27750 return false;
27751 }
27752 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27752); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27752; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27753 args.rval().setUndefined();
27754 return true;
27755}
27756
27757static const JSJitInfo passUnionWithNullable_methodinfo = {
27758 { (JSJitGetterOp)passUnionWithNullable },
27759 { prototypes::id::TestJSImplInterface },
27760 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27761 JSJitInfo::Method,
27762 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27763 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27764 false, /* isInfallible. False in setters. */
27765 false, /* isMovable. Not relevant for setters. */
27766 false, /* isEliminatable. Not relevant for setters. */
27767 false, /* isAlwaysInSlot. Only relevant for getters. */
27768 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27769 false, /* isTypedMethod. Only relevant for methods. */
27770 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27771};
27772
27773MOZ_CAN_RUN_SCRIPT static bool
27774passNullableUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27775{
27776 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnion");
27777 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27780( cx, "TestJSImplInterface"
, "passNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27778 "TestJSImplInterface", "passNullableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27780( cx, "TestJSImplInterface"
, "passNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27779 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27780( cx, "TestJSImplInterface"
, "passNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27780 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27780( cx, "TestJSImplInterface"
, "passNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27781
27782 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27783 if (!args.requireAtLeast(cx, "TestJSImplInterface.passNullableUnion", 1)) {
27784 return false;
27785 }
27786 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27787 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27788 if (objIsXray) {
27789 unwrappedObj.emplace(cx, obj);
27790 }
27791 Nullable<ObjectOrLong > arg0;
27792 if (args[0].isNullOrUndefined()) {
27793 arg0.SetNull();
27794 } else {
27795 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
27796 return false;
27797 }
27798 }
27799 if (objIsXray) {
27800 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27801 // we know Xrays have no dynamic unwrap behavior.
27802 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27803 if (!unwrappedObj.ref()) {
27804 return false;
27805 }
27806 }
27807 FastErrorResult rv;
27808 // NOTE: This assert does NOT call the function.
27809 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27810 MOZ_KnownLive(self)(self)->PassNullableUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27811 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnion"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnion"
)), 0))
) {
27812 return false;
27813 }
27814 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27814); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27814; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27815 args.rval().setUndefined();
27816 return true;
27817}
27818
27819static const JSJitInfo passNullableUnion_methodinfo = {
27820 { (JSJitGetterOp)passNullableUnion },
27821 { prototypes::id::TestJSImplInterface },
27822 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27823 JSJitInfo::Method,
27824 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27825 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27826 false, /* isInfallible. False in setters. */
27827 false, /* isMovable. Not relevant for setters. */
27828 false, /* isEliminatable. Not relevant for setters. */
27829 false, /* isAlwaysInSlot. Only relevant for getters. */
27830 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27831 false, /* isTypedMethod. Only relevant for methods. */
27832 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27833};
27834
27835MOZ_CAN_RUN_SCRIPT static bool
27836passOptionalUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27837{
27838 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalUnion");
27839 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27842( cx, "TestJSImplInterface"
, "passOptionalUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27840 "TestJSImplInterface", "passOptionalUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27842( cx, "TestJSImplInterface"
, "passOptionalUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27841 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27842( cx, "TestJSImplInterface"
, "passOptionalUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
27842 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27842( cx, "TestJSImplInterface"
, "passOptionalUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
27843
27844 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27845 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27846 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27847 if (objIsXray) {
27848 unwrappedObj.emplace(cx, obj);
27849 }
27850 Optional<ObjectOrLong> arg0;
27851 if (args.hasDefined(0)) {
27852 arg0.Construct();
27853 if (!arg0.Value().Init(cx, args[0], "Argument 1", true)) {
27854 return false;
27855 }
27856 }
27857 if (objIsXray) {
27858 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27859 // we know Xrays have no dynamic unwrap behavior.
27860 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27861 if (!unwrappedObj.ref()) {
27862 return false;
27863 }
27864 }
27865 FastErrorResult rv;
27866 // NOTE: This assert does NOT call the function.
27867 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27868 MOZ_KnownLive(self)(self)->PassOptionalUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27869 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnion"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalUnion"
)), 0))
) {
27870 return false;
27871 }
27872 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27872); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27872; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27873 args.rval().setUndefined();
27874 return true;
27875}
27876
27877static const JSJitInfo passOptionalUnion_methodinfo = {
27878 { (JSJitGetterOp)passOptionalUnion },
27879 { prototypes::id::TestJSImplInterface },
27880 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27881 JSJitInfo::Method,
27882 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27883 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27884 false, /* isInfallible. False in setters. */
27885 false, /* isMovable. Not relevant for setters. */
27886 false, /* isEliminatable. Not relevant for setters. */
27887 false, /* isAlwaysInSlot. Only relevant for getters. */
27888 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27889 false, /* isTypedMethod. Only relevant for methods. */
27890 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27891};
27892
27893MOZ_CAN_RUN_SCRIPT static bool
27894passOptionalNullableUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27895{
27896 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableUnion");
27897 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27900( cx, "TestJSImplInterface"
, "passOptionalNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27898 "TestJSImplInterface", "passOptionalNullableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27900( cx, "TestJSImplInterface"
, "passOptionalNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27899 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27900( cx, "TestJSImplInterface"
, "passOptionalNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27900 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27900( cx, "TestJSImplInterface"
, "passOptionalNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
27901
27902 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27903 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27904 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27905 if (objIsXray) {
27906 unwrappedObj.emplace(cx, obj);
27907 }
27908 Optional<Nullable<ObjectOrLong >> arg0;
27909 if (args.hasDefined(0)) {
27910 arg0.Construct();
27911 if (args[0].isNullOrUndefined()) {
27912 arg0.Value().SetNull();
27913 } else {
27914 if (!arg0.Value().SetValue().Init(cx, args[0], "Argument 1", true)) {
27915 return false;
27916 }
27917 }
27918 }
27919 if (objIsXray) {
27920 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27921 // we know Xrays have no dynamic unwrap behavior.
27922 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27923 if (!unwrappedObj.ref()) {
27924 return false;
27925 }
27926 }
27927 FastErrorResult rv;
27928 // NOTE: This assert does NOT call the function.
27929 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27930 MOZ_KnownLive(self)(self)->PassOptionalNullableUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27931 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableUnion"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableUnion"
)), 0))
) {
27932 return false;
27933 }
27934 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27934); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27934; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27935 args.rval().setUndefined();
27936 return true;
27937}
27938
27939static const JSJitInfo passOptionalNullableUnion_methodinfo = {
27940 { (JSJitGetterOp)passOptionalNullableUnion },
27941 { prototypes::id::TestJSImplInterface },
27942 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
27943 JSJitInfo::Method,
27944 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
27945 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
27946 false, /* isInfallible. False in setters. */
27947 false, /* isMovable. Not relevant for setters. */
27948 false, /* isEliminatable. Not relevant for setters. */
27949 false, /* isAlwaysInSlot. Only relevant for getters. */
27950 false, /* isLazilyCachedInSlot. Only relevant for getters. */
27951 false, /* isTypedMethod. Only relevant for methods. */
27952 0 /* Reserved slot index, if we're stored in a slot, else 0. */
27953};
27954
27955MOZ_CAN_RUN_SCRIPT static bool
27956passOptionalNullableUnionWithDefaultValue(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
27957{
27958 BindingCallContext cx(cx_, "TestJSImplInterface.passOptionalNullableUnionWithDefaultValue");
27959 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject27962( cx, "TestJSImplInterface"
, "passOptionalNullableUnionWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27960 "TestJSImplInterface", "passOptionalNullableUnionWithDefaultValue", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject27962( cx, "TestJSImplInterface"
, "passOptionalNullableUnionWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27961 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject27962( cx, "TestJSImplInterface"
, "passOptionalNullableUnionWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
27962 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject27962( cx, "TestJSImplInterface"
, "passOptionalNullableUnionWithDefaultValue", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
27963
27964 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
27965 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
27966 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
27967 if (objIsXray) {
27968 unwrappedObj.emplace(cx, obj);
27969 }
27970 Nullable<ObjectOrLong > arg0;
27971 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
27972 arg0.SetNull();
27973 } else {
27974 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
27975 return false;
27976 }
27977 }
27978 if (objIsXray) {
27979 // Since our object is an Xray, we can just CheckedUnwrapStatic:
27980 // we know Xrays have no dynamic unwrap behavior.
27981 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
27982 if (!unwrappedObj.ref()) {
27983 return false;
27984 }
27985 }
27986 FastErrorResult rv;
27987 // NOTE: This assert does NOT call the function.
27988 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalNullableUnionWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
27989 MOZ_KnownLive(self)(self)->PassOptionalNullableUnionWithDefaultValue(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
27990 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableUnionWithDefaultValue"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalNullableUnionWithDefaultValue"
)), 0))
) {
27991 return false;
27992 }
27993 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 27993); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 27993; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
27994 args.rval().setUndefined();
27995 return true;
27996}
27997
27998static const JSJitInfo passOptionalNullableUnionWithDefaultValue_methodinfo = {
27999 { (JSJitGetterOp)passOptionalNullableUnionWithDefaultValue },
28000 { prototypes::id::TestJSImplInterface },
28001 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28002 JSJitInfo::Method,
28003 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28004 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28005 false, /* isInfallible. False in setters. */
28006 false, /* isMovable. Not relevant for setters. */
28007 false, /* isEliminatable. Not relevant for setters. */
28008 false, /* isAlwaysInSlot. Only relevant for getters. */
28009 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28010 false, /* isTypedMethod. Only relevant for methods. */
28011 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28012};
28013
28014MOZ_CAN_RUN_SCRIPT static bool
28015passUnionWithArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28016{
28017 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithArrayBuffer");
28018 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28021( cx, "TestJSImplInterface"
, "passUnionWithArrayBuffer", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28019 "TestJSImplInterface", "passUnionWithArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28021( cx, "TestJSImplInterface"
, "passUnionWithArrayBuffer", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28020 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28021( cx, "TestJSImplInterface"
, "passUnionWithArrayBuffer", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28021 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28021( cx, "TestJSImplInterface"
, "passUnionWithArrayBuffer", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
28022
28023 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28024 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithArrayBuffer", 1)) {
28025 return false;
28026 }
28027 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28028 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28029 if (objIsXray) {
28030 unwrappedObj.emplace(cx, obj);
28031 }
28032 UTF8StringOrArrayBuffer arg0;
28033 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28034 return false;
28035 }
28036 if (objIsXray) {
28037 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28038 // we know Xrays have no dynamic unwrap behavior.
28039 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28040 if (!unwrappedObj.ref()) {
28041 return false;
28042 }
28043 }
28044 FastErrorResult rv;
28045 // NOTE: This assert does NOT call the function.
28046 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28047 MOZ_KnownLive(self)(self)->PassUnionWithArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28048 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithArrayBuffer"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithArrayBuffer"
)), 0))
) {
28049 return false;
28050 }
28051 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28051); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28051; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28052 args.rval().setUndefined();
28053 return true;
28054}
28055
28056static const JSJitInfo passUnionWithArrayBuffer_methodinfo = {
28057 { (JSJitGetterOp)passUnionWithArrayBuffer },
28058 { prototypes::id::TestJSImplInterface },
28059 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28060 JSJitInfo::Method,
28061 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28062 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28063 false, /* isInfallible. False in setters. */
28064 false, /* isMovable. Not relevant for setters. */
28065 false, /* isEliminatable. Not relevant for setters. */
28066 false, /* isAlwaysInSlot. Only relevant for getters. */
28067 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28068 false, /* isTypedMethod. Only relevant for methods. */
28069 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28070};
28071
28072MOZ_CAN_RUN_SCRIPT static bool
28073passUnionWithArrayBufferOrNull(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28074{
28075 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithArrayBufferOrNull");
28076 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28079( cx, "TestJSImplInterface"
, "passUnionWithArrayBufferOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28077 "TestJSImplInterface", "passUnionWithArrayBufferOrNull", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28079( cx, "TestJSImplInterface"
, "passUnionWithArrayBufferOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28078 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28079( cx, "TestJSImplInterface"
, "passUnionWithArrayBufferOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28079 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28079( cx, "TestJSImplInterface"
, "passUnionWithArrayBufferOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
28080
28081 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28082 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithArrayBufferOrNull", 1)) {
28083 return false;
28084 }
28085 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28086 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28087 if (objIsXray) {
28088 unwrappedObj.emplace(cx, obj);
28089 }
28090 UTF8StringOrArrayBufferOrNull arg0;
28091 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28092 return false;
28093 }
28094 if (objIsXray) {
28095 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28096 // we know Xrays have no dynamic unwrap behavior.
28097 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28098 if (!unwrappedObj.ref()) {
28099 return false;
28100 }
28101 }
28102 FastErrorResult rv;
28103 // NOTE: This assert does NOT call the function.
28104 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithArrayBufferOrNull(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28105 MOZ_KnownLive(self)(self)->PassUnionWithArrayBufferOrNull(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28106 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithArrayBufferOrNull"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithArrayBufferOrNull"
)), 0))
) {
28107 return false;
28108 }
28109 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28109); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28109; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28110 args.rval().setUndefined();
28111 return true;
28112}
28113
28114static const JSJitInfo passUnionWithArrayBufferOrNull_methodinfo = {
28115 { (JSJitGetterOp)passUnionWithArrayBufferOrNull },
28116 { prototypes::id::TestJSImplInterface },
28117 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28118 JSJitInfo::Method,
28119 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28120 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28121 false, /* isInfallible. False in setters. */
28122 false, /* isMovable. Not relevant for setters. */
28123 false, /* isEliminatable. Not relevant for setters. */
28124 false, /* isAlwaysInSlot. Only relevant for getters. */
28125 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28126 false, /* isTypedMethod. Only relevant for methods. */
28127 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28128};
28129
28130MOZ_CAN_RUN_SCRIPT static bool
28131passUnionWithTypedArrays(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28132{
28133 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithTypedArrays");
28134 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28137( cx, "TestJSImplInterface"
, "passUnionWithTypedArrays", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28135 "TestJSImplInterface", "passUnionWithTypedArrays", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28137( cx, "TestJSImplInterface"
, "passUnionWithTypedArrays", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28136 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28137( cx, "TestJSImplInterface"
, "passUnionWithTypedArrays", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28137 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28137( cx, "TestJSImplInterface"
, "passUnionWithTypedArrays", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
28138
28139 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28140 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithTypedArrays", 1)) {
28141 return false;
28142 }
28143 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28144 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28145 if (objIsXray) {
28146 unwrappedObj.emplace(cx, obj);
28147 }
28148 ArrayBufferViewOrArrayBuffer arg0;
28149 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28150 return false;
28151 }
28152 if (objIsXray) {
28153 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28154 // we know Xrays have no dynamic unwrap behavior.
28155 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28156 if (!unwrappedObj.ref()) {
28157 return false;
28158 }
28159 }
28160 FastErrorResult rv;
28161 // NOTE: This assert does NOT call the function.
28162 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithTypedArrays(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28163 MOZ_KnownLive(self)(self)->PassUnionWithTypedArrays(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28164 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithTypedArrays"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithTypedArrays"
)), 0))
) {
28165 return false;
28166 }
28167 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28167); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28167; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28168 args.rval().setUndefined();
28169 return true;
28170}
28171
28172static const JSJitInfo passUnionWithTypedArrays_methodinfo = {
28173 { (JSJitGetterOp)passUnionWithTypedArrays },
28174 { prototypes::id::TestJSImplInterface },
28175 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28176 JSJitInfo::Method,
28177 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28178 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28179 false, /* isInfallible. False in setters. */
28180 false, /* isMovable. Not relevant for setters. */
28181 false, /* isEliminatable. Not relevant for setters. */
28182 false, /* isAlwaysInSlot. Only relevant for getters. */
28183 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28184 false, /* isTypedMethod. Only relevant for methods. */
28185 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28186};
28187
28188MOZ_CAN_RUN_SCRIPT static bool
28189passUnionWithTypedArraysOrNull(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28190{
28191 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithTypedArraysOrNull");
28192 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28195( cx, "TestJSImplInterface"
, "passUnionWithTypedArraysOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28193 "TestJSImplInterface", "passUnionWithTypedArraysOrNull", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28195( cx, "TestJSImplInterface"
, "passUnionWithTypedArraysOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28194 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28195( cx, "TestJSImplInterface"
, "passUnionWithTypedArraysOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28195 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28195( cx, "TestJSImplInterface"
, "passUnionWithTypedArraysOrNull", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
28196
28197 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28198 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithTypedArraysOrNull", 1)) {
28199 return false;
28200 }
28201 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28202 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28203 if (objIsXray) {
28204 unwrappedObj.emplace(cx, obj);
28205 }
28206 ArrayBufferViewOrArrayBufferOrNull arg0;
28207 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28208 return false;
28209 }
28210 if (objIsXray) {
28211 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28212 // we know Xrays have no dynamic unwrap behavior.
28213 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28214 if (!unwrappedObj.ref()) {
28215 return false;
28216 }
28217 }
28218 FastErrorResult rv;
28219 // NOTE: This assert does NOT call the function.
28220 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithTypedArraysOrNull(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28221 MOZ_KnownLive(self)(self)->PassUnionWithTypedArraysOrNull(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28222 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithTypedArraysOrNull"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithTypedArraysOrNull"
)), 0))
) {
28223 return false;
28224 }
28225 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28225); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28225; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28226 args.rval().setUndefined();
28227 return true;
28228}
28229
28230static const JSJitInfo passUnionWithTypedArraysOrNull_methodinfo = {
28231 { (JSJitGetterOp)passUnionWithTypedArraysOrNull },
28232 { prototypes::id::TestJSImplInterface },
28233 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28234 JSJitInfo::Method,
28235 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28236 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28237 false, /* isInfallible. False in setters. */
28238 false, /* isMovable. Not relevant for setters. */
28239 false, /* isEliminatable. Not relevant for setters. */
28240 false, /* isAlwaysInSlot. Only relevant for getters. */
28241 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28242 false, /* isTypedMethod. Only relevant for methods. */
28243 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28244};
28245
28246MOZ_CAN_RUN_SCRIPT static bool
28247passUnionWithString(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28248{
28249 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithString");
28250 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28253( cx, "TestJSImplInterface"
, "passUnionWithString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28251 "TestJSImplInterface", "passUnionWithString", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28253( cx, "TestJSImplInterface"
, "passUnionWithString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28252 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28253( cx, "TestJSImplInterface"
, "passUnionWithString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28253 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28253( cx, "TestJSImplInterface"
, "passUnionWithString", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
28254
28255 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28256 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithString", 1)) {
28257 return false;
28258 }
28259 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28260 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28261 if (objIsXray) {
28262 unwrappedObj.emplace(cx, obj);
28263 }
28264 StringOrObject arg0;
28265 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28266 return false;
28267 }
28268 if (objIsXray) {
28269 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28270 // we know Xrays have no dynamic unwrap behavior.
28271 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28272 if (!unwrappedObj.ref()) {
28273 return false;
28274 }
28275 }
28276 FastErrorResult rv;
28277 // NOTE: This assert does NOT call the function.
28278 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28279 MOZ_KnownLive(self)(self)->PassUnionWithString(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28280 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithString"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithString"
)), 0))
) {
28281 return false;
28282 }
28283 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28283); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28283; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28284 args.rval().setUndefined();
28285 return true;
28286}
28287
28288static const JSJitInfo passUnionWithString_methodinfo = {
28289 { (JSJitGetterOp)passUnionWithString },
28290 { prototypes::id::TestJSImplInterface },
28291 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28292 JSJitInfo::Method,
28293 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28294 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28295 false, /* isInfallible. False in setters. */
28296 false, /* isMovable. Not relevant for setters. */
28297 false, /* isEliminatable. Not relevant for setters. */
28298 false, /* isAlwaysInSlot. Only relevant for getters. */
28299 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28300 false, /* isTypedMethod. Only relevant for methods. */
28301 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28302};
28303
28304MOZ_CAN_RUN_SCRIPT static bool
28305passUnionWithEnum(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28306{
28307 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithEnum");
28308 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28311( cx, "TestJSImplInterface"
, "passUnionWithEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28309 "TestJSImplInterface", "passUnionWithEnum", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28311( cx, "TestJSImplInterface"
, "passUnionWithEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28310 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28311( cx, "TestJSImplInterface"
, "passUnionWithEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28311 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28311( cx, "TestJSImplInterface"
, "passUnionWithEnum", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
28312
28313 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28314 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithEnum", 1)) {
28315 return false;
28316 }
28317 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28318 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28319 if (objIsXray) {
28320 unwrappedObj.emplace(cx, obj);
28321 }
28322 SupportedTypeOrObject arg0;
28323 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28324 return false;
28325 }
28326 if (objIsXray) {
28327 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28328 // we know Xrays have no dynamic unwrap behavior.
28329 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28330 if (!unwrappedObj.ref()) {
28331 return false;
28332 }
28333 }
28334 FastErrorResult rv;
28335 // NOTE: This assert does NOT call the function.
28336 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithEnum(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28337 MOZ_KnownLive(self)(self)->PassUnionWithEnum(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28338 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithEnum"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithEnum"
)), 0))
) {
28339 return false;
28340 }
28341 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28341); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28341; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28342 args.rval().setUndefined();
28343 return true;
28344}
28345
28346static const JSJitInfo passUnionWithEnum_methodinfo = {
28347 { (JSJitGetterOp)passUnionWithEnum },
28348 { prototypes::id::TestJSImplInterface },
28349 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28350 JSJitInfo::Method,
28351 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28352 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28353 false, /* isInfallible. False in setters. */
28354 false, /* isMovable. Not relevant for setters. */
28355 false, /* isEliminatable. Not relevant for setters. */
28356 false, /* isAlwaysInSlot. Only relevant for getters. */
28357 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28358 false, /* isTypedMethod. Only relevant for methods. */
28359 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28360};
28361
28362MOZ_CAN_RUN_SCRIPT static bool
28363passUnionWithObject(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28364{
28365 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithObject");
28366 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28369( cx, "TestJSImplInterface"
, "passUnionWithObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28367 "TestJSImplInterface", "passUnionWithObject", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28369( cx, "TestJSImplInterface"
, "passUnionWithObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28368 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28369( cx, "TestJSImplInterface"
, "passUnionWithObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
28369 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28369( cx, "TestJSImplInterface"
, "passUnionWithObject", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
28370
28371 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28372 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionWithObject", 1)) {
28373 return false;
28374 }
28375 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28376 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28377 if (objIsXray) {
28378 unwrappedObj.emplace(cx, obj);
28379 }
28380 ObjectOrLong arg0;
28381 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28382 return false;
28383 }
28384 if (objIsXray) {
28385 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28386 // we know Xrays have no dynamic unwrap behavior.
28387 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28388 if (!unwrappedObj.ref()) {
28389 return false;
28390 }
28391 }
28392 FastErrorResult rv;
28393 // NOTE: This assert does NOT call the function.
28394 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28395 MOZ_KnownLive(self)(self)->PassUnionWithObject(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28396 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithObject"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithObject"
)), 0))
) {
28397 return false;
28398 }
28399 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28399); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28399; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28400 args.rval().setUndefined();
28401 return true;
28402}
28403
28404static const JSJitInfo passUnionWithObject_methodinfo = {
28405 { (JSJitGetterOp)passUnionWithObject },
28406 { prototypes::id::TestJSImplInterface },
28407 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28408 JSJitInfo::Method,
28409 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28410 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28411 false, /* isInfallible. False in setters. */
28412 false, /* isMovable. Not relevant for setters. */
28413 false, /* isEliminatable. Not relevant for setters. */
28414 false, /* isAlwaysInSlot. Only relevant for getters. */
28415 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28416 false, /* isTypedMethod. Only relevant for methods. */
28417 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28418};
28419
28420MOZ_CAN_RUN_SCRIPT static bool
28421passUnionWithDefaultValue1(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28422{
28423 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue1");
28424 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28427( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28425 "TestJSImplInterface", "passUnionWithDefaultValue1", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28427( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28426 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28427( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28427 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28427( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
28428
28429 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28430 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28431 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28432 if (objIsXray) {
28433 unwrappedObj.emplace(cx, obj);
28434 }
28435 DoubleOrString arg0;
28436 if (!(args.hasDefined(0))) {
28437 arg0.SetStringLiteral(u"");
28438 } else {
28439 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28440 return false;
28441 }
28442 }
28443 if (objIsXray) {
28444 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28445 // we know Xrays have no dynamic unwrap behavior.
28446 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28447 if (!unwrappedObj.ref()) {
28448 return false;
28449 }
28450 }
28451 FastErrorResult rv;
28452 // NOTE: This assert does NOT call the function.
28453 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue1(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28454 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue1(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28455 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue1"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue1"
)), 0))
) {
28456 return false;
28457 }
28458 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28458); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28458; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28459 args.rval().setUndefined();
28460 return true;
28461}
28462
28463static const JSJitInfo passUnionWithDefaultValue1_methodinfo = {
28464 { (JSJitGetterOp)passUnionWithDefaultValue1 },
28465 { prototypes::id::TestJSImplInterface },
28466 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28467 JSJitInfo::Method,
28468 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28469 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28470 false, /* isInfallible. False in setters. */
28471 false, /* isMovable. Not relevant for setters. */
28472 false, /* isEliminatable. Not relevant for setters. */
28473 false, /* isAlwaysInSlot. Only relevant for getters. */
28474 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28475 false, /* isTypedMethod. Only relevant for methods. */
28476 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28477};
28478
28479MOZ_CAN_RUN_SCRIPT static bool
28480passUnionWithDefaultValue2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28481{
28482 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue2");
28483 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28486( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28484 "TestJSImplInterface", "passUnionWithDefaultValue2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28486( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28485 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28486( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28486 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28486( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
28487
28488 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28489 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28490 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28491 if (objIsXray) {
28492 unwrappedObj.emplace(cx, obj);
28493 }
28494 DoubleOrString arg0;
28495 if (!(args.hasDefined(0))) {
28496 arg0.RawSetAsDouble() = 1.0;
28497 } else {
28498 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28499 return false;
28500 }
28501 }
28502 if (objIsXray) {
28503 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28504 // we know Xrays have no dynamic unwrap behavior.
28505 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28506 if (!unwrappedObj.ref()) {
28507 return false;
28508 }
28509 }
28510 FastErrorResult rv;
28511 // NOTE: This assert does NOT call the function.
28512 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28513 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28514 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue2"
)), 0))
) {
28515 return false;
28516 }
28517 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28517); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28517; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28518 args.rval().setUndefined();
28519 return true;
28520}
28521
28522static const JSJitInfo passUnionWithDefaultValue2_methodinfo = {
28523 { (JSJitGetterOp)passUnionWithDefaultValue2 },
28524 { prototypes::id::TestJSImplInterface },
28525 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28526 JSJitInfo::Method,
28527 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28528 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28529 false, /* isInfallible. False in setters. */
28530 false, /* isMovable. Not relevant for setters. */
28531 false, /* isEliminatable. Not relevant for setters. */
28532 false, /* isAlwaysInSlot. Only relevant for getters. */
28533 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28534 false, /* isTypedMethod. Only relevant for methods. */
28535 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28536};
28537
28538MOZ_CAN_RUN_SCRIPT static bool
28539passUnionWithDefaultValue3(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28540{
28541 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue3");
28542 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28545( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28543 "TestJSImplInterface", "passUnionWithDefaultValue3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28545( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28544 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28545( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28545 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28545( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
28546
28547 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28548 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28549 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28550 if (objIsXray) {
28551 unwrappedObj.emplace(cx, obj);
28552 }
28553 DoubleOrString arg0;
28554 if (!(args.hasDefined(0))) {
28555 arg0.RawSetAsDouble() = 1.5;
28556 } else {
28557 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28558 return false;
28559 }
28560 }
28561 if (objIsXray) {
28562 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28563 // we know Xrays have no dynamic unwrap behavior.
28564 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28565 if (!unwrappedObj.ref()) {
28566 return false;
28567 }
28568 }
28569 FastErrorResult rv;
28570 // NOTE: This assert does NOT call the function.
28571 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue3(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28572 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue3(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28573 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue3"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue3"
)), 0))
) {
28574 return false;
28575 }
28576 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28576); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28576; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28577 args.rval().setUndefined();
28578 return true;
28579}
28580
28581static const JSJitInfo passUnionWithDefaultValue3_methodinfo = {
28582 { (JSJitGetterOp)passUnionWithDefaultValue3 },
28583 { prototypes::id::TestJSImplInterface },
28584 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28585 JSJitInfo::Method,
28586 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28587 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28588 false, /* isInfallible. False in setters. */
28589 false, /* isMovable. Not relevant for setters. */
28590 false, /* isEliminatable. Not relevant for setters. */
28591 false, /* isAlwaysInSlot. Only relevant for getters. */
28592 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28593 false, /* isTypedMethod. Only relevant for methods. */
28594 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28595};
28596
28597MOZ_CAN_RUN_SCRIPT static bool
28598passUnionWithDefaultValue4(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28599{
28600 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue4");
28601 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28604( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28602 "TestJSImplInterface", "passUnionWithDefaultValue4", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28604( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28603 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28604( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28604 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28604( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
28605
28606 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28607 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28608 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28609 if (objIsXray) {
28610 unwrappedObj.emplace(cx, obj);
28611 }
28612 FloatOrString arg0;
28613 if (!(args.hasDefined(0))) {
28614 arg0.SetStringLiteral(u"");
28615 } else {
28616 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28617 return false;
28618 }
28619 }
28620 if (objIsXray) {
28621 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28622 // we know Xrays have no dynamic unwrap behavior.
28623 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28624 if (!unwrappedObj.ref()) {
28625 return false;
28626 }
28627 }
28628 FastErrorResult rv;
28629 // NOTE: This assert does NOT call the function.
28630 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue4(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28631 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue4(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28632 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue4"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue4"
)), 0))
) {
28633 return false;
28634 }
28635 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28635); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28635; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28636 args.rval().setUndefined();
28637 return true;
28638}
28639
28640static const JSJitInfo passUnionWithDefaultValue4_methodinfo = {
28641 { (JSJitGetterOp)passUnionWithDefaultValue4 },
28642 { prototypes::id::TestJSImplInterface },
28643 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28644 JSJitInfo::Method,
28645 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28646 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28647 false, /* isInfallible. False in setters. */
28648 false, /* isMovable. Not relevant for setters. */
28649 false, /* isEliminatable. Not relevant for setters. */
28650 false, /* isAlwaysInSlot. Only relevant for getters. */
28651 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28652 false, /* isTypedMethod. Only relevant for methods. */
28653 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28654};
28655
28656MOZ_CAN_RUN_SCRIPT static bool
28657passUnionWithDefaultValue5(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28658{
28659 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue5");
28660 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28663( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28661 "TestJSImplInterface", "passUnionWithDefaultValue5", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28663( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28662 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28663( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28663 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28663( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
28664
28665 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28666 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28667 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28668 if (objIsXray) {
28669 unwrappedObj.emplace(cx, obj);
28670 }
28671 FloatOrString arg0;
28672 if (!(args.hasDefined(0))) {
28673 arg0.RawSetAsFloat() = 1.0F;
28674 } else {
28675 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28676 return false;
28677 }
28678 }
28679 if (objIsXray) {
28680 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28681 // we know Xrays have no dynamic unwrap behavior.
28682 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28683 if (!unwrappedObj.ref()) {
28684 return false;
28685 }
28686 }
28687 FastErrorResult rv;
28688 // NOTE: This assert does NOT call the function.
28689 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue5(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28690 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue5(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28691 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue5"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue5"
)), 0))
) {
28692 return false;
28693 }
28694 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28694); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28694; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28695 args.rval().setUndefined();
28696 return true;
28697}
28698
28699static const JSJitInfo passUnionWithDefaultValue5_methodinfo = {
28700 { (JSJitGetterOp)passUnionWithDefaultValue5 },
28701 { prototypes::id::TestJSImplInterface },
28702 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28703 JSJitInfo::Method,
28704 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28705 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28706 false, /* isInfallible. False in setters. */
28707 false, /* isMovable. Not relevant for setters. */
28708 false, /* isEliminatable. Not relevant for setters. */
28709 false, /* isAlwaysInSlot. Only relevant for getters. */
28710 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28711 false, /* isTypedMethod. Only relevant for methods. */
28712 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28713};
28714
28715MOZ_CAN_RUN_SCRIPT static bool
28716passUnionWithDefaultValue6(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28717{
28718 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue6");
28719 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28722( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28720 "TestJSImplInterface", "passUnionWithDefaultValue6", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28722( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28721 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28722( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28722 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28722( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
28723
28724 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28725 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28726 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28727 if (objIsXray) {
28728 unwrappedObj.emplace(cx, obj);
28729 }
28730 FloatOrString arg0;
28731 if (!(args.hasDefined(0))) {
28732 arg0.RawSetAsFloat() = 1.5F;
28733 } else {
28734 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28735 return false;
28736 }
28737 }
28738 if (objIsXray) {
28739 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28740 // we know Xrays have no dynamic unwrap behavior.
28741 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28742 if (!unwrappedObj.ref()) {
28743 return false;
28744 }
28745 }
28746 FastErrorResult rv;
28747 // NOTE: This assert does NOT call the function.
28748 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue6(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28749 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue6(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28750 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue6"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue6"
)), 0))
) {
28751 return false;
28752 }
28753 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28753); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28753; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28754 args.rval().setUndefined();
28755 return true;
28756}
28757
28758static const JSJitInfo passUnionWithDefaultValue6_methodinfo = {
28759 { (JSJitGetterOp)passUnionWithDefaultValue6 },
28760 { prototypes::id::TestJSImplInterface },
28761 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28762 JSJitInfo::Method,
28763 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28764 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28765 false, /* isInfallible. False in setters. */
28766 false, /* isMovable. Not relevant for setters. */
28767 false, /* isEliminatable. Not relevant for setters. */
28768 false, /* isAlwaysInSlot. Only relevant for getters. */
28769 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28770 false, /* isTypedMethod. Only relevant for methods. */
28771 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28772};
28773
28774MOZ_CAN_RUN_SCRIPT static bool
28775passUnionWithDefaultValue7(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28776{
28777 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue7");
28778 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28781( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28779 "TestJSImplInterface", "passUnionWithDefaultValue7", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28781( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28780 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28781( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28781 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28781( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
28782
28783 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28784 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28785 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28786 if (objIsXray) {
28787 unwrappedObj.emplace(cx, obj);
28788 }
28789 UnrestrictedDoubleOrString arg0;
28790 if (!(args.hasDefined(0))) {
28791 arg0.SetStringLiteral(u"");
28792 } else {
28793 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28794 return false;
28795 }
28796 }
28797 if (objIsXray) {
28798 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28799 // we know Xrays have no dynamic unwrap behavior.
28800 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28801 if (!unwrappedObj.ref()) {
28802 return false;
28803 }
28804 }
28805 FastErrorResult rv;
28806 // NOTE: This assert does NOT call the function.
28807 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue7(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28808 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue7(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28809 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue7"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue7"
)), 0))
) {
28810 return false;
28811 }
28812 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28812); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28812; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28813 args.rval().setUndefined();
28814 return true;
28815}
28816
28817static const JSJitInfo passUnionWithDefaultValue7_methodinfo = {
28818 { (JSJitGetterOp)passUnionWithDefaultValue7 },
28819 { prototypes::id::TestJSImplInterface },
28820 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28821 JSJitInfo::Method,
28822 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28823 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28824 false, /* isInfallible. False in setters. */
28825 false, /* isMovable. Not relevant for setters. */
28826 false, /* isEliminatable. Not relevant for setters. */
28827 false, /* isAlwaysInSlot. Only relevant for getters. */
28828 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28829 false, /* isTypedMethod. Only relevant for methods. */
28830 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28831};
28832
28833MOZ_CAN_RUN_SCRIPT static bool
28834passUnionWithDefaultValue8(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28835{
28836 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue8");
28837 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28840( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28838 "TestJSImplInterface", "passUnionWithDefaultValue8", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28840( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28839 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28840( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28840 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28840( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
28841
28842 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28843 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28844 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28845 if (objIsXray) {
28846 unwrappedObj.emplace(cx, obj);
28847 }
28848 UnrestrictedDoubleOrString arg0;
28849 if (!(args.hasDefined(0))) {
28850 arg0.RawSetAsUnrestrictedDouble() = 1.0;
28851 } else {
28852 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28853 return false;
28854 }
28855 }
28856 if (objIsXray) {
28857 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28858 // we know Xrays have no dynamic unwrap behavior.
28859 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28860 if (!unwrappedObj.ref()) {
28861 return false;
28862 }
28863 }
28864 FastErrorResult rv;
28865 // NOTE: This assert does NOT call the function.
28866 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue8(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28867 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue8(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28868 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue8"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue8"
)), 0))
) {
28869 return false;
28870 }
28871 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28871); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28871; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28872 args.rval().setUndefined();
28873 return true;
28874}
28875
28876static const JSJitInfo passUnionWithDefaultValue8_methodinfo = {
28877 { (JSJitGetterOp)passUnionWithDefaultValue8 },
28878 { prototypes::id::TestJSImplInterface },
28879 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28880 JSJitInfo::Method,
28881 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28882 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28883 false, /* isInfallible. False in setters. */
28884 false, /* isMovable. Not relevant for setters. */
28885 false, /* isEliminatable. Not relevant for setters. */
28886 false, /* isAlwaysInSlot. Only relevant for getters. */
28887 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28888 false, /* isTypedMethod. Only relevant for methods. */
28889 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28890};
28891
28892MOZ_CAN_RUN_SCRIPT static bool
28893passUnionWithDefaultValue9(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28894{
28895 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue9");
28896 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28899( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue9", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28897 "TestJSImplInterface", "passUnionWithDefaultValue9", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28899( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue9", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28898 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28899( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue9", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28899 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28899( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue9", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
28900
28901 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28902 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28903 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28904 if (objIsXray) {
28905 unwrappedObj.emplace(cx, obj);
28906 }
28907 UnrestrictedDoubleOrString arg0;
28908 if (!(args.hasDefined(0))) {
28909 arg0.RawSetAsUnrestrictedDouble() = 1.5;
28910 } else {
28911 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28912 return false;
28913 }
28914 }
28915 if (objIsXray) {
28916 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28917 // we know Xrays have no dynamic unwrap behavior.
28918 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28919 if (!unwrappedObj.ref()) {
28920 return false;
28921 }
28922 }
28923 FastErrorResult rv;
28924 // NOTE: This assert does NOT call the function.
28925 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue9(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28926 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue9(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28927 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue9"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue9"
)), 0))
) {
28928 return false;
28929 }
28930 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28930); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28930; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28931 args.rval().setUndefined();
28932 return true;
28933}
28934
28935static const JSJitInfo passUnionWithDefaultValue9_methodinfo = {
28936 { (JSJitGetterOp)passUnionWithDefaultValue9 },
28937 { prototypes::id::TestJSImplInterface },
28938 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28939 JSJitInfo::Method,
28940 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
28941 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
28942 false, /* isInfallible. False in setters. */
28943 false, /* isMovable. Not relevant for setters. */
28944 false, /* isEliminatable. Not relevant for setters. */
28945 false, /* isAlwaysInSlot. Only relevant for getters. */
28946 false, /* isLazilyCachedInSlot. Only relevant for getters. */
28947 false, /* isTypedMethod. Only relevant for methods. */
28948 0 /* Reserved slot index, if we're stored in a slot, else 0. */
28949};
28950
28951MOZ_CAN_RUN_SCRIPT static bool
28952passUnionWithDefaultValue10(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
28953{
28954 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue10");
28955 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject28958( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue10", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28956 "TestJSImplInterface", "passUnionWithDefaultValue10", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject28958( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue10", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28957 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject28958( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue10", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
28958 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject28958( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue10", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
28959
28960 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
28961 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
28962 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
28963 if (objIsXray) {
28964 unwrappedObj.emplace(cx, obj);
28965 }
28966 UnrestrictedDoubleOrString arg0;
28967 if (!(args.hasDefined(0))) {
28968 arg0.RawSetAsUnrestrictedDouble() = mozilla::PositiveInfinity<double>();
28969 } else {
28970 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
28971 return false;
28972 }
28973 }
28974 if (objIsXray) {
28975 // Since our object is an Xray, we can just CheckedUnwrapStatic:
28976 // we know Xrays have no dynamic unwrap behavior.
28977 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
28978 if (!unwrappedObj.ref()) {
28979 return false;
28980 }
28981 }
28982 FastErrorResult rv;
28983 // NOTE: This assert does NOT call the function.
28984 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue10(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
28985 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue10(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
28986 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue10"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue10"
)), 0))
) {
28987 return false;
28988 }
28989 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 28989); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 28989; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
28990 args.rval().setUndefined();
28991 return true;
28992}
28993
28994static const JSJitInfo passUnionWithDefaultValue10_methodinfo = {
28995 { (JSJitGetterOp)passUnionWithDefaultValue10 },
28996 { prototypes::id::TestJSImplInterface },
28997 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
28998 JSJitInfo::Method,
28999 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29000 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29001 false, /* isInfallible. False in setters. */
29002 false, /* isMovable. Not relevant for setters. */
29003 false, /* isEliminatable. Not relevant for setters. */
29004 false, /* isAlwaysInSlot. Only relevant for getters. */
29005 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29006 false, /* isTypedMethod. Only relevant for methods. */
29007 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29008};
29009
29010MOZ_CAN_RUN_SCRIPT static bool
29011passUnionWithDefaultValue11(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29012{
29013 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue11");
29014 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29017( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue11", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29015 "TestJSImplInterface", "passUnionWithDefaultValue11", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29017( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue11", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29016 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29017( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue11", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29017 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29017( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue11", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29018
29019 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29020 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29021 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29022 if (objIsXray) {
29023 unwrappedObj.emplace(cx, obj);
29024 }
29025 UnrestrictedFloatOrString arg0;
29026 if (!(args.hasDefined(0))) {
29027 arg0.SetStringLiteral(u"");
29028 } else {
29029 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29030 return false;
29031 }
29032 }
29033 if (objIsXray) {
29034 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29035 // we know Xrays have no dynamic unwrap behavior.
29036 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29037 if (!unwrappedObj.ref()) {
29038 return false;
29039 }
29040 }
29041 FastErrorResult rv;
29042 // NOTE: This assert does NOT call the function.
29043 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue11(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29044 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue11(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29045 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue11"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue11"
)), 0))
) {
29046 return false;
29047 }
29048 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29048); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29048; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29049 args.rval().setUndefined();
29050 return true;
29051}
29052
29053static const JSJitInfo passUnionWithDefaultValue11_methodinfo = {
29054 { (JSJitGetterOp)passUnionWithDefaultValue11 },
29055 { prototypes::id::TestJSImplInterface },
29056 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29057 JSJitInfo::Method,
29058 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29059 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29060 false, /* isInfallible. False in setters. */
29061 false, /* isMovable. Not relevant for setters. */
29062 false, /* isEliminatable. Not relevant for setters. */
29063 false, /* isAlwaysInSlot. Only relevant for getters. */
29064 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29065 false, /* isTypedMethod. Only relevant for methods. */
29066 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29067};
29068
29069MOZ_CAN_RUN_SCRIPT static bool
29070passUnionWithDefaultValue12(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29071{
29072 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue12");
29073 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29076( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue12", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29074 "TestJSImplInterface", "passUnionWithDefaultValue12", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29076( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue12", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29075 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29076( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue12", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29076 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29076( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue12", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29077
29078 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29079 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29080 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29081 if (objIsXray) {
29082 unwrappedObj.emplace(cx, obj);
29083 }
29084 UnrestrictedFloatOrString arg0;
29085 if (!(args.hasDefined(0))) {
29086 arg0.RawSetAsUnrestrictedFloat() = 1.0F;
29087 } else {
29088 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29089 return false;
29090 }
29091 }
29092 if (objIsXray) {
29093 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29094 // we know Xrays have no dynamic unwrap behavior.
29095 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29096 if (!unwrappedObj.ref()) {
29097 return false;
29098 }
29099 }
29100 FastErrorResult rv;
29101 // NOTE: This assert does NOT call the function.
29102 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue12(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29103 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue12(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29104 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue12"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue12"
)), 0))
) {
29105 return false;
29106 }
29107 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29107); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29107; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29108 args.rval().setUndefined();
29109 return true;
29110}
29111
29112static const JSJitInfo passUnionWithDefaultValue12_methodinfo = {
29113 { (JSJitGetterOp)passUnionWithDefaultValue12 },
29114 { prototypes::id::TestJSImplInterface },
29115 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29116 JSJitInfo::Method,
29117 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29118 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29119 false, /* isInfallible. False in setters. */
29120 false, /* isMovable. Not relevant for setters. */
29121 false, /* isEliminatable. Not relevant for setters. */
29122 false, /* isAlwaysInSlot. Only relevant for getters. */
29123 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29124 false, /* isTypedMethod. Only relevant for methods. */
29125 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29126};
29127
29128MOZ_CAN_RUN_SCRIPT static bool
29129passUnionWithDefaultValue13(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29130{
29131 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue13");
29132 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29135( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue13", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29133 "TestJSImplInterface", "passUnionWithDefaultValue13", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29135( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue13", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29134 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29135( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue13", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29135 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29135( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue13", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29136
29137 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29138 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29139 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29140 if (objIsXray) {
29141 unwrappedObj.emplace(cx, obj);
29142 }
29143 UnrestrictedFloatOrString arg0;
29144 if (!(args.hasDefined(0))) {
29145 arg0.RawSetAsUnrestrictedFloat() = mozilla::PositiveInfinity<float>();
29146 } else {
29147 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29148 return false;
29149 }
29150 }
29151 if (objIsXray) {
29152 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29153 // we know Xrays have no dynamic unwrap behavior.
29154 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29155 if (!unwrappedObj.ref()) {
29156 return false;
29157 }
29158 }
29159 FastErrorResult rv;
29160 // NOTE: This assert does NOT call the function.
29161 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue13(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29162 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue13(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29163 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue13"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue13"
)), 0))
) {
29164 return false;
29165 }
29166 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29166); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29166; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29167 args.rval().setUndefined();
29168 return true;
29169}
29170
29171static const JSJitInfo passUnionWithDefaultValue13_methodinfo = {
29172 { (JSJitGetterOp)passUnionWithDefaultValue13 },
29173 { prototypes::id::TestJSImplInterface },
29174 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29175 JSJitInfo::Method,
29176 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29177 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29178 false, /* isInfallible. False in setters. */
29179 false, /* isMovable. Not relevant for setters. */
29180 false, /* isEliminatable. Not relevant for setters. */
29181 false, /* isAlwaysInSlot. Only relevant for getters. */
29182 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29183 false, /* isTypedMethod. Only relevant for methods. */
29184 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29185};
29186
29187MOZ_CAN_RUN_SCRIPT static bool
29188passUnionWithDefaultValue14(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29189{
29190 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue14");
29191 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29194( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue14", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29192 "TestJSImplInterface", "passUnionWithDefaultValue14", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29194( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue14", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29193 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29194( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue14", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29194 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29194( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue14", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29195
29196 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29197 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29198 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29199 if (objIsXray) {
29200 unwrappedObj.emplace(cx, obj);
29201 }
29202 DoubleOrByteString arg0;
29203 if (!(args.hasDefined(0))) {
29204 arg0.SetStringLiteral("");
29205 } else {
29206 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29207 return false;
29208 }
29209 }
29210 if (objIsXray) {
29211 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29212 // we know Xrays have no dynamic unwrap behavior.
29213 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29214 if (!unwrappedObj.ref()) {
29215 return false;
29216 }
29217 }
29218 FastErrorResult rv;
29219 // NOTE: This assert does NOT call the function.
29220 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue14(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29221 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue14(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29222 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue14"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue14"
)), 0))
) {
29223 return false;
29224 }
29225 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29225); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29225; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29226 args.rval().setUndefined();
29227 return true;
29228}
29229
29230static const JSJitInfo passUnionWithDefaultValue14_methodinfo = {
29231 { (JSJitGetterOp)passUnionWithDefaultValue14 },
29232 { prototypes::id::TestJSImplInterface },
29233 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29234 JSJitInfo::Method,
29235 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29236 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29237 false, /* isInfallible. False in setters. */
29238 false, /* isMovable. Not relevant for setters. */
29239 false, /* isEliminatable. Not relevant for setters. */
29240 false, /* isAlwaysInSlot. Only relevant for getters. */
29241 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29242 false, /* isTypedMethod. Only relevant for methods. */
29243 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29244};
29245
29246MOZ_CAN_RUN_SCRIPT static bool
29247passUnionWithDefaultValue15(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29248{
29249 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue15");
29250 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29253( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue15", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29251 "TestJSImplInterface", "passUnionWithDefaultValue15", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29253( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue15", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29252 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29253( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue15", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29253 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29253( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue15", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29254
29255 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29256 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29257 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29258 if (objIsXray) {
29259 unwrappedObj.emplace(cx, obj);
29260 }
29261 DoubleOrByteString arg0;
29262 if (!(args.hasDefined(0))) {
29263 arg0.RawSetAsDouble() = 1.0;
29264 } else {
29265 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29266 return false;
29267 }
29268 }
29269 if (objIsXray) {
29270 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29271 // we know Xrays have no dynamic unwrap behavior.
29272 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29273 if (!unwrappedObj.ref()) {
29274 return false;
29275 }
29276 }
29277 FastErrorResult rv;
29278 // NOTE: This assert does NOT call the function.
29279 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue15(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29280 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue15(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29281 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue15"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue15"
)), 0))
) {
29282 return false;
29283 }
29284 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29284); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29284; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29285 args.rval().setUndefined();
29286 return true;
29287}
29288
29289static const JSJitInfo passUnionWithDefaultValue15_methodinfo = {
29290 { (JSJitGetterOp)passUnionWithDefaultValue15 },
29291 { prototypes::id::TestJSImplInterface },
29292 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29293 JSJitInfo::Method,
29294 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29295 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29296 false, /* isInfallible. False in setters. */
29297 false, /* isMovable. Not relevant for setters. */
29298 false, /* isEliminatable. Not relevant for setters. */
29299 false, /* isAlwaysInSlot. Only relevant for getters. */
29300 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29301 false, /* isTypedMethod. Only relevant for methods. */
29302 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29303};
29304
29305MOZ_CAN_RUN_SCRIPT static bool
29306passUnionWithDefaultValue16(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29307{
29308 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue16");
29309 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29312( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue16", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29310 "TestJSImplInterface", "passUnionWithDefaultValue16", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29312( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue16", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29311 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29312( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue16", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29312 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29312( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue16", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29313
29314 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29315 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29316 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29317 if (objIsXray) {
29318 unwrappedObj.emplace(cx, obj);
29319 }
29320 DoubleOrByteString arg0;
29321 if (!(args.hasDefined(0))) {
29322 arg0.RawSetAsDouble() = 1.5;
29323 } else {
29324 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29325 return false;
29326 }
29327 }
29328 if (objIsXray) {
29329 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29330 // we know Xrays have no dynamic unwrap behavior.
29331 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29332 if (!unwrappedObj.ref()) {
29333 return false;
29334 }
29335 }
29336 FastErrorResult rv;
29337 // NOTE: This assert does NOT call the function.
29338 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue16(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29339 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue16(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29340 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue16"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue16"
)), 0))
) {
29341 return false;
29342 }
29343 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29343); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29343; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29344 args.rval().setUndefined();
29345 return true;
29346}
29347
29348static const JSJitInfo passUnionWithDefaultValue16_methodinfo = {
29349 { (JSJitGetterOp)passUnionWithDefaultValue16 },
29350 { prototypes::id::TestJSImplInterface },
29351 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29352 JSJitInfo::Method,
29353 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29354 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29355 false, /* isInfallible. False in setters. */
29356 false, /* isMovable. Not relevant for setters. */
29357 false, /* isEliminatable. Not relevant for setters. */
29358 false, /* isAlwaysInSlot. Only relevant for getters. */
29359 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29360 false, /* isTypedMethod. Only relevant for methods. */
29361 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29362};
29363
29364MOZ_CAN_RUN_SCRIPT static bool
29365passUnionWithDefaultValue17(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29366{
29367 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue17");
29368 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29371( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue17", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29369 "TestJSImplInterface", "passUnionWithDefaultValue17", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29371( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue17", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29370 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29371( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue17", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29371 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29371( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue17", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29372
29373 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29374 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29375 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29376 if (objIsXray) {
29377 unwrappedObj.emplace(cx, obj);
29378 }
29379 DoubleOrSupportedType arg0;
29380 if (!(args.hasDefined(0))) {
29381 arg0.RawSetAsSupportedType() = SupportedType::Text_html;
29382 } else {
29383 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29384 return false;
29385 }
29386 }
29387 if (objIsXray) {
29388 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29389 // we know Xrays have no dynamic unwrap behavior.
29390 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29391 if (!unwrappedObj.ref()) {
29392 return false;
29393 }
29394 }
29395 FastErrorResult rv;
29396 // NOTE: This assert does NOT call the function.
29397 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue17(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29398 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue17(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29399 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue17"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue17"
)), 0))
) {
29400 return false;
29401 }
29402 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29402); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29402; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29403 args.rval().setUndefined();
29404 return true;
29405}
29406
29407static const JSJitInfo passUnionWithDefaultValue17_methodinfo = {
29408 { (JSJitGetterOp)passUnionWithDefaultValue17 },
29409 { prototypes::id::TestJSImplInterface },
29410 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29411 JSJitInfo::Method,
29412 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29413 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29414 false, /* isInfallible. False in setters. */
29415 false, /* isMovable. Not relevant for setters. */
29416 false, /* isEliminatable. Not relevant for setters. */
29417 false, /* isAlwaysInSlot. Only relevant for getters. */
29418 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29419 false, /* isTypedMethod. Only relevant for methods. */
29420 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29421};
29422
29423MOZ_CAN_RUN_SCRIPT static bool
29424passUnionWithDefaultValue18(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29425{
29426 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue18");
29427 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29430( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue18", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29428 "TestJSImplInterface", "passUnionWithDefaultValue18", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29430( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue18", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29429 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29430( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue18", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29430 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29430( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue18", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29431
29432 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29433 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29434 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29435 if (objIsXray) {
29436 unwrappedObj.emplace(cx, obj);
29437 }
29438 DoubleOrSupportedType arg0;
29439 if (!(args.hasDefined(0))) {
29440 arg0.RawSetAsDouble() = 1.0;
29441 } else {
29442 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29443 return false;
29444 }
29445 }
29446 if (objIsXray) {
29447 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29448 // we know Xrays have no dynamic unwrap behavior.
29449 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29450 if (!unwrappedObj.ref()) {
29451 return false;
29452 }
29453 }
29454 FastErrorResult rv;
29455 // NOTE: This assert does NOT call the function.
29456 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue18(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29457 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue18(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29458 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue18"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue18"
)), 0))
) {
29459 return false;
29460 }
29461 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29461); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29461; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29462 args.rval().setUndefined();
29463 return true;
29464}
29465
29466static const JSJitInfo passUnionWithDefaultValue18_methodinfo = {
29467 { (JSJitGetterOp)passUnionWithDefaultValue18 },
29468 { prototypes::id::TestJSImplInterface },
29469 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29470 JSJitInfo::Method,
29471 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29472 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29473 false, /* isInfallible. False in setters. */
29474 false, /* isMovable. Not relevant for setters. */
29475 false, /* isEliminatable. Not relevant for setters. */
29476 false, /* isAlwaysInSlot. Only relevant for getters. */
29477 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29478 false, /* isTypedMethod. Only relevant for methods. */
29479 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29480};
29481
29482MOZ_CAN_RUN_SCRIPT static bool
29483passUnionWithDefaultValue19(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29484{
29485 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue19");
29486 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29489( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue19", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29487 "TestJSImplInterface", "passUnionWithDefaultValue19", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29489( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue19", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29488 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29489( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue19", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29489 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29489( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue19", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29490
29491 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29492 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29493 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29494 if (objIsXray) {
29495 unwrappedObj.emplace(cx, obj);
29496 }
29497 DoubleOrSupportedType arg0;
29498 if (!(args.hasDefined(0))) {
29499 arg0.RawSetAsDouble() = 1.5;
29500 } else {
29501 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29502 return false;
29503 }
29504 }
29505 if (objIsXray) {
29506 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29507 // we know Xrays have no dynamic unwrap behavior.
29508 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29509 if (!unwrappedObj.ref()) {
29510 return false;
29511 }
29512 }
29513 FastErrorResult rv;
29514 // NOTE: This assert does NOT call the function.
29515 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue19(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29516 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue19(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29517 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue19"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue19"
)), 0))
) {
29518 return false;
29519 }
29520 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29520); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29520; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29521 args.rval().setUndefined();
29522 return true;
29523}
29524
29525static const JSJitInfo passUnionWithDefaultValue19_methodinfo = {
29526 { (JSJitGetterOp)passUnionWithDefaultValue19 },
29527 { prototypes::id::TestJSImplInterface },
29528 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29529 JSJitInfo::Method,
29530 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29531 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29532 false, /* isInfallible. False in setters. */
29533 false, /* isMovable. Not relevant for setters. */
29534 false, /* isEliminatable. Not relevant for setters. */
29535 false, /* isAlwaysInSlot. Only relevant for getters. */
29536 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29537 false, /* isTypedMethod. Only relevant for methods. */
29538 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29539};
29540
29541MOZ_CAN_RUN_SCRIPT static bool
29542passUnionWithDefaultValue20(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29543{
29544 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue20");
29545 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29548( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue20", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29546 "TestJSImplInterface", "passUnionWithDefaultValue20", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29548( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue20", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29547 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29548( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue20", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29548 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29548( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue20", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29549
29550 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29551 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29552 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29553 if (objIsXray) {
29554 unwrappedObj.emplace(cx, obj);
29555 }
29556 DoubleOrUSVString arg0;
29557 if (!(args.hasDefined(0))) {
29558 arg0.SetStringLiteral(u"abc");
29559 } else {
29560 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29561 return false;
29562 }
29563 }
29564 if (objIsXray) {
29565 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29566 // we know Xrays have no dynamic unwrap behavior.
29567 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29568 if (!unwrappedObj.ref()) {
29569 return false;
29570 }
29571 }
29572 FastErrorResult rv;
29573 // NOTE: This assert does NOT call the function.
29574 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue20(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29575 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue20(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29576 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue20"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue20"
)), 0))
) {
29577 return false;
29578 }
29579 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29579); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29579; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29580 args.rval().setUndefined();
29581 return true;
29582}
29583
29584static const JSJitInfo passUnionWithDefaultValue20_methodinfo = {
29585 { (JSJitGetterOp)passUnionWithDefaultValue20 },
29586 { prototypes::id::TestJSImplInterface },
29587 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29588 JSJitInfo::Method,
29589 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29590 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29591 false, /* isInfallible. False in setters. */
29592 false, /* isMovable. Not relevant for setters. */
29593 false, /* isEliminatable. Not relevant for setters. */
29594 false, /* isAlwaysInSlot. Only relevant for getters. */
29595 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29596 false, /* isTypedMethod. Only relevant for methods. */
29597 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29598};
29599
29600MOZ_CAN_RUN_SCRIPT static bool
29601passUnionWithDefaultValue21(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29602{
29603 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue21");
29604 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29607( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue21", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29605 "TestJSImplInterface", "passUnionWithDefaultValue21", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29607( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue21", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29606 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29607( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue21", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29607 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29607( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue21", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29608
29609 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29610 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29611 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29612 if (objIsXray) {
29613 unwrappedObj.emplace(cx, obj);
29614 }
29615 DoubleOrUSVString arg0;
29616 if (!(args.hasDefined(0))) {
29617 arg0.RawSetAsDouble() = 1.0;
29618 } else {
29619 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29620 return false;
29621 }
29622 }
29623 if (objIsXray) {
29624 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29625 // we know Xrays have no dynamic unwrap behavior.
29626 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29627 if (!unwrappedObj.ref()) {
29628 return false;
29629 }
29630 }
29631 FastErrorResult rv;
29632 // NOTE: This assert does NOT call the function.
29633 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue21(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29634 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue21(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29635 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue21"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue21"
)), 0))
) {
29636 return false;
29637 }
29638 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29638); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29638; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29639 args.rval().setUndefined();
29640 return true;
29641}
29642
29643static const JSJitInfo passUnionWithDefaultValue21_methodinfo = {
29644 { (JSJitGetterOp)passUnionWithDefaultValue21 },
29645 { prototypes::id::TestJSImplInterface },
29646 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29647 JSJitInfo::Method,
29648 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29649 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29650 false, /* isInfallible. False in setters. */
29651 false, /* isMovable. Not relevant for setters. */
29652 false, /* isEliminatable. Not relevant for setters. */
29653 false, /* isAlwaysInSlot. Only relevant for getters. */
29654 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29655 false, /* isTypedMethod. Only relevant for methods. */
29656 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29657};
29658
29659MOZ_CAN_RUN_SCRIPT static bool
29660passUnionWithDefaultValue22(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29661{
29662 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue22");
29663 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29666( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue22", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29664 "TestJSImplInterface", "passUnionWithDefaultValue22", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29666( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue22", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29665 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29666( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue22", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29666 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29666( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue22", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29667
29668 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29669 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29670 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29671 if (objIsXray) {
29672 unwrappedObj.emplace(cx, obj);
29673 }
29674 DoubleOrUSVString arg0;
29675 if (!(args.hasDefined(0))) {
29676 arg0.RawSetAsDouble() = 1.5;
29677 } else {
29678 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29679 return false;
29680 }
29681 }
29682 if (objIsXray) {
29683 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29684 // we know Xrays have no dynamic unwrap behavior.
29685 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29686 if (!unwrappedObj.ref()) {
29687 return false;
29688 }
29689 }
29690 FastErrorResult rv;
29691 // NOTE: This assert does NOT call the function.
29692 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue22(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29693 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue22(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29694 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue22"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue22"
)), 0))
) {
29695 return false;
29696 }
29697 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29697); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29697; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29698 args.rval().setUndefined();
29699 return true;
29700}
29701
29702static const JSJitInfo passUnionWithDefaultValue22_methodinfo = {
29703 { (JSJitGetterOp)passUnionWithDefaultValue22 },
29704 { prototypes::id::TestJSImplInterface },
29705 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29706 JSJitInfo::Method,
29707 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29708 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29709 false, /* isInfallible. False in setters. */
29710 false, /* isMovable. Not relevant for setters. */
29711 false, /* isEliminatable. Not relevant for setters. */
29712 false, /* isAlwaysInSlot. Only relevant for getters. */
29713 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29714 false, /* isTypedMethod. Only relevant for methods. */
29715 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29716};
29717
29718MOZ_CAN_RUN_SCRIPT static bool
29719passUnionWithDefaultValue23(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29720{
29721 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue23");
29722 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29725( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue23", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29723 "TestJSImplInterface", "passUnionWithDefaultValue23", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29725( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue23", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29724 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29725( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue23", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29725 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29725( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue23", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29726
29727 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29728 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29729 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29730 if (objIsXray) {
29731 unwrappedObj.emplace(cx, obj);
29732 }
29733 DoubleOrUTF8String arg0;
29734 if (!(args.hasDefined(0))) {
29735 arg0.SetStringLiteral("");
29736 } else {
29737 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29738 return false;
29739 }
29740 }
29741 if (objIsXray) {
29742 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29743 // we know Xrays have no dynamic unwrap behavior.
29744 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29745 if (!unwrappedObj.ref()) {
29746 return false;
29747 }
29748 }
29749 FastErrorResult rv;
29750 // NOTE: This assert does NOT call the function.
29751 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue23(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29752 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue23(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29753 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue23"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue23"
)), 0))
) {
29754 return false;
29755 }
29756 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29756); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29756; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29757 args.rval().setUndefined();
29758 return true;
29759}
29760
29761static const JSJitInfo passUnionWithDefaultValue23_methodinfo = {
29762 { (JSJitGetterOp)passUnionWithDefaultValue23 },
29763 { prototypes::id::TestJSImplInterface },
29764 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29765 JSJitInfo::Method,
29766 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29767 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29768 false, /* isInfallible. False in setters. */
29769 false, /* isMovable. Not relevant for setters. */
29770 false, /* isEliminatable. Not relevant for setters. */
29771 false, /* isAlwaysInSlot. Only relevant for getters. */
29772 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29773 false, /* isTypedMethod. Only relevant for methods. */
29774 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29775};
29776
29777MOZ_CAN_RUN_SCRIPT static bool
29778passUnionWithDefaultValue24(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29779{
29780 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue24");
29781 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29784( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue24", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29782 "TestJSImplInterface", "passUnionWithDefaultValue24", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29784( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue24", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29783 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29784( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue24", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29784 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29784( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue24", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29785
29786 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29787 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29788 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29789 if (objIsXray) {
29790 unwrappedObj.emplace(cx, obj);
29791 }
29792 DoubleOrUTF8String arg0;
29793 if (!(args.hasDefined(0))) {
29794 arg0.RawSetAsDouble() = 1.0;
29795 } else {
29796 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29797 return false;
29798 }
29799 }
29800 if (objIsXray) {
29801 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29802 // we know Xrays have no dynamic unwrap behavior.
29803 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29804 if (!unwrappedObj.ref()) {
29805 return false;
29806 }
29807 }
29808 FastErrorResult rv;
29809 // NOTE: This assert does NOT call the function.
29810 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue24(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29811 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue24(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29812 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue24"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue24"
)), 0))
) {
29813 return false;
29814 }
29815 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29815); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29815; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29816 args.rval().setUndefined();
29817 return true;
29818}
29819
29820static const JSJitInfo passUnionWithDefaultValue24_methodinfo = {
29821 { (JSJitGetterOp)passUnionWithDefaultValue24 },
29822 { prototypes::id::TestJSImplInterface },
29823 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29824 JSJitInfo::Method,
29825 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29826 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29827 false, /* isInfallible. False in setters. */
29828 false, /* isMovable. Not relevant for setters. */
29829 false, /* isEliminatable. Not relevant for setters. */
29830 false, /* isAlwaysInSlot. Only relevant for getters. */
29831 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29832 false, /* isTypedMethod. Only relevant for methods. */
29833 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29834};
29835
29836MOZ_CAN_RUN_SCRIPT static bool
29837passUnionWithDefaultValue25(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29838{
29839 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionWithDefaultValue25");
29840 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29843( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue25", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29841 "TestJSImplInterface", "passUnionWithDefaultValue25", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29843( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue25", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29842 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29843( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue25", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29843 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29843( cx, "TestJSImplInterface"
, "passUnionWithDefaultValue25", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29844
29845 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29846 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29847 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29848 if (objIsXray) {
29849 unwrappedObj.emplace(cx, obj);
29850 }
29851 DoubleOrUTF8String arg0;
29852 if (!(args.hasDefined(0))) {
29853 arg0.RawSetAsDouble() = 1.5;
29854 } else {
29855 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
29856 return false;
29857 }
29858 }
29859 if (objIsXray) {
29860 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29861 // we know Xrays have no dynamic unwrap behavior.
29862 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29863 if (!unwrappedObj.ref()) {
29864 return false;
29865 }
29866 }
29867 FastErrorResult rv;
29868 // NOTE: This assert does NOT call the function.
29869 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue25(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29870 MOZ_KnownLive(self)(self)->PassUnionWithDefaultValue25(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29871 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue25"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionWithDefaultValue25"
)), 0))
) {
29872 return false;
29873 }
29874 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29874); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29874; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29875 args.rval().setUndefined();
29876 return true;
29877}
29878
29879static const JSJitInfo passUnionWithDefaultValue25_methodinfo = {
29880 { (JSJitGetterOp)passUnionWithDefaultValue25 },
29881 { prototypes::id::TestJSImplInterface },
29882 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29883 JSJitInfo::Method,
29884 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29885 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29886 false, /* isInfallible. False in setters. */
29887 false, /* isMovable. Not relevant for setters. */
29888 false, /* isEliminatable. Not relevant for setters. */
29889 false, /* isAlwaysInSlot. Only relevant for getters. */
29890 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29891 false, /* isTypedMethod. Only relevant for methods. */
29892 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29893};
29894
29895MOZ_CAN_RUN_SCRIPT static bool
29896passNullableUnionWithDefaultValue1(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29897{
29898 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue1");
29899 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29902( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue1", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29900 "TestJSImplInterface", "passNullableUnionWithDefaultValue1", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29902( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue1", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29901 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29902( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue1", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29902 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29902( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue1", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29903
29904 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29905 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29906 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29907 if (objIsXray) {
29908 unwrappedObj.emplace(cx, obj);
29909 }
29910 Nullable<DoubleOrString > arg0;
29911 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
29912 arg0.SetNull();
29913 } else {
29914 if (!(args.hasDefined(0))) {
29915 arg0.SetValue().SetStringLiteral(u"");
29916 } else {
29917 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
29918 return false;
29919 }
29920 }
29921 }
29922 if (objIsXray) {
29923 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29924 // we know Xrays have no dynamic unwrap behavior.
29925 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29926 if (!unwrappedObj.ref()) {
29927 return false;
29928 }
29929 }
29930 FastErrorResult rv;
29931 // NOTE: This assert does NOT call the function.
29932 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue1(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29933 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue1(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29934 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue1"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue1"
)), 0))
) {
29935 return false;
29936 }
29937 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 29937); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 29937; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
29938 args.rval().setUndefined();
29939 return true;
29940}
29941
29942static const JSJitInfo passNullableUnionWithDefaultValue1_methodinfo = {
29943 { (JSJitGetterOp)passNullableUnionWithDefaultValue1 },
29944 { prototypes::id::TestJSImplInterface },
29945 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
29946 JSJitInfo::Method,
29947 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
29948 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
29949 false, /* isInfallible. False in setters. */
29950 false, /* isMovable. Not relevant for setters. */
29951 false, /* isEliminatable. Not relevant for setters. */
29952 false, /* isAlwaysInSlot. Only relevant for getters. */
29953 false, /* isLazilyCachedInSlot. Only relevant for getters. */
29954 false, /* isTypedMethod. Only relevant for methods. */
29955 0 /* Reserved slot index, if we're stored in a slot, else 0. */
29956};
29957
29958MOZ_CAN_RUN_SCRIPT static bool
29959passNullableUnionWithDefaultValue2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
29960{
29961 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue2");
29962 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject29965( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29963 "TestJSImplInterface", "passNullableUnionWithDefaultValue2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject29965( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29964 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject29965( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
29965 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject29965( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue2", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
29966
29967 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
29968 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
29969 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
29970 if (objIsXray) {
29971 unwrappedObj.emplace(cx, obj);
29972 }
29973 Nullable<DoubleOrString > arg0;
29974 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
29975 arg0.SetNull();
29976 } else {
29977 if (!(args.hasDefined(0))) {
29978 arg0.SetValue().RawSetAsDouble() = 1.0;
29979 } else {
29980 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
29981 return false;
29982 }
29983 }
29984 }
29985 if (objIsXray) {
29986 // Since our object is an Xray, we can just CheckedUnwrapStatic:
29987 // we know Xrays have no dynamic unwrap behavior.
29988 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
29989 if (!unwrappedObj.ref()) {
29990 return false;
29991 }
29992 }
29993 FastErrorResult rv;
29994 // NOTE: This assert does NOT call the function.
29995 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
29996 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
29997 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue2"
)), 0))
) {
29998 return false;
29999 }
30000 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30000); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30000; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30001 args.rval().setUndefined();
30002 return true;
30003}
30004
30005static const JSJitInfo passNullableUnionWithDefaultValue2_methodinfo = {
30006 { (JSJitGetterOp)passNullableUnionWithDefaultValue2 },
30007 { prototypes::id::TestJSImplInterface },
30008 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30009 JSJitInfo::Method,
30010 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30011 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30012 false, /* isInfallible. False in setters. */
30013 false, /* isMovable. Not relevant for setters. */
30014 false, /* isEliminatable. Not relevant for setters. */
30015 false, /* isAlwaysInSlot. Only relevant for getters. */
30016 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30017 false, /* isTypedMethod. Only relevant for methods. */
30018 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30019};
30020
30021MOZ_CAN_RUN_SCRIPT static bool
30022passNullableUnionWithDefaultValue3(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30023{
30024 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue3");
30025 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30028( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue3", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30026 "TestJSImplInterface", "passNullableUnionWithDefaultValue3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30028( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue3", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30027 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30028( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue3", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30028 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30028( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue3", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30029
30030 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30031 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30032 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30033 if (objIsXray) {
30034 unwrappedObj.emplace(cx, obj);
30035 }
30036 Nullable<DoubleOrString > arg0;
30037 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
30038 arg0.SetNull();
30039 } else {
30040 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30041 return false;
30042 }
30043 }
30044 if (objIsXray) {
30045 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30046 // we know Xrays have no dynamic unwrap behavior.
30047 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30048 if (!unwrappedObj.ref()) {
30049 return false;
30050 }
30051 }
30052 FastErrorResult rv;
30053 // NOTE: This assert does NOT call the function.
30054 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue3(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30055 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue3(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30056 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue3"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue3"
)), 0))
) {
30057 return false;
30058 }
30059 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30059); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30059; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30060 args.rval().setUndefined();
30061 return true;
30062}
30063
30064static const JSJitInfo passNullableUnionWithDefaultValue3_methodinfo = {
30065 { (JSJitGetterOp)passNullableUnionWithDefaultValue3 },
30066 { prototypes::id::TestJSImplInterface },
30067 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30068 JSJitInfo::Method,
30069 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30070 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30071 false, /* isInfallible. False in setters. */
30072 false, /* isMovable. Not relevant for setters. */
30073 false, /* isEliminatable. Not relevant for setters. */
30074 false, /* isAlwaysInSlot. Only relevant for getters. */
30075 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30076 false, /* isTypedMethod. Only relevant for methods. */
30077 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30078};
30079
30080MOZ_CAN_RUN_SCRIPT static bool
30081passNullableUnionWithDefaultValue4(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30082{
30083 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue4");
30084 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30087( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue4", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30085 "TestJSImplInterface", "passNullableUnionWithDefaultValue4", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30087( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue4", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30086 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30087( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue4", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30087 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30087( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue4", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30088
30089 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30090 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30091 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30092 if (objIsXray) {
30093 unwrappedObj.emplace(cx, obj);
30094 }
30095 Nullable<FloatOrString > arg0;
30096 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
30097 arg0.SetNull();
30098 } else {
30099 if (!(args.hasDefined(0))) {
30100 arg0.SetValue().SetStringLiteral(u"");
30101 } else {
30102 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30103 return false;
30104 }
30105 }
30106 }
30107 if (objIsXray) {
30108 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30109 // we know Xrays have no dynamic unwrap behavior.
30110 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30111 if (!unwrappedObj.ref()) {
30112 return false;
30113 }
30114 }
30115 FastErrorResult rv;
30116 // NOTE: This assert does NOT call the function.
30117 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue4(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30118 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue4(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30119 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue4"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue4"
)), 0))
) {
30120 return false;
30121 }
30122 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30122); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30122; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30123 args.rval().setUndefined();
30124 return true;
30125}
30126
30127static const JSJitInfo passNullableUnionWithDefaultValue4_methodinfo = {
30128 { (JSJitGetterOp)passNullableUnionWithDefaultValue4 },
30129 { prototypes::id::TestJSImplInterface },
30130 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30131 JSJitInfo::Method,
30132 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30133 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30134 false, /* isInfallible. False in setters. */
30135 false, /* isMovable. Not relevant for setters. */
30136 false, /* isEliminatable. Not relevant for setters. */
30137 false, /* isAlwaysInSlot. Only relevant for getters. */
30138 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30139 false, /* isTypedMethod. Only relevant for methods. */
30140 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30141};
30142
30143MOZ_CAN_RUN_SCRIPT static bool
30144passNullableUnionWithDefaultValue5(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30145{
30146 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue5");
30147 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30150( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue5", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30148 "TestJSImplInterface", "passNullableUnionWithDefaultValue5", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30150( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue5", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30149 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30150( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue5", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30150 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30150( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue5", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30151
30152 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30153 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30154 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30155 if (objIsXray) {
30156 unwrappedObj.emplace(cx, obj);
30157 }
30158 Nullable<FloatOrString > arg0;
30159 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
30160 arg0.SetNull();
30161 } else {
30162 if (!(args.hasDefined(0))) {
30163 arg0.SetValue().RawSetAsFloat() = 1.0F;
30164 } else {
30165 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30166 return false;
30167 }
30168 }
30169 }
30170 if (objIsXray) {
30171 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30172 // we know Xrays have no dynamic unwrap behavior.
30173 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30174 if (!unwrappedObj.ref()) {
30175 return false;
30176 }
30177 }
30178 FastErrorResult rv;
30179 // NOTE: This assert does NOT call the function.
30180 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue5(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30181 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue5(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30182 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue5"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue5"
)), 0))
) {
30183 return false;
30184 }
30185 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30185); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30185; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30186 args.rval().setUndefined();
30187 return true;
30188}
30189
30190static const JSJitInfo passNullableUnionWithDefaultValue5_methodinfo = {
30191 { (JSJitGetterOp)passNullableUnionWithDefaultValue5 },
30192 { prototypes::id::TestJSImplInterface },
30193 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30194 JSJitInfo::Method,
30195 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30196 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30197 false, /* isInfallible. False in setters. */
30198 false, /* isMovable. Not relevant for setters. */
30199 false, /* isEliminatable. Not relevant for setters. */
30200 false, /* isAlwaysInSlot. Only relevant for getters. */
30201 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30202 false, /* isTypedMethod. Only relevant for methods. */
30203 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30204};
30205
30206MOZ_CAN_RUN_SCRIPT static bool
30207passNullableUnionWithDefaultValue6(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30208{
30209 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue6");
30210 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30213( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue6", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30211 "TestJSImplInterface", "passNullableUnionWithDefaultValue6", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30213( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue6", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30212 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30213( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue6", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30213 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30213( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue6", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30214
30215 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30216 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30217 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30218 if (objIsXray) {
30219 unwrappedObj.emplace(cx, obj);
30220 }
30221 Nullable<FloatOrString > arg0;
30222 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
30223 arg0.SetNull();
30224 } else {
30225 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30226 return false;
30227 }
30228 }
30229 if (objIsXray) {
30230 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30231 // we know Xrays have no dynamic unwrap behavior.
30232 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30233 if (!unwrappedObj.ref()) {
30234 return false;
30235 }
30236 }
30237 FastErrorResult rv;
30238 // NOTE: This assert does NOT call the function.
30239 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue6(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30240 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue6(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30241 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue6"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue6"
)), 0))
) {
30242 return false;
30243 }
30244 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30244); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30244; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30245 args.rval().setUndefined();
30246 return true;
30247}
30248
30249static const JSJitInfo passNullableUnionWithDefaultValue6_methodinfo = {
30250 { (JSJitGetterOp)passNullableUnionWithDefaultValue6 },
30251 { prototypes::id::TestJSImplInterface },
30252 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30253 JSJitInfo::Method,
30254 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30255 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30256 false, /* isInfallible. False in setters. */
30257 false, /* isMovable. Not relevant for setters. */
30258 false, /* isEliminatable. Not relevant for setters. */
30259 false, /* isAlwaysInSlot. Only relevant for getters. */
30260 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30261 false, /* isTypedMethod. Only relevant for methods. */
30262 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30263};
30264
30265MOZ_CAN_RUN_SCRIPT static bool
30266passNullableUnionWithDefaultValue7(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30267{
30268 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue7");
30269 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30272( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue7", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30270 "TestJSImplInterface", "passNullableUnionWithDefaultValue7", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30272( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue7", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30271 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30272( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue7", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30272 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30272( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue7", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30273
30274 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30275 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30276 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30277 if (objIsXray) {
30278 unwrappedObj.emplace(cx, obj);
30279 }
30280 Nullable<UnrestrictedDoubleOrString > arg0;
30281 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
30282 arg0.SetNull();
30283 } else {
30284 if (!(args.hasDefined(0))) {
30285 arg0.SetValue().SetStringLiteral(u"");
30286 } else {
30287 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30288 return false;
30289 }
30290 }
30291 }
30292 if (objIsXray) {
30293 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30294 // we know Xrays have no dynamic unwrap behavior.
30295 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30296 if (!unwrappedObj.ref()) {
30297 return false;
30298 }
30299 }
30300 FastErrorResult rv;
30301 // NOTE: This assert does NOT call the function.
30302 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue7(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30303 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue7(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30304 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue7"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue7"
)), 0))
) {
30305 return false;
30306 }
30307 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30307); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30307; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30308 args.rval().setUndefined();
30309 return true;
30310}
30311
30312static const JSJitInfo passNullableUnionWithDefaultValue7_methodinfo = {
30313 { (JSJitGetterOp)passNullableUnionWithDefaultValue7 },
30314 { prototypes::id::TestJSImplInterface },
30315 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30316 JSJitInfo::Method,
30317 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30318 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30319 false, /* isInfallible. False in setters. */
30320 false, /* isMovable. Not relevant for setters. */
30321 false, /* isEliminatable. Not relevant for setters. */
30322 false, /* isAlwaysInSlot. Only relevant for getters. */
30323 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30324 false, /* isTypedMethod. Only relevant for methods. */
30325 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30326};
30327
30328MOZ_CAN_RUN_SCRIPT static bool
30329passNullableUnionWithDefaultValue8(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30330{
30331 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue8");
30332 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30335( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue8", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30333 "TestJSImplInterface", "passNullableUnionWithDefaultValue8", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30335( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue8", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30334 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30335( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue8", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30335 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30335( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue8", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30336
30337 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30338 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30339 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30340 if (objIsXray) {
30341 unwrappedObj.emplace(cx, obj);
30342 }
30343 Nullable<UnrestrictedDoubleOrString > arg0;
30344 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
30345 arg0.SetNull();
30346 } else {
30347 if (!(args.hasDefined(0))) {
30348 arg0.SetValue().RawSetAsUnrestrictedDouble() = 1.0;
30349 } else {
30350 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30351 return false;
30352 }
30353 }
30354 }
30355 if (objIsXray) {
30356 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30357 // we know Xrays have no dynamic unwrap behavior.
30358 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30359 if (!unwrappedObj.ref()) {
30360 return false;
30361 }
30362 }
30363 FastErrorResult rv;
30364 // NOTE: This assert does NOT call the function.
30365 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue8(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30366 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue8(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30367 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue8"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue8"
)), 0))
) {
30368 return false;
30369 }
30370 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30370); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30370; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30371 args.rval().setUndefined();
30372 return true;
30373}
30374
30375static const JSJitInfo passNullableUnionWithDefaultValue8_methodinfo = {
30376 { (JSJitGetterOp)passNullableUnionWithDefaultValue8 },
30377 { prototypes::id::TestJSImplInterface },
30378 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30379 JSJitInfo::Method,
30380 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30381 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30382 false, /* isInfallible. False in setters. */
30383 false, /* isMovable. Not relevant for setters. */
30384 false, /* isEliminatable. Not relevant for setters. */
30385 false, /* isAlwaysInSlot. Only relevant for getters. */
30386 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30387 false, /* isTypedMethod. Only relevant for methods. */
30388 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30389};
30390
30391MOZ_CAN_RUN_SCRIPT static bool
30392passNullableUnionWithDefaultValue9(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30393{
30394 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue9");
30395 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30398( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue9", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30396 "TestJSImplInterface", "passNullableUnionWithDefaultValue9", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30398( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue9", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30397 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30398( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue9", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30398 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30398( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue9", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30399
30400 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30401 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30402 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30403 if (objIsXray) {
30404 unwrappedObj.emplace(cx, obj);
30405 }
30406 Nullable<UnrestrictedDoubleOrString > arg0;
30407 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
30408 arg0.SetNull();
30409 } else {
30410 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30411 return false;
30412 }
30413 }
30414 if (objIsXray) {
30415 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30416 // we know Xrays have no dynamic unwrap behavior.
30417 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30418 if (!unwrappedObj.ref()) {
30419 return false;
30420 }
30421 }
30422 FastErrorResult rv;
30423 // NOTE: This assert does NOT call the function.
30424 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue9(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30425 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue9(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30426 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue9"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue9"
)), 0))
) {
30427 return false;
30428 }
30429 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30429); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30429; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30430 args.rval().setUndefined();
30431 return true;
30432}
30433
30434static const JSJitInfo passNullableUnionWithDefaultValue9_methodinfo = {
30435 { (JSJitGetterOp)passNullableUnionWithDefaultValue9 },
30436 { prototypes::id::TestJSImplInterface },
30437 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30438 JSJitInfo::Method,
30439 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30440 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30441 false, /* isInfallible. False in setters. */
30442 false, /* isMovable. Not relevant for setters. */
30443 false, /* isEliminatable. Not relevant for setters. */
30444 false, /* isAlwaysInSlot. Only relevant for getters. */
30445 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30446 false, /* isTypedMethod. Only relevant for methods. */
30447 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30448};
30449
30450MOZ_CAN_RUN_SCRIPT static bool
30451passNullableUnionWithDefaultValue10(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30452{
30453 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue10");
30454 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30457( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue10", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30455 "TestJSImplInterface", "passNullableUnionWithDefaultValue10", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30457( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue10", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30456 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30457( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue10", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30457 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30457( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue10", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30458
30459 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30460 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30461 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30462 if (objIsXray) {
30463 unwrappedObj.emplace(cx, obj);
30464 }
30465 Nullable<UnrestrictedFloatOrString > arg0;
30466 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
30467 arg0.SetNull();
30468 } else {
30469 if (!(args.hasDefined(0))) {
30470 arg0.SetValue().SetStringLiteral(u"");
30471 } else {
30472 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30473 return false;
30474 }
30475 }
30476 }
30477 if (objIsXray) {
30478 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30479 // we know Xrays have no dynamic unwrap behavior.
30480 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30481 if (!unwrappedObj.ref()) {
30482 return false;
30483 }
30484 }
30485 FastErrorResult rv;
30486 // NOTE: This assert does NOT call the function.
30487 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue10(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30488 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue10(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30489 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue10"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue10"
)), 0))
) {
30490 return false;
30491 }
30492 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30492); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30492; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30493 args.rval().setUndefined();
30494 return true;
30495}
30496
30497static const JSJitInfo passNullableUnionWithDefaultValue10_methodinfo = {
30498 { (JSJitGetterOp)passNullableUnionWithDefaultValue10 },
30499 { prototypes::id::TestJSImplInterface },
30500 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30501 JSJitInfo::Method,
30502 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30503 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30504 false, /* isInfallible. False in setters. */
30505 false, /* isMovable. Not relevant for setters. */
30506 false, /* isEliminatable. Not relevant for setters. */
30507 false, /* isAlwaysInSlot. Only relevant for getters. */
30508 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30509 false, /* isTypedMethod. Only relevant for methods. */
30510 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30511};
30512
30513MOZ_CAN_RUN_SCRIPT static bool
30514passNullableUnionWithDefaultValue11(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30515{
30516 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue11");
30517 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30520( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue11", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30518 "TestJSImplInterface", "passNullableUnionWithDefaultValue11", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30520( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue11", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30519 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30520( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue11", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30520 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30520( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue11", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30521
30522 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30523 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30524 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30525 if (objIsXray) {
30526 unwrappedObj.emplace(cx, obj);
30527 }
30528 Nullable<UnrestrictedFloatOrString > arg0;
30529 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
30530 arg0.SetNull();
30531 } else {
30532 if (!(args.hasDefined(0))) {
30533 arg0.SetValue().RawSetAsUnrestrictedFloat() = 1.0F;
30534 } else {
30535 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30536 return false;
30537 }
30538 }
30539 }
30540 if (objIsXray) {
30541 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30542 // we know Xrays have no dynamic unwrap behavior.
30543 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30544 if (!unwrappedObj.ref()) {
30545 return false;
30546 }
30547 }
30548 FastErrorResult rv;
30549 // NOTE: This assert does NOT call the function.
30550 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue11(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30551 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue11(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30552 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue11"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue11"
)), 0))
) {
30553 return false;
30554 }
30555 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30555); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30555; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30556 args.rval().setUndefined();
30557 return true;
30558}
30559
30560static const JSJitInfo passNullableUnionWithDefaultValue11_methodinfo = {
30561 { (JSJitGetterOp)passNullableUnionWithDefaultValue11 },
30562 { prototypes::id::TestJSImplInterface },
30563 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30564 JSJitInfo::Method,
30565 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30566 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30567 false, /* isInfallible. False in setters. */
30568 false, /* isMovable. Not relevant for setters. */
30569 false, /* isEliminatable. Not relevant for setters. */
30570 false, /* isAlwaysInSlot. Only relevant for getters. */
30571 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30572 false, /* isTypedMethod. Only relevant for methods. */
30573 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30574};
30575
30576MOZ_CAN_RUN_SCRIPT static bool
30577passNullableUnionWithDefaultValue12(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30578{
30579 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue12");
30580 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30583( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue12", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30581 "TestJSImplInterface", "passNullableUnionWithDefaultValue12", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30583( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue12", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30582 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30583( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue12", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30583 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30583( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue12", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30584
30585 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30586 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30587 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30588 if (objIsXray) {
30589 unwrappedObj.emplace(cx, obj);
30590 }
30591 Nullable<UnrestrictedFloatOrString > arg0;
30592 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
30593 arg0.SetNull();
30594 } else {
30595 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30596 return false;
30597 }
30598 }
30599 if (objIsXray) {
30600 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30601 // we know Xrays have no dynamic unwrap behavior.
30602 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30603 if (!unwrappedObj.ref()) {
30604 return false;
30605 }
30606 }
30607 FastErrorResult rv;
30608 // NOTE: This assert does NOT call the function.
30609 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue12(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30610 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue12(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30611 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue12"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue12"
)), 0))
) {
30612 return false;
30613 }
30614 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30614); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30614; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30615 args.rval().setUndefined();
30616 return true;
30617}
30618
30619static const JSJitInfo passNullableUnionWithDefaultValue12_methodinfo = {
30620 { (JSJitGetterOp)passNullableUnionWithDefaultValue12 },
30621 { prototypes::id::TestJSImplInterface },
30622 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30623 JSJitInfo::Method,
30624 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30625 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30626 false, /* isInfallible. False in setters. */
30627 false, /* isMovable. Not relevant for setters. */
30628 false, /* isEliminatable. Not relevant for setters. */
30629 false, /* isAlwaysInSlot. Only relevant for getters. */
30630 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30631 false, /* isTypedMethod. Only relevant for methods. */
30632 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30633};
30634
30635MOZ_CAN_RUN_SCRIPT static bool
30636passNullableUnionWithDefaultValue13(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30637{
30638 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue13");
30639 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30642( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue13", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30640 "TestJSImplInterface", "passNullableUnionWithDefaultValue13", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30642( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue13", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30641 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30642( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue13", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30642 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30642( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue13", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30643
30644 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30645 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30646 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30647 if (objIsXray) {
30648 unwrappedObj.emplace(cx, obj);
30649 }
30650 Nullable<DoubleOrByteString > arg0;
30651 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
30652 arg0.SetNull();
30653 } else {
30654 if (!(args.hasDefined(0))) {
30655 arg0.SetValue().SetStringLiteral("");
30656 } else {
30657 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30658 return false;
30659 }
30660 }
30661 }
30662 if (objIsXray) {
30663 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30664 // we know Xrays have no dynamic unwrap behavior.
30665 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30666 if (!unwrappedObj.ref()) {
30667 return false;
30668 }
30669 }
30670 FastErrorResult rv;
30671 // NOTE: This assert does NOT call the function.
30672 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue13(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30673 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue13(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30674 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue13"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue13"
)), 0))
) {
30675 return false;
30676 }
30677 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30677); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30677; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30678 args.rval().setUndefined();
30679 return true;
30680}
30681
30682static const JSJitInfo passNullableUnionWithDefaultValue13_methodinfo = {
30683 { (JSJitGetterOp)passNullableUnionWithDefaultValue13 },
30684 { prototypes::id::TestJSImplInterface },
30685 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30686 JSJitInfo::Method,
30687 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30688 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30689 false, /* isInfallible. False in setters. */
30690 false, /* isMovable. Not relevant for setters. */
30691 false, /* isEliminatable. Not relevant for setters. */
30692 false, /* isAlwaysInSlot. Only relevant for getters. */
30693 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30694 false, /* isTypedMethod. Only relevant for methods. */
30695 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30696};
30697
30698MOZ_CAN_RUN_SCRIPT static bool
30699passNullableUnionWithDefaultValue14(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30700{
30701 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue14");
30702 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30705( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue14", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30703 "TestJSImplInterface", "passNullableUnionWithDefaultValue14", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30705( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue14", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30704 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30705( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue14", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30705 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30705( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue14", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30706
30707 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30708 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30709 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30710 if (objIsXray) {
30711 unwrappedObj.emplace(cx, obj);
30712 }
30713 Nullable<DoubleOrByteString > arg0;
30714 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
30715 arg0.SetNull();
30716 } else {
30717 if (!(args.hasDefined(0))) {
30718 arg0.SetValue().RawSetAsDouble() = 1.0;
30719 } else {
30720 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30721 return false;
30722 }
30723 }
30724 }
30725 if (objIsXray) {
30726 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30727 // we know Xrays have no dynamic unwrap behavior.
30728 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30729 if (!unwrappedObj.ref()) {
30730 return false;
30731 }
30732 }
30733 FastErrorResult rv;
30734 // NOTE: This assert does NOT call the function.
30735 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue14(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30736 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue14(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30737 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue14"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue14"
)), 0))
) {
30738 return false;
30739 }
30740 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30740); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30740; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30741 args.rval().setUndefined();
30742 return true;
30743}
30744
30745static const JSJitInfo passNullableUnionWithDefaultValue14_methodinfo = {
30746 { (JSJitGetterOp)passNullableUnionWithDefaultValue14 },
30747 { prototypes::id::TestJSImplInterface },
30748 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30749 JSJitInfo::Method,
30750 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30751 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30752 false, /* isInfallible. False in setters. */
30753 false, /* isMovable. Not relevant for setters. */
30754 false, /* isEliminatable. Not relevant for setters. */
30755 false, /* isAlwaysInSlot. Only relevant for getters. */
30756 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30757 false, /* isTypedMethod. Only relevant for methods. */
30758 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30759};
30760
30761MOZ_CAN_RUN_SCRIPT static bool
30762passNullableUnionWithDefaultValue15(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30763{
30764 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue15");
30765 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30768( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue15", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30766 "TestJSImplInterface", "passNullableUnionWithDefaultValue15", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30768( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue15", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30767 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30768( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue15", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30768 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30768( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue15", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30769
30770 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30771 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30772 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30773 if (objIsXray) {
30774 unwrappedObj.emplace(cx, obj);
30775 }
30776 Nullable<DoubleOrByteString > arg0;
30777 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
30778 arg0.SetNull();
30779 } else {
30780 if (!(args.hasDefined(0))) {
30781 arg0.SetValue().RawSetAsDouble() = 1.5;
30782 } else {
30783 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30784 return false;
30785 }
30786 }
30787 }
30788 if (objIsXray) {
30789 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30790 // we know Xrays have no dynamic unwrap behavior.
30791 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30792 if (!unwrappedObj.ref()) {
30793 return false;
30794 }
30795 }
30796 FastErrorResult rv;
30797 // NOTE: This assert does NOT call the function.
30798 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue15(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30799 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue15(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30800 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue15"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue15"
)), 0))
) {
30801 return false;
30802 }
30803 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30803); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30803; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30804 args.rval().setUndefined();
30805 return true;
30806}
30807
30808static const JSJitInfo passNullableUnionWithDefaultValue15_methodinfo = {
30809 { (JSJitGetterOp)passNullableUnionWithDefaultValue15 },
30810 { prototypes::id::TestJSImplInterface },
30811 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30812 JSJitInfo::Method,
30813 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30814 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30815 false, /* isInfallible. False in setters. */
30816 false, /* isMovable. Not relevant for setters. */
30817 false, /* isEliminatable. Not relevant for setters. */
30818 false, /* isAlwaysInSlot. Only relevant for getters. */
30819 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30820 false, /* isTypedMethod. Only relevant for methods. */
30821 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30822};
30823
30824MOZ_CAN_RUN_SCRIPT static bool
30825passNullableUnionWithDefaultValue16(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30826{
30827 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue16");
30828 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30831( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue16", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30829 "TestJSImplInterface", "passNullableUnionWithDefaultValue16", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30831( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue16", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30830 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30831( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue16", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30831 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30831( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue16", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30832
30833 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30834 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30835 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30836 if (objIsXray) {
30837 unwrappedObj.emplace(cx, obj);
30838 }
30839 Nullable<DoubleOrByteString > arg0;
30840 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
30841 arg0.SetNull();
30842 } else {
30843 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30844 return false;
30845 }
30846 }
30847 if (objIsXray) {
30848 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30849 // we know Xrays have no dynamic unwrap behavior.
30850 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30851 if (!unwrappedObj.ref()) {
30852 return false;
30853 }
30854 }
30855 FastErrorResult rv;
30856 // NOTE: This assert does NOT call the function.
30857 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue16(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30858 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue16(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30859 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue16"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue16"
)), 0))
) {
30860 return false;
30861 }
30862 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30862); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30862; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30863 args.rval().setUndefined();
30864 return true;
30865}
30866
30867static const JSJitInfo passNullableUnionWithDefaultValue16_methodinfo = {
30868 { (JSJitGetterOp)passNullableUnionWithDefaultValue16 },
30869 { prototypes::id::TestJSImplInterface },
30870 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30871 JSJitInfo::Method,
30872 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30873 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30874 false, /* isInfallible. False in setters. */
30875 false, /* isMovable. Not relevant for setters. */
30876 false, /* isEliminatable. Not relevant for setters. */
30877 false, /* isAlwaysInSlot. Only relevant for getters. */
30878 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30879 false, /* isTypedMethod. Only relevant for methods. */
30880 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30881};
30882
30883MOZ_CAN_RUN_SCRIPT static bool
30884passNullableUnionWithDefaultValue17(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30885{
30886 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue17");
30887 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30890( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue17", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30888 "TestJSImplInterface", "passNullableUnionWithDefaultValue17", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30890( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue17", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30889 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30890( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue17", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30890 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30890( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue17", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30891
30892 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30893 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30894 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30895 if (objIsXray) {
30896 unwrappedObj.emplace(cx, obj);
30897 }
30898 Nullable<DoubleOrSupportedType > arg0;
30899 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
30900 arg0.SetNull();
30901 } else {
30902 if (!(args.hasDefined(0))) {
30903 arg0.SetValue().RawSetAsSupportedType() = SupportedType::Text_html;
30904 } else {
30905 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30906 return false;
30907 }
30908 }
30909 }
30910 if (objIsXray) {
30911 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30912 // we know Xrays have no dynamic unwrap behavior.
30913 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30914 if (!unwrappedObj.ref()) {
30915 return false;
30916 }
30917 }
30918 FastErrorResult rv;
30919 // NOTE: This assert does NOT call the function.
30920 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue17(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30921 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue17(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30922 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue17"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue17"
)), 0))
) {
30923 return false;
30924 }
30925 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30925); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30925; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30926 args.rval().setUndefined();
30927 return true;
30928}
30929
30930static const JSJitInfo passNullableUnionWithDefaultValue17_methodinfo = {
30931 { (JSJitGetterOp)passNullableUnionWithDefaultValue17 },
30932 { prototypes::id::TestJSImplInterface },
30933 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30934 JSJitInfo::Method,
30935 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30936 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
30937 false, /* isInfallible. False in setters. */
30938 false, /* isMovable. Not relevant for setters. */
30939 false, /* isEliminatable. Not relevant for setters. */
30940 false, /* isAlwaysInSlot. Only relevant for getters. */
30941 false, /* isLazilyCachedInSlot. Only relevant for getters. */
30942 false, /* isTypedMethod. Only relevant for methods. */
30943 0 /* Reserved slot index, if we're stored in a slot, else 0. */
30944};
30945
30946MOZ_CAN_RUN_SCRIPT static bool
30947passNullableUnionWithDefaultValue18(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
30948{
30949 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue18");
30950 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject30953( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue18", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30951 "TestJSImplInterface", "passNullableUnionWithDefaultValue18", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject30953( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue18", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30952 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject30953( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue18", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
30953 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject30953( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue18", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
30954
30955 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
30956 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
30957 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
30958 if (objIsXray) {
30959 unwrappedObj.emplace(cx, obj);
30960 }
30961 Nullable<DoubleOrSupportedType > arg0;
30962 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
30963 arg0.SetNull();
30964 } else {
30965 if (!(args.hasDefined(0))) {
30966 arg0.SetValue().RawSetAsDouble() = 1.0;
30967 } else {
30968 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
30969 return false;
30970 }
30971 }
30972 }
30973 if (objIsXray) {
30974 // Since our object is an Xray, we can just CheckedUnwrapStatic:
30975 // we know Xrays have no dynamic unwrap behavior.
30976 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
30977 if (!unwrappedObj.ref()) {
30978 return false;
30979 }
30980 }
30981 FastErrorResult rv;
30982 // NOTE: This assert does NOT call the function.
30983 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue18(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
30984 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue18(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
30985 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue18"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue18"
)), 0))
) {
30986 return false;
30987 }
30988 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 30988); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 30988; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
30989 args.rval().setUndefined();
30990 return true;
30991}
30992
30993static const JSJitInfo passNullableUnionWithDefaultValue18_methodinfo = {
30994 { (JSJitGetterOp)passNullableUnionWithDefaultValue18 },
30995 { prototypes::id::TestJSImplInterface },
30996 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
30997 JSJitInfo::Method,
30998 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
30999 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31000 false, /* isInfallible. False in setters. */
31001 false, /* isMovable. Not relevant for setters. */
31002 false, /* isEliminatable. Not relevant for setters. */
31003 false, /* isAlwaysInSlot. Only relevant for getters. */
31004 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31005 false, /* isTypedMethod. Only relevant for methods. */
31006 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31007};
31008
31009MOZ_CAN_RUN_SCRIPT static bool
31010passNullableUnionWithDefaultValue19(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31011{
31012 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue19");
31013 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31016( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue19", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31014 "TestJSImplInterface", "passNullableUnionWithDefaultValue19", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31016( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue19", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31015 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31016( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue19", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31016 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31016( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue19", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31017
31018 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31019 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31020 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31021 if (objIsXray) {
31022 unwrappedObj.emplace(cx, obj);
31023 }
31024 Nullable<DoubleOrSupportedType > arg0;
31025 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
31026 arg0.SetNull();
31027 } else {
31028 if (!(args.hasDefined(0))) {
31029 arg0.SetValue().RawSetAsDouble() = 1.5;
31030 } else {
31031 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
31032 return false;
31033 }
31034 }
31035 }
31036 if (objIsXray) {
31037 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31038 // we know Xrays have no dynamic unwrap behavior.
31039 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31040 if (!unwrappedObj.ref()) {
31041 return false;
31042 }
31043 }
31044 FastErrorResult rv;
31045 // NOTE: This assert does NOT call the function.
31046 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue19(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
31047 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue19(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
31048 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue19"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue19"
)), 0))
) {
31049 return false;
31050 }
31051 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 31051); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31051; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31052 args.rval().setUndefined();
31053 return true;
31054}
31055
31056static const JSJitInfo passNullableUnionWithDefaultValue19_methodinfo = {
31057 { (JSJitGetterOp)passNullableUnionWithDefaultValue19 },
31058 { prototypes::id::TestJSImplInterface },
31059 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
31060 JSJitInfo::Method,
31061 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31062 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31063 false, /* isInfallible. False in setters. */
31064 false, /* isMovable. Not relevant for setters. */
31065 false, /* isEliminatable. Not relevant for setters. */
31066 false, /* isAlwaysInSlot. Only relevant for getters. */
31067 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31068 false, /* isTypedMethod. Only relevant for methods. */
31069 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31070};
31071
31072MOZ_CAN_RUN_SCRIPT static bool
31073passNullableUnionWithDefaultValue20(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31074{
31075 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue20");
31076 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31079( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue20", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31077 "TestJSImplInterface", "passNullableUnionWithDefaultValue20", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31079( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue20", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31078 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31079( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue20", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31079 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31079( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue20", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31080
31081 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31082 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31083 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31084 if (objIsXray) {
31085 unwrappedObj.emplace(cx, obj);
31086 }
31087 Nullable<DoubleOrSupportedType > arg0;
31088 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
31089 arg0.SetNull();
31090 } else {
31091 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
31092 return false;
31093 }
31094 }
31095 if (objIsXray) {
31096 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31097 // we know Xrays have no dynamic unwrap behavior.
31098 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31099 if (!unwrappedObj.ref()) {
31100 return false;
31101 }
31102 }
31103 FastErrorResult rv;
31104 // NOTE: This assert does NOT call the function.
31105 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue20(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
31106 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue20(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
31107 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue20"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue20"
)), 0))
) {
31108 return false;
31109 }
31110 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 31110); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31110; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31111 args.rval().setUndefined();
31112 return true;
31113}
31114
31115static const JSJitInfo passNullableUnionWithDefaultValue20_methodinfo = {
31116 { (JSJitGetterOp)passNullableUnionWithDefaultValue20 },
31117 { prototypes::id::TestJSImplInterface },
31118 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
31119 JSJitInfo::Method,
31120 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31121 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31122 false, /* isInfallible. False in setters. */
31123 false, /* isMovable. Not relevant for setters. */
31124 false, /* isEliminatable. Not relevant for setters. */
31125 false, /* isAlwaysInSlot. Only relevant for getters. */
31126 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31127 false, /* isTypedMethod. Only relevant for methods. */
31128 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31129};
31130
31131MOZ_CAN_RUN_SCRIPT static bool
31132passNullableUnionWithDefaultValue21(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31133{
31134 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue21");
31135 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31138( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue21", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31136 "TestJSImplInterface", "passNullableUnionWithDefaultValue21", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31138( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue21", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31137 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31138( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue21", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31138 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31138( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue21", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31139
31140 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31141 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31142 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31143 if (objIsXray) {
31144 unwrappedObj.emplace(cx, obj);
31145 }
31146 Nullable<DoubleOrUSVString > arg0;
31147 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
31148 arg0.SetNull();
31149 } else {
31150 if (!(args.hasDefined(0))) {
31151 arg0.SetValue().SetStringLiteral(u"abc");
31152 } else {
31153 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
31154 return false;
31155 }
31156 }
31157 }
31158 if (objIsXray) {
31159 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31160 // we know Xrays have no dynamic unwrap behavior.
31161 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31162 if (!unwrappedObj.ref()) {
31163 return false;
31164 }
31165 }
31166 FastErrorResult rv;
31167 // NOTE: This assert does NOT call the function.
31168 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue21(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
31169 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue21(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
31170 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue21"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue21"
)), 0))
) {
31171 return false;
31172 }
31173 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 31173); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31173; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31174 args.rval().setUndefined();
31175 return true;
31176}
31177
31178static const JSJitInfo passNullableUnionWithDefaultValue21_methodinfo = {
31179 { (JSJitGetterOp)passNullableUnionWithDefaultValue21 },
31180 { prototypes::id::TestJSImplInterface },
31181 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
31182 JSJitInfo::Method,
31183 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31184 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31185 false, /* isInfallible. False in setters. */
31186 false, /* isMovable. Not relevant for setters. */
31187 false, /* isEliminatable. Not relevant for setters. */
31188 false, /* isAlwaysInSlot. Only relevant for getters. */
31189 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31190 false, /* isTypedMethod. Only relevant for methods. */
31191 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31192};
31193
31194MOZ_CAN_RUN_SCRIPT static bool
31195passNullableUnionWithDefaultValue22(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31196{
31197 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue22");
31198 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31201( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue22", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31199 "TestJSImplInterface", "passNullableUnionWithDefaultValue22", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31201( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue22", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31200 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31201( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue22", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31201 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31201( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue22", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31202
31203 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31204 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31205 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31206 if (objIsXray) {
31207 unwrappedObj.emplace(cx, obj);
31208 }
31209 Nullable<DoubleOrUSVString > arg0;
31210 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
31211 arg0.SetNull();
31212 } else {
31213 if (!(args.hasDefined(0))) {
31214 arg0.SetValue().RawSetAsDouble() = 1.0;
31215 } else {
31216 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
31217 return false;
31218 }
31219 }
31220 }
31221 if (objIsXray) {
31222 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31223 // we know Xrays have no dynamic unwrap behavior.
31224 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31225 if (!unwrappedObj.ref()) {
31226 return false;
31227 }
31228 }
31229 FastErrorResult rv;
31230 // NOTE: This assert does NOT call the function.
31231 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue22(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
31232 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue22(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
31233 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue22"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue22"
)), 0))
) {
31234 return false;
31235 }
31236 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 31236); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31236; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31237 args.rval().setUndefined();
31238 return true;
31239}
31240
31241static const JSJitInfo passNullableUnionWithDefaultValue22_methodinfo = {
31242 { (JSJitGetterOp)passNullableUnionWithDefaultValue22 },
31243 { prototypes::id::TestJSImplInterface },
31244 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
31245 JSJitInfo::Method,
31246 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31247 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31248 false, /* isInfallible. False in setters. */
31249 false, /* isMovable. Not relevant for setters. */
31250 false, /* isEliminatable. Not relevant for setters. */
31251 false, /* isAlwaysInSlot. Only relevant for getters. */
31252 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31253 false, /* isTypedMethod. Only relevant for methods. */
31254 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31255};
31256
31257MOZ_CAN_RUN_SCRIPT static bool
31258passNullableUnionWithDefaultValue23(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31259{
31260 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue23");
31261 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31264( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue23", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31262 "TestJSImplInterface", "passNullableUnionWithDefaultValue23", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31264( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue23", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31263 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31264( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue23", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31264 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31264( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue23", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31265
31266 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31267 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31268 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31269 if (objIsXray) {
31270 unwrappedObj.emplace(cx, obj);
31271 }
31272 Nullable<DoubleOrUSVString > arg0;
31273 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
31274 arg0.SetNull();
31275 } else {
31276 if (!(args.hasDefined(0))) {
31277 arg0.SetValue().RawSetAsDouble() = 1.5;
31278 } else {
31279 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
31280 return false;
31281 }
31282 }
31283 }
31284 if (objIsXray) {
31285 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31286 // we know Xrays have no dynamic unwrap behavior.
31287 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31288 if (!unwrappedObj.ref()) {
31289 return false;
31290 }
31291 }
31292 FastErrorResult rv;
31293 // NOTE: This assert does NOT call the function.
31294 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue23(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
31295 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue23(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
31296 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue23"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue23"
)), 0))
) {
31297 return false;
31298 }
31299 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 31299); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31299; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31300 args.rval().setUndefined();
31301 return true;
31302}
31303
31304static const JSJitInfo passNullableUnionWithDefaultValue23_methodinfo = {
31305 { (JSJitGetterOp)passNullableUnionWithDefaultValue23 },
31306 { prototypes::id::TestJSImplInterface },
31307 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
31308 JSJitInfo::Method,
31309 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31310 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31311 false, /* isInfallible. False in setters. */
31312 false, /* isMovable. Not relevant for setters. */
31313 false, /* isEliminatable. Not relevant for setters. */
31314 false, /* isAlwaysInSlot. Only relevant for getters. */
31315 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31316 false, /* isTypedMethod. Only relevant for methods. */
31317 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31318};
31319
31320MOZ_CAN_RUN_SCRIPT static bool
31321passNullableUnionWithDefaultValue24(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31322{
31323 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue24");
31324 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31327( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue24", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31325 "TestJSImplInterface", "passNullableUnionWithDefaultValue24", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31327( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue24", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31326 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31327( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue24", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31327 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31327( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue24", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31328
31329 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31330 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31331 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31332 if (objIsXray) {
31333 unwrappedObj.emplace(cx, obj);
31334 }
31335 Nullable<DoubleOrUSVString > arg0;
31336 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
31337 arg0.SetNull();
31338 } else {
31339 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
31340 return false;
31341 }
31342 }
31343 if (objIsXray) {
31344 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31345 // we know Xrays have no dynamic unwrap behavior.
31346 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31347 if (!unwrappedObj.ref()) {
31348 return false;
31349 }
31350 }
31351 FastErrorResult rv;
31352 // NOTE: This assert does NOT call the function.
31353 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue24(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
31354 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue24(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
31355 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue24"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue24"
)), 0))
) {
31356 return false;
31357 }
31358 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 31358); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31358; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31359 args.rval().setUndefined();
31360 return true;
31361}
31362
31363static const JSJitInfo passNullableUnionWithDefaultValue24_methodinfo = {
31364 { (JSJitGetterOp)passNullableUnionWithDefaultValue24 },
31365 { prototypes::id::TestJSImplInterface },
31366 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
31367 JSJitInfo::Method,
31368 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31369 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31370 false, /* isInfallible. False in setters. */
31371 false, /* isMovable. Not relevant for setters. */
31372 false, /* isEliminatable. Not relevant for setters. */
31373 false, /* isAlwaysInSlot. Only relevant for getters. */
31374 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31375 false, /* isTypedMethod. Only relevant for methods. */
31376 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31377};
31378
31379MOZ_CAN_RUN_SCRIPT static bool
31380passNullableUnionWithDefaultValue25(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31381{
31382 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue25");
31383 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31386( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue25", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31384 "TestJSImplInterface", "passNullableUnionWithDefaultValue25", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31386( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue25", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31385 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31386( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue25", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31386 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31386( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue25", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31387
31388 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31389 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31390 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31391 if (objIsXray) {
31392 unwrappedObj.emplace(cx, obj);
31393 }
31394 Nullable<DoubleOrUTF8String > arg0;
31395 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
31396 arg0.SetNull();
31397 } else {
31398 if (!(args.hasDefined(0))) {
31399 arg0.SetValue().SetStringLiteral("");
31400 } else {
31401 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
31402 return false;
31403 }
31404 }
31405 }
31406 if (objIsXray) {
31407 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31408 // we know Xrays have no dynamic unwrap behavior.
31409 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31410 if (!unwrappedObj.ref()) {
31411 return false;
31412 }
31413 }
31414 FastErrorResult rv;
31415 // NOTE: This assert does NOT call the function.
31416 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue25(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
31417 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue25(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
31418 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue25"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue25"
)), 0))
) {
31419 return false;
31420 }
31421 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 31421); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31421; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31422 args.rval().setUndefined();
31423 return true;
31424}
31425
31426static const JSJitInfo passNullableUnionWithDefaultValue25_methodinfo = {
31427 { (JSJitGetterOp)passNullableUnionWithDefaultValue25 },
31428 { prototypes::id::TestJSImplInterface },
31429 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
31430 JSJitInfo::Method,
31431 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31432 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31433 false, /* isInfallible. False in setters. */
31434 false, /* isMovable. Not relevant for setters. */
31435 false, /* isEliminatable. Not relevant for setters. */
31436 false, /* isAlwaysInSlot. Only relevant for getters. */
31437 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31438 false, /* isTypedMethod. Only relevant for methods. */
31439 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31440};
31441
31442MOZ_CAN_RUN_SCRIPT static bool
31443passNullableUnionWithDefaultValue26(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31444{
31445 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue26");
31446 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31449( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue26", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31447 "TestJSImplInterface", "passNullableUnionWithDefaultValue26", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31449( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue26", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31448 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31449( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue26", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31449 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31449( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue26", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31450
31451 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31452 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31453 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31454 if (objIsXray) {
31455 unwrappedObj.emplace(cx, obj);
31456 }
31457 Nullable<DoubleOrUTF8String > arg0;
31458 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
31459 arg0.SetNull();
31460 } else {
31461 if (!(args.hasDefined(0))) {
31462 arg0.SetValue().RawSetAsDouble() = 1.0;
31463 } else {
31464 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
31465 return false;
31466 }
31467 }
31468 }
31469 if (objIsXray) {
31470 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31471 // we know Xrays have no dynamic unwrap behavior.
31472 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31473 if (!unwrappedObj.ref()) {
31474 return false;
31475 }
31476 }
31477 FastErrorResult rv;
31478 // NOTE: This assert does NOT call the function.
31479 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue26(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
31480 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue26(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
31481 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue26"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue26"
)), 0))
) {
31482 return false;
31483 }
31484 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 31484); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31484; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31485 args.rval().setUndefined();
31486 return true;
31487}
31488
31489static const JSJitInfo passNullableUnionWithDefaultValue26_methodinfo = {
31490 { (JSJitGetterOp)passNullableUnionWithDefaultValue26 },
31491 { prototypes::id::TestJSImplInterface },
31492 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
31493 JSJitInfo::Method,
31494 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31495 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31496 false, /* isInfallible. False in setters. */
31497 false, /* isMovable. Not relevant for setters. */
31498 false, /* isEliminatable. Not relevant for setters. */
31499 false, /* isAlwaysInSlot. Only relevant for getters. */
31500 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31501 false, /* isTypedMethod. Only relevant for methods. */
31502 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31503};
31504
31505MOZ_CAN_RUN_SCRIPT static bool
31506passNullableUnionWithDefaultValue27(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31507{
31508 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue27");
31509 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31512( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue27", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31510 "TestJSImplInterface", "passNullableUnionWithDefaultValue27", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31512( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue27", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31511 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31512( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue27", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31512 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31512( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue27", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31513
31514 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31515 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31516 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31517 if (objIsXray) {
31518 unwrappedObj.emplace(cx, obj);
31519 }
31520 Nullable<DoubleOrUTF8String > arg0;
31521 if ((args.hasDefined(0)) && args[0].isNullOrUndefined()) {
31522 arg0.SetNull();
31523 } else {
31524 if (!(args.hasDefined(0))) {
31525 arg0.SetValue().RawSetAsDouble() = 1.5;
31526 } else {
31527 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
31528 return false;
31529 }
31530 }
31531 }
31532 if (objIsXray) {
31533 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31534 // we know Xrays have no dynamic unwrap behavior.
31535 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31536 if (!unwrappedObj.ref()) {
31537 return false;
31538 }
31539 }
31540 FastErrorResult rv;
31541 // NOTE: This assert does NOT call the function.
31542 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue27(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
31543 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue27(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
31544 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue27"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue27"
)), 0))
) {
31545 return false;
31546 }
31547 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 31547); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31547; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31548 args.rval().setUndefined();
31549 return true;
31550}
31551
31552static const JSJitInfo passNullableUnionWithDefaultValue27_methodinfo = {
31553 { (JSJitGetterOp)passNullableUnionWithDefaultValue27 },
31554 { prototypes::id::TestJSImplInterface },
31555 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
31556 JSJitInfo::Method,
31557 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31558 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31559 false, /* isInfallible. False in setters. */
31560 false, /* isMovable. Not relevant for setters. */
31561 false, /* isEliminatable. Not relevant for setters. */
31562 false, /* isAlwaysInSlot. Only relevant for getters. */
31563 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31564 false, /* isTypedMethod. Only relevant for methods. */
31565 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31566};
31567
31568MOZ_CAN_RUN_SCRIPT static bool
31569passNullableUnionWithDefaultValue28(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31570{
31571 BindingCallContext cx(cx_, "TestJSImplInterface.passNullableUnionWithDefaultValue28");
31572 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31575( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue28", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31573 "TestJSImplInterface", "passNullableUnionWithDefaultValue28", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31575( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue28", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31574 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31575( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue28", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31575 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31575( cx, "TestJSImplInterface"
, "passNullableUnionWithDefaultValue28", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31576
31577 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31578 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31579 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31580 if (objIsXray) {
31581 unwrappedObj.emplace(cx, obj);
31582 }
31583 Nullable<DoubleOrUTF8String > arg0;
31584 if (!(args.hasDefined(0)) || args[0].isNullOrUndefined()) {
31585 arg0.SetNull();
31586 } else {
31587 if (!arg0.SetValue().Init(cx, args[0], "Argument 1", true)) {
31588 return false;
31589 }
31590 }
31591 if (objIsXray) {
31592 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31593 // we know Xrays have no dynamic unwrap behavior.
31594 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31595 if (!unwrappedObj.ref()) {
31596 return false;
31597 }
31598 }
31599 FastErrorResult rv;
31600 // NOTE: This assert does NOT call the function.
31601 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue28(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
31602 MOZ_KnownLive(self)(self)->PassNullableUnionWithDefaultValue28(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
31603 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue28"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passNullableUnionWithDefaultValue28"
)), 0))
) {
31604 return false;
31605 }
31606 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 31606); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31606; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31607 args.rval().setUndefined();
31608 return true;
31609}
31610
31611static const JSJitInfo passNullableUnionWithDefaultValue28_methodinfo = {
31612 { (JSJitGetterOp)passNullableUnionWithDefaultValue28 },
31613 { prototypes::id::TestJSImplInterface },
31614 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
31615 JSJitInfo::Method,
31616 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31617 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31618 false, /* isInfallible. False in setters. */
31619 false, /* isMovable. Not relevant for setters. */
31620 false, /* isEliminatable. Not relevant for setters. */
31621 false, /* isAlwaysInSlot. Only relevant for getters. */
31622 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31623 false, /* isTypedMethod. Only relevant for methods. */
31624 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31625};
31626
31627MOZ_CAN_RUN_SCRIPT static bool
31628passSequenceOfUnions(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31629{
31630 BindingCallContext cx(cx_, "TestJSImplInterface.passSequenceOfUnions");
31631 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31634( cx, "TestJSImplInterface"
, "passSequenceOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31632 "TestJSImplInterface", "passSequenceOfUnions", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31634( cx, "TestJSImplInterface"
, "passSequenceOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31633 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31634( cx, "TestJSImplInterface"
, "passSequenceOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31634 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31634( cx, "TestJSImplInterface"
, "passSequenceOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
31635
31636 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31637 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequenceOfUnions", 1)) {
31638 return false;
31639 }
31640 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31641 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31642 if (objIsXray) {
31643 unwrappedObj.emplace(cx, obj);
31644 }
31645 binding_detail::AutoSequence<OwningCanvasPatternOrCanvasGradient> arg0;
31646 if (args[0].isObject()) {
31647 JS::ForOfIterator iter(cx);
31648 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
31649 return false;
31650 }
31651 if (!iter.valueIsIterable()) {
31652 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
31653 return false;
31654 }
31655 binding_detail::AutoSequence<OwningCanvasPatternOrCanvasGradient> &arr = arg0;
31656 JS::Rooted<JS::Value> temp(cx);
31657 while (true) {
31658 bool done;
31659 if (!iter.next(&temp, &done)) {
31660 return false;
31661 }
31662 if (done) {
31663 break;
31664 }
31665 OwningCanvasPatternOrCanvasGradient* slotPtr = arr.AppendElement(mozilla::fallible);
31666 if (!slotPtr) {
31667 JS_ReportOutOfMemory(cx);
31668 return false;
31669 }
31670 OwningCanvasPatternOrCanvasGradient& slot = *slotPtr;
31671 if (!slot.Init(cx, temp, "Element of argument 1", true)) {
31672 return false;
31673 }
31674 }
31675 } else {
31676 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
31677 return false;
31678 }
31679 if (objIsXray) {
31680 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31681 // we know Xrays have no dynamic unwrap behavior.
31682 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31683 if (!unwrappedObj.ref()) {
31684 return false;
31685 }
31686 }
31687 FastErrorResult rv;
31688 // NOTE: This assert does NOT call the function.
31689 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfUnions(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
31690 MOZ_KnownLive(self)(self)->PassSequenceOfUnions(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
31691 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfUnions"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfUnions"
)), 0))
) {
31692 return false;
31693 }
31694 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 31694); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31694; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31695 args.rval().setUndefined();
31696 return true;
31697}
31698
31699static const JSJitInfo passSequenceOfUnions_methodinfo = {
31700 { (JSJitGetterOp)passSequenceOfUnions },
31701 { prototypes::id::TestJSImplInterface },
31702 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
31703 JSJitInfo::Method,
31704 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31705 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31706 false, /* isInfallible. False in setters. */
31707 false, /* isMovable. Not relevant for setters. */
31708 false, /* isEliminatable. Not relevant for setters. */
31709 false, /* isAlwaysInSlot. Only relevant for getters. */
31710 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31711 false, /* isTypedMethod. Only relevant for methods. */
31712 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31713};
31714
31715MOZ_CAN_RUN_SCRIPT static bool
31716passSequenceOfUnions2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31717{
31718 BindingCallContext cx(cx_, "TestJSImplInterface.passSequenceOfUnions2");
31719 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31722( cx, "TestJSImplInterface"
, "passSequenceOfUnions2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31720 "TestJSImplInterface", "passSequenceOfUnions2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31722( cx, "TestJSImplInterface"
, "passSequenceOfUnions2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31721 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31722( cx, "TestJSImplInterface"
, "passSequenceOfUnions2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31722 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31722( cx, "TestJSImplInterface"
, "passSequenceOfUnions2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
31723
31724 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31725 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequenceOfUnions2", 1)) {
31726 return false;
31727 }
31728 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31729 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31730 if (objIsXray) {
31731 unwrappedObj.emplace(cx, obj);
31732 }
31733 binding_detail::AutoSequence<OwningObjectOrLong> arg0;
31734 SequenceRooter<OwningObjectOrLong> arg0_holder(cx, &arg0);
31735 if (args[0].isObject()) {
31736 JS::ForOfIterator iter(cx);
31737 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
31738 return false;
31739 }
31740 if (!iter.valueIsIterable()) {
31741 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
31742 return false;
31743 }
31744 binding_detail::AutoSequence<OwningObjectOrLong> &arr = arg0;
31745 JS::Rooted<JS::Value> temp(cx);
31746 while (true) {
31747 bool done;
31748 if (!iter.next(&temp, &done)) {
31749 return false;
31750 }
31751 if (done) {
31752 break;
31753 }
31754 OwningObjectOrLong* slotPtr = arr.AppendElement(mozilla::fallible);
31755 if (!slotPtr) {
31756 JS_ReportOutOfMemory(cx);
31757 return false;
31758 }
31759 OwningObjectOrLong& slot = *slotPtr;
31760 if (!slot.Init(cx, temp, "Element of argument 1", true)) {
31761 return false;
31762 }
31763 }
31764 } else {
31765 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
31766 return false;
31767 }
31768 if (objIsXray) {
31769 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31770 // we know Xrays have no dynamic unwrap behavior.
31771 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31772 if (!unwrappedObj.ref()) {
31773 return false;
31774 }
31775 }
31776 FastErrorResult rv;
31777 // NOTE: This assert does NOT call the function.
31778 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfUnions2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
31779 MOZ_KnownLive(self)(self)->PassSequenceOfUnions2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
31780 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfUnions2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfUnions2"
)), 0))
) {
31781 return false;
31782 }
31783 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 31783); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31783; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31784 args.rval().setUndefined();
31785 return true;
31786}
31787
31788static const JSJitInfo passSequenceOfUnions2_methodinfo = {
31789 { (JSJitGetterOp)passSequenceOfUnions2 },
31790 { prototypes::id::TestJSImplInterface },
31791 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
31792 JSJitInfo::Method,
31793 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31794 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31795 false, /* isInfallible. False in setters. */
31796 false, /* isMovable. Not relevant for setters. */
31797 false, /* isEliminatable. Not relevant for setters. */
31798 false, /* isAlwaysInSlot. Only relevant for getters. */
31799 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31800 false, /* isTypedMethod. Only relevant for methods. */
31801 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31802};
31803
31804MOZ_CAN_RUN_SCRIPT static bool
31805passVariadicUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31806{
31807 BindingCallContext cx(cx_, "TestJSImplInterface.passVariadicUnion");
31808 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31811( cx, "TestJSImplInterface"
, "passVariadicUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31809 "TestJSImplInterface", "passVariadicUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31811( cx, "TestJSImplInterface"
, "passVariadicUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31810 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31811( cx, "TestJSImplInterface"
, "passVariadicUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
31811 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31811( cx, "TestJSImplInterface"
, "passVariadicUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
31812
31813 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31814 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31815 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31816 if (objIsXray) {
31817 unwrappedObj.emplace(cx, obj);
31818 }
31819 AutoSequence<OwningCanvasPatternOrCanvasGradient> arg0;
31820 if (args.length() > 0) {
31821 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
31822 JS_ReportOutOfMemory(cx);
31823 return false;
31824 }
31825 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
31826 // OK to do infallible append here, since we ensured capacity already.
31827 OwningCanvasPatternOrCanvasGradient& slot = *arg0.AppendElement();
31828 if (!slot.Init(cx, args[variadicArg], "Argument 1", true)) {
31829 return false;
31830 }
31831 }
31832 }
31833 if (objIsXray) {
31834 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31835 // we know Xrays have no dynamic unwrap behavior.
31836 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31837 if (!unwrappedObj.ref()) {
31838 return false;
31839 }
31840 }
31841 FastErrorResult rv;
31842 // NOTE: This assert does NOT call the function.
31843 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
31844 MOZ_KnownLive(self)(self)->PassVariadicUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
31845 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicUnion"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicUnion"
)), 0))
) {
31846 return false;
31847 }
31848 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 31848); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31848; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31849 args.rval().setUndefined();
31850 return true;
31851}
31852
31853static const JSJitInfo passVariadicUnion_methodinfo = {
31854 { (JSJitGetterOp)passVariadicUnion },
31855 { prototypes::id::TestJSImplInterface },
31856 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
31857 JSJitInfo::Method,
31858 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31859 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31860 false, /* isInfallible. False in setters. */
31861 false, /* isMovable. Not relevant for setters. */
31862 false, /* isEliminatable. Not relevant for setters. */
31863 false, /* isAlwaysInSlot. Only relevant for getters. */
31864 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31865 false, /* isTypedMethod. Only relevant for methods. */
31866 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31867};
31868
31869MOZ_CAN_RUN_SCRIPT static bool
31870passSequenceOfNullableUnions(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31871{
31872 BindingCallContext cx(cx_, "TestJSImplInterface.passSequenceOfNullableUnions");
31873 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31876( cx, "TestJSImplInterface"
, "passSequenceOfNullableUnions", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31874 "TestJSImplInterface", "passSequenceOfNullableUnions", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31876( cx, "TestJSImplInterface"
, "passSequenceOfNullableUnions", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31875 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31876( cx, "TestJSImplInterface"
, "passSequenceOfNullableUnions", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31876 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31876( cx, "TestJSImplInterface"
, "passSequenceOfNullableUnions", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31877
31878 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31879 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequenceOfNullableUnions", 1)) {
31880 return false;
31881 }
31882 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31883 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31884 if (objIsXray) {
31885 unwrappedObj.emplace(cx, obj);
31886 }
31887 binding_detail::AutoSequence<Nullable<OwningCanvasPatternOrCanvasGradient >> arg0;
31888 if (args[0].isObject()) {
31889 JS::ForOfIterator iter(cx);
31890 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
31891 return false;
31892 }
31893 if (!iter.valueIsIterable()) {
31894 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
31895 return false;
31896 }
31897 binding_detail::AutoSequence<Nullable<OwningCanvasPatternOrCanvasGradient >> &arr = arg0;
31898 JS::Rooted<JS::Value> temp(cx);
31899 while (true) {
31900 bool done;
31901 if (!iter.next(&temp, &done)) {
31902 return false;
31903 }
31904 if (done) {
31905 break;
31906 }
31907 Nullable<OwningCanvasPatternOrCanvasGradient >* slotPtr = arr.AppendElement(mozilla::fallible);
31908 if (!slotPtr) {
31909 JS_ReportOutOfMemory(cx);
31910 return false;
31911 }
31912 Nullable<OwningCanvasPatternOrCanvasGradient >& slot = *slotPtr;
31913 if (temp.isNullOrUndefined()) {
31914 slot.SetNull();
31915 } else {
31916 if (!slot.SetValue().Init(cx, temp, "Element of argument 1", true)) {
31917 return false;
31918 }
31919 }
31920 }
31921 } else {
31922 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
31923 return false;
31924 }
31925 if (objIsXray) {
31926 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31927 // we know Xrays have no dynamic unwrap behavior.
31928 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31929 if (!unwrappedObj.ref()) {
31930 return false;
31931 }
31932 }
31933 FastErrorResult rv;
31934 // NOTE: This assert does NOT call the function.
31935 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfNullableUnions(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
31936 MOZ_KnownLive(self)(self)->PassSequenceOfNullableUnions(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
31937 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfNullableUnions"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfNullableUnions"
)), 0))
) {
31938 return false;
31939 }
31940 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 31940); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 31940; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
31941 args.rval().setUndefined();
31942 return true;
31943}
31944
31945static const JSJitInfo passSequenceOfNullableUnions_methodinfo = {
31946 { (JSJitGetterOp)passSequenceOfNullableUnions },
31947 { prototypes::id::TestJSImplInterface },
31948 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
31949 JSJitInfo::Method,
31950 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
31951 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
31952 false, /* isInfallible. False in setters. */
31953 false, /* isMovable. Not relevant for setters. */
31954 false, /* isEliminatable. Not relevant for setters. */
31955 false, /* isAlwaysInSlot. Only relevant for getters. */
31956 false, /* isLazilyCachedInSlot. Only relevant for getters. */
31957 false, /* isTypedMethod. Only relevant for methods. */
31958 0 /* Reserved slot index, if we're stored in a slot, else 0. */
31959};
31960
31961MOZ_CAN_RUN_SCRIPT static bool
31962passVariadicNullableUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
31963{
31964 BindingCallContext cx(cx_, "TestJSImplInterface.passVariadicNullableUnion");
31965 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject31968( cx, "TestJSImplInterface"
, "passVariadicNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31966 "TestJSImplInterface", "passVariadicNullableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject31968( cx, "TestJSImplInterface"
, "passVariadicNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31967 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject31968( cx, "TestJSImplInterface"
, "passVariadicNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
31968 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject31968( cx, "TestJSImplInterface"
, "passVariadicNullableUnion", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
31969
31970 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
31971 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
31972 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
31973 if (objIsXray) {
31974 unwrappedObj.emplace(cx, obj);
31975 }
31976 AutoSequence<Nullable<OwningCanvasPatternOrCanvasGradient >> arg0;
31977 if (args.length() > 0) {
31978 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
31979 JS_ReportOutOfMemory(cx);
31980 return false;
31981 }
31982 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
31983 // OK to do infallible append here, since we ensured capacity already.
31984 Nullable<OwningCanvasPatternOrCanvasGradient >& slot = *arg0.AppendElement();
31985 if (args[variadicArg].isNullOrUndefined()) {
31986 slot.SetNull();
31987 } else {
31988 if (!slot.SetValue().Init(cx, args[variadicArg], "Argument 1", true)) {
31989 return false;
31990 }
31991 }
31992 }
31993 }
31994 if (objIsXray) {
31995 // Since our object is an Xray, we can just CheckedUnwrapStatic:
31996 // we know Xrays have no dynamic unwrap behavior.
31997 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
31998 if (!unwrappedObj.ref()) {
31999 return false;
32000 }
32001 }
32002 FastErrorResult rv;
32003 // NOTE: This assert does NOT call the function.
32004 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicNullableUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32005 MOZ_KnownLive(self)(self)->PassVariadicNullableUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32006 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicNullableUnion"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicNullableUnion"
)), 0))
) {
32007 return false;
32008 }
32009 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32009); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32009; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32010 args.rval().setUndefined();
32011 return true;
32012}
32013
32014static const JSJitInfo passVariadicNullableUnion_methodinfo = {
32015 { (JSJitGetterOp)passVariadicNullableUnion },
32016 { prototypes::id::TestJSImplInterface },
32017 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32018 JSJitInfo::Method,
32019 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32020 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32021 false, /* isInfallible. False in setters. */
32022 false, /* isMovable. Not relevant for setters. */
32023 false, /* isEliminatable. Not relevant for setters. */
32024 false, /* isAlwaysInSlot. Only relevant for getters. */
32025 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32026 false, /* isTypedMethod. Only relevant for methods. */
32027 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32028};
32029
32030MOZ_CAN_RUN_SCRIPT static bool
32031passRecordOfUnions(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32032{
32033 BindingCallContext cx(cx_, "TestJSImplInterface.passRecordOfUnions");
32034 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32037( cx, "TestJSImplInterface"
, "passRecordOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32035 "TestJSImplInterface", "passRecordOfUnions", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32037( cx, "TestJSImplInterface"
, "passRecordOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32036 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32037( cx, "TestJSImplInterface"
, "passRecordOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32037 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32037( cx, "TestJSImplInterface"
, "passRecordOfUnions", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32038
32039 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32040 if (!args.requireAtLeast(cx, "TestJSImplInterface.passRecordOfUnions", 1)) {
32041 return false;
32042 }
32043 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32044 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32045 if (objIsXray) {
32046 unwrappedObj.emplace(cx, obj);
32047 }
32048 Record<nsString, OwningCanvasPatternOrCanvasGradient> arg0;
32049 if (args[0].isObject()) {
32050 auto& recordEntries = arg0.Entries();
32051
32052 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
32053 JS::RootedVector<jsid> ids(cx);
32054 if (!js::GetPropertyKeys(cx, recordObj,
32055 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
32056 return false;
32057 }
32058 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
32059 JS_ReportOutOfMemory(cx);
32060 return false;
32061 }
32062 JS::Rooted<JS::Value> propNameValue(cx);
32063 JS::Rooted<JS::Value> temp(cx);
32064 JS::Rooted<jsid> curId(cx);
32065 JS::Rooted<JS::Value> idVal(cx);
32066 // Use a hashset to keep track of ids seen, to avoid
32067 // introducing nasty O(N^2) behavior scanning for them all the
32068 // time. Ideally we'd use a data structure with O(1) lookup
32069 // _and_ ordering for the MozMap, but we don't have one lying
32070 // around.
32071 nsTHashtable<nsStringHashKey> idsSeen;
32072 for (size_t i = 0; i < ids.length(); ++i) {
32073 curId = ids[i];
32074
32075 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
32076 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
32077 &desc)) {
32078 return false;
32079 }
32080
32081 if (desc.isNothing() || !desc->enumerable()) {
32082 continue;
32083 }
32084
32085 idVal = js::IdToValue(curId);
32086 nsString propName;
32087 // This will just throw if idVal is a Symbol, like the spec says
32088 // to do.
32089 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
32090 return false;
32091 }
32092
32093 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
32094 return false;
32095 }
32096
32097 Record<nsString, OwningCanvasPatternOrCanvasGradient>::EntryType* entry;
32098 if (!idsSeen.EnsureInserted(propName)) {
32099 // Find the existing entry.
32100 auto idx = recordEntries.IndexOf(propName);
32101 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 32102); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 32102; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
32102 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 32102); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 32102; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
32103 // Now blow it away to make it look like it was just added
32104 // to the array, because it's not obvious that it's
32105 // safe to write to its already-initialized mValue via our
32106 // normal codegen conversions. For example, the value
32107 // could be a union and this would change its type, but
32108 // codegen assumes we won't do that.
32109 entry = recordEntries.ReconstructElementAt(idx);
32110 } else {
32111 // Safe to do an infallible append here, because we did a
32112 // SetCapacity above to the right capacity.
32113 entry = recordEntries.AppendElement();
32114 }
32115 entry->mKey = propName;
32116 OwningCanvasPatternOrCanvasGradient& slot = entry->mValue;
32117 if (!slot.Init(cx, temp, "Value in argument 1", true)) {
32118 return false;
32119 }
32120 }
32121 } else {
32122 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
32123 return false;
32124 }
32125 if (objIsXray) {
32126 // Since our object is an Xray, we can just CheckedUnwrapStatic:
32127 // we know Xrays have no dynamic unwrap behavior.
32128 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
32129 if (!unwrappedObj.ref()) {
32130 return false;
32131 }
32132 }
32133 FastErrorResult rv;
32134 // NOTE: This assert does NOT call the function.
32135 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfUnions(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32136 MOZ_KnownLive(self)(self)->PassRecordOfUnions(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32137 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfUnions"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfUnions"
)), 0))
) {
32138 return false;
32139 }
32140 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32140); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32140; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32141 args.rval().setUndefined();
32142 return true;
32143}
32144
32145static const JSJitInfo passRecordOfUnions_methodinfo = {
32146 { (JSJitGetterOp)passRecordOfUnions },
32147 { prototypes::id::TestJSImplInterface },
32148 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32149 JSJitInfo::Method,
32150 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32151 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32152 false, /* isInfallible. False in setters. */
32153 false, /* isMovable. Not relevant for setters. */
32154 false, /* isEliminatable. Not relevant for setters. */
32155 false, /* isAlwaysInSlot. Only relevant for getters. */
32156 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32157 false, /* isTypedMethod. Only relevant for methods. */
32158 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32159};
32160
32161MOZ_CAN_RUN_SCRIPT static bool
32162receiveUnion(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32163{
32164 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32167( cx, "TestJSImplInterface"
, "receiveUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32165 "TestJSImplInterface", "receiveUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32167( cx, "TestJSImplInterface"
, "receiveUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32166 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32167( cx, "TestJSImplInterface"
, "receiveUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32167 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32167( cx, "TestJSImplInterface"
, "receiveUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32168
32169 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32170 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32171 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32172 if (objIsXray) {
32173 unwrappedObj.emplace(cx, obj);
32174 }
32175 if (objIsXray) {
32176 // Since our object is an Xray, we can just CheckedUnwrapStatic:
32177 // we know Xrays have no dynamic unwrap behavior.
32178 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
32179 if (!unwrappedObj.ref()) {
32180 return false;
32181 }
32182 }
32183 FastErrorResult rv;
32184 OwningCanvasPatternOrCanvasGradient result;
32185 // NOTE: This assert does NOT call the function.
32186 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveUnion(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32187 MOZ_KnownLive(self)(self)->ReceiveUnion(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32188 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUnion"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUnion"
)), 0))
) {
32189 return false;
32190 }
32191 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32191); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32191; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32192 if (!result.ToJSVal(cx, obj, args.rval())) {
32193 return false;
32194 }
32195 return true;
32196}
32197
32198static const JSJitInfo receiveUnion_methodinfo = {
32199 { (JSJitGetterOp)receiveUnion },
32200 { prototypes::id::TestJSImplInterface },
32201 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32202 JSJitInfo::Method,
32203 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32204 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
32205 false, /* isInfallible. False in setters. */
32206 false, /* isMovable. Not relevant for setters. */
32207 false, /* isEliminatable. Not relevant for setters. */
32208 false, /* isAlwaysInSlot. Only relevant for getters. */
32209 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32210 false, /* isTypedMethod. Only relevant for methods. */
32211 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32212};
32213
32214MOZ_CAN_RUN_SCRIPT static bool
32215receiveUnion2(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32216{
32217 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32220( cx, "TestJSImplInterface"
, "receiveUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32218 "TestJSImplInterface", "receiveUnion2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32220( cx, "TestJSImplInterface"
, "receiveUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32219 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32220( cx, "TestJSImplInterface"
, "receiveUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32220 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32220( cx, "TestJSImplInterface"
, "receiveUnion2", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32221
32222 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32223 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32224 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32225 if (objIsXray) {
32226 unwrappedObj.emplace(cx, obj);
32227 }
32228 if (objIsXray) {
32229 // Since our object is an Xray, we can just CheckedUnwrapStatic:
32230 // we know Xrays have no dynamic unwrap behavior.
32231 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
32232 if (!unwrappedObj.ref()) {
32233 return false;
32234 }
32235 }
32236 FastErrorResult rv;
32237 RootedUnion<OwningObjectOrLong> result(cx);
32238 // NOTE: This assert does NOT call the function.
32239 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveUnion2(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32240 MOZ_KnownLive(self)(self)->ReceiveUnion2(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32241 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUnion2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUnion2"
)), 0))
) {
32242 return false;
32243 }
32244 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32244); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32244; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32245 if (!result.ToJSVal(cx, obj, args.rval())) {
32246 return false;
32247 }
32248 return true;
32249}
32250
32251static const JSJitInfo receiveUnion2_methodinfo = {
32252 { (JSJitGetterOp)receiveUnion2 },
32253 { prototypes::id::TestJSImplInterface },
32254 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32255 JSJitInfo::Method,
32256 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32257 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
32258 false, /* isInfallible. False in setters. */
32259 false, /* isMovable. Not relevant for setters. */
32260 false, /* isEliminatable. Not relevant for setters. */
32261 false, /* isAlwaysInSlot. Only relevant for getters. */
32262 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32263 false, /* isTypedMethod. Only relevant for methods. */
32264 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32265};
32266
32267MOZ_CAN_RUN_SCRIPT static bool
32268receiveUnionContainingNull(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32269{
32270 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32273( cx, "TestJSImplInterface"
, "receiveUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32271 "TestJSImplInterface", "receiveUnionContainingNull", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32273( cx, "TestJSImplInterface"
, "receiveUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32272 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32273( cx, "TestJSImplInterface"
, "receiveUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32273 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32273( cx, "TestJSImplInterface"
, "receiveUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
32274
32275 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32276 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32277 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32278 if (objIsXray) {
32279 unwrappedObj.emplace(cx, obj);
32280 }
32281 if (objIsXray) {
32282 // Since our object is an Xray, we can just CheckedUnwrapStatic:
32283 // we know Xrays have no dynamic unwrap behavior.
32284 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
32285 if (!unwrappedObj.ref()) {
32286 return false;
32287 }
32288 }
32289 FastErrorResult rv;
32290 OwningCanvasPatternOrNullOrCanvasGradient result;
32291 // NOTE: This assert does NOT call the function.
32292 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveUnionContainingNull(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32293 MOZ_KnownLive(self)(self)->ReceiveUnionContainingNull(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32294 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUnionContainingNull"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveUnionContainingNull"
)), 0))
) {
32295 return false;
32296 }
32297 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32297); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32297; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32298 if (!result.ToJSVal(cx, obj, args.rval())) {
32299 return false;
32300 }
32301 return true;
32302}
32303
32304static const JSJitInfo receiveUnionContainingNull_methodinfo = {
32305 { (JSJitGetterOp)receiveUnionContainingNull },
32306 { prototypes::id::TestJSImplInterface },
32307 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32308 JSJitInfo::Method,
32309 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32310 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
32311 false, /* isInfallible. False in setters. */
32312 false, /* isMovable. Not relevant for setters. */
32313 false, /* isEliminatable. Not relevant for setters. */
32314 false, /* isAlwaysInSlot. Only relevant for getters. */
32315 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32316 false, /* isTypedMethod. Only relevant for methods. */
32317 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32318};
32319
32320MOZ_CAN_RUN_SCRIPT static bool
32321receiveNullableUnion(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32322{
32323 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32326( cx, "TestJSImplInterface"
, "receiveNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32324 "TestJSImplInterface", "receiveNullableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32326( cx, "TestJSImplInterface"
, "receiveNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32325 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32326( cx, "TestJSImplInterface"
, "receiveNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32326 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32326( cx, "TestJSImplInterface"
, "receiveNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32327
32328 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32329 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32330 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32331 if (objIsXray) {
32332 unwrappedObj.emplace(cx, obj);
32333 }
32334 if (objIsXray) {
32335 // Since our object is an Xray, we can just CheckedUnwrapStatic:
32336 // we know Xrays have no dynamic unwrap behavior.
32337 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
32338 if (!unwrappedObj.ref()) {
32339 return false;
32340 }
32341 }
32342 FastErrorResult rv;
32343 Nullable<OwningCanvasPatternOrCanvasGradient> result;
32344 // NOTE: This assert does NOT call the function.
32345 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableUnion(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32346 MOZ_KnownLive(self)(self)->ReceiveNullableUnion(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32347 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableUnion"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableUnion"
)), 0))
) {
32348 return false;
32349 }
32350 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32350); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32350; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32351 if (result.IsNull()) {
32352 args.rval().setNull();
32353 return true;
32354 }
32355 if (!result.Value().ToJSVal(cx, obj, args.rval())) {
32356 return false;
32357 }
32358 return true;
32359}
32360
32361static const JSJitInfo receiveNullableUnion_methodinfo = {
32362 { (JSJitGetterOp)receiveNullableUnion },
32363 { prototypes::id::TestJSImplInterface },
32364 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32365 JSJitInfo::Method,
32366 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32367 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
32368 false, /* isInfallible. False in setters. */
32369 false, /* isMovable. Not relevant for setters. */
32370 false, /* isEliminatable. Not relevant for setters. */
32371 false, /* isAlwaysInSlot. Only relevant for getters. */
32372 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32373 false, /* isTypedMethod. Only relevant for methods. */
32374 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32375};
32376
32377MOZ_CAN_RUN_SCRIPT static bool
32378receiveNullableUnion2(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32379{
32380 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32383( cx, "TestJSImplInterface"
, "receiveNullableUnion2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32381 "TestJSImplInterface", "receiveNullableUnion2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32383( cx, "TestJSImplInterface"
, "receiveNullableUnion2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32382 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32383( cx, "TestJSImplInterface"
, "receiveNullableUnion2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32383 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32383( cx, "TestJSImplInterface"
, "receiveNullableUnion2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32384
32385 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32386 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32387 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32388 if (objIsXray) {
32389 unwrappedObj.emplace(cx, obj);
32390 }
32391 if (objIsXray) {
32392 // Since our object is an Xray, we can just CheckedUnwrapStatic:
32393 // we know Xrays have no dynamic unwrap behavior.
32394 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
32395 if (!unwrappedObj.ref()) {
32396 return false;
32397 }
32398 }
32399 FastErrorResult rv;
32400 NullableRootedUnion<OwningObjectOrLong> result(cx);
32401 // NOTE: This assert does NOT call the function.
32402 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableUnion2(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32403 MOZ_KnownLive(self)(self)->ReceiveNullableUnion2(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32404 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableUnion2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableUnion2"
)), 0))
) {
32405 return false;
32406 }
32407 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32407); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32407; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32408 if (result.IsNull()) {
32409 args.rval().setNull();
32410 return true;
32411 }
32412 if (!result.Value().ToJSVal(cx, obj, args.rval())) {
32413 return false;
32414 }
32415 return true;
32416}
32417
32418static const JSJitInfo receiveNullableUnion2_methodinfo = {
32419 { (JSJitGetterOp)receiveNullableUnion2 },
32420 { prototypes::id::TestJSImplInterface },
32421 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32422 JSJitInfo::Method,
32423 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32424 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
32425 false, /* isInfallible. False in setters. */
32426 false, /* isMovable. Not relevant for setters. */
32427 false, /* isEliminatable. Not relevant for setters. */
32428 false, /* isAlwaysInSlot. Only relevant for getters. */
32429 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32430 false, /* isTypedMethod. Only relevant for methods. */
32431 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32432};
32433
32434MOZ_CAN_RUN_SCRIPT static bool
32435get_writableUnion(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
32436{
32437 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32440( cx, "TestJSImplInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32438 "TestJSImplInterface", "writableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32440( cx, "TestJSImplInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32439 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject32440( cx, "TestJSImplInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32440 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32440( cx, "TestJSImplInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32441
32442 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32443 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32444 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32445 if (objIsXray) {
32446 unwrappedObj.emplace(cx, obj);
32447 }
32448 if (objIsXray) {
32449 // Since our object is an Xray, we can just CheckedUnwrapStatic:
32450 // we know Xrays have no dynamic unwrap behavior.
32451 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
32452 if (!unwrappedObj.ref()) {
32453 return false;
32454 }
32455 }
32456 FastErrorResult rv;
32457 OwningCanvasPatternOrCanvasGradient result;
32458 // NOTE: This assert does NOT call the function.
32459 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetWritableUnion(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32460 MOZ_KnownLive(self)(self)->GetWritableUnion(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32461 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnion getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnion getter"
)), 0))
) {
32462 return false;
32463 }
32464 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32464); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32464; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32465 if (!result.ToJSVal(cx, obj, args.rval())) {
32466 return false;
32467 }
32468 return true;
32469}
32470
32471MOZ_CAN_RUN_SCRIPT static bool
32472set_writableUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
32473{
32474 BindingCallContext cx(cx_, "TestJSImplInterface.writableUnion setter");
32475 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32478( cx, "TestJSImplInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32476 "TestJSImplInterface", "writableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32478( cx, "TestJSImplInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32477 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject32478( cx, "TestJSImplInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32478 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32478( cx, "TestJSImplInterface"
, "writableUnion", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32479
32480 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32481 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32482 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32483 if (objIsXray) {
32484 unwrappedObj.emplace(cx, obj);
32485 }
32486 CanvasPatternOrCanvasGradient arg0;
32487 if (!arg0.Init(cx, args[0], "Value being assigned", true)) {
32488 return false;
32489 }
32490 if (objIsXray) {
32491 // Since our object is an Xray, we can just CheckedUnwrapStatic:
32492 // we know Xrays have no dynamic unwrap behavior.
32493 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
32494 if (!unwrappedObj.ref()) {
32495 return false;
32496 }
32497 }
32498 FastErrorResult rv;
32499 // NOTE: This assert does NOT call the function.
32500 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32501 MOZ_KnownLive(self)(self)->SetWritableUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32502 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnion setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnion setter"
)), 0))
) {
32503 return false;
32504 }
32505 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32505); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32505; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32506
32507 return true;
32508}
32509
32510static const JSJitInfo writableUnion_getterinfo = {
32511 { get_writableUnion },
32512 { prototypes::id::TestJSImplInterface },
32513 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32514 JSJitInfo::Getter,
32515 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32516 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
32517 false, /* isInfallible. False in setters. */
32518 false, /* isMovable. Not relevant for setters. */
32519 false, /* isEliminatable. Not relevant for setters. */
32520 false, /* isAlwaysInSlot. Only relevant for getters. */
32521 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32522 false, /* isTypedMethod. Only relevant for methods. */
32523 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32524};
32525static const JSJitInfo writableUnion_setterinfo = {
32526 { (JSJitGetterOp)set_writableUnion },
32527 { prototypes::id::TestJSImplInterface },
32528 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32529 JSJitInfo::Setter,
32530 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32531 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32532 false, /* isInfallible. False in setters. */
32533 false, /* isMovable. Not relevant for setters. */
32534 false, /* isEliminatable. Not relevant for setters. */
32535 false, /* isAlwaysInSlot. Only relevant for getters. */
32536 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32537 false, /* isTypedMethod. Only relevant for methods. */
32538 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32539};
32540
32541MOZ_CAN_RUN_SCRIPT static bool
32542get_writableUnionContainingNull(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
32543{
32544 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32547( cx, "TestJSImplInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32545 "TestJSImplInterface", "writableUnionContainingNull", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32547( cx, "TestJSImplInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32546 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject32547( cx, "TestJSImplInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32547 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32547( cx, "TestJSImplInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
32548
32549 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32550 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32551 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32552 if (objIsXray) {
32553 unwrappedObj.emplace(cx, obj);
32554 }
32555 if (objIsXray) {
32556 // Since our object is an Xray, we can just CheckedUnwrapStatic:
32557 // we know Xrays have no dynamic unwrap behavior.
32558 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
32559 if (!unwrappedObj.ref()) {
32560 return false;
32561 }
32562 }
32563 FastErrorResult rv;
32564 OwningCanvasPatternOrNullOrCanvasGradient result;
32565 // NOTE: This assert does NOT call the function.
32566 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetWritableUnionContainingNull(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32567 MOZ_KnownLive(self)(self)->GetWritableUnionContainingNull(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32568 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnionContainingNull getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnionContainingNull getter"
)), 0))
) {
32569 return false;
32570 }
32571 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32571); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32571; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32572 if (!result.ToJSVal(cx, obj, args.rval())) {
32573 return false;
32574 }
32575 return true;
32576}
32577
32578MOZ_CAN_RUN_SCRIPT static bool
32579set_writableUnionContainingNull(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
32580{
32581 BindingCallContext cx(cx_, "TestJSImplInterface.writableUnionContainingNull setter");
32582 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32585( cx, "TestJSImplInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32583 "TestJSImplInterface", "writableUnionContainingNull", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32585( cx, "TestJSImplInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32584 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject32585( cx, "TestJSImplInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
32585 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32585( cx, "TestJSImplInterface"
, "writableUnionContainingNull", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
32586
32587 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32588 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32589 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32590 if (objIsXray) {
32591 unwrappedObj.emplace(cx, obj);
32592 }
32593 CanvasPatternOrNullOrCanvasGradient arg0;
32594 if (!arg0.Init(cx, args[0], "Value being assigned", true)) {
32595 return false;
32596 }
32597 if (objIsXray) {
32598 // Since our object is an Xray, we can just CheckedUnwrapStatic:
32599 // we know Xrays have no dynamic unwrap behavior.
32600 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
32601 if (!unwrappedObj.ref()) {
32602 return false;
32603 }
32604 }
32605 FastErrorResult rv;
32606 // NOTE: This assert does NOT call the function.
32607 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableUnionContainingNull(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32608 MOZ_KnownLive(self)(self)->SetWritableUnionContainingNull(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32609 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnionContainingNull setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableUnionContainingNull setter"
)), 0))
) {
32610 return false;
32611 }
32612 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32612); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32612; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32613
32614 return true;
32615}
32616
32617static const JSJitInfo writableUnionContainingNull_getterinfo = {
32618 { get_writableUnionContainingNull },
32619 { prototypes::id::TestJSImplInterface },
32620 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32621 JSJitInfo::Getter,
32622 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32623 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
32624 false, /* isInfallible. False in setters. */
32625 false, /* isMovable. Not relevant for setters. */
32626 false, /* isEliminatable. Not relevant for setters. */
32627 false, /* isAlwaysInSlot. Only relevant for getters. */
32628 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32629 false, /* isTypedMethod. Only relevant for methods. */
32630 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32631};
32632static const JSJitInfo writableUnionContainingNull_setterinfo = {
32633 { (JSJitGetterOp)set_writableUnionContainingNull },
32634 { prototypes::id::TestJSImplInterface },
32635 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32636 JSJitInfo::Setter,
32637 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32638 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32639 false, /* isInfallible. False in setters. */
32640 false, /* isMovable. Not relevant for setters. */
32641 false, /* isEliminatable. Not relevant for setters. */
32642 false, /* isAlwaysInSlot. Only relevant for getters. */
32643 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32644 false, /* isTypedMethod. Only relevant for methods. */
32645 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32646};
32647
32648MOZ_CAN_RUN_SCRIPT static bool
32649get_writableNullableUnion(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
32650{
32651 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32654( cx, "TestJSImplInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32652 "TestJSImplInterface", "writableNullableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32654( cx, "TestJSImplInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32653 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject32654( cx, "TestJSImplInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32654 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32654( cx, "TestJSImplInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32655
32656 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32657 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32658 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32659 if (objIsXray) {
32660 unwrappedObj.emplace(cx, obj);
32661 }
32662 if (objIsXray) {
32663 // Since our object is an Xray, we can just CheckedUnwrapStatic:
32664 // we know Xrays have no dynamic unwrap behavior.
32665 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
32666 if (!unwrappedObj.ref()) {
32667 return false;
32668 }
32669 }
32670 FastErrorResult rv;
32671 Nullable<OwningCanvasPatternOrCanvasGradient> result;
32672 // NOTE: This assert does NOT call the function.
32673 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetWritableNullableUnion(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32674 MOZ_KnownLive(self)(self)->GetWritableNullableUnion(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32675 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableUnion getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableUnion getter"
)), 0))
) {
32676 return false;
32677 }
32678 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32678); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32678; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32679 if (result.IsNull()) {
32680 args.rval().setNull();
32681 return true;
32682 }
32683 if (!result.Value().ToJSVal(cx, obj, args.rval())) {
32684 return false;
32685 }
32686 return true;
32687}
32688
32689MOZ_CAN_RUN_SCRIPT static bool
32690set_writableNullableUnion(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
32691{
32692 BindingCallContext cx(cx_, "TestJSImplInterface.writableNullableUnion setter");
32693 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32696( cx, "TestJSImplInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32694 "TestJSImplInterface", "writableNullableUnion", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32696( cx, "TestJSImplInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32695 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject32696( cx, "TestJSImplInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32696 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32696( cx, "TestJSImplInterface"
, "writableNullableUnion", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32697
32698 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32699 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32700 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32701 if (objIsXray) {
32702 unwrappedObj.emplace(cx, obj);
32703 }
32704 Nullable<CanvasPatternOrCanvasGradient > arg0;
32705 if (args[0].isNullOrUndefined()) {
32706 arg0.SetNull();
32707 } else {
32708 if (!arg0.SetValue().Init(cx, args[0], "Value being assigned", true)) {
32709 return false;
32710 }
32711 }
32712 if (objIsXray) {
32713 // Since our object is an Xray, we can just CheckedUnwrapStatic:
32714 // we know Xrays have no dynamic unwrap behavior.
32715 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
32716 if (!unwrappedObj.ref()) {
32717 return false;
32718 }
32719 }
32720 FastErrorResult rv;
32721 // NOTE: This assert does NOT call the function.
32722 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetWritableNullableUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32723 MOZ_KnownLive(self)(self)->SetWritableNullableUnion(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32724 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableUnion setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.writableNullableUnion setter"
)), 0))
) {
32725 return false;
32726 }
32727 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32727); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32727; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32728
32729 return true;
32730}
32731
32732static const JSJitInfo writableNullableUnion_getterinfo = {
32733 { get_writableNullableUnion },
32734 { prototypes::id::TestJSImplInterface },
32735 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32736 JSJitInfo::Getter,
32737 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32738 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
32739 false, /* isInfallible. False in setters. */
32740 false, /* isMovable. Not relevant for setters. */
32741 false, /* isEliminatable. Not relevant for setters. */
32742 false, /* isAlwaysInSlot. Only relevant for getters. */
32743 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32744 false, /* isTypedMethod. Only relevant for methods. */
32745 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32746};
32747static const JSJitInfo writableNullableUnion_setterinfo = {
32748 { (JSJitGetterOp)set_writableNullableUnion },
32749 { prototypes::id::TestJSImplInterface },
32750 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32751 JSJitInfo::Setter,
32752 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32753 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32754 false, /* isInfallible. False in setters. */
32755 false, /* isMovable. Not relevant for setters. */
32756 false, /* isEliminatable. Not relevant for setters. */
32757 false, /* isAlwaysInSlot. Only relevant for getters. */
32758 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32759 false, /* isTypedMethod. Only relevant for methods. */
32760 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32761};
32762
32763MOZ_CAN_RUN_SCRIPT static bool
32764passPromise(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32765{
32766 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32769( cx, "TestJSImplInterface"
, "passPromise", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32767 "TestJSImplInterface", "passPromise", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32769( cx, "TestJSImplInterface"
, "passPromise", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32768 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32769( cx, "TestJSImplInterface"
, "passPromise", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32769 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32769( cx, "TestJSImplInterface"
, "passPromise", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32770
32771 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32772 if (!args.requireAtLeast(cx, "TestJSImplInterface.passPromise", 1)) {
32773 return false;
32774 }
32775 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32776 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32777 if (objIsXray) {
32778 unwrappedObj.emplace(cx, obj);
32779 }
32780 OwningNonNull<Promise> arg0;
32781 { // Scope for our GlobalObject, FastErrorResult, JSAutoRealm,
32782 // etc.
32783
32784 JS::Rooted<JSObject*> globalObj(cx);
32785 globalObj = JS::CurrentGlobalOrNull(cx);
32786 JSAutoRealm ar(cx, globalObj);
32787 GlobalObject promiseGlobal(cx, globalObj);
32788 if (promiseGlobal.Failed()) {
32789 return false;
32790 }
32791
32792 JS::Rooted<JS::Value> valueToResolve(cx, args[0]);
32793 if (!JS_WrapValue(cx, &valueToResolve)) {
32794 return false;
32795 }
32796 binding_detail::FastErrorResult promiseRv;
32797 nsCOMPtr<nsIGlobalObject> global =
32798 do_QueryInterface(promiseGlobal.GetAsSupports());
32799 if (!global) {
32800 promiseRv.Throw(NS_ERROR_UNEXPECTED);
32801 MOZ_ALWAYS_TRUE(promiseRv.MaybeSetPendingException(cx))do { if ((__builtin_expect(!!(promiseRv.MaybeSetPendingException
(cx)), 1))) { } else { do { static_assert( mozilla::detail::AssertionConditionType
<decltype(false)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("false" " (" "promiseRv.MaybeSetPendingException(cx)"
")", "../TestJSImplGenBinding.cpp", 32801); AnnotateMozCrashReason
("MOZ_DIAGNOSTIC_ASSERT" "(" "false" ") (" "promiseRv.MaybeSetPendingException(cx)"
")"); do { *((volatile int*)__null) = 32801; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); } } while
(false)
;
32802 return false;
32803 }
32804 arg0 = Promise::Resolve(global, cx, valueToResolve,
32805 promiseRv);
32806 if (promiseRv.MaybeSetPendingException(cx)) {
32807 return false;
32808 }
32809 }
32810 if (objIsXray) {
32811 // Since our object is an Xray, we can just CheckedUnwrapStatic:
32812 // we know Xrays have no dynamic unwrap behavior.
32813 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
32814 if (!unwrappedObj.ref()) {
32815 return false;
32816 }
32817 }
32818 FastErrorResult rv;
32819 // NOTE: This assert does NOT call the function.
32820 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassPromise(NonNullHelper(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32821 MOZ_KnownLive(self)(self)->PassPromise(NonNullHelper(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32822 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passPromise"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passPromise"
)), 0))
) {
32823 return false;
32824 }
32825 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32825); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32825; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32826 args.rval().setUndefined();
32827 return true;
32828}
32829
32830static const JSJitInfo passPromise_methodinfo = {
32831 { (JSJitGetterOp)passPromise },
32832 { prototypes::id::TestJSImplInterface },
32833 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32834 JSJitInfo::Method,
32835 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32836 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32837 false, /* isInfallible. False in setters. */
32838 false, /* isMovable. Not relevant for setters. */
32839 false, /* isEliminatable. Not relevant for setters. */
32840 false, /* isAlwaysInSlot. Only relevant for getters. */
32841 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32842 false, /* isTypedMethod. Only relevant for methods. */
32843 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32844};
32845
32846MOZ_CAN_RUN_SCRIPT static bool
32847passOptionalPromise(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32848{
32849 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32852( cx, "TestJSImplInterface"
, "passOptionalPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32850 "TestJSImplInterface", "passOptionalPromise", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32852( cx, "TestJSImplInterface"
, "passOptionalPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32851 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32852( cx, "TestJSImplInterface"
, "passOptionalPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32852 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32852( cx, "TestJSImplInterface"
, "passOptionalPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32853
32854 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32855 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32856 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32857 if (objIsXray) {
32858 unwrappedObj.emplace(cx, obj);
32859 }
32860 Optional<OwningNonNull<Promise>> arg0;
32861 if (args.hasDefined(0)) {
32862 arg0.Construct();
32863 { // Scope for our GlobalObject, FastErrorResult, JSAutoRealm,
32864 // etc.
32865
32866 JS::Rooted<JSObject*> globalObj(cx);
32867 globalObj = JS::CurrentGlobalOrNull(cx);
32868 JSAutoRealm ar(cx, globalObj);
32869 GlobalObject promiseGlobal(cx, globalObj);
32870 if (promiseGlobal.Failed()) {
32871 return false;
32872 }
32873
32874 JS::Rooted<JS::Value> valueToResolve(cx, args[0]);
32875 if (!JS_WrapValue(cx, &valueToResolve)) {
32876 return false;
32877 }
32878 binding_detail::FastErrorResult promiseRv;
32879 nsCOMPtr<nsIGlobalObject> global =
32880 do_QueryInterface(promiseGlobal.GetAsSupports());
32881 if (!global) {
32882 promiseRv.Throw(NS_ERROR_UNEXPECTED);
32883 MOZ_ALWAYS_TRUE(promiseRv.MaybeSetPendingException(cx))do { if ((__builtin_expect(!!(promiseRv.MaybeSetPendingException
(cx)), 1))) { } else { do { static_assert( mozilla::detail::AssertionConditionType
<decltype(false)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("false" " (" "promiseRv.MaybeSetPendingException(cx)"
")", "../TestJSImplGenBinding.cpp", 32883); AnnotateMozCrashReason
("MOZ_DIAGNOSTIC_ASSERT" "(" "false" ") (" "promiseRv.MaybeSetPendingException(cx)"
")"); do { *((volatile int*)__null) = 32883; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); } } while
(false)
;
32884 return false;
32885 }
32886 arg0.Value() = Promise::Resolve(global, cx, valueToResolve,
32887 promiseRv);
32888 if (promiseRv.MaybeSetPendingException(cx)) {
32889 return false;
32890 }
32891 }
32892 }
32893 if (objIsXray) {
32894 // Since our object is an Xray, we can just CheckedUnwrapStatic:
32895 // we know Xrays have no dynamic unwrap behavior.
32896 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
32897 if (!unwrappedObj.ref()) {
32898 return false;
32899 }
32900 }
32901 FastErrorResult rv;
32902 // NOTE: This assert does NOT call the function.
32903 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOptionalPromise(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
32904 MOZ_KnownLive(self)(self)->PassOptionalPromise(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
32905 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalPromise"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOptionalPromise"
)), 0))
) {
32906 return false;
32907 }
32908 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 32908); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 32908; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
32909 args.rval().setUndefined();
32910 return true;
32911}
32912
32913static const JSJitInfo passOptionalPromise_methodinfo = {
32914 { (JSJitGetterOp)passOptionalPromise },
32915 { prototypes::id::TestJSImplInterface },
32916 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
32917 JSJitInfo::Method,
32918 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
32919 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
32920 false, /* isInfallible. False in setters. */
32921 false, /* isMovable. Not relevant for setters. */
32922 false, /* isEliminatable. Not relevant for setters. */
32923 false, /* isAlwaysInSlot. Only relevant for getters. */
32924 false, /* isLazilyCachedInSlot. Only relevant for getters. */
32925 false, /* isTypedMethod. Only relevant for methods. */
32926 0 /* Reserved slot index, if we're stored in a slot, else 0. */
32927};
32928
32929MOZ_CAN_RUN_SCRIPT static bool
32930passPromiseSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
32931{
32932 BindingCallContext cx(cx_, "TestJSImplInterface.passPromiseSequence");
32933 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject32936( cx, "TestJSImplInterface"
, "passPromiseSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32934 "TestJSImplInterface", "passPromiseSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject32936( cx, "TestJSImplInterface"
, "passPromiseSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32935 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject32936( cx, "TestJSImplInterface"
, "passPromiseSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
32936 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject32936( cx, "TestJSImplInterface"
, "passPromiseSequence", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
32937
32938 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
32939 if (!args.requireAtLeast(cx, "TestJSImplInterface.passPromiseSequence", 1)) {
32940 return false;
32941 }
32942 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
32943 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
32944 if (objIsXray) {
32945 unwrappedObj.emplace(cx, obj);
32946 }
32947 binding_detail::AutoSequence<OwningNonNull<Promise>> arg0;
32948 if (args[0].isObject()) {
32949 JS::ForOfIterator iter(cx);
32950 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
32951 return false;
32952 }
32953 if (!iter.valueIsIterable()) {
32954 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
32955 return false;
32956 }
32957 binding_detail::AutoSequence<OwningNonNull<Promise>> &arr = arg0;
32958 JS::Rooted<JS::Value> temp(cx);
32959 while (true) {
32960 bool done;
32961 if (!iter.next(&temp, &done)) {
32962 return false;
32963 }
32964 if (done) {
32965 break;
32966 }
32967 OwningNonNull<Promise>* slotPtr = arr.AppendElement(mozilla::fallible);
32968 if (!slotPtr) {
32969 JS_ReportOutOfMemory(cx);
32970 return false;
32971 }
32972 OwningNonNull<Promise>& slot = *slotPtr;
32973 { // Scope for our GlobalObject, FastErrorResult, JSAutoRealm,
32974 // etc.
32975
32976 JS::Rooted<JSObject*> globalObj(cx);
32977 globalObj = JS::CurrentGlobalOrNull(cx);
32978 JSAutoRealm ar(cx, globalObj);
32979 GlobalObject promiseGlobal(cx, globalObj);
32980 if (promiseGlobal.Failed()) {
32981 return false;
32982 }
32983
32984 JS::Rooted<JS::Value> valueToResolve(cx, temp);
32985 if (!JS_WrapValue(cx, &valueToResolve)) {
32986 return false;
32987 }
32988 binding_detail::FastErrorResult promiseRv;
32989 nsCOMPtr<nsIGlobalObject> global =
32990 do_QueryInterface(promiseGlobal.GetAsSupports());
32991 if (!global) {
32992 promiseRv.Throw(NS_ERROR_UNEXPECTED);
32993 MOZ_ALWAYS_TRUE(promiseRv.MaybeSetPendingException(cx))do { if ((__builtin_expect(!!(promiseRv.MaybeSetPendingException
(cx)), 1))) { } else { do { static_assert( mozilla::detail::AssertionConditionType
<decltype(false)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("false" " (" "promiseRv.MaybeSetPendingException(cx)"
")", "../TestJSImplGenBinding.cpp", 32993); AnnotateMozCrashReason
("MOZ_DIAGNOSTIC_ASSERT" "(" "false" ") (" "promiseRv.MaybeSetPendingException(cx)"
")"); do { *((volatile int*)__null) = 32993; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); } } while
(false)
;
32994 return false;
32995 }
32996 slot = Promise::Resolve(global, cx, valueToResolve,
32997 promiseRv);
32998 if (promiseRv.MaybeSetPendingException(cx)) {
32999 return false;
33000 }
33001 }
33002 }
33003 } else {
33004 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
33005 return false;
33006 }
33007 if (objIsXray) {
33008 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33009 // we know Xrays have no dynamic unwrap behavior.
33010 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33011 if (!unwrappedObj.ref()) {
33012 return false;
33013 }
33014 }
33015 FastErrorResult rv;
33016 // NOTE: This assert does NOT call the function.
33017 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassPromiseSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
33018 MOZ_KnownLive(self)(self)->PassPromiseSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
33019 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passPromiseSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passPromiseSequence"
)), 0))
) {
33020 return false;
33021 }
33022 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33022); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33022; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33023 args.rval().setUndefined();
33024 return true;
33025}
33026
33027static const JSJitInfo passPromiseSequence_methodinfo = {
33028 { (JSJitGetterOp)passPromiseSequence },
33029 { prototypes::id::TestJSImplInterface },
33030 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
33031 JSJitInfo::Method,
33032 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33033 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33034 false, /* isInfallible. False in setters. */
33035 false, /* isMovable. Not relevant for setters. */
33036 false, /* isEliminatable. Not relevant for setters. */
33037 false, /* isAlwaysInSlot. Only relevant for getters. */
33038 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33039 false, /* isTypedMethod. Only relevant for methods. */
33040 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33041};
33042
33043MOZ_CAN_RUN_SCRIPT static bool
33044receivePromise(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33045{
33046 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33049( cx, "TestJSImplInterface"
, "receivePromise", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33047 "TestJSImplInterface", "receivePromise", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33049( cx, "TestJSImplInterface"
, "receivePromise", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33048 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33049( cx, "TestJSImplInterface"
, "receivePromise", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33049 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33049( cx, "TestJSImplInterface"
, "receivePromise", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33050
33051 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
33052 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33053 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33054 if (objIsXray) {
33055 unwrappedObj.emplace(cx, obj);
33056 }
33057 if (objIsXray) {
33058 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33059 // we know Xrays have no dynamic unwrap behavior.
33060 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33061 if (!unwrappedObj.ref()) {
33062 return false;
33063 }
33064 }
33065 FastErrorResult rv;
33066 auto result(StrongOrRawPtr<Promise>(MOZ_KnownLive(self)(self)->ReceivePromise(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
33067 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receivePromise"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receivePromise"
)), 0))
) {
33068 return false;
33069 }
33070 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33070); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33070; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33071 if (!ToJSValue(cx, result, args.rval())) {
33072 return false;
33073 }
33074 return true;
33075}
33076
33077MOZ_CAN_RUN_SCRIPT static bool
33078receivePromise_promiseWrapper(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33079{
33080 bool ok = receivePromise(cx, obj, void_self, args);
33081 if (ok) {
33082 return true;
33083 }
33084 return ConvertExceptionToPromise(cx, args.rval());
33085}
33086
33087static const JSJitInfo receivePromise_methodinfo = {
33088 { (JSJitGetterOp)receivePromise_promiseWrapper },
33089 { prototypes::id::TestJSImplInterface },
33090 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
33091 JSJitInfo::Method,
33092 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33093 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
33094 false, /* isInfallible. False in setters. */
33095 false, /* isMovable. Not relevant for setters. */
33096 false, /* isEliminatable. Not relevant for setters. */
33097 false, /* isAlwaysInSlot. Only relevant for getters. */
33098 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33099 false, /* isTypedMethod. Only relevant for methods. */
33100 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33101};
33102
33103MOZ_CAN_RUN_SCRIPT static bool
33104receiveAddrefedPromise(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33105{
33106 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33109( cx, "TestJSImplInterface"
, "receiveAddrefedPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33107 "TestJSImplInterface", "receiveAddrefedPromise", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33109( cx, "TestJSImplInterface"
, "receiveAddrefedPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33108 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33109( cx, "TestJSImplInterface"
, "receiveAddrefedPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33109 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33109( cx, "TestJSImplInterface"
, "receiveAddrefedPromise", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33110
33111 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
33112 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33113 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33114 if (objIsXray) {
33115 unwrappedObj.emplace(cx, obj);
33116 }
33117 if (objIsXray) {
33118 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33119 // we know Xrays have no dynamic unwrap behavior.
33120 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33121 if (!unwrappedObj.ref()) {
33122 return false;
33123 }
33124 }
33125 FastErrorResult rv;
33126 auto result(StrongOrRawPtr<Promise>(MOZ_KnownLive(self)(self)->ReceiveAddrefedPromise(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
33127 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveAddrefedPromise"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveAddrefedPromise"
)), 0))
) {
33128 return false;
33129 }
33130 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33130); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33130; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33131 if (!ToJSValue(cx, result, args.rval())) {
33132 return false;
33133 }
33134 return true;
33135}
33136
33137MOZ_CAN_RUN_SCRIPT static bool
33138receiveAddrefedPromise_promiseWrapper(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33139{
33140 bool ok = receiveAddrefedPromise(cx, obj, void_self, args);
33141 if (ok) {
33142 return true;
33143 }
33144 return ConvertExceptionToPromise(cx, args.rval());
33145}
33146
33147static const JSJitInfo receiveAddrefedPromise_methodinfo = {
33148 { (JSJitGetterOp)receiveAddrefedPromise_promiseWrapper },
33149 { prototypes::id::TestJSImplInterface },
33150 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
33151 JSJitInfo::Method,
33152 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33153 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
33154 false, /* isInfallible. False in setters. */
33155 false, /* isMovable. Not relevant for setters. */
33156 false, /* isEliminatable. Not relevant for setters. */
33157 false, /* isAlwaysInSlot. Only relevant for getters. */
33158 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33159 false, /* isTypedMethod. Only relevant for methods. */
33160 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33161};
33162
33163MOZ_CAN_RUN_SCRIPT static bool
33164methodRenamedFrom(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33165{
33166 BindingCallContext cx(cx_, "TestJSImplInterface.methodRenamedFrom");
33167 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33170( cx, "TestJSImplInterface"
, "methodRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33168 "TestJSImplInterface", "methodRenamedFrom", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33170( cx, "TestJSImplInterface"
, "methodRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33169 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33170( cx, "TestJSImplInterface"
, "methodRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33170 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33170( cx, "TestJSImplInterface"
, "methodRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33171
33172 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
33173 unsigned argcount = std::min(args.length(), 1u);
33174 switch (argcount) {
33175 case 0: {
33176 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33177 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33178 if (objIsXray) {
33179 unwrappedObj.emplace(cx, obj);
33180 }
33181 if (objIsXray) {
33182 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33183 // we know Xrays have no dynamic unwrap behavior.
33184 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33185 if (!unwrappedObj.ref()) {
33186 return false;
33187 }
33188 }
33189 FastErrorResult rv;
33190 // NOTE: This assert does NOT call the function.
33191 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->MethodRenamedTo(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
33192 MOZ_KnownLive(self)(self)->MethodRenamedTo(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
33193 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.methodRenamedFrom"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.methodRenamedFrom"
)), 0))
) {
33194 return false;
33195 }
33196 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33196); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33196; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33197 args.rval().setUndefined();
33198 return true;
33199 break;
33200 }
33201 case 1: {
33202 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33203 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33204 if (objIsXray) {
33205 unwrappedObj.emplace(cx, obj);
33206 }
33207 int8_t arg0;
33208 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
33209 return false;
33210 }
33211 if (objIsXray) {
33212 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33213 // we know Xrays have no dynamic unwrap behavior.
33214 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33215 if (!unwrappedObj.ref()) {
33216 return false;
33217 }
33218 }
33219 FastErrorResult rv;
33220 // NOTE: This assert does NOT call the function.
33221 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->MethodRenamedTo(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
33222 MOZ_KnownLive(self)(self)->MethodRenamedTo(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
33223 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.methodRenamedFrom"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.methodRenamedFrom"
)), 0))
) {
33224 return false;
33225 }
33226 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33226); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33226; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33227 args.rval().setUndefined();
33228 return true;
33229 break;
33230 }
33231 default: {
33232 // Using nsPrintfCString here would require including that
33233 // header. Let's not worry about it.
33234 nsAutoCString argCountStr;
33235 argCountStr.AppendPrintf("%u", args.length());
33236 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
33237 }
33238 }
33239 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 33239); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 33239; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
33240 return false;
33241}
33242
33243static const JSJitInfo methodRenamedFrom_methodinfo = {
33244 { (JSJitGetterOp)methodRenamedFrom },
33245 { prototypes::id::TestJSImplInterface },
33246 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
33247 JSJitInfo::Method,
33248 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33249 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33250 false, /* isInfallible. False in setters. */
33251 false, /* isMovable. Not relevant for setters. */
33252 false, /* isEliminatable. Not relevant for setters. */
33253 false, /* isAlwaysInSlot. Only relevant for getters. */
33254 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33255 false, /* isTypedMethod. Only relevant for methods. */
33256 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33257};
33258
33259MOZ_CAN_RUN_SCRIPT static bool
33260get_attributeGetterRenamedFrom(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
33261{
33262 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33265( cx, "TestJSImplInterface"
, "attributeGetterRenamedFrom", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
33263 "TestJSImplInterface", "attributeGetterRenamedFrom", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33265( cx, "TestJSImplInterface"
, "attributeGetterRenamedFrom", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
33264 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject33265( cx, "TestJSImplInterface"
, "attributeGetterRenamedFrom", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
33265 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33265( cx, "TestJSImplInterface"
, "attributeGetterRenamedFrom", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
33266
33267 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
33268 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33269 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33270 if (objIsXray) {
33271 unwrappedObj.emplace(cx, obj);
33272 }
33273 if (objIsXray) {
33274 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33275 // we know Xrays have no dynamic unwrap behavior.
33276 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33277 if (!unwrappedObj.ref()) {
33278 return false;
33279 }
33280 }
33281 FastErrorResult rv;
33282 int8_t result(MOZ_KnownLive(self)(self)->GetAttributeGetterRenamedTo(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
33283 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.attributeGetterRenamedFrom getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.attributeGetterRenamedFrom getter"
)), 0))
) {
33284 return false;
33285 }
33286 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33286); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33286; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33287 args.rval().setInt32(int32_t(result));
33288 return true;
33289}
33290
33291static const JSJitInfo attributeGetterRenamedFrom_getterinfo = {
33292 { get_attributeGetterRenamedFrom },
33293 { prototypes::id::TestJSImplInterface },
33294 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
33295 JSJitInfo::Getter,
33296 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33297 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
33298 false, /* isInfallible. False in setters. */
33299 false, /* isMovable. Not relevant for setters. */
33300 false, /* isEliminatable. Not relevant for setters. */
33301 false, /* isAlwaysInSlot. Only relevant for getters. */
33302 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33303 false, /* isTypedMethod. Only relevant for methods. */
33304 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33305};
33306
33307MOZ_CAN_RUN_SCRIPT static bool
33308get_attributeRenamedFrom(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
33309{
33310 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33313( cx, "TestJSImplInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33311 "TestJSImplInterface", "attributeRenamedFrom", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33313( cx, "TestJSImplInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33312 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject33313( cx, "TestJSImplInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33313 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33313( cx, "TestJSImplInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33314
33315 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
33316 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33317 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33318 if (objIsXray) {
33319 unwrappedObj.emplace(cx, obj);
33320 }
33321 if (objIsXray) {
33322 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33323 // we know Xrays have no dynamic unwrap behavior.
33324 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33325 if (!unwrappedObj.ref()) {
33326 return false;
33327 }
33328 }
33329 FastErrorResult rv;
33330 int8_t result(MOZ_KnownLive(self)(self)->GetAttributeRenamedTo(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
33331 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.attributeRenamedFrom getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.attributeRenamedFrom getter"
)), 0))
) {
33332 return false;
33333 }
33334 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33334); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33334; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33335 args.rval().setInt32(int32_t(result));
33336 return true;
33337}
33338
33339MOZ_CAN_RUN_SCRIPT static bool
33340set_attributeRenamedFrom(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
33341{
33342 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33345( cx, "TestJSImplInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33343 "TestJSImplInterface", "attributeRenamedFrom", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33345( cx, "TestJSImplInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33344 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject33345( cx, "TestJSImplInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33345 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33345( cx, "TestJSImplInterface"
, "attributeRenamedFrom", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33346
33347 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
33348 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33349 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33350 if (objIsXray) {
33351 unwrappedObj.emplace(cx, obj);
33352 }
33353 int8_t arg0;
33354 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
33355 return false;
33356 }
33357 if (objIsXray) {
33358 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33359 // we know Xrays have no dynamic unwrap behavior.
33360 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33361 if (!unwrappedObj.ref()) {
33362 return false;
33363 }
33364 }
33365 FastErrorResult rv;
33366 // NOTE: This assert does NOT call the function.
33367 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetAttributeRenamedTo(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
33368 MOZ_KnownLive(self)(self)->SetAttributeRenamedTo(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
33369 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.attributeRenamedFrom setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.attributeRenamedFrom setter"
)), 0))
) {
33370 return false;
33371 }
33372 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33372); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33372; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33373
33374 return true;
33375}
33376
33377static const JSJitInfo attributeRenamedFrom_getterinfo = {
33378 { get_attributeRenamedFrom },
33379 { prototypes::id::TestJSImplInterface },
33380 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
33381 JSJitInfo::Getter,
33382 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33383 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
33384 false, /* isInfallible. False in setters. */
33385 false, /* isMovable. Not relevant for setters. */
33386 false, /* isEliminatable. Not relevant for setters. */
33387 false, /* isAlwaysInSlot. Only relevant for getters. */
33388 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33389 false, /* isTypedMethod. Only relevant for methods. */
33390 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33391};
33392static const JSJitInfo attributeRenamedFrom_setterinfo = {
33393 { (JSJitGetterOp)set_attributeRenamedFrom },
33394 { prototypes::id::TestJSImplInterface },
33395 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
33396 JSJitInfo::Setter,
33397 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33398 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33399 false, /* isInfallible. False in setters. */
33400 false, /* isMovable. Not relevant for setters. */
33401 false, /* isEliminatable. Not relevant for setters. */
33402 false, /* isAlwaysInSlot. Only relevant for getters. */
33403 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33404 false, /* isTypedMethod. Only relevant for methods. */
33405 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33406};
33407
33408MOZ_CAN_RUN_SCRIPT static bool
33409passDictionary(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33410{
33411 BindingCallContext cx(cx_, "TestJSImplInterface.passDictionary");
33412 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33415( cx, "TestJSImplInterface"
, "passDictionary", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33413 "TestJSImplInterface", "passDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33415( cx, "TestJSImplInterface"
, "passDictionary", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33414 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33415( cx, "TestJSImplInterface"
, "passDictionary", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33415 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33415( cx, "TestJSImplInterface"
, "passDictionary", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33416
33417 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
33418 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33419 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33420 if (objIsXray) {
33421 unwrappedObj.emplace(cx, obj);
33422 }
33423 RootedDictionary<binding_detail::FastDict> arg0(cx);
33424 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", true)) {
33425 return false;
33426 }
33427 if (objIsXray) {
33428 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33429 // we know Xrays have no dynamic unwrap behavior.
33430 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33431 if (!unwrappedObj.ref()) {
33432 return false;
33433 }
33434 }
33435 FastErrorResult rv;
33436 // NOTE: This assert does NOT call the function.
33437 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictionary(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
33438 MOZ_KnownLive(self)(self)->PassDictionary(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
33439 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictionary"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictionary"
)), 0))
) {
33440 return false;
33441 }
33442 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33442); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33442; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33443 args.rval().setUndefined();
33444 return true;
33445}
33446
33447static const JSJitInfo passDictionary_methodinfo = {
33448 { (JSJitGetterOp)passDictionary },
33449 { prototypes::id::TestJSImplInterface },
33450 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
33451 JSJitInfo::Method,
33452 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33453 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33454 false, /* isInfallible. False in setters. */
33455 false, /* isMovable. Not relevant for setters. */
33456 false, /* isEliminatable. Not relevant for setters. */
33457 false, /* isAlwaysInSlot. Only relevant for getters. */
33458 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33459 false, /* isTypedMethod. Only relevant for methods. */
33460 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33461};
33462
33463MOZ_CAN_RUN_SCRIPT static bool
33464passDictionary2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33465{
33466 BindingCallContext cx(cx_, "TestJSImplInterface.passDictionary2");
33467 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33470( cx, "TestJSImplInterface"
, "passDictionary2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33468 "TestJSImplInterface", "passDictionary2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33470( cx, "TestJSImplInterface"
, "passDictionary2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33469 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33470( cx, "TestJSImplInterface"
, "passDictionary2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33470 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33470( cx, "TestJSImplInterface"
, "passDictionary2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33471
33472 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
33473 if (!args.requireAtLeast(cx, "TestJSImplInterface.passDictionary2", 1)) {
33474 return false;
33475 }
33476 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33477 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33478 if (objIsXray) {
33479 unwrappedObj.emplace(cx, obj);
33480 }
33481 RootedDictionary<binding_detail::FastDict> arg0(cx);
33482 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
33483 return false;
33484 }
33485 if (objIsXray) {
33486 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33487 // we know Xrays have no dynamic unwrap behavior.
33488 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33489 if (!unwrappedObj.ref()) {
33490 return false;
33491 }
33492 }
33493 FastErrorResult rv;
33494 // NOTE: This assert does NOT call the function.
33495 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictionary2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
33496 MOZ_KnownLive(self)(self)->PassDictionary2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
33497 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictionary2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictionary2"
)), 0))
) {
33498 return false;
33499 }
33500 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33500); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33500; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33501 args.rval().setUndefined();
33502 return true;
33503}
33504
33505static const JSJitInfo passDictionary2_methodinfo = {
33506 { (JSJitGetterOp)passDictionary2 },
33507 { prototypes::id::TestJSImplInterface },
33508 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
33509 JSJitInfo::Method,
33510 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33511 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33512 false, /* isInfallible. False in setters. */
33513 false, /* isMovable. Not relevant for setters. */
33514 false, /* isEliminatable. Not relevant for setters. */
33515 false, /* isAlwaysInSlot. Only relevant for getters. */
33516 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33517 false, /* isTypedMethod. Only relevant for methods. */
33518 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33519};
33520
33521MOZ_CAN_RUN_SCRIPT static bool
33522receiveDictionary(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33523{
33524 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33527( cx, "TestJSImplInterface"
, "receiveDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33525 "TestJSImplInterface", "receiveDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33527( cx, "TestJSImplInterface"
, "receiveDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33526 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33527( cx, "TestJSImplInterface"
, "receiveDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33527 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33527( cx, "TestJSImplInterface"
, "receiveDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33528
33529 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
33530 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33531 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33532 if (objIsXray) {
33533 unwrappedObj.emplace(cx, obj);
33534 }
33535 if (objIsXray) {
33536 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33537 // we know Xrays have no dynamic unwrap behavior.
33538 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33539 if (!unwrappedObj.ref()) {
33540 return false;
33541 }
33542 }
33543 FastErrorResult rv;
33544 RootedDictionary<Dict> result(cx);
33545 // NOTE: This assert does NOT call the function.
33546 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveDictionary(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
33547 MOZ_KnownLive(self)(self)->ReceiveDictionary(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
33548 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveDictionary"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveDictionary"
)), 0))
) {
33549 return false;
33550 }
33551 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33551); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33551; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33552 if (!result.ToObjectInternal(cx, args.rval())) {
33553 return false;
33554 }
33555 return true;
33556}
33557
33558static const JSJitInfo receiveDictionary_methodinfo = {
33559 { (JSJitGetterOp)receiveDictionary },
33560 { prototypes::id::TestJSImplInterface },
33561 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
33562 JSJitInfo::Method,
33563 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33564 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
33565 false, /* isInfallible. False in setters. */
33566 false, /* isMovable. Not relevant for setters. */
33567 false, /* isEliminatable. Not relevant for setters. */
33568 false, /* isAlwaysInSlot. Only relevant for getters. */
33569 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33570 false, /* isTypedMethod. Only relevant for methods. */
33571 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33572};
33573
33574MOZ_CAN_RUN_SCRIPT static bool
33575receiveNullableDictionary(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33576{
33577 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33580( cx, "TestJSImplInterface"
, "receiveNullableDictionary", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
33578 "TestJSImplInterface", "receiveNullableDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33580( cx, "TestJSImplInterface"
, "receiveNullableDictionary", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
33579 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33580( cx, "TestJSImplInterface"
, "receiveNullableDictionary", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
33580 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33580( cx, "TestJSImplInterface"
, "receiveNullableDictionary", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
33581
33582 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
33583 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33584 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33585 if (objIsXray) {
33586 unwrappedObj.emplace(cx, obj);
33587 }
33588 if (objIsXray) {
33589 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33590 // we know Xrays have no dynamic unwrap behavior.
33591 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33592 if (!unwrappedObj.ref()) {
33593 return false;
33594 }
33595 }
33596 FastErrorResult rv;
33597 NullableRootedDictionary<Dict> result(cx);
33598 // NOTE: This assert does NOT call the function.
33599 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveNullableDictionary(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
33600 MOZ_KnownLive(self)(self)->ReceiveNullableDictionary(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
33601 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableDictionary"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveNullableDictionary"
)), 0))
) {
33602 return false;
33603 }
33604 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33604); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33604; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33605 if (result.IsNull()) {
33606 args.rval().setNull();
33607 return true;
33608 }
33609 if (!result.Value().ToObjectInternal(cx, args.rval())) {
33610 return false;
33611 }
33612 return true;
33613}
33614
33615static const JSJitInfo receiveNullableDictionary_methodinfo = {
33616 { (JSJitGetterOp)receiveNullableDictionary },
33617 { prototypes::id::TestJSImplInterface },
33618 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
33619 JSJitInfo::Method,
33620 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33621 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
33622 false, /* isInfallible. False in setters. */
33623 false, /* isMovable. Not relevant for setters. */
33624 false, /* isEliminatable. Not relevant for setters. */
33625 false, /* isAlwaysInSlot. Only relevant for getters. */
33626 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33627 false, /* isTypedMethod. Only relevant for methods. */
33628 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33629};
33630
33631MOZ_CAN_RUN_SCRIPT static bool
33632passOtherDictionary(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33633{
33634 BindingCallContext cx(cx_, "TestJSImplInterface.passOtherDictionary");
33635 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33638( cx, "TestJSImplInterface"
, "passOtherDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33636 "TestJSImplInterface", "passOtherDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33638( cx, "TestJSImplInterface"
, "passOtherDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33637 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33638( cx, "TestJSImplInterface"
, "passOtherDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33638 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33638( cx, "TestJSImplInterface"
, "passOtherDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33639
33640 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
33641 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33642 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33643 if (objIsXray) {
33644 unwrappedObj.emplace(cx, obj);
33645 }
33646 binding_detail::FastGrandparentDict arg0;
33647 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", true)) {
33648 return false;
33649 }
33650 if (objIsXray) {
33651 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33652 // we know Xrays have no dynamic unwrap behavior.
33653 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33654 if (!unwrappedObj.ref()) {
33655 return false;
33656 }
33657 }
33658 FastErrorResult rv;
33659 // NOTE: This assert does NOT call the function.
33660 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassOtherDictionary(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
33661 MOZ_KnownLive(self)(self)->PassOtherDictionary(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
33662 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOtherDictionary"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passOtherDictionary"
)), 0))
) {
33663 return false;
33664 }
33665 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33665); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33665; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33666 args.rval().setUndefined();
33667 return true;
33668}
33669
33670static const JSJitInfo passOtherDictionary_methodinfo = {
33671 { (JSJitGetterOp)passOtherDictionary },
33672 { prototypes::id::TestJSImplInterface },
33673 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
33674 JSJitInfo::Method,
33675 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33676 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33677 false, /* isInfallible. False in setters. */
33678 false, /* isMovable. Not relevant for setters. */
33679 false, /* isEliminatable. Not relevant for setters. */
33680 false, /* isAlwaysInSlot. Only relevant for getters. */
33681 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33682 false, /* isTypedMethod. Only relevant for methods. */
33683 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33684};
33685
33686MOZ_CAN_RUN_SCRIPT static bool
33687passSequenceOfDictionaries(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33688{
33689 BindingCallContext cx(cx_, "TestJSImplInterface.passSequenceOfDictionaries");
33690 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33693( cx, "TestJSImplInterface"
, "passSequenceOfDictionaries", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
33691 "TestJSImplInterface", "passSequenceOfDictionaries", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33693( cx, "TestJSImplInterface"
, "passSequenceOfDictionaries", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
33692 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33693( cx, "TestJSImplInterface"
, "passSequenceOfDictionaries", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
33693 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33693( cx, "TestJSImplInterface"
, "passSequenceOfDictionaries", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
33694
33695 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
33696 if (!args.requireAtLeast(cx, "TestJSImplInterface.passSequenceOfDictionaries", 1)) {
33697 return false;
33698 }
33699 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33700 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33701 if (objIsXray) {
33702 unwrappedObj.emplace(cx, obj);
33703 }
33704 binding_detail::AutoSequence<Dict> arg0;
33705 SequenceRooter<Dict> arg0_holder(cx, &arg0);
33706 if (args[0].isObject()) {
33707 JS::ForOfIterator iter(cx);
33708 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
33709 return false;
33710 }
33711 if (!iter.valueIsIterable()) {
33712 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
33713 return false;
33714 }
33715 binding_detail::AutoSequence<Dict> &arr = arg0;
33716 JS::Rooted<JS::Value> temp(cx);
33717 while (true) {
33718 bool done;
33719 if (!iter.next(&temp, &done)) {
33720 return false;
33721 }
33722 if (done) {
33723 break;
33724 }
33725 Dict* slotPtr = arr.AppendElement(mozilla::fallible);
33726 if (!slotPtr) {
33727 JS_ReportOutOfMemory(cx);
33728 return false;
33729 }
33730 Dict& slot = *slotPtr;
33731 if (!slot.Init(cx, temp, "Element of argument 1", true)) {
33732 return false;
33733 }
33734 }
33735 } else {
33736 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 1", "sequence");
33737 return false;
33738 }
33739 if (objIsXray) {
33740 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33741 // we know Xrays have no dynamic unwrap behavior.
33742 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33743 if (!unwrappedObj.ref()) {
33744 return false;
33745 }
33746 }
33747 FastErrorResult rv;
33748 // NOTE: This assert does NOT call the function.
33749 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassSequenceOfDictionaries(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
33750 MOZ_KnownLive(self)(self)->PassSequenceOfDictionaries(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
33751 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfDictionaries"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passSequenceOfDictionaries"
)), 0))
) {
33752 return false;
33753 }
33754 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33754); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33754; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33755 args.rval().setUndefined();
33756 return true;
33757}
33758
33759static const JSJitInfo passSequenceOfDictionaries_methodinfo = {
33760 { (JSJitGetterOp)passSequenceOfDictionaries },
33761 { prototypes::id::TestJSImplInterface },
33762 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
33763 JSJitInfo::Method,
33764 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33765 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33766 false, /* isInfallible. False in setters. */
33767 false, /* isMovable. Not relevant for setters. */
33768 false, /* isEliminatable. Not relevant for setters. */
33769 false, /* isAlwaysInSlot. Only relevant for getters. */
33770 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33771 false, /* isTypedMethod. Only relevant for methods. */
33772 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33773};
33774
33775MOZ_CAN_RUN_SCRIPT static bool
33776passRecordOfDictionaries(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33777{
33778 BindingCallContext cx(cx_, "TestJSImplInterface.passRecordOfDictionaries");
33779 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33782( cx, "TestJSImplInterface"
, "passRecordOfDictionaries", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
33780 "TestJSImplInterface", "passRecordOfDictionaries", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33782( cx, "TestJSImplInterface"
, "passRecordOfDictionaries", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
33781 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33782( cx, "TestJSImplInterface"
, "passRecordOfDictionaries", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
33782 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33782( cx, "TestJSImplInterface"
, "passRecordOfDictionaries", JS::ProfilingCategoryPair::DOM,
uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
33783
33784 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
33785 if (!args.requireAtLeast(cx, "TestJSImplInterface.passRecordOfDictionaries", 1)) {
33786 return false;
33787 }
33788 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33789 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33790 if (objIsXray) {
33791 unwrappedObj.emplace(cx, obj);
33792 }
33793 Record<nsString, GrandparentDict> arg0;
33794 if (args[0].isObject()) {
33795 auto& recordEntries = arg0.Entries();
33796
33797 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
33798 JS::RootedVector<jsid> ids(cx);
33799 if (!js::GetPropertyKeys(cx, recordObj,
33800 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
33801 return false;
33802 }
33803 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
33804 JS_ReportOutOfMemory(cx);
33805 return false;
33806 }
33807 JS::Rooted<JS::Value> propNameValue(cx);
33808 JS::Rooted<JS::Value> temp(cx);
33809 JS::Rooted<jsid> curId(cx);
33810 JS::Rooted<JS::Value> idVal(cx);
33811 // Use a hashset to keep track of ids seen, to avoid
33812 // introducing nasty O(N^2) behavior scanning for them all the
33813 // time. Ideally we'd use a data structure with O(1) lookup
33814 // _and_ ordering for the MozMap, but we don't have one lying
33815 // around.
33816 nsTHashtable<nsStringHashKey> idsSeen;
33817 for (size_t i = 0; i < ids.length(); ++i) {
33818 curId = ids[i];
33819
33820 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
33821 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
33822 &desc)) {
33823 return false;
33824 }
33825
33826 if (desc.isNothing() || !desc->enumerable()) {
33827 continue;
33828 }
33829
33830 idVal = js::IdToValue(curId);
33831 nsString propName;
33832 // This will just throw if idVal is a Symbol, like the spec says
33833 // to do.
33834 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
33835 return false;
33836 }
33837
33838 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
33839 return false;
33840 }
33841
33842 Record<nsString, GrandparentDict>::EntryType* entry;
33843 if (!idsSeen.EnsureInserted(propName)) {
33844 // Find the existing entry.
33845 auto idx = recordEntries.IndexOf(propName);
33846 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 33847); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 33847; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
33847 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 33847); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 33847; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
33848 // Now blow it away to make it look like it was just added
33849 // to the array, because it's not obvious that it's
33850 // safe to write to its already-initialized mValue via our
33851 // normal codegen conversions. For example, the value
33852 // could be a union and this would change its type, but
33853 // codegen assumes we won't do that.
33854 entry = recordEntries.ReconstructElementAt(idx);
33855 } else {
33856 // Safe to do an infallible append here, because we did a
33857 // SetCapacity above to the right capacity.
33858 entry = recordEntries.AppendElement();
33859 }
33860 entry->mKey = propName;
33861 GrandparentDict& slot = entry->mValue;
33862 if (!slot.Init(cx, temp, "Value in argument 1", true)) {
33863 return false;
33864 }
33865 }
33866 } else {
33867 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
33868 return false;
33869 }
33870 if (objIsXray) {
33871 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33872 // we know Xrays have no dynamic unwrap behavior.
33873 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33874 if (!unwrappedObj.ref()) {
33875 return false;
33876 }
33877 }
33878 FastErrorResult rv;
33879 // NOTE: This assert does NOT call the function.
33880 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRecordOfDictionaries(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
33881 MOZ_KnownLive(self)(self)->PassRecordOfDictionaries(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
33882 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfDictionaries"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRecordOfDictionaries"
)), 0))
) {
33883 return false;
33884 }
33885 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33885); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33885; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33886 args.rval().setUndefined();
33887 return true;
33888}
33889
33890static const JSJitInfo passRecordOfDictionaries_methodinfo = {
33891 { (JSJitGetterOp)passRecordOfDictionaries },
33892 { prototypes::id::TestJSImplInterface },
33893 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
33894 JSJitInfo::Method,
33895 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
33896 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
33897 false, /* isInfallible. False in setters. */
33898 false, /* isMovable. Not relevant for setters. */
33899 false, /* isEliminatable. Not relevant for setters. */
33900 false, /* isAlwaysInSlot. Only relevant for getters. */
33901 false, /* isLazilyCachedInSlot. Only relevant for getters. */
33902 false, /* isTypedMethod. Only relevant for methods. */
33903 0 /* Reserved slot index, if we're stored in a slot, else 0. */
33904};
33905
33906MOZ_CAN_RUN_SCRIPT static bool
33907passDictionaryOrLong(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
33908{
33909 BindingCallContext cx(cx_, "TestJSImplInterface.passDictionaryOrLong");
33910 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject33913( cx, "TestJSImplInterface"
, "passDictionaryOrLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33911 "TestJSImplInterface", "passDictionaryOrLong", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject33913( cx, "TestJSImplInterface"
, "passDictionaryOrLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33912 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject33913( cx, "TestJSImplInterface"
, "passDictionaryOrLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
33913 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject33913( cx, "TestJSImplInterface"
, "passDictionaryOrLong", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
33914
33915 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
33916 unsigned argcount = std::min(args.length(), 1u);
33917 switch (argcount) {
33918 case 0: {
33919 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33920 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33921 if (objIsXray) {
33922 unwrappedObj.emplace(cx, obj);
33923 }
33924 RootedDictionary<binding_detail::FastDict> arg0(cx);
33925 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", true)) {
33926 return false;
33927 }
33928 if (objIsXray) {
33929 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33930 // we know Xrays have no dynamic unwrap behavior.
33931 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33932 if (!unwrappedObj.ref()) {
33933 return false;
33934 }
33935 }
33936 FastErrorResult rv;
33937 // NOTE: This assert does NOT call the function.
33938 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictionaryOrLong(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
33939 MOZ_KnownLive(self)(self)->PassDictionaryOrLong(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
33940 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictionaryOrLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictionaryOrLong"
)), 0))
) {
33941 return false;
33942 }
33943 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33943); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33943; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33944 args.rval().setUndefined();
33945 return true;
33946 break;
33947 }
33948 case 1: {
33949 if (args[0].isNullOrUndefined()) {
33950 RootedDictionary<binding_detail::FastDict> arg0(cx);
33951 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
33952 return false;
33953 }
33954 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33955 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33956 if (objIsXray) {
33957 unwrappedObj.emplace(cx, obj);
33958 }
33959 if (objIsXray) {
33960 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33961 // we know Xrays have no dynamic unwrap behavior.
33962 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33963 if (!unwrappedObj.ref()) {
33964 return false;
33965 }
33966 }
33967 FastErrorResult rv;
33968 // NOTE: This assert does NOT call the function.
33969 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictionaryOrLong(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
33970 MOZ_KnownLive(self)(self)->PassDictionaryOrLong(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
33971 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictionaryOrLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictionaryOrLong"
)), 0))
) {
33972 return false;
33973 }
33974 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 33974); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 33974; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
33975 args.rval().setUndefined();
33976 return true;
33977 }
33978 if (args[0].isObject()) {
33979 do {
33980 RootedDictionary<binding_detail::FastDict> arg0(cx);
33981 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
33982 return false;
33983 }
33984 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
33985 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
33986 if (objIsXray) {
33987 unwrappedObj.emplace(cx, obj);
33988 }
33989 if (objIsXray) {
33990 // Since our object is an Xray, we can just CheckedUnwrapStatic:
33991 // we know Xrays have no dynamic unwrap behavior.
33992 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
33993 if (!unwrappedObj.ref()) {
33994 return false;
33995 }
33996 }
33997 FastErrorResult rv;
33998 // NOTE: This assert does NOT call the function.
33999 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictionaryOrLong(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34000 MOZ_KnownLive(self)(self)->PassDictionaryOrLong(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34001 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictionaryOrLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictionaryOrLong"
)), 0))
) {
34002 return false;
34003 }
34004 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34004); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34004; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34005 args.rval().setUndefined();
34006 return true;
34007 } while (false);
34008 }
34009 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34010 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34011 if (objIsXray) {
34012 unwrappedObj.emplace(cx, obj);
34013 }
34014 int32_t arg0;
34015 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
34016 return false;
34017 }
34018 if (objIsXray) {
34019 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34020 // we know Xrays have no dynamic unwrap behavior.
34021 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34022 if (!unwrappedObj.ref()) {
34023 return false;
34024 }
34025 }
34026 FastErrorResult rv;
34027 // NOTE: This assert does NOT call the function.
34028 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictionaryOrLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34029 MOZ_KnownLive(self)(self)->PassDictionaryOrLong(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34030 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictionaryOrLong"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictionaryOrLong"
)), 0))
) {
34031 return false;
34032 }
34033 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34033); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34033; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34034 args.rval().setUndefined();
34035 return true;
34036 break;
34037 }
34038 default: {
34039 // Using nsPrintfCString here would require including that
34040 // header. Let's not worry about it.
34041 nsAutoCString argCountStr;
34042 argCountStr.AppendPrintf("%u", args.length());
34043 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
34044 }
34045 }
34046 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 34046); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 34046; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
34047 return false;
34048}
34049
34050static const JSJitInfo passDictionaryOrLong_methodinfo = {
34051 { (JSJitGetterOp)passDictionaryOrLong },
34052 { prototypes::id::TestJSImplInterface },
34053 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34054 JSJitInfo::Method,
34055 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34056 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34057 false, /* isInfallible. False in setters. */
34058 false, /* isMovable. Not relevant for setters. */
34059 false, /* isEliminatable. Not relevant for setters. */
34060 false, /* isAlwaysInSlot. Only relevant for getters. */
34061 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34062 false, /* isTypedMethod. Only relevant for methods. */
34063 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34064};
34065
34066MOZ_CAN_RUN_SCRIPT static bool
34067passDictContainingDict(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34068{
34069 BindingCallContext cx(cx_, "TestJSImplInterface.passDictContainingDict");
34070 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34073( cx, "TestJSImplInterface"
, "passDictContainingDict", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34071 "TestJSImplInterface", "passDictContainingDict", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34073( cx, "TestJSImplInterface"
, "passDictContainingDict", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34072 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34073( cx, "TestJSImplInterface"
, "passDictContainingDict", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34073 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34073( cx, "TestJSImplInterface"
, "passDictContainingDict", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34074
34075 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34076 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34077 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34078 if (objIsXray) {
34079 unwrappedObj.emplace(cx, obj);
34080 }
34081 RootedDictionary<binding_detail::FastDictContainingDict> arg0(cx);
34082 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", true)) {
34083 return false;
34084 }
34085 if (objIsXray) {
34086 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34087 // we know Xrays have no dynamic unwrap behavior.
34088 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34089 if (!unwrappedObj.ref()) {
34090 return false;
34091 }
34092 }
34093 FastErrorResult rv;
34094 // NOTE: This assert does NOT call the function.
34095 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictContainingDict(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34096 MOZ_KnownLive(self)(self)->PassDictContainingDict(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34097 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictContainingDict"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictContainingDict"
)), 0))
) {
34098 return false;
34099 }
34100 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34100); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34100; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34101 args.rval().setUndefined();
34102 return true;
34103}
34104
34105static const JSJitInfo passDictContainingDict_methodinfo = {
34106 { (JSJitGetterOp)passDictContainingDict },
34107 { prototypes::id::TestJSImplInterface },
34108 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34109 JSJitInfo::Method,
34110 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34111 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34112 false, /* isInfallible. False in setters. */
34113 false, /* isMovable. Not relevant for setters. */
34114 false, /* isEliminatable. Not relevant for setters. */
34115 false, /* isAlwaysInSlot. Only relevant for getters. */
34116 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34117 false, /* isTypedMethod. Only relevant for methods. */
34118 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34119};
34120
34121MOZ_CAN_RUN_SCRIPT static bool
34122passDictContainingSequence(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34123{
34124 BindingCallContext cx(cx_, "TestJSImplInterface.passDictContainingSequence");
34125 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34128( cx, "TestJSImplInterface"
, "passDictContainingSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
34126 "TestJSImplInterface", "passDictContainingSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34128( cx, "TestJSImplInterface"
, "passDictContainingSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
34127 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34128( cx, "TestJSImplInterface"
, "passDictContainingSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
34128 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34128( cx, "TestJSImplInterface"
, "passDictContainingSequence", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
34129
34130 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34131 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34132 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34133 if (objIsXray) {
34134 unwrappedObj.emplace(cx, obj);
34135 }
34136 RootedDictionary<binding_detail::FastDictContainingSequence> arg0(cx);
34137 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", true)) {
34138 return false;
34139 }
34140 if (objIsXray) {
34141 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34142 // we know Xrays have no dynamic unwrap behavior.
34143 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34144 if (!unwrappedObj.ref()) {
34145 return false;
34146 }
34147 }
34148 FastErrorResult rv;
34149 // NOTE: This assert does NOT call the function.
34150 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassDictContainingSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34151 MOZ_KnownLive(self)(self)->PassDictContainingSequence(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34152 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictContainingSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passDictContainingSequence"
)), 0))
) {
34153 return false;
34154 }
34155 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34155); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34155; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34156 args.rval().setUndefined();
34157 return true;
34158}
34159
34160static const JSJitInfo passDictContainingSequence_methodinfo = {
34161 { (JSJitGetterOp)passDictContainingSequence },
34162 { prototypes::id::TestJSImplInterface },
34163 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34164 JSJitInfo::Method,
34165 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34166 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34167 false, /* isInfallible. False in setters. */
34168 false, /* isMovable. Not relevant for setters. */
34169 false, /* isEliminatable. Not relevant for setters. */
34170 false, /* isAlwaysInSlot. Only relevant for getters. */
34171 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34172 false, /* isTypedMethod. Only relevant for methods. */
34173 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34174};
34175
34176MOZ_CAN_RUN_SCRIPT static bool
34177receiveDictContainingSequence(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34178{
34179 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34182( cx, "TestJSImplInterface"
, "receiveDictContainingSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
34180 "TestJSImplInterface", "receiveDictContainingSequence", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34182( cx, "TestJSImplInterface"
, "receiveDictContainingSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
34181 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34182( cx, "TestJSImplInterface"
, "receiveDictContainingSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
34182 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34182( cx, "TestJSImplInterface"
, "receiveDictContainingSequence", JS::ProfilingCategoryPair::
DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
34183
34184 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34185 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34186 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34187 if (objIsXray) {
34188 unwrappedObj.emplace(cx, obj);
34189 }
34190 if (objIsXray) {
34191 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34192 // we know Xrays have no dynamic unwrap behavior.
34193 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34194 if (!unwrappedObj.ref()) {
34195 return false;
34196 }
34197 }
34198 FastErrorResult rv;
34199 RootedDictionary<DictContainingSequence> result(cx);
34200 // NOTE: This assert does NOT call the function.
34201 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ReceiveDictContainingSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34202 MOZ_KnownLive(self)(self)->ReceiveDictContainingSequence(result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34203 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveDictContainingSequence"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.receiveDictContainingSequence"
)), 0))
) {
34204 return false;
34205 }
34206 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34206); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34206; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34207 if (!result.ToObjectInternal(cx, args.rval())) {
34208 return false;
34209 }
34210 return true;
34211}
34212
34213static const JSJitInfo receiveDictContainingSequence_methodinfo = {
34214 { (JSJitGetterOp)receiveDictContainingSequence },
34215 { prototypes::id::TestJSImplInterface },
34216 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34217 JSJitInfo::Method,
34218 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34219 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
34220 false, /* isInfallible. False in setters. */
34221 false, /* isMovable. Not relevant for setters. */
34222 false, /* isEliminatable. Not relevant for setters. */
34223 false, /* isAlwaysInSlot. Only relevant for getters. */
34224 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34225 false, /* isTypedMethod. Only relevant for methods. */
34226 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34227};
34228
34229MOZ_CAN_RUN_SCRIPT static bool
34230passVariadicDictionary(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34231{
34232 BindingCallContext cx(cx_, "TestJSImplInterface.passVariadicDictionary");
34233 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34236( cx, "TestJSImplInterface"
, "passVariadicDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34234 "TestJSImplInterface", "passVariadicDictionary", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34236( cx, "TestJSImplInterface"
, "passVariadicDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34235 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34236( cx, "TestJSImplInterface"
, "passVariadicDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34236 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34236( cx, "TestJSImplInterface"
, "passVariadicDictionary", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34237
34238 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34239 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34240 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34241 if (objIsXray) {
34242 unwrappedObj.emplace(cx, obj);
34243 }
34244 AutoSequence<Dict> arg0;
34245 SequenceRooter<Dict> arg0_holder(cx, &arg0);
34246 if (args.length() > 0) {
34247 if (!arg0.SetCapacity(args.length() - 0, mozilla::fallible)) {
34248 JS_ReportOutOfMemory(cx);
34249 return false;
34250 }
34251 for (uint32_t variadicArg = 0; variadicArg < args.length(); ++variadicArg) {
34252 // OK to do infallible append here, since we ensured capacity already.
34253 Dict& slot = *arg0.AppendElement();
34254 if (!slot.Init(cx, args[variadicArg], "Argument 1", true)) {
34255 return false;
34256 }
34257 }
34258 }
34259 if (objIsXray) {
34260 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34261 // we know Xrays have no dynamic unwrap behavior.
34262 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34263 if (!unwrappedObj.ref()) {
34264 return false;
34265 }
34266 }
34267 FastErrorResult rv;
34268 // NOTE: This assert does NOT call the function.
34269 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicDictionary(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34270 MOZ_KnownLive(self)(self)->PassVariadicDictionary(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34271 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicDictionary"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicDictionary"
)), 0))
) {
34272 return false;
34273 }
34274 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34274); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34274; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34275 args.rval().setUndefined();
34276 return true;
34277}
34278
34279static const JSJitInfo passVariadicDictionary_methodinfo = {
34280 { (JSJitGetterOp)passVariadicDictionary },
34281 { prototypes::id::TestJSImplInterface },
34282 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34283 JSJitInfo::Method,
34284 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34285 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34286 false, /* isInfallible. False in setters. */
34287 false, /* isMovable. Not relevant for setters. */
34288 false, /* isEliminatable. Not relevant for setters. */
34289 false, /* isAlwaysInSlot. Only relevant for getters. */
34290 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34291 false, /* isTypedMethod. Only relevant for methods. */
34292 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34293};
34294
34295MOZ_CAN_RUN_SCRIPT static bool
34296dontEnforceRangeOrClamp(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34297{
34298 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34301( cx, "TestJSImplInterface"
, "dontEnforceRangeOrClamp", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34299 "TestJSImplInterface", "dontEnforceRangeOrClamp", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34301( cx, "TestJSImplInterface"
, "dontEnforceRangeOrClamp", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34300 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34301( cx, "TestJSImplInterface"
, "dontEnforceRangeOrClamp", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34301 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34301( cx, "TestJSImplInterface"
, "dontEnforceRangeOrClamp", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34302
34303 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34304 if (!args.requireAtLeast(cx, "TestJSImplInterface.dontEnforceRangeOrClamp", 1)) {
34305 return false;
34306 }
34307 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34308 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34309 if (objIsXray) {
34310 unwrappedObj.emplace(cx, obj);
34311 }
34312 int8_t arg0;
34313 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
34314 return false;
34315 }
34316 if (objIsXray) {
34317 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34318 // we know Xrays have no dynamic unwrap behavior.
34319 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34320 if (!unwrappedObj.ref()) {
34321 return false;
34322 }
34323 }
34324 FastErrorResult rv;
34325 // NOTE: This assert does NOT call the function.
34326 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->DontEnforceRangeOrClamp(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34327 MOZ_KnownLive(self)(self)->DontEnforceRangeOrClamp(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34328 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.dontEnforceRangeOrClamp"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.dontEnforceRangeOrClamp"
)), 0))
) {
34329 return false;
34330 }
34331 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34331); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34331; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34332 args.rval().setUndefined();
34333 return true;
34334}
34335
34336static const JSJitInfo dontEnforceRangeOrClamp_methodinfo = {
34337 { (JSJitGetterOp)dontEnforceRangeOrClamp },
34338 { prototypes::id::TestJSImplInterface },
34339 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34340 JSJitInfo::Method,
34341 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34342 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34343 false, /* isInfallible. False in setters. */
34344 false, /* isMovable. Not relevant for setters. */
34345 false, /* isEliminatable. Not relevant for setters. */
34346 false, /* isAlwaysInSlot. Only relevant for getters. */
34347 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34348 false, /* isTypedMethod. Only relevant for methods. */
34349 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34350};
34351
34352MOZ_CAN_RUN_SCRIPT static bool
34353doEnforceRange(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34354{
34355 BindingCallContext cx(cx_, "TestJSImplInterface.doEnforceRange");
34356 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34359( cx, "TestJSImplInterface"
, "doEnforceRange", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34357 "TestJSImplInterface", "doEnforceRange", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34359( cx, "TestJSImplInterface"
, "doEnforceRange", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34358 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34359( cx, "TestJSImplInterface"
, "doEnforceRange", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34359 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34359( cx, "TestJSImplInterface"
, "doEnforceRange", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34360
34361 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34362 if (!args.requireAtLeast(cx, "TestJSImplInterface.doEnforceRange", 1)) {
34363 return false;
34364 }
34365 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34366 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34367 if (objIsXray) {
34368 unwrappedObj.emplace(cx, obj);
34369 }
34370 int8_t arg0;
34371 if (!ValueToPrimitive<int8_t, eEnforceRange>(cx, args[0], "Argument 1", &arg0)) {
34372 return false;
34373 }
34374 if (objIsXray) {
34375 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34376 // we know Xrays have no dynamic unwrap behavior.
34377 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34378 if (!unwrappedObj.ref()) {
34379 return false;
34380 }
34381 }
34382 FastErrorResult rv;
34383 // NOTE: This assert does NOT call the function.
34384 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->DoEnforceRange(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34385 MOZ_KnownLive(self)(self)->DoEnforceRange(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34386 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.doEnforceRange"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.doEnforceRange"
)), 0))
) {
34387 return false;
34388 }
34389 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34389); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34389; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34390 args.rval().setUndefined();
34391 return true;
34392}
34393
34394static const JSJitInfo doEnforceRange_methodinfo = {
34395 { (JSJitGetterOp)doEnforceRange },
34396 { prototypes::id::TestJSImplInterface },
34397 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34398 JSJitInfo::Method,
34399 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34400 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34401 false, /* isInfallible. False in setters. */
34402 false, /* isMovable. Not relevant for setters. */
34403 false, /* isEliminatable. Not relevant for setters. */
34404 false, /* isAlwaysInSlot. Only relevant for getters. */
34405 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34406 false, /* isTypedMethod. Only relevant for methods. */
34407 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34408};
34409
34410MOZ_CAN_RUN_SCRIPT static bool
34411doEnforceRangeNullable(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34412{
34413 BindingCallContext cx(cx_, "TestJSImplInterface.doEnforceRangeNullable");
34414 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34417( cx, "TestJSImplInterface"
, "doEnforceRangeNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34415 "TestJSImplInterface", "doEnforceRangeNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34417( cx, "TestJSImplInterface"
, "doEnforceRangeNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34416 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34417( cx, "TestJSImplInterface"
, "doEnforceRangeNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34417 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34417( cx, "TestJSImplInterface"
, "doEnforceRangeNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34418
34419 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34420 if (!args.requireAtLeast(cx, "TestJSImplInterface.doEnforceRangeNullable", 1)) {
34421 return false;
34422 }
34423 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34424 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34425 if (objIsXray) {
34426 unwrappedObj.emplace(cx, obj);
34427 }
34428 Nullable<int8_t> arg0;
34429 if (args[0].isNullOrUndefined()) {
34430 arg0.SetNull();
34431 } else if (!ValueToPrimitive<int8_t, eEnforceRange>(cx, args[0], "Argument 1", &arg0.SetValue())) {
34432 return false;
34433 }
34434 if (objIsXray) {
34435 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34436 // we know Xrays have no dynamic unwrap behavior.
34437 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34438 if (!unwrappedObj.ref()) {
34439 return false;
34440 }
34441 }
34442 FastErrorResult rv;
34443 // NOTE: This assert does NOT call the function.
34444 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->DoEnforceRangeNullable(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34445 MOZ_KnownLive(self)(self)->DoEnforceRangeNullable(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34446 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.doEnforceRangeNullable"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.doEnforceRangeNullable"
)), 0))
) {
34447 return false;
34448 }
34449 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34449); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34449; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34450 args.rval().setUndefined();
34451 return true;
34452}
34453
34454static const JSJitInfo doEnforceRangeNullable_methodinfo = {
34455 { (JSJitGetterOp)doEnforceRangeNullable },
34456 { prototypes::id::TestJSImplInterface },
34457 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34458 JSJitInfo::Method,
34459 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34460 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34461 false, /* isInfallible. False in setters. */
34462 false, /* isMovable. Not relevant for setters. */
34463 false, /* isEliminatable. Not relevant for setters. */
34464 false, /* isAlwaysInSlot. Only relevant for getters. */
34465 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34466 false, /* isTypedMethod. Only relevant for methods. */
34467 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34468};
34469
34470MOZ_CAN_RUN_SCRIPT static bool
34471doClamp(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34472{
34473 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34476( cx, "TestJSImplInterface"
, "doClamp", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34474 "TestJSImplInterface", "doClamp", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34476( cx, "TestJSImplInterface"
, "doClamp", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34475 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34476( cx, "TestJSImplInterface"
, "doClamp", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
34476 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34476( cx, "TestJSImplInterface"
, "doClamp", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
34477
34478 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34479 if (!args.requireAtLeast(cx, "TestJSImplInterface.doClamp", 1)) {
34480 return false;
34481 }
34482 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34483 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34484 if (objIsXray) {
34485 unwrappedObj.emplace(cx, obj);
34486 }
34487 int8_t arg0;
34488 if (!ValueToPrimitive<int8_t, eClamp>(cx, args[0], "Argument 1", &arg0)) {
34489 return false;
34490 }
34491 if (objIsXray) {
34492 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34493 // we know Xrays have no dynamic unwrap behavior.
34494 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34495 if (!unwrappedObj.ref()) {
34496 return false;
34497 }
34498 }
34499 FastErrorResult rv;
34500 // NOTE: This assert does NOT call the function.
34501 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->DoClamp(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34502 MOZ_KnownLive(self)(self)->DoClamp(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34503 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.doClamp"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.doClamp"
)), 0))
) {
34504 return false;
34505 }
34506 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34506); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34506; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34507 args.rval().setUndefined();
34508 return true;
34509}
34510
34511static const JSJitInfo doClamp_methodinfo = {
34512 { (JSJitGetterOp)doClamp },
34513 { prototypes::id::TestJSImplInterface },
34514 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34515 JSJitInfo::Method,
34516 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34517 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34518 false, /* isInfallible. False in setters. */
34519 false, /* isMovable. Not relevant for setters. */
34520 false, /* isEliminatable. Not relevant for setters. */
34521 false, /* isAlwaysInSlot. Only relevant for getters. */
34522 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34523 false, /* isTypedMethod. Only relevant for methods. */
34524 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34525};
34526
34527MOZ_CAN_RUN_SCRIPT static bool
34528doClampNullable(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
34529{
34530 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34533( cx, "TestJSImplInterface"
, "doClampNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34531 "TestJSImplInterface", "doClampNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34533( cx, "TestJSImplInterface"
, "doClampNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34532 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject34533( cx, "TestJSImplInterface"
, "doClampNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34533 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34533( cx, "TestJSImplInterface"
, "doClampNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34534
34535 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34536 if (!args.requireAtLeast(cx, "TestJSImplInterface.doClampNullable", 1)) {
34537 return false;
34538 }
34539 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34540 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34541 if (objIsXray) {
34542 unwrappedObj.emplace(cx, obj);
34543 }
34544 Nullable<int8_t> arg0;
34545 if (args[0].isNullOrUndefined()) {
34546 arg0.SetNull();
34547 } else if (!ValueToPrimitive<int8_t, eClamp>(cx, args[0], "Argument 1", &arg0.SetValue())) {
34548 return false;
34549 }
34550 if (objIsXray) {
34551 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34552 // we know Xrays have no dynamic unwrap behavior.
34553 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34554 if (!unwrappedObj.ref()) {
34555 return false;
34556 }
34557 }
34558 FastErrorResult rv;
34559 // NOTE: This assert does NOT call the function.
34560 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->DoClampNullable(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34561 MOZ_KnownLive(self)(self)->DoClampNullable(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34562 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.doClampNullable"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.doClampNullable"
)), 0))
) {
34563 return false;
34564 }
34565 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34565); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34565; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34566 args.rval().setUndefined();
34567 return true;
34568}
34569
34570static const JSJitInfo doClampNullable_methodinfo = {
34571 { (JSJitGetterOp)doClampNullable },
34572 { prototypes::id::TestJSImplInterface },
34573 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34574 JSJitInfo::Method,
34575 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34576 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34577 false, /* isInfallible. False in setters. */
34578 false, /* isMovable. Not relevant for setters. */
34579 false, /* isEliminatable. Not relevant for setters. */
34580 false, /* isAlwaysInSlot. Only relevant for getters. */
34581 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34582 false, /* isTypedMethod. Only relevant for methods. */
34583 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34584};
34585
34586MOZ_CAN_RUN_SCRIPT static bool
34587get_enforcedByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
34588{
34589 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34592( cx, "TestJSImplInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34590 "TestJSImplInterface", "enforcedByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34592( cx, "TestJSImplInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34591 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject34592( cx, "TestJSImplInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34592 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34592( cx, "TestJSImplInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34593
34594 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34595 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34596 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34597 if (objIsXray) {
34598 unwrappedObj.emplace(cx, obj);
34599 }
34600 if (objIsXray) {
34601 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34602 // we know Xrays have no dynamic unwrap behavior.
34603 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34604 if (!unwrappedObj.ref()) {
34605 return false;
34606 }
34607 }
34608 FastErrorResult rv;
34609 int8_t result(MOZ_KnownLive(self)(self)->GetEnforcedByte(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
34610 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.enforcedByte getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.enforcedByte getter"
)), 0))
) {
34611 return false;
34612 }
34613 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34613); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34613; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34614 args.rval().setInt32(int32_t(result));
34615 return true;
34616}
34617
34618MOZ_CAN_RUN_SCRIPT static bool
34619set_enforcedByte(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
34620{
34621 BindingCallContext cx(cx_, "TestJSImplInterface.enforcedByte setter");
34622 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34625( cx, "TestJSImplInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34623 "TestJSImplInterface", "enforcedByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34625( cx, "TestJSImplInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34624 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject34625( cx, "TestJSImplInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34625 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34625( cx, "TestJSImplInterface"
, "enforcedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34626
34627 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34628 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34629 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34630 if (objIsXray) {
34631 unwrappedObj.emplace(cx, obj);
34632 }
34633 int8_t arg0;
34634 if (!ValueToPrimitive<int8_t, eEnforceRange>(cx, args[0], "Value being assigned", &arg0)) {
34635 return false;
34636 }
34637 if (objIsXray) {
34638 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34639 // we know Xrays have no dynamic unwrap behavior.
34640 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34641 if (!unwrappedObj.ref()) {
34642 return false;
34643 }
34644 }
34645 FastErrorResult rv;
34646 // NOTE: This assert does NOT call the function.
34647 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetEnforcedByte(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34648 MOZ_KnownLive(self)(self)->SetEnforcedByte(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34649 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.enforcedByte setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.enforcedByte setter"
)), 0))
) {
34650 return false;
34651 }
34652 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34652); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34652; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34653
34654 return true;
34655}
34656
34657static const JSJitInfo enforcedByte_getterinfo = {
34658 { get_enforcedByte },
34659 { prototypes::id::TestJSImplInterface },
34660 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34661 JSJitInfo::Getter,
34662 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34663 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
34664 false, /* isInfallible. False in setters. */
34665 false, /* isMovable. Not relevant for setters. */
34666 false, /* isEliminatable. Not relevant for setters. */
34667 false, /* isAlwaysInSlot. Only relevant for getters. */
34668 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34669 false, /* isTypedMethod. Only relevant for methods. */
34670 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34671};
34672static const JSJitInfo enforcedByte_setterinfo = {
34673 { (JSJitGetterOp)set_enforcedByte },
34674 { prototypes::id::TestJSImplInterface },
34675 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34676 JSJitInfo::Setter,
34677 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34678 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34679 false, /* isInfallible. False in setters. */
34680 false, /* isMovable. Not relevant for setters. */
34681 false, /* isEliminatable. Not relevant for setters. */
34682 false, /* isAlwaysInSlot. Only relevant for getters. */
34683 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34684 false, /* isTypedMethod. Only relevant for methods. */
34685 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34686};
34687
34688MOZ_CAN_RUN_SCRIPT static bool
34689get_enforcedByteNullable(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
34690{
34691 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34694( cx, "TestJSImplInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34692 "TestJSImplInterface", "enforcedByteNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34694( cx, "TestJSImplInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34693 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject34694( cx, "TestJSImplInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34694 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34694( cx, "TestJSImplInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34695
34696 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34697 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34698 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34699 if (objIsXray
0.1
'objIsXray' is false
0.1
'objIsXray' is false
) {
1
Taking false branch
34700 unwrappedObj.emplace(cx, obj);
34701 }
34702 if (objIsXray
1.1
'objIsXray' is false
1.1
'objIsXray' is false
) {
2
Taking false branch
34703 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34704 // we know Xrays have no dynamic unwrap behavior.
34705 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34706 if (!unwrappedObj.ref()) {
34707 return false;
34708 }
34709 }
34710 FastErrorResult rv;
34711 Nullable<int8_t> result(MOZ_KnownLive(self)(self)->GetEnforcedByteNullable(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
3
'?' condition is false
4
Calling 'TestJSImplInterface::GetEnforcedByteNullable'
34712 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.enforcedByteNullable getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.enforcedByteNullable getter"
)), 0))
) {
34713 return false;
34714 }
34715 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34715); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34715; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34716 if (result.IsNull()) {
34717 args.rval().setNull();
34718 return true;
34719 }
34720 args.rval().setInt32(int32_t(result.Value()));
34721 return true;
34722}
34723
34724MOZ_CAN_RUN_SCRIPT static bool
34725set_enforcedByteNullable(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
34726{
34727 BindingCallContext cx(cx_, "TestJSImplInterface.enforcedByteNullable setter");
34728 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34731( cx, "TestJSImplInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34729 "TestJSImplInterface", "enforcedByteNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34731( cx, "TestJSImplInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34730 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject34731( cx, "TestJSImplInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34731 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34731( cx, "TestJSImplInterface"
, "enforcedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34732
34733 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34734 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34735 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34736 if (objIsXray) {
34737 unwrappedObj.emplace(cx, obj);
34738 }
34739 Nullable<int8_t> arg0;
34740 if (args[0].isNullOrUndefined()) {
34741 arg0.SetNull();
34742 } else if (!ValueToPrimitive<int8_t, eEnforceRange>(cx, args[0], "Value being assigned", &arg0.SetValue())) {
34743 return false;
34744 }
34745 if (objIsXray) {
34746 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34747 // we know Xrays have no dynamic unwrap behavior.
34748 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34749 if (!unwrappedObj.ref()) {
34750 return false;
34751 }
34752 }
34753 FastErrorResult rv;
34754 // NOTE: This assert does NOT call the function.
34755 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetEnforcedByteNullable(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34756 MOZ_KnownLive(self)(self)->SetEnforcedByteNullable(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34757 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.enforcedByteNullable setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.enforcedByteNullable setter"
)), 0))
) {
34758 return false;
34759 }
34760 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34760); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34760; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34761
34762 return true;
34763}
34764
34765static const JSJitInfo enforcedByteNullable_getterinfo = {
34766 { get_enforcedByteNullable },
34767 { prototypes::id::TestJSImplInterface },
34768 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34769 JSJitInfo::Getter,
34770 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34771 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
34772 false, /* isInfallible. False in setters. */
34773 false, /* isMovable. Not relevant for setters. */
34774 false, /* isEliminatable. Not relevant for setters. */
34775 false, /* isAlwaysInSlot. Only relevant for getters. */
34776 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34777 false, /* isTypedMethod. Only relevant for methods. */
34778 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34779};
34780static const JSJitInfo enforcedByteNullable_setterinfo = {
34781 { (JSJitGetterOp)set_enforcedByteNullable },
34782 { prototypes::id::TestJSImplInterface },
34783 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34784 JSJitInfo::Setter,
34785 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34786 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34787 false, /* isInfallible. False in setters. */
34788 false, /* isMovable. Not relevant for setters. */
34789 false, /* isEliminatable. Not relevant for setters. */
34790 false, /* isAlwaysInSlot. Only relevant for getters. */
34791 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34792 false, /* isTypedMethod. Only relevant for methods. */
34793 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34794};
34795
34796MOZ_CAN_RUN_SCRIPT static bool
34797get_clampedByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
34798{
34799 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34802( cx, "TestJSImplInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34800 "TestJSImplInterface", "clampedByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34802( cx, "TestJSImplInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34801 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject34802( cx, "TestJSImplInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34802 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34802( cx, "TestJSImplInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34803
34804 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34805 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34806 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34807 if (objIsXray) {
34808 unwrappedObj.emplace(cx, obj);
34809 }
34810 if (objIsXray) {
34811 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34812 // we know Xrays have no dynamic unwrap behavior.
34813 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34814 if (!unwrappedObj.ref()) {
34815 return false;
34816 }
34817 }
34818 FastErrorResult rv;
34819 int8_t result(MOZ_KnownLive(self)(self)->GetClampedByte(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
34820 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.clampedByte getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.clampedByte getter"
)), 0))
) {
34821 return false;
34822 }
34823 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34823); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34823; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34824 args.rval().setInt32(int32_t(result));
34825 return true;
34826}
34827
34828MOZ_CAN_RUN_SCRIPT static bool
34829set_clampedByte(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
34830{
34831 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34834( cx, "TestJSImplInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34832 "TestJSImplInterface", "clampedByte", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34834( cx, "TestJSImplInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34833 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject34834( cx, "TestJSImplInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34834 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34834( cx, "TestJSImplInterface"
, "clampedByte", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34835
34836 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34837 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34838 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34839 if (objIsXray) {
34840 unwrappedObj.emplace(cx, obj);
34841 }
34842 int8_t arg0;
34843 if (!ValueToPrimitive<int8_t, eClamp>(cx, args[0], "Value being assigned", &arg0)) {
34844 return false;
34845 }
34846 if (objIsXray) {
34847 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34848 // we know Xrays have no dynamic unwrap behavior.
34849 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34850 if (!unwrappedObj.ref()) {
34851 return false;
34852 }
34853 }
34854 FastErrorResult rv;
34855 // NOTE: This assert does NOT call the function.
34856 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetClampedByte(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34857 MOZ_KnownLive(self)(self)->SetClampedByte(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34858 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.clampedByte setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.clampedByte setter"
)), 0))
) {
34859 return false;
34860 }
34861 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34861); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34861; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34862
34863 return true;
34864}
34865
34866static const JSJitInfo clampedByte_getterinfo = {
34867 { get_clampedByte },
34868 { prototypes::id::TestJSImplInterface },
34869 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34870 JSJitInfo::Getter,
34871 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34872 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
34873 false, /* isInfallible. False in setters. */
34874 false, /* isMovable. Not relevant for setters. */
34875 false, /* isEliminatable. Not relevant for setters. */
34876 false, /* isAlwaysInSlot. Only relevant for getters. */
34877 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34878 false, /* isTypedMethod. Only relevant for methods. */
34879 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34880};
34881static const JSJitInfo clampedByte_setterinfo = {
34882 { (JSJitGetterOp)set_clampedByte },
34883 { prototypes::id::TestJSImplInterface },
34884 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34885 JSJitInfo::Setter,
34886 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34887 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34888 false, /* isInfallible. False in setters. */
34889 false, /* isMovable. Not relevant for setters. */
34890 false, /* isEliminatable. Not relevant for setters. */
34891 false, /* isAlwaysInSlot. Only relevant for getters. */
34892 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34893 false, /* isTypedMethod. Only relevant for methods. */
34894 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34895};
34896
34897MOZ_CAN_RUN_SCRIPT static bool
34898get_clampedByteNullable(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
34899{
34900 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34903( cx, "TestJSImplInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34901 "TestJSImplInterface", "clampedByteNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34903( cx, "TestJSImplInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34902 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject34903( cx, "TestJSImplInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34903 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34903( cx, "TestJSImplInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34904
34905 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34906 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34907 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34908 if (objIsXray) {
34909 unwrappedObj.emplace(cx, obj);
34910 }
34911 if (objIsXray) {
34912 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34913 // we know Xrays have no dynamic unwrap behavior.
34914 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34915 if (!unwrappedObj.ref()) {
34916 return false;
34917 }
34918 }
34919 FastErrorResult rv;
34920 Nullable<int8_t> result(MOZ_KnownLive(self)(self)->GetClampedByteNullable(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
34921 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.clampedByteNullable getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.clampedByteNullable getter"
)), 0))
) {
34922 return false;
34923 }
34924 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34924); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34924; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34925 if (result.IsNull()) {
34926 args.rval().setNull();
34927 return true;
34928 }
34929 args.rval().setInt32(int32_t(result.Value()));
34930 return true;
34931}
34932
34933MOZ_CAN_RUN_SCRIPT static bool
34934set_clampedByteNullable(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
34935{
34936 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject34939( cx, "TestJSImplInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34937 "TestJSImplInterface", "clampedByteNullable", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject34939( cx, "TestJSImplInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34938 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject34939( cx, "TestJSImplInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
34939 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject34939( cx, "TestJSImplInterface"
, "clampedByteNullable", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
34940
34941 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
34942 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
34943 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
34944 if (objIsXray) {
34945 unwrappedObj.emplace(cx, obj);
34946 }
34947 Nullable<int8_t> arg0;
34948 if (args[0].isNullOrUndefined()) {
34949 arg0.SetNull();
34950 } else if (!ValueToPrimitive<int8_t, eClamp>(cx, args[0], "Value being assigned", &arg0.SetValue())) {
34951 return false;
34952 }
34953 if (objIsXray) {
34954 // Since our object is an Xray, we can just CheckedUnwrapStatic:
34955 // we know Xrays have no dynamic unwrap behavior.
34956 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
34957 if (!unwrappedObj.ref()) {
34958 return false;
34959 }
34960 }
34961 FastErrorResult rv;
34962 // NOTE: This assert does NOT call the function.
34963 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetClampedByteNullable(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
34964 MOZ_KnownLive(self)(self)->SetClampedByteNullable(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
34965 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.clampedByteNullable setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.clampedByteNullable setter"
)), 0))
) {
34966 return false;
34967 }
34968 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 34968); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 34968; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
34969
34970 return true;
34971}
34972
34973static const JSJitInfo clampedByteNullable_getterinfo = {
34974 { get_clampedByteNullable },
34975 { prototypes::id::TestJSImplInterface },
34976 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34977 JSJitInfo::Getter,
34978 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34979 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
34980 false, /* isInfallible. False in setters. */
34981 false, /* isMovable. Not relevant for setters. */
34982 false, /* isEliminatable. Not relevant for setters. */
34983 false, /* isAlwaysInSlot. Only relevant for getters. */
34984 false, /* isLazilyCachedInSlot. Only relevant for getters. */
34985 false, /* isTypedMethod. Only relevant for methods. */
34986 0 /* Reserved slot index, if we're stored in a slot, else 0. */
34987};
34988static const JSJitInfo clampedByteNullable_setterinfo = {
34989 { (JSJitGetterOp)set_clampedByteNullable },
34990 { prototypes::id::TestJSImplInterface },
34991 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
34992 JSJitInfo::Setter,
34993 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
34994 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
34995 false, /* isInfallible. False in setters. */
34996 false, /* isMovable. Not relevant for setters. */
34997 false, /* isEliminatable. Not relevant for setters. */
34998 false, /* isAlwaysInSlot. Only relevant for getters. */
34999 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35000 false, /* isTypedMethod. Only relevant for methods. */
35001 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35002};
35003
35004MOZ_CAN_RUN_SCRIPT static bool
35005exerciseTypedefInterfaces1(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35006{
35007 BindingCallContext cx(cx_, "TestJSImplInterface.exerciseTypedefInterfaces1");
35008 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35011( cx, "TestJSImplInterface"
, "exerciseTypedefInterfaces1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35009 "TestJSImplInterface", "exerciseTypedefInterfaces1", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35011( cx, "TestJSImplInterface"
, "exerciseTypedefInterfaces1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35010 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35011( cx, "TestJSImplInterface"
, "exerciseTypedefInterfaces1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35011 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35011( cx, "TestJSImplInterface"
, "exerciseTypedefInterfaces1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
35012
35013 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
35014 if (!args.requireAtLeast(cx, "TestJSImplInterface.exerciseTypedefInterfaces1", 1)) {
35015 return false;
35016 }
35017 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35018 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35019 if (objIsXray) {
35020 unwrappedObj.emplace(cx, obj);
35021 }
35022 NonNull<mozilla::dom::TestJSImplInterface> arg0;
35023 if (args[0].isObject()) {
35024 {
35025 // Our JSContext should be in the right global to do unwrapping in.
35026 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0, cx);
35027 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
35028 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestJSImplInterface");
35029 return false;
35030 }
35031 }
35032 } else {
35033 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
35034 return false;
35035 }
35036 if (objIsXray) {
35037 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35038 // we know Xrays have no dynamic unwrap behavior.
35039 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35040 if (!unwrappedObj.ref()) {
35041 return false;
35042 }
35043 }
35044 FastErrorResult rv;
35045 // NOTE: This assert does NOT call the function.
35046 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ExerciseTypedefInterfaces1(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35047 MOZ_KnownLive(self)(self)->ExerciseTypedefInterfaces1(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35048 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.exerciseTypedefInterfaces1"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.exerciseTypedefInterfaces1"
)), 0))
) {
35049 return false;
35050 }
35051 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35051); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35051; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35052 args.rval().setUndefined();
35053 return true;
35054}
35055
35056static const JSJitInfo exerciseTypedefInterfaces1_methodinfo = {
35057 { (JSJitGetterOp)exerciseTypedefInterfaces1 },
35058 { prototypes::id::TestJSImplInterface },
35059 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
35060 JSJitInfo::Method,
35061 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35062 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35063 false, /* isInfallible. False in setters. */
35064 false, /* isMovable. Not relevant for setters. */
35065 false, /* isEliminatable. Not relevant for setters. */
35066 false, /* isAlwaysInSlot. Only relevant for getters. */
35067 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35068 false, /* isTypedMethod. Only relevant for methods. */
35069 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35070};
35071
35072MOZ_CAN_RUN_SCRIPT static bool
35073exerciseTypedefInterfaces2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35074{
35075 BindingCallContext cx(cx_, "TestJSImplInterface.exerciseTypedefInterfaces2");
35076 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35079( cx, "TestJSImplInterface"
, "exerciseTypedefInterfaces2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35077 "TestJSImplInterface", "exerciseTypedefInterfaces2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35079( cx, "TestJSImplInterface"
, "exerciseTypedefInterfaces2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35078 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35079( cx, "TestJSImplInterface"
, "exerciseTypedefInterfaces2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35079 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35079( cx, "TestJSImplInterface"
, "exerciseTypedefInterfaces2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
35080
35081 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
35082 if (!args.requireAtLeast(cx, "TestJSImplInterface.exerciseTypedefInterfaces2", 1)) {
35083 return false;
35084 }
35085 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35086 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35087 if (objIsXray) {
35088 unwrappedObj.emplace(cx, obj);
35089 }
35090 mozilla::dom::TestJSImplInterface* arg0;
35091 if (args[0].isObject()) {
35092 {
35093 // Our JSContext should be in the right global to do unwrapping in.
35094 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0, cx);
35095 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
35096 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestJSImplInterface");
35097 return false;
35098 }
35099 }
35100 } else if (args[0].isNullOrUndefined()) {
35101 arg0 = nullptr;
35102 } else {
35103 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
35104 return false;
35105 }
35106 if (objIsXray) {
35107 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35108 // we know Xrays have no dynamic unwrap behavior.
35109 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35110 if (!unwrappedObj.ref()) {
35111 return false;
35112 }
35113 }
35114 FastErrorResult rv;
35115 auto result(StrongOrRawPtr<mozilla::dom::TestJSImplInterface>(MOZ_KnownLive(self)(self)->ExerciseTypedefInterfaces2(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
35116 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.exerciseTypedefInterfaces2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.exerciseTypedefInterfaces2"
)), 0))
) {
35117 return false;
35118 }
35119 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35119); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35119; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35120 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
35121 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35121); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 35121; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
35122 return false;
35123 }
35124 return true;
35125}
35126
35127static const JSJitInfo exerciseTypedefInterfaces2_methodinfo = {
35128 { (JSJitGetterOp)exerciseTypedefInterfaces2 },
35129 { prototypes::id::TestJSImplInterface },
35130 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
35131 JSJitInfo::Method,
35132 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35133 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
35134 false, /* isInfallible. False in setters. */
35135 false, /* isMovable. Not relevant for setters. */
35136 false, /* isEliminatable. Not relevant for setters. */
35137 false, /* isAlwaysInSlot. Only relevant for getters. */
35138 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35139 false, /* isTypedMethod. Only relevant for methods. */
35140 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35141};
35142
35143MOZ_CAN_RUN_SCRIPT static bool
35144exerciseTypedefInterfaces3(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35145{
35146 BindingCallContext cx(cx_, "TestJSImplInterface.exerciseTypedefInterfaces3");
35147 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35150( cx, "TestJSImplInterface"
, "exerciseTypedefInterfaces3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35148 "TestJSImplInterface", "exerciseTypedefInterfaces3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35150( cx, "TestJSImplInterface"
, "exerciseTypedefInterfaces3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35149 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35150( cx, "TestJSImplInterface"
, "exerciseTypedefInterfaces3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35150 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35150( cx, "TestJSImplInterface"
, "exerciseTypedefInterfaces3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
35151
35152 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
35153 if (!args.requireAtLeast(cx, "TestJSImplInterface.exerciseTypedefInterfaces3", 1)) {
35154 return false;
35155 }
35156 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35157 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35158 if (objIsXray) {
35159 unwrappedObj.emplace(cx, obj);
35160 }
35161 NonNull<mozilla::dom::TestJSImplInterface> arg0;
35162 if (args[0].isObject()) {
35163 {
35164 // Our JSContext should be in the right global to do unwrapping in.
35165 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0, cx);
35166 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
35167 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestJSImplInterface");
35168 return false;
35169 }
35170 }
35171 } else {
35172 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
35173 return false;
35174 }
35175 if (objIsXray) {
35176 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35177 // we know Xrays have no dynamic unwrap behavior.
35178 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35179 if (!unwrappedObj.ref()) {
35180 return false;
35181 }
35182 }
35183 FastErrorResult rv;
35184 // NOTE: This assert does NOT call the function.
35185 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ExerciseTypedefInterfaces3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35186 MOZ_KnownLive(self)(self)->ExerciseTypedefInterfaces3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35187 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.exerciseTypedefInterfaces3"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.exerciseTypedefInterfaces3"
)), 0))
) {
35188 return false;
35189 }
35190 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35190); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35190; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35191 args.rval().setUndefined();
35192 return true;
35193}
35194
35195static const JSJitInfo exerciseTypedefInterfaces3_methodinfo = {
35196 { (JSJitGetterOp)exerciseTypedefInterfaces3 },
35197 { prototypes::id::TestJSImplInterface },
35198 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
35199 JSJitInfo::Method,
35200 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35201 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35202 false, /* isInfallible. False in setters. */
35203 false, /* isMovable. Not relevant for setters. */
35204 false, /* isEliminatable. Not relevant for setters. */
35205 false, /* isAlwaysInSlot. Only relevant for getters. */
35206 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35207 false, /* isTypedMethod. Only relevant for methods. */
35208 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35209};
35210
35211MOZ_CAN_RUN_SCRIPT static bool
35212get_deprecatedAttribute(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
35213{
35214 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35217( cx, "TestJSImplInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35215 "TestJSImplInterface", "deprecatedAttribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35217( cx, "TestJSImplInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35216 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject35217( cx, "TestJSImplInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35217 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35217( cx, "TestJSImplInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35218
35219 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
35220 DeprecationWarning(cx, obj, DeprecatedOperations::eComponents);
35221 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35222 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35223 if (objIsXray) {
35224 unwrappedObj.emplace(cx, obj);
35225 }
35226 if (objIsXray) {
35227 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35228 // we know Xrays have no dynamic unwrap behavior.
35229 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35230 if (!unwrappedObj.ref()) {
35231 return false;
35232 }
35233 }
35234 FastErrorResult rv;
35235 int8_t result(MOZ_KnownLive(self)(self)->GetDeprecatedAttribute(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
35236 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.deprecatedAttribute getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.deprecatedAttribute getter"
)), 0))
) {
35237 return false;
35238 }
35239 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35239); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35239; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35240 args.rval().setInt32(int32_t(result));
35241 return true;
35242}
35243
35244MOZ_CAN_RUN_SCRIPT static bool
35245set_deprecatedAttribute(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
35246{
35247 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35250( cx, "TestJSImplInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35248 "TestJSImplInterface", "deprecatedAttribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35250( cx, "TestJSImplInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35249 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject35250( cx, "TestJSImplInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35250 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35250( cx, "TestJSImplInterface"
, "deprecatedAttribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35251
35252 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
35253 DeprecationWarning(cx, obj, DeprecatedOperations::eComponents);
35254 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35255 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35256 if (objIsXray) {
35257 unwrappedObj.emplace(cx, obj);
35258 }
35259 int8_t arg0;
35260 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
35261 return false;
35262 }
35263 if (objIsXray) {
35264 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35265 // we know Xrays have no dynamic unwrap behavior.
35266 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35267 if (!unwrappedObj.ref()) {
35268 return false;
35269 }
35270 }
35271 FastErrorResult rv;
35272 // NOTE: This assert does NOT call the function.
35273 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetDeprecatedAttribute(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35274 MOZ_KnownLive(self)(self)->SetDeprecatedAttribute(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35275 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.deprecatedAttribute setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.deprecatedAttribute setter"
)), 0))
) {
35276 return false;
35277 }
35278 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35278); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35278; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35279
35280 return true;
35281}
35282
35283static const JSJitInfo deprecatedAttribute_getterinfo = {
35284 { get_deprecatedAttribute },
35285 { prototypes::id::TestJSImplInterface },
35286 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
35287 JSJitInfo::Getter,
35288 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35289 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
35290 false, /* isInfallible. False in setters. */
35291 false, /* isMovable. Not relevant for setters. */
35292 false, /* isEliminatable. Not relevant for setters. */
35293 false, /* isAlwaysInSlot. Only relevant for getters. */
35294 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35295 false, /* isTypedMethod. Only relevant for methods. */
35296 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35297};
35298static const JSJitInfo deprecatedAttribute_setterinfo = {
35299 { (JSJitGetterOp)set_deprecatedAttribute },
35300 { prototypes::id::TestJSImplInterface },
35301 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
35302 JSJitInfo::Setter,
35303 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35304 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35305 false, /* isInfallible. False in setters. */
35306 false, /* isMovable. Not relevant for setters. */
35307 false, /* isEliminatable. Not relevant for setters. */
35308 false, /* isAlwaysInSlot. Only relevant for getters. */
35309 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35310 false, /* isTypedMethod. Only relevant for methods. */
35311 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35312};
35313
35314MOZ_CAN_RUN_SCRIPT static bool
35315deprecatedMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35316{
35317 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35320( cx, "TestJSImplInterface"
, "deprecatedMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35318 "TestJSImplInterface", "deprecatedMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35320( cx, "TestJSImplInterface"
, "deprecatedMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35319 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35320( cx, "TestJSImplInterface"
, "deprecatedMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
35320 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35320( cx, "TestJSImplInterface"
, "deprecatedMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
35321
35322 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
35323 DeprecationWarning(cx, obj, DeprecatedOperations::eComponents);
35324 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35325 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35326 if (objIsXray) {
35327 unwrappedObj.emplace(cx, obj);
35328 }
35329 if (objIsXray) {
35330 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35331 // we know Xrays have no dynamic unwrap behavior.
35332 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35333 if (!unwrappedObj.ref()) {
35334 return false;
35335 }
35336 }
35337 FastErrorResult rv;
35338 int8_t result(MOZ_KnownLive(self)(self)->DeprecatedMethod(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
35339 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.deprecatedMethod"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.deprecatedMethod"
)), 0))
) {
35340 return false;
35341 }
35342 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35342); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35342; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35343 args.rval().setInt32(int32_t(result));
35344 return true;
35345}
35346
35347static const JSJitInfo deprecatedMethod_methodinfo = {
35348 { (JSJitGetterOp)deprecatedMethod },
35349 { prototypes::id::TestJSImplInterface },
35350 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
35351 JSJitInfo::Method,
35352 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35353 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
35354 false, /* isInfallible. False in setters. */
35355 false, /* isMovable. Not relevant for setters. */
35356 false, /* isEliminatable. Not relevant for setters. */
35357 false, /* isAlwaysInSlot. Only relevant for getters. */
35358 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35359 false, /* isTypedMethod. Only relevant for methods. */
35360 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35361};
35362
35363MOZ_CAN_RUN_SCRIPT static bool
35364deprecatedMethodWithContext(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35365{
35366 BindingCallContext cx(cx_, "TestJSImplInterface.deprecatedMethodWithContext");
35367 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35370( cx, "TestJSImplInterface"
, "deprecatedMethodWithContext", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35368 "TestJSImplInterface", "deprecatedMethodWithContext", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35370( cx, "TestJSImplInterface"
, "deprecatedMethodWithContext", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35369 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35370( cx, "TestJSImplInterface"
, "deprecatedMethodWithContext", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
35370 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35370( cx, "TestJSImplInterface"
, "deprecatedMethodWithContext", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
35371
35372 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
35373 if (!args.requireAtLeast(cx, "TestJSImplInterface.deprecatedMethodWithContext", 1)) {
35374 return false;
35375 }
35376 DeprecationWarning(cx, obj, DeprecatedOperations::eComponents);
35377 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35378 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35379 if (objIsXray) {
35380 unwrappedObj.emplace(cx, obj);
35381 }
35382 JS::Rooted<JS::Value> arg0(cx);
35383#ifdef __clang__1
35384#pragma clang diagnostic push
35385#pragma clang diagnostic ignored "-Wunreachable-code"
35386#pragma clang diagnostic ignored "-Wunreachable-code-return"
35387#endif // __clang__
35388 if ((true) && !CallerSubsumes(args[0])) {
35389 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 1");
35390 return false;
35391 }
35392#ifdef __clang__1
35393#pragma clang diagnostic pop
35394#endif // __clang__
35395 arg0 = args[0];
35396 if (objIsXray) {
35397 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35398 // we know Xrays have no dynamic unwrap behavior.
35399 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35400 if (!unwrappedObj.ref()) {
35401 return false;
35402 }
35403 }
35404 FastErrorResult rv;
35405 // NOTE: This assert does NOT call the function.
35406 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->DeprecatedMethodWithContext(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35407 MOZ_KnownLive(self)(self)->DeprecatedMethodWithContext(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35408 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.deprecatedMethodWithContext"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.deprecatedMethodWithContext"
)), 0))
) {
35409 return false;
35410 }
35411 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35411); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35411; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35412 args.rval().setUndefined();
35413 return true;
35414}
35415
35416static const JSJitInfo deprecatedMethodWithContext_methodinfo = {
35417 { (JSJitGetterOp)deprecatedMethodWithContext },
35418 { prototypes::id::TestJSImplInterface },
35419 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
35420 JSJitInfo::Method,
35421 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35422 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35423 false, /* isInfallible. False in setters. */
35424 false, /* isMovable. Not relevant for setters. */
35425 false, /* isEliminatable. Not relevant for setters. */
35426 false, /* isAlwaysInSlot. Only relevant for getters. */
35427 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35428 false, /* isTypedMethod. Only relevant for methods. */
35429 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35430};
35431
35432MOZ_CAN_RUN_SCRIPT static bool
35433overload1(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35434{
35435 BindingCallContext cx(cx_, "TestJSImplInterface.overload1");
35436 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35439( cx, "TestJSImplInterface"
, "overload1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35437 "TestJSImplInterface", "overload1", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35439( cx, "TestJSImplInterface"
, "overload1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35438 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35439( cx, "TestJSImplInterface"
, "overload1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35439 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35439( cx, "TestJSImplInterface"
, "overload1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
35440
35441 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
35442 unsigned argcount = std::min(args.length(), 2u);
35443 switch (argcount) {
35444 case 1: {
35445 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35446 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35447 if (objIsXray) {
35448 unwrappedObj.emplace(cx, obj);
35449 }
35450 NonNull<mozilla::dom::TestJSImplInterface> arg0;
35451 if (args[0].isObject()) {
35452 {
35453 // Our JSContext should be in the right global to do unwrapping in.
35454 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0, cx);
35455 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
35456 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestJSImplInterface");
35457 return false;
35458 }
35459 }
35460 } else {
35461 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
35462 return false;
35463 }
35464 if (objIsXray) {
35465 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35466 // we know Xrays have no dynamic unwrap behavior.
35467 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35468 if (!unwrappedObj.ref()) {
35469 return false;
35470 }
35471 }
35472 FastErrorResult rv;
35473 bool result(MOZ_KnownLive(self)(self)->Overload1(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
35474 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload1"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload1"
)), 0))
) {
35475 return false;
35476 }
35477 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35477); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35477; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35478 args.rval().setBoolean(result);
35479 return true;
35480 break;
35481 }
35482 case 2: {
35483 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35484 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35485 if (objIsXray) {
35486 unwrappedObj.emplace(cx, obj);
35487 }
35488 binding_detail::FakeString<char16_t> arg0;
35489 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
35490 return false;
35491 }
35492 NonNull<mozilla::dom::TestJSImplInterface> arg1;
35493 if (args[1].isObject()) {
35494 {
35495 // Our JSContext should be in the right global to do unwrapping in.
35496 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[1], arg1, cx);
35497 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
35498 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 2", "TestJSImplInterface");
35499 return false;
35500 }
35501 }
35502 } else {
35503 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 2");
35504 return false;
35505 }
35506 if (objIsXray) {
35507 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35508 // we know Xrays have no dynamic unwrap behavior.
35509 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35510 if (!unwrappedObj.ref()) {
35511 return false;
35512 }
35513 }
35514 FastErrorResult rv;
35515 auto result(StrongOrRawPtr<mozilla::dom::TestJSImplInterface>(MOZ_KnownLive(self)(self)->Overload1(NonNullHelper(Constify(arg0)), MOZ_KnownLive(NonNullHelper(arg1))(NonNullHelper(arg1)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
35516 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload1"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload1"
)), 0))
) {
35517 return false;
35518 }
35519 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35519); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35519; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35520 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
35521 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35521); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 35521; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
35522 return false;
35523 }
35524 return true;
35525 break;
35526 }
35527 default: {
35528 // Using nsPrintfCString here would require including that
35529 // header. Let's not worry about it.
35530 nsAutoCString argCountStr;
35531 argCountStr.AppendPrintf("%u", args.length());
35532 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
35533 }
35534 }
35535 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 35535); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 35535; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
35536 return false;
35537}
35538
35539static const JSJitInfo overload1_methodinfo = {
35540 { (JSJitGetterOp)overload1 },
35541 { prototypes::id::TestJSImplInterface },
35542 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
35543 JSJitInfo::Method,
35544 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35545 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
35546 false, /* isInfallible. False in setters. */
35547 false, /* isMovable. Not relevant for setters. */
35548 false, /* isEliminatable. Not relevant for setters. */
35549 false, /* isAlwaysInSlot. Only relevant for getters. */
35550 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35551 false, /* isTypedMethod. Only relevant for methods. */
35552 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35553};
35554
35555MOZ_CAN_RUN_SCRIPT static bool
35556overload2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35557{
35558 BindingCallContext cx(cx_, "TestJSImplInterface.overload2");
35559 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35562( cx, "TestJSImplInterface"
, "overload2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35560 "TestJSImplInterface", "overload2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35562( cx, "TestJSImplInterface"
, "overload2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35561 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35562( cx, "TestJSImplInterface"
, "overload2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35562 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35562( cx, "TestJSImplInterface"
, "overload2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
35563
35564 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
35565 unsigned argcount = std::min(args.length(), 1u);
35566 switch (argcount) {
35567 case 0: {
35568 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35569 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35570 if (objIsXray) {
35571 unwrappedObj.emplace(cx, obj);
35572 }
35573 RootedDictionary<binding_detail::FastDict> arg0(cx);
35574 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", true)) {
35575 return false;
35576 }
35577 if (objIsXray) {
35578 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35579 // we know Xrays have no dynamic unwrap behavior.
35580 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35581 if (!unwrappedObj.ref()) {
35582 return false;
35583 }
35584 }
35585 FastErrorResult rv;
35586 // NOTE: This assert does NOT call the function.
35587 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35588 MOZ_KnownLive(self)(self)->Overload2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35589 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload2"
)), 0))
) {
35590 return false;
35591 }
35592 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35592); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35592; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35593 args.rval().setUndefined();
35594 return true;
35595 break;
35596 }
35597 case 1: {
35598 if (args[0].isNullOrUndefined()) {
35599 RootedDictionary<binding_detail::FastDict> arg0(cx);
35600 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
35601 return false;
35602 }
35603 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35604 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35605 if (objIsXray) {
35606 unwrappedObj.emplace(cx, obj);
35607 }
35608 if (objIsXray) {
35609 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35610 // we know Xrays have no dynamic unwrap behavior.
35611 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35612 if (!unwrappedObj.ref()) {
35613 return false;
35614 }
35615 }
35616 FastErrorResult rv;
35617 // NOTE: This assert does NOT call the function.
35618 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35619 MOZ_KnownLive(self)(self)->Overload2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35620 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload2"
)), 0))
) {
35621 return false;
35622 }
35623 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35623); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35623; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35624 args.rval().setUndefined();
35625 return true;
35626 }
35627 if (args[0].isObject()) {
35628 do {
35629 NonNull<mozilla::dom::TestJSImplInterface> arg0;
35630 {
35631 // Our JSContext should be in the right global to do unwrapping in.
35632 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0, cx);
35633 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
35634 break;
35635 }
35636 }
35637 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35638 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35639 if (objIsXray) {
35640 unwrappedObj.emplace(cx, obj);
35641 }
35642 if (objIsXray) {
35643 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35644 // we know Xrays have no dynamic unwrap behavior.
35645 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35646 if (!unwrappedObj.ref()) {
35647 return false;
35648 }
35649 }
35650 FastErrorResult rv;
35651 // NOTE: This assert does NOT call the function.
35652 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload2(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35653 MOZ_KnownLive(self)(self)->Overload2(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35654 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload2"
)), 0))
) {
35655 return false;
35656 }
35657 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35657); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35657; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35658 args.rval().setUndefined();
35659 return true;
35660 } while (false);
35661 do {
35662 RootedDictionary<binding_detail::FastDict> arg0(cx);
35663 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
35664 return false;
35665 }
35666 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35667 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35668 if (objIsXray) {
35669 unwrappedObj.emplace(cx, obj);
35670 }
35671 if (objIsXray) {
35672 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35673 // we know Xrays have no dynamic unwrap behavior.
35674 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35675 if (!unwrappedObj.ref()) {
35676 return false;
35677 }
35678 }
35679 FastErrorResult rv;
35680 // NOTE: This assert does NOT call the function.
35681 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35682 MOZ_KnownLive(self)(self)->Overload2(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35683 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload2"
)), 0))
) {
35684 return false;
35685 }
35686 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35686); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35686; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35687 args.rval().setUndefined();
35688 return true;
35689 } while (false);
35690 }
35691 if (args[0].isBoolean()) {
35692 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35693 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35694 if (objIsXray) {
35695 unwrappedObj.emplace(cx, obj);
35696 }
35697 bool arg0;
35698 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0)) {
35699 return false;
35700 }
35701 if (objIsXray) {
35702 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35703 // we know Xrays have no dynamic unwrap behavior.
35704 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35705 if (!unwrappedObj.ref()) {
35706 return false;
35707 }
35708 }
35709 FastErrorResult rv;
35710 // NOTE: This assert does NOT call the function.
35711 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload2(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35712 MOZ_KnownLive(self)(self)->Overload2(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35713 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload2"
)), 0))
) {
35714 return false;
35715 }
35716 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35716); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35716; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35717 args.rval().setUndefined();
35718 return true;
35719 }
35720 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35721 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35722 if (objIsXray) {
35723 unwrappedObj.emplace(cx, obj);
35724 }
35725 binding_detail::FakeString<char16_t> arg0;
35726 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
35727 return false;
35728 }
35729 if (objIsXray) {
35730 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35731 // we know Xrays have no dynamic unwrap behavior.
35732 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35733 if (!unwrappedObj.ref()) {
35734 return false;
35735 }
35736 }
35737 FastErrorResult rv;
35738 // NOTE: This assert does NOT call the function.
35739 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload2(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35740 MOZ_KnownLive(self)(self)->Overload2(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35741 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload2"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload2"
)), 0))
) {
35742 return false;
35743 }
35744 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35744); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35744; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35745 args.rval().setUndefined();
35746 return true;
35747 break;
35748 }
35749 default: {
35750 // Using nsPrintfCString here would require including that
35751 // header. Let's not worry about it.
35752 nsAutoCString argCountStr;
35753 argCountStr.AppendPrintf("%u", args.length());
35754 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
35755 }
35756 }
35757 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 35757); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 35757; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
35758 return false;
35759}
35760
35761static const JSJitInfo overload2_methodinfo = {
35762 { (JSJitGetterOp)overload2 },
35763 { prototypes::id::TestJSImplInterface },
35764 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
35765 JSJitInfo::Method,
35766 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35767 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35768 false, /* isInfallible. False in setters. */
35769 false, /* isMovable. Not relevant for setters. */
35770 false, /* isEliminatable. Not relevant for setters. */
35771 false, /* isAlwaysInSlot. Only relevant for getters. */
35772 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35773 false, /* isTypedMethod. Only relevant for methods. */
35774 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35775};
35776
35777MOZ_CAN_RUN_SCRIPT static bool
35778overload3(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35779{
35780 BindingCallContext cx(cx_, "TestJSImplInterface.overload3");
35781 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35784( cx, "TestJSImplInterface"
, "overload3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35782 "TestJSImplInterface", "overload3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35784( cx, "TestJSImplInterface"
, "overload3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35783 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35784( cx, "TestJSImplInterface"
, "overload3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35784 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35784( cx, "TestJSImplInterface"
, "overload3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
35785
35786 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
35787 unsigned argcount = std::min(args.length(), 1u);
35788 switch (argcount) {
35789 case 1: {
35790 if (args[0].isObject()) {
35791 do {
35792 NonNull<mozilla::dom::TestJSImplInterface> arg0;
35793 {
35794 // Our JSContext should be in the right global to do unwrapping in.
35795 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0, cx);
35796 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
35797 break;
35798 }
35799 }
35800 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35801 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35802 if (objIsXray) {
35803 unwrappedObj.emplace(cx, obj);
35804 }
35805 if (objIsXray) {
35806 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35807 // we know Xrays have no dynamic unwrap behavior.
35808 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35809 if (!unwrappedObj.ref()) {
35810 return false;
35811 }
35812 }
35813 FastErrorResult rv;
35814 // NOTE: This assert does NOT call the function.
35815 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35816 MOZ_KnownLive(self)(self)->Overload3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35817 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload3"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload3"
)), 0))
) {
35818 return false;
35819 }
35820 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35820); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35820; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35821 args.rval().setUndefined();
35822 return true;
35823 } while (false);
35824 do {
35825 RootedCallback<OwningNonNull<binding_detail::FastMyTestCallback>> arg0(cx);
35826 if (JS::IsCallable(&args[0].toObject())) {
35827 { // scope for tempRoot and tempGlobalRoot if needed
35828 arg0 = new binding_detail::FastMyTestCallback(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
35829 }
35830 } else {
35831 break;
35832 }
35833 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35834 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35835 if (objIsXray) {
35836 unwrappedObj.emplace(cx, obj);
35837 }
35838 if (objIsXray) {
35839 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35840 // we know Xrays have no dynamic unwrap behavior.
35841 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35842 if (!unwrappedObj.ref()) {
35843 return false;
35844 }
35845 }
35846 FastErrorResult rv;
35847 // NOTE: This assert does NOT call the function.
35848 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35849 MOZ_KnownLive(self)(self)->Overload3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35850 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload3"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload3"
)), 0))
) {
35851 return false;
35852 }
35853 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35853); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35853; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35854 args.rval().setUndefined();
35855 return true;
35856 } while (false);
35857 }
35858 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35859 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35860 if (objIsXray) {
35861 unwrappedObj.emplace(cx, obj);
35862 }
35863 bool arg0;
35864 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0)) {
35865 return false;
35866 }
35867 if (objIsXray) {
35868 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35869 // we know Xrays have no dynamic unwrap behavior.
35870 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35871 if (!unwrappedObj.ref()) {
35872 return false;
35873 }
35874 }
35875 FastErrorResult rv;
35876 // NOTE: This assert does NOT call the function.
35877 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload3(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35878 MOZ_KnownLive(self)(self)->Overload3(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35879 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload3"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload3"
)), 0))
) {
35880 return false;
35881 }
35882 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35882); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35882; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35883 args.rval().setUndefined();
35884 return true;
35885 break;
35886 }
35887 default: {
35888 // Using nsPrintfCString here would require including that
35889 // header. Let's not worry about it.
35890 nsAutoCString argCountStr;
35891 argCountStr.AppendPrintf("%u", args.length());
35892 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
35893 }
35894 }
35895 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 35895); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 35895; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
35896 return false;
35897}
35898
35899static const JSJitInfo overload3_methodinfo = {
35900 { (JSJitGetterOp)overload3 },
35901 { prototypes::id::TestJSImplInterface },
35902 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
35903 JSJitInfo::Method,
35904 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
35905 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
35906 false, /* isInfallible. False in setters. */
35907 false, /* isMovable. Not relevant for setters. */
35908 false, /* isEliminatable. Not relevant for setters. */
35909 false, /* isAlwaysInSlot. Only relevant for getters. */
35910 false, /* isLazilyCachedInSlot. Only relevant for getters. */
35911 false, /* isTypedMethod. Only relevant for methods. */
35912 0 /* Reserved slot index, if we're stored in a slot, else 0. */
35913};
35914
35915MOZ_CAN_RUN_SCRIPT static bool
35916overload4(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
35917{
35918 BindingCallContext cx(cx_, "TestJSImplInterface.overload4");
35919 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject35922( cx, "TestJSImplInterface"
, "overload4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35920 "TestJSImplInterface", "overload4", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject35922( cx, "TestJSImplInterface"
, "overload4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35921 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject35922( cx, "TestJSImplInterface"
, "overload4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
35922 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject35922( cx, "TestJSImplInterface"
, "overload4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
35923
35924 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
35925 unsigned argcount = std::min(args.length(), 1u);
35926 switch (argcount) {
35927 case 1: {
35928 if (args[0].isObject()) {
35929 do {
35930 NonNull<mozilla::dom::TestJSImplInterface> arg0;
35931 {
35932 // Our JSContext should be in the right global to do unwrapping in.
35933 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0, cx);
35934 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
35935 break;
35936 }
35937 }
35938 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35939 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35940 if (objIsXray) {
35941 unwrappedObj.emplace(cx, obj);
35942 }
35943 if (objIsXray) {
35944 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35945 // we know Xrays have no dynamic unwrap behavior.
35946 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35947 if (!unwrappedObj.ref()) {
35948 return false;
35949 }
35950 }
35951 FastErrorResult rv;
35952 // NOTE: This assert does NOT call the function.
35953 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload4(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35954 MOZ_KnownLive(self)(self)->Overload4(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35955 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload4"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload4"
)), 0))
) {
35956 return false;
35957 }
35958 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35958); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35958; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35959 args.rval().setUndefined();
35960 return true;
35961 } while (false);
35962 do {
35963 RootedCallback<OwningNonNull<binding_detail::FastTestCallbackInterface>> arg0(cx);
35964 { // scope for tempRoot and tempGlobalRoot if needed
35965 arg0 = new binding_detail::FastTestCallbackInterface(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
35966 }
35967 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35968 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35969 if (objIsXray) {
35970 unwrappedObj.emplace(cx, obj);
35971 }
35972 if (objIsXray) {
35973 // Since our object is an Xray, we can just CheckedUnwrapStatic:
35974 // we know Xrays have no dynamic unwrap behavior.
35975 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
35976 if (!unwrappedObj.ref()) {
35977 return false;
35978 }
35979 }
35980 FastErrorResult rv;
35981 // NOTE: This assert does NOT call the function.
35982 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload4(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
35983 MOZ_KnownLive(self)(self)->Overload4(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
35984 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload4"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload4"
)), 0))
) {
35985 return false;
35986 }
35987 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 35987); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 35987; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
35988 args.rval().setUndefined();
35989 return true;
35990 } while (false);
35991 }
35992 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
35993 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
35994 if (objIsXray) {
35995 unwrappedObj.emplace(cx, obj);
35996 }
35997 binding_detail::FakeString<char16_t> arg0;
35998 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
35999 return false;
36000 }
36001 if (objIsXray) {
36002 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36003 // we know Xrays have no dynamic unwrap behavior.
36004 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36005 if (!unwrappedObj.ref()) {
36006 return false;
36007 }
36008 }
36009 FastErrorResult rv;
36010 // NOTE: This assert does NOT call the function.
36011 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload4(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36012 MOZ_KnownLive(self)(self)->Overload4(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36013 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload4"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload4"
)), 0))
) {
36014 return false;
36015 }
36016 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36016); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36016; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36017 args.rval().setUndefined();
36018 return true;
36019 break;
36020 }
36021 default: {
36022 // Using nsPrintfCString here would require including that
36023 // header. Let's not worry about it.
36024 nsAutoCString argCountStr;
36025 argCountStr.AppendPrintf("%u", args.length());
36026 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
36027 }
36028 }
36029 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 36029); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 36029; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
36030 return false;
36031}
36032
36033static const JSJitInfo overload4_methodinfo = {
36034 { (JSJitGetterOp)overload4 },
36035 { prototypes::id::TestJSImplInterface },
36036 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
36037 JSJitInfo::Method,
36038 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36039 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36040 false, /* isInfallible. False in setters. */
36041 false, /* isMovable. Not relevant for setters. */
36042 false, /* isEliminatable. Not relevant for setters. */
36043 false, /* isAlwaysInSlot. Only relevant for getters. */
36044 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36045 false, /* isTypedMethod. Only relevant for methods. */
36046 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36047};
36048
36049MOZ_CAN_RUN_SCRIPT static bool
36050overload5(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36051{
36052 BindingCallContext cx(cx_, "TestJSImplInterface.overload5");
36053 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36056( cx, "TestJSImplInterface"
, "overload5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36054 "TestJSImplInterface", "overload5", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36056( cx, "TestJSImplInterface"
, "overload5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36055 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36056( cx, "TestJSImplInterface"
, "overload5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36056 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36056( cx, "TestJSImplInterface"
, "overload5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
36057
36058 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
36059 unsigned argcount = std::min(args.length(), 1u);
36060 switch (argcount) {
36061 case 1: {
36062 if (args[0].isNumber()) {
36063 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36064 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36065 if (objIsXray) {
36066 unwrappedObj.emplace(cx, obj);
36067 }
36068 int32_t arg0;
36069 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
36070 return false;
36071 }
36072 if (objIsXray) {
36073 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36074 // we know Xrays have no dynamic unwrap behavior.
36075 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36076 if (!unwrappedObj.ref()) {
36077 return false;
36078 }
36079 }
36080 FastErrorResult rv;
36081 // NOTE: This assert does NOT call the function.
36082 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload5(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36083 MOZ_KnownLive(self)(self)->Overload5(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36084 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload5"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload5"
)), 0))
) {
36085 return false;
36086 }
36087 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36087); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36087; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36088 args.rval().setUndefined();
36089 return true;
36090 }
36091 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36092 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36093 if (objIsXray) {
36094 unwrappedObj.emplace(cx, obj);
36095 }
36096 MyTestEnum arg0;
36097 {
36098 int index;
36099 if (!binding_detail::FindEnumStringIndex<true>(cx, args[0],
36100 binding_detail::EnumStrings<MyTestEnum>::Values,
36101 "MyTestEnum", "argument 1",
36102 &index)) {
36103 return false;
36104 }
36105 MOZ_ASSERT(index >= 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(index >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(index >= 0))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("index >= 0",
"../TestJSImplGenBinding.cpp", 36105); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 36105; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
36106 arg0 = static_cast<MyTestEnum>(index);
36107 }
36108 if (objIsXray) {
36109 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36110 // we know Xrays have no dynamic unwrap behavior.
36111 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36112 if (!unwrappedObj.ref()) {
36113 return false;
36114 }
36115 }
36116 FastErrorResult rv;
36117 // NOTE: This assert does NOT call the function.
36118 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload5(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36119 MOZ_KnownLive(self)(self)->Overload5(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36120 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload5"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload5"
)), 0))
) {
36121 return false;
36122 }
36123 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36123); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36123; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36124 args.rval().setUndefined();
36125 return true;
36126 break;
36127 }
36128 default: {
36129 // Using nsPrintfCString here would require including that
36130 // header. Let's not worry about it.
36131 nsAutoCString argCountStr;
36132 argCountStr.AppendPrintf("%u", args.length());
36133 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
36134 }
36135 }
36136 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 36136); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 36136; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
36137 return false;
36138}
36139
36140static const JSJitInfo overload5_methodinfo = {
36141 { (JSJitGetterOp)overload5 },
36142 { prototypes::id::TestJSImplInterface },
36143 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
36144 JSJitInfo::Method,
36145 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36146 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36147 false, /* isInfallible. False in setters. */
36148 false, /* isMovable. Not relevant for setters. */
36149 false, /* isEliminatable. Not relevant for setters. */
36150 false, /* isAlwaysInSlot. Only relevant for getters. */
36151 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36152 false, /* isTypedMethod. Only relevant for methods. */
36153 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36154};
36155
36156MOZ_CAN_RUN_SCRIPT static bool
36157overload6(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36158{
36159 BindingCallContext cx(cx_, "TestJSImplInterface.overload6");
36160 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36163( cx, "TestJSImplInterface"
, "overload6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36161 "TestJSImplInterface", "overload6", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36163( cx, "TestJSImplInterface"
, "overload6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36162 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36163( cx, "TestJSImplInterface"
, "overload6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36163 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36163( cx, "TestJSImplInterface"
, "overload6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
36164
36165 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
36166 unsigned argcount = std::min(args.length(), 1u);
36167 switch (argcount) {
36168 case 1: {
36169 if (args[0].isBoolean()) {
36170 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36171 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36172 if (objIsXray) {
36173 unwrappedObj.emplace(cx, obj);
36174 }
36175 bool arg0;
36176 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0)) {
36177 return false;
36178 }
36179 if (objIsXray) {
36180 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36181 // we know Xrays have no dynamic unwrap behavior.
36182 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36183 if (!unwrappedObj.ref()) {
36184 return false;
36185 }
36186 }
36187 FastErrorResult rv;
36188 // NOTE: This assert does NOT call the function.
36189 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload6(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36190 MOZ_KnownLive(self)(self)->Overload6(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36191 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload6"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload6"
)), 0))
) {
36192 return false;
36193 }
36194 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36194); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36194; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36195 args.rval().setUndefined();
36196 return true;
36197 }
36198 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36199 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36200 if (objIsXray) {
36201 unwrappedObj.emplace(cx, obj);
36202 }
36203 int32_t arg0;
36204 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
36205 return false;
36206 }
36207 if (objIsXray) {
36208 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36209 // we know Xrays have no dynamic unwrap behavior.
36210 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36211 if (!unwrappedObj.ref()) {
36212 return false;
36213 }
36214 }
36215 FastErrorResult rv;
36216 // NOTE: This assert does NOT call the function.
36217 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload6(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36218 MOZ_KnownLive(self)(self)->Overload6(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36219 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload6"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload6"
)), 0))
) {
36220 return false;
36221 }
36222 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36222); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36222; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36223 args.rval().setUndefined();
36224 return true;
36225 break;
36226 }
36227 default: {
36228 // Using nsPrintfCString here would require including that
36229 // header. Let's not worry about it.
36230 nsAutoCString argCountStr;
36231 argCountStr.AppendPrintf("%u", args.length());
36232 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
36233 }
36234 }
36235 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 36235); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 36235; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
36236 return false;
36237}
36238
36239static const JSJitInfo overload6_methodinfo = {
36240 { (JSJitGetterOp)overload6 },
36241 { prototypes::id::TestJSImplInterface },
36242 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
36243 JSJitInfo::Method,
36244 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36245 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36246 false, /* isInfallible. False in setters. */
36247 false, /* isMovable. Not relevant for setters. */
36248 false, /* isEliminatable. Not relevant for setters. */
36249 false, /* isAlwaysInSlot. Only relevant for getters. */
36250 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36251 false, /* isTypedMethod. Only relevant for methods. */
36252 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36253};
36254
36255MOZ_CAN_RUN_SCRIPT static bool
36256overload7(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36257{
36258 BindingCallContext cx(cx_, "TestJSImplInterface.overload7");
36259 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36262( cx, "TestJSImplInterface"
, "overload7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36260 "TestJSImplInterface", "overload7", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36262( cx, "TestJSImplInterface"
, "overload7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36261 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36262( cx, "TestJSImplInterface"
, "overload7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36262 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36262( cx, "TestJSImplInterface"
, "overload7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
36263
36264 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
36265 unsigned argcount = std::min(args.length(), 1u);
36266 switch (argcount) {
36267 case 1: {
36268 if (args[0].isBoolean()) {
36269 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36270 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36271 if (objIsXray) {
36272 unwrappedObj.emplace(cx, obj);
36273 }
36274 bool arg0;
36275 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0)) {
36276 return false;
36277 }
36278 if (objIsXray) {
36279 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36280 // we know Xrays have no dynamic unwrap behavior.
36281 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36282 if (!unwrappedObj.ref()) {
36283 return false;
36284 }
36285 }
36286 FastErrorResult rv;
36287 // NOTE: This assert does NOT call the function.
36288 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload7(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36289 MOZ_KnownLive(self)(self)->Overload7(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36290 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload7"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload7"
)), 0))
) {
36291 return false;
36292 }
36293 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36293); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36293; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36294 args.rval().setUndefined();
36295 return true;
36296 }
36297 if (args[0].isNumber()) {
36298 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36299 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36300 if (objIsXray) {
36301 unwrappedObj.emplace(cx, obj);
36302 }
36303 int32_t arg0;
36304 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
36305 return false;
36306 }
36307 if (objIsXray) {
36308 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36309 // we know Xrays have no dynamic unwrap behavior.
36310 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36311 if (!unwrappedObj.ref()) {
36312 return false;
36313 }
36314 }
36315 FastErrorResult rv;
36316 // NOTE: This assert does NOT call the function.
36317 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload7(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36318 MOZ_KnownLive(self)(self)->Overload7(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36319 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload7"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload7"
)), 0))
) {
36320 return false;
36321 }
36322 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36322); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36322; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36323 args.rval().setUndefined();
36324 return true;
36325 }
36326 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36327 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36328 if (objIsXray) {
36329 unwrappedObj.emplace(cx, obj);
36330 }
36331 nsCString arg0;
36332 if (!ConvertJSValueToByteString(cx, args[0], false, "argument 1", arg0)) {
36333 return false;
36334 }
36335 if (objIsXray) {
36336 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36337 // we know Xrays have no dynamic unwrap behavior.
36338 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36339 if (!unwrappedObj.ref()) {
36340 return false;
36341 }
36342 }
36343 FastErrorResult rv;
36344 // NOTE: This assert does NOT call the function.
36345 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload7(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36346 MOZ_KnownLive(self)(self)->Overload7(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36347 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload7"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload7"
)), 0))
) {
36348 return false;
36349 }
36350 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36350); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36350; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36351 args.rval().setUndefined();
36352 return true;
36353 break;
36354 }
36355 default: {
36356 // Using nsPrintfCString here would require including that
36357 // header. Let's not worry about it.
36358 nsAutoCString argCountStr;
36359 argCountStr.AppendPrintf("%u", args.length());
36360 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
36361 }
36362 }
36363 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 36363); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 36363; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
36364 return false;
36365}
36366
36367static const JSJitInfo overload7_methodinfo = {
36368 { (JSJitGetterOp)overload7 },
36369 { prototypes::id::TestJSImplInterface },
36370 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
36371 JSJitInfo::Method,
36372 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36373 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36374 false, /* isInfallible. False in setters. */
36375 false, /* isMovable. Not relevant for setters. */
36376 false, /* isEliminatable. Not relevant for setters. */
36377 false, /* isAlwaysInSlot. Only relevant for getters. */
36378 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36379 false, /* isTypedMethod. Only relevant for methods. */
36380 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36381};
36382
36383MOZ_CAN_RUN_SCRIPT static bool
36384overload8(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36385{
36386 BindingCallContext cx(cx_, "TestJSImplInterface.overload8");
36387 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36390( cx, "TestJSImplInterface"
, "overload8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36388 "TestJSImplInterface", "overload8", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36390( cx, "TestJSImplInterface"
, "overload8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36389 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36390( cx, "TestJSImplInterface"
, "overload8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36390 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36390( cx, "TestJSImplInterface"
, "overload8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
36391
36392 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
36393 unsigned argcount = std::min(args.length(), 1u);
36394 switch (argcount) {
36395 case 1: {
36396 if (args[0].isObject()) {
36397 do {
36398 NonNull<mozilla::dom::TestJSImplInterface> arg0;
36399 {
36400 // Our JSContext should be in the right global to do unwrapping in.
36401 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[0], arg0, cx);
36402 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
36403 break;
36404 }
36405 }
36406 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36407 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36408 if (objIsXray) {
36409 unwrappedObj.emplace(cx, obj);
36410 }
36411 if (objIsXray) {
36412 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36413 // we know Xrays have no dynamic unwrap behavior.
36414 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36415 if (!unwrappedObj.ref()) {
36416 return false;
36417 }
36418 }
36419 FastErrorResult rv;
36420 // NOTE: This assert does NOT call the function.
36421 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload8(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36422 MOZ_KnownLive(self)(self)->Overload8(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36423 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload8"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload8"
)), 0))
) {
36424 return false;
36425 }
36426 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36426); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36426; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36427 args.rval().setUndefined();
36428 return true;
36429 } while (false);
36430 }
36431 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36432 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36433 if (objIsXray) {
36434 unwrappedObj.emplace(cx, obj);
36435 }
36436 int32_t arg0;
36437 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
36438 return false;
36439 }
36440 if (objIsXray) {
36441 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36442 // we know Xrays have no dynamic unwrap behavior.
36443 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36444 if (!unwrappedObj.ref()) {
36445 return false;
36446 }
36447 }
36448 FastErrorResult rv;
36449 // NOTE: This assert does NOT call the function.
36450 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload8(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36451 MOZ_KnownLive(self)(self)->Overload8(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36452 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload8"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload8"
)), 0))
) {
36453 return false;
36454 }
36455 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36455); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36455; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36456 args.rval().setUndefined();
36457 return true;
36458 break;
36459 }
36460 default: {
36461 // Using nsPrintfCString here would require including that
36462 // header. Let's not worry about it.
36463 nsAutoCString argCountStr;
36464 argCountStr.AppendPrintf("%u", args.length());
36465 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
36466 }
36467 }
36468 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 36468); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 36468; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
36469 return false;
36470}
36471
36472static const JSJitInfo overload8_methodinfo = {
36473 { (JSJitGetterOp)overload8 },
36474 { prototypes::id::TestJSImplInterface },
36475 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
36476 JSJitInfo::Method,
36477 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36478 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36479 false, /* isInfallible. False in setters. */
36480 false, /* isMovable. Not relevant for setters. */
36481 false, /* isEliminatable. Not relevant for setters. */
36482 false, /* isAlwaysInSlot. Only relevant for getters. */
36483 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36484 false, /* isTypedMethod. Only relevant for methods. */
36485 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36486};
36487
36488MOZ_CAN_RUN_SCRIPT static bool
36489overload9(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36490{
36491 BindingCallContext cx(cx_, "TestJSImplInterface.overload9");
36492 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36495( cx, "TestJSImplInterface"
, "overload9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36493 "TestJSImplInterface", "overload9", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36495( cx, "TestJSImplInterface"
, "overload9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36494 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36495( cx, "TestJSImplInterface"
, "overload9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
36495 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36495( cx, "TestJSImplInterface"
, "overload9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
36496
36497 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
36498 unsigned argcount = std::min(args.length(), 1u);
36499 switch (argcount) {
36500 case 1: {
36501 if (args[0].isNullOrUndefined()) {
36502 Nullable<int32_t> arg0;
36503 if (args[0].isNullOrUndefined()) {
36504 arg0.SetNull();
36505 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.SetValue())) {
36506 return false;
36507 }
36508 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36509 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36510 if (objIsXray) {
36511 unwrappedObj.emplace(cx, obj);
36512 }
36513 if (objIsXray) {
36514 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36515 // we know Xrays have no dynamic unwrap behavior.
36516 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36517 if (!unwrappedObj.ref()) {
36518 return false;
36519 }
36520 }
36521 FastErrorResult rv;
36522 // NOTE: This assert does NOT call the function.
36523 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload9(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36524 MOZ_KnownLive(self)(self)->Overload9(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36525 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload9"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload9"
)), 0))
) {
36526 return false;
36527 }
36528 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36528); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36528; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36529 args.rval().setUndefined();
36530 return true;
36531 }
36532 if (args[0].isNumber()) {
36533 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36534 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36535 if (objIsXray) {
36536 unwrappedObj.emplace(cx, obj);
36537 }
36538 Nullable<int32_t> arg0;
36539 if (args[0].isNullOrUndefined()) {
36540 arg0.SetNull();
36541 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.SetValue())) {
36542 return false;
36543 }
36544 if (objIsXray) {
36545 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36546 // we know Xrays have no dynamic unwrap behavior.
36547 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36548 if (!unwrappedObj.ref()) {
36549 return false;
36550 }
36551 }
36552 FastErrorResult rv;
36553 // NOTE: This assert does NOT call the function.
36554 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload9(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36555 MOZ_KnownLive(self)(self)->Overload9(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36556 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload9"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload9"
)), 0))
) {
36557 return false;
36558 }
36559 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36559); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36559; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36560 args.rval().setUndefined();
36561 return true;
36562 }
36563 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36564 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36565 if (objIsXray) {
36566 unwrappedObj.emplace(cx, obj);
36567 }
36568 binding_detail::FakeString<char16_t> arg0;
36569 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
36570 return false;
36571 }
36572 if (objIsXray) {
36573 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36574 // we know Xrays have no dynamic unwrap behavior.
36575 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36576 if (!unwrappedObj.ref()) {
36577 return false;
36578 }
36579 }
36580 FastErrorResult rv;
36581 // NOTE: This assert does NOT call the function.
36582 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload9(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36583 MOZ_KnownLive(self)(self)->Overload9(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36584 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload9"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload9"
)), 0))
) {
36585 return false;
36586 }
36587 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36587); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36587; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36588 args.rval().setUndefined();
36589 return true;
36590 break;
36591 }
36592 default: {
36593 // Using nsPrintfCString here would require including that
36594 // header. Let's not worry about it.
36595 nsAutoCString argCountStr;
36596 argCountStr.AppendPrintf("%u", args.length());
36597 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
36598 }
36599 }
36600 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 36600); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 36600; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
36601 return false;
36602}
36603
36604static const JSJitInfo overload9_methodinfo = {
36605 { (JSJitGetterOp)overload9 },
36606 { prototypes::id::TestJSImplInterface },
36607 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
36608 JSJitInfo::Method,
36609 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36610 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36611 false, /* isInfallible. False in setters. */
36612 false, /* isMovable. Not relevant for setters. */
36613 false, /* isEliminatable. Not relevant for setters. */
36614 false, /* isAlwaysInSlot. Only relevant for getters. */
36615 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36616 false, /* isTypedMethod. Only relevant for methods. */
36617 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36618};
36619
36620MOZ_CAN_RUN_SCRIPT static bool
36621overload10(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36622{
36623 BindingCallContext cx(cx_, "TestJSImplInterface.overload10");
36624 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36627( cx, "TestJSImplInterface"
, "overload10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36625 "TestJSImplInterface", "overload10", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36627( cx, "TestJSImplInterface"
, "overload10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36626 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36627( cx, "TestJSImplInterface"
, "overload10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36627 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36627( cx, "TestJSImplInterface"
, "overload10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36628
36629 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
36630 unsigned argcount = std::min(args.length(), 1u);
36631 switch (argcount) {
36632 case 1: {
36633 if (args[0].isObject()) {
36634 do {
36635 JS::Rooted<JSObject*> arg0(cx);
36636#ifdef __clang__1
36637#pragma clang diagnostic push
36638#pragma clang diagnostic ignored "-Wunreachable-code"
36639#pragma clang diagnostic ignored "-Wunreachable-code-return"
36640#endif // __clang__
36641 if ((true) && !CallerSubsumes(args[0])) {
36642 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 1");
36643 return false;
36644 }
36645#ifdef __clang__1
36646#pragma clang diagnostic pop
36647#endif // __clang__
36648 arg0 = &args[0].toObject();
36649 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36650 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36651 if (objIsXray) {
36652 unwrappedObj.emplace(cx, obj);
36653 }
36654 if (objIsXray) {
36655 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36656 // we know Xrays have no dynamic unwrap behavior.
36657 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36658 if (!unwrappedObj.ref()) {
36659 return false;
36660 }
36661 }
36662 FastErrorResult rv;
36663 // NOTE: This assert does NOT call the function.
36664 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload10(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36665 MOZ_KnownLive(self)(self)->Overload10(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36666 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload10"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload10"
)), 0))
) {
36667 return false;
36668 }
36669 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36669); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36669; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36670 args.rval().setUndefined();
36671 return true;
36672 } while (false);
36673 }
36674 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36675 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36676 if (objIsXray) {
36677 unwrappedObj.emplace(cx, obj);
36678 }
36679 Nullable<int32_t> arg0;
36680 if (args[0].isNullOrUndefined()) {
36681 arg0.SetNull();
36682 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.SetValue())) {
36683 return false;
36684 }
36685 if (objIsXray) {
36686 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36687 // we know Xrays have no dynamic unwrap behavior.
36688 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36689 if (!unwrappedObj.ref()) {
36690 return false;
36691 }
36692 }
36693 FastErrorResult rv;
36694 // NOTE: This assert does NOT call the function.
36695 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload10(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36696 MOZ_KnownLive(self)(self)->Overload10(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36697 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload10"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload10"
)), 0))
) {
36698 return false;
36699 }
36700 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36700); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36700; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36701 args.rval().setUndefined();
36702 return true;
36703 break;
36704 }
36705 default: {
36706 // Using nsPrintfCString here would require including that
36707 // header. Let's not worry about it.
36708 nsAutoCString argCountStr;
36709 argCountStr.AppendPrintf("%u", args.length());
36710 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
36711 }
36712 }
36713 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 36713); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 36713; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
36714 return false;
36715}
36716
36717static const JSJitInfo overload10_methodinfo = {
36718 { (JSJitGetterOp)overload10 },
36719 { prototypes::id::TestJSImplInterface },
36720 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
36721 JSJitInfo::Method,
36722 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36723 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36724 false, /* isInfallible. False in setters. */
36725 false, /* isMovable. Not relevant for setters. */
36726 false, /* isEliminatable. Not relevant for setters. */
36727 false, /* isAlwaysInSlot. Only relevant for getters. */
36728 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36729 false, /* isTypedMethod. Only relevant for methods. */
36730 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36731};
36732
36733MOZ_CAN_RUN_SCRIPT static bool
36734overload11(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36735{
36736 BindingCallContext cx(cx_, "TestJSImplInterface.overload11");
36737 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36740( cx, "TestJSImplInterface"
, "overload11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36738 "TestJSImplInterface", "overload11", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36740( cx, "TestJSImplInterface"
, "overload11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36739 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36740( cx, "TestJSImplInterface"
, "overload11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36740 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36740( cx, "TestJSImplInterface"
, "overload11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36741
36742 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
36743 unsigned argcount = std::min(args.length(), 1u);
36744 switch (argcount) {
36745 case 1: {
36746 if (args[0].isNumber()) {
36747 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36748 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36749 if (objIsXray) {
36750 unwrappedObj.emplace(cx, obj);
36751 }
36752 int32_t arg0;
36753 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
36754 return false;
36755 }
36756 if (objIsXray) {
36757 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36758 // we know Xrays have no dynamic unwrap behavior.
36759 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36760 if (!unwrappedObj.ref()) {
36761 return false;
36762 }
36763 }
36764 FastErrorResult rv;
36765 // NOTE: This assert does NOT call the function.
36766 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload11(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36767 MOZ_KnownLive(self)(self)->Overload11(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36768 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload11"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload11"
)), 0))
) {
36769 return false;
36770 }
36771 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36771); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36771; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36772 args.rval().setUndefined();
36773 return true;
36774 }
36775 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36776 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36777 if (objIsXray) {
36778 unwrappedObj.emplace(cx, obj);
36779 }
36780 binding_detail::FakeString<char16_t> arg0;
36781 if (!ConvertJSValueToString(cx, args[0], eNull, eNull, arg0)) {
36782 return false;
36783 }
36784 if (objIsXray) {
36785 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36786 // we know Xrays have no dynamic unwrap behavior.
36787 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36788 if (!unwrappedObj.ref()) {
36789 return false;
36790 }
36791 }
36792 FastErrorResult rv;
36793 // NOTE: This assert does NOT call the function.
36794 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload11(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36795 MOZ_KnownLive(self)(self)->Overload11(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36796 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload11"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload11"
)), 0))
) {
36797 return false;
36798 }
36799 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36799); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36799; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36800 args.rval().setUndefined();
36801 return true;
36802 break;
36803 }
36804 default: {
36805 // Using nsPrintfCString here would require including that
36806 // header. Let's not worry about it.
36807 nsAutoCString argCountStr;
36808 argCountStr.AppendPrintf("%u", args.length());
36809 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
36810 }
36811 }
36812 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 36812); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 36812; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
36813 return false;
36814}
36815
36816static const JSJitInfo overload11_methodinfo = {
36817 { (JSJitGetterOp)overload11 },
36818 { prototypes::id::TestJSImplInterface },
36819 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
36820 JSJitInfo::Method,
36821 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36822 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36823 false, /* isInfallible. False in setters. */
36824 false, /* isMovable. Not relevant for setters. */
36825 false, /* isEliminatable. Not relevant for setters. */
36826 false, /* isAlwaysInSlot. Only relevant for getters. */
36827 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36828 false, /* isTypedMethod. Only relevant for methods. */
36829 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36830};
36831
36832MOZ_CAN_RUN_SCRIPT static bool
36833overload12(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36834{
36835 BindingCallContext cx(cx_, "TestJSImplInterface.overload12");
36836 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36839( cx, "TestJSImplInterface"
, "overload12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36837 "TestJSImplInterface", "overload12", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36839( cx, "TestJSImplInterface"
, "overload12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36838 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36839( cx, "TestJSImplInterface"
, "overload12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36839 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36839( cx, "TestJSImplInterface"
, "overload12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36840
36841 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
36842 unsigned argcount = std::min(args.length(), 1u);
36843 switch (argcount) {
36844 case 1: {
36845 if (args[0].isNullOrUndefined()) {
36846 Nullable<bool> arg0;
36847 if (args[0].isNullOrUndefined()) {
36848 arg0.SetNull();
36849 } else if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0.SetValue())) {
36850 return false;
36851 }
36852 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36853 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36854 if (objIsXray) {
36855 unwrappedObj.emplace(cx, obj);
36856 }
36857 if (objIsXray) {
36858 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36859 // we know Xrays have no dynamic unwrap behavior.
36860 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36861 if (!unwrappedObj.ref()) {
36862 return false;
36863 }
36864 }
36865 FastErrorResult rv;
36866 // NOTE: This assert does NOT call the function.
36867 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload12(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36868 MOZ_KnownLive(self)(self)->Overload12(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36869 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload12"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload12"
)), 0))
) {
36870 return false;
36871 }
36872 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36872); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36872; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36873 args.rval().setUndefined();
36874 return true;
36875 }
36876 if (args[0].isBoolean()) {
36877 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36878 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36879 if (objIsXray) {
36880 unwrappedObj.emplace(cx, obj);
36881 }
36882 Nullable<bool> arg0;
36883 if (args[0].isNullOrUndefined()) {
36884 arg0.SetNull();
36885 } else if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0.SetValue())) {
36886 return false;
36887 }
36888 if (objIsXray) {
36889 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36890 // we know Xrays have no dynamic unwrap behavior.
36891 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36892 if (!unwrappedObj.ref()) {
36893 return false;
36894 }
36895 }
36896 FastErrorResult rv;
36897 // NOTE: This assert does NOT call the function.
36898 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload12(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36899 MOZ_KnownLive(self)(self)->Overload12(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36900 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload12"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload12"
)), 0))
) {
36901 return false;
36902 }
36903 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36903); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36903; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36904 args.rval().setUndefined();
36905 return true;
36906 }
36907 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36908 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36909 if (objIsXray) {
36910 unwrappedObj.emplace(cx, obj);
36911 }
36912 int32_t arg0;
36913 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
36914 return false;
36915 }
36916 if (objIsXray) {
36917 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36918 // we know Xrays have no dynamic unwrap behavior.
36919 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36920 if (!unwrappedObj.ref()) {
36921 return false;
36922 }
36923 }
36924 FastErrorResult rv;
36925 // NOTE: This assert does NOT call the function.
36926 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload12(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36927 MOZ_KnownLive(self)(self)->Overload12(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36928 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload12"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload12"
)), 0))
) {
36929 return false;
36930 }
36931 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 36931); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 36931; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
36932 args.rval().setUndefined();
36933 return true;
36934 break;
36935 }
36936 default: {
36937 // Using nsPrintfCString here would require including that
36938 // header. Let's not worry about it.
36939 nsAutoCString argCountStr;
36940 argCountStr.AppendPrintf("%u", args.length());
36941 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
36942 }
36943 }
36944 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 36944); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 36944; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
36945 return false;
36946}
36947
36948static const JSJitInfo overload12_methodinfo = {
36949 { (JSJitGetterOp)overload12 },
36950 { prototypes::id::TestJSImplInterface },
36951 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
36952 JSJitInfo::Method,
36953 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
36954 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
36955 false, /* isInfallible. False in setters. */
36956 false, /* isMovable. Not relevant for setters. */
36957 false, /* isEliminatable. Not relevant for setters. */
36958 false, /* isAlwaysInSlot. Only relevant for getters. */
36959 false, /* isLazilyCachedInSlot. Only relevant for getters. */
36960 false, /* isTypedMethod. Only relevant for methods. */
36961 0 /* Reserved slot index, if we're stored in a slot, else 0. */
36962};
36963
36964MOZ_CAN_RUN_SCRIPT static bool
36965overload13(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
36966{
36967 BindingCallContext cx(cx_, "TestJSImplInterface.overload13");
36968 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject36971( cx, "TestJSImplInterface"
, "overload13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36969 "TestJSImplInterface", "overload13", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject36971( cx, "TestJSImplInterface"
, "overload13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36970 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject36971( cx, "TestJSImplInterface"
, "overload13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
36971 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject36971( cx, "TestJSImplInterface"
, "overload13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
36972
36973 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
36974 unsigned argcount = std::min(args.length(), 1u);
36975 switch (argcount) {
36976 case 1: {
36977 if (args[0].isBoolean()) {
36978 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
36979 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
36980 if (objIsXray) {
36981 unwrappedObj.emplace(cx, obj);
36982 }
36983 bool arg0;
36984 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Argument 1", &arg0)) {
36985 return false;
36986 }
36987 if (objIsXray) {
36988 // Since our object is an Xray, we can just CheckedUnwrapStatic:
36989 // we know Xrays have no dynamic unwrap behavior.
36990 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
36991 if (!unwrappedObj.ref()) {
36992 return false;
36993 }
36994 }
36995 FastErrorResult rv;
36996 // NOTE: This assert does NOT call the function.
36997 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload13(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
36998 MOZ_KnownLive(self)(self)->Overload13(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
36999 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload13"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload13"
)), 0))
) {
37000 return false;
37001 }
37002 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37002); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37002; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37003 args.rval().setUndefined();
37004 return true;
37005 }
37006 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37007 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37008 if (objIsXray) {
37009 unwrappedObj.emplace(cx, obj);
37010 }
37011 Nullable<int32_t> arg0;
37012 if (args[0].isNullOrUndefined()) {
37013 arg0.SetNull();
37014 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.SetValue())) {
37015 return false;
37016 }
37017 if (objIsXray) {
37018 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37019 // we know Xrays have no dynamic unwrap behavior.
37020 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37021 if (!unwrappedObj.ref()) {
37022 return false;
37023 }
37024 }
37025 FastErrorResult rv;
37026 // NOTE: This assert does NOT call the function.
37027 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload13(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37028 MOZ_KnownLive(self)(self)->Overload13(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37029 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload13"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload13"
)), 0))
) {
37030 return false;
37031 }
37032 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37032); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37032; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37033 args.rval().setUndefined();
37034 return true;
37035 break;
37036 }
37037 default: {
37038 // Using nsPrintfCString here would require including that
37039 // header. Let's not worry about it.
37040 nsAutoCString argCountStr;
37041 argCountStr.AppendPrintf("%u", args.length());
37042 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
37043 }
37044 }
37045 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 37045); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 37045; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
37046 return false;
37047}
37048
37049static const JSJitInfo overload13_methodinfo = {
37050 { (JSJitGetterOp)overload13 },
37051 { prototypes::id::TestJSImplInterface },
37052 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
37053 JSJitInfo::Method,
37054 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37055 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37056 false, /* isInfallible. False in setters. */
37057 false, /* isMovable. Not relevant for setters. */
37058 false, /* isEliminatable. Not relevant for setters. */
37059 false, /* isAlwaysInSlot. Only relevant for getters. */
37060 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37061 false, /* isTypedMethod. Only relevant for methods. */
37062 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37063};
37064
37065MOZ_CAN_RUN_SCRIPT static bool
37066overload14(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
37067{
37068 BindingCallContext cx(cx_, "TestJSImplInterface.overload14");
37069 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37072( cx, "TestJSImplInterface"
, "overload14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37070 "TestJSImplInterface", "overload14", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37072( cx, "TestJSImplInterface"
, "overload14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37071 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject37072( cx, "TestJSImplInterface"
, "overload14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37072 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37072( cx, "TestJSImplInterface"
, "overload14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37073
37074 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
37075 unsigned argcount = std::min(args.length(), 1u);
37076 switch (argcount) {
37077 case 0: {
37078 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37079 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37080 if (objIsXray) {
37081 unwrappedObj.emplace(cx, obj);
37082 }
37083 Optional<int32_t> arg0;
37084 if (args.hasDefined(0)) {
37085 arg0.Construct();
37086 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
37087 return false;
37088 }
37089 }
37090 if (objIsXray) {
37091 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37092 // we know Xrays have no dynamic unwrap behavior.
37093 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37094 if (!unwrappedObj.ref()) {
37095 return false;
37096 }
37097 }
37098 FastErrorResult rv;
37099 // NOTE: This assert does NOT call the function.
37100 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload14(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37101 MOZ_KnownLive(self)(self)->Overload14(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37102 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload14"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload14"
)), 0))
) {
37103 return false;
37104 }
37105 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37105); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37105; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37106 args.rval().setUndefined();
37107 return true;
37108 break;
37109 }
37110 case 1: {
37111 if (args[0].isObject()) {
37112 do {
37113 NonNull<mozilla::dom::TestInterface> arg0;
37114 {
37115 // Our JSContext should be in the right global to do unwrapping in.
37116 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0, cx);
37117 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
37118 break;
37119 }
37120 }
37121 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37122 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37123 if (objIsXray) {
37124 unwrappedObj.emplace(cx, obj);
37125 }
37126 if (objIsXray) {
37127 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37128 // we know Xrays have no dynamic unwrap behavior.
37129 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37130 if (!unwrappedObj.ref()) {
37131 return false;
37132 }
37133 }
37134 FastErrorResult rv;
37135 // NOTE: This assert does NOT call the function.
37136 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload14(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37137 MOZ_KnownLive(self)(self)->Overload14(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37138 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload14"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload14"
)), 0))
) {
37139 return false;
37140 }
37141 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37141); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37141; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37142 args.rval().setUndefined();
37143 return true;
37144 } while (false);
37145 }
37146 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37147 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37148 if (objIsXray) {
37149 unwrappedObj.emplace(cx, obj);
37150 }
37151 Optional<int32_t> arg0;
37152 if (args.hasDefined(0)) {
37153 arg0.Construct();
37154 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
37155 return false;
37156 }
37157 }
37158 if (objIsXray) {
37159 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37160 // we know Xrays have no dynamic unwrap behavior.
37161 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37162 if (!unwrappedObj.ref()) {
37163 return false;
37164 }
37165 }
37166 FastErrorResult rv;
37167 // NOTE: This assert does NOT call the function.
37168 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload14(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37169 MOZ_KnownLive(self)(self)->Overload14(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37170 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload14"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload14"
)), 0))
) {
37171 return false;
37172 }
37173 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37173); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37173; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37174 args.rval().setUndefined();
37175 return true;
37176 break;
37177 }
37178 default: {
37179 // Using nsPrintfCString here would require including that
37180 // header. Let's not worry about it.
37181 nsAutoCString argCountStr;
37182 argCountStr.AppendPrintf("%u", args.length());
37183 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
37184 }
37185 }
37186 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 37186); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 37186; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
37187 return false;
37188}
37189
37190static const JSJitInfo overload14_methodinfo = {
37191 { (JSJitGetterOp)overload14 },
37192 { prototypes::id::TestJSImplInterface },
37193 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
37194 JSJitInfo::Method,
37195 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37196 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37197 false, /* isInfallible. False in setters. */
37198 false, /* isMovable. Not relevant for setters. */
37199 false, /* isEliminatable. Not relevant for setters. */
37200 false, /* isAlwaysInSlot. Only relevant for getters. */
37201 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37202 false, /* isTypedMethod. Only relevant for methods. */
37203 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37204};
37205
37206MOZ_CAN_RUN_SCRIPT static bool
37207overload15(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
37208{
37209 BindingCallContext cx(cx_, "TestJSImplInterface.overload15");
37210 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37213( cx, "TestJSImplInterface"
, "overload15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37211 "TestJSImplInterface", "overload15", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37213( cx, "TestJSImplInterface"
, "overload15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37212 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject37213( cx, "TestJSImplInterface"
, "overload15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37213 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37213( cx, "TestJSImplInterface"
, "overload15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37214
37215 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
37216 unsigned argcount = std::min(args.length(), 1u);
37217 switch (argcount) {
37218 case 0: {
37219 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37220 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37221 if (objIsXray) {
37222 unwrappedObj.emplace(cx, obj);
37223 }
37224 Optional<NonNull<mozilla::dom::TestInterface>> arg0;
37225 if (args.hasDefined(0)) {
37226 arg0.Construct();
37227 if (args[0].isObject()) {
37228 {
37229 // Our JSContext should be in the right global to do unwrapping in.
37230 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0.Value(), cx);
37231 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
37232 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
37233 return false;
37234 }
37235 }
37236 } else {
37237 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
37238 return false;
37239 }
37240 }
37241 if (objIsXray) {
37242 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37243 // we know Xrays have no dynamic unwrap behavior.
37244 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37245 if (!unwrappedObj.ref()) {
37246 return false;
37247 }
37248 }
37249 FastErrorResult rv;
37250 // NOTE: This assert does NOT call the function.
37251 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload15(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37252 MOZ_KnownLive(self)(self)->Overload15(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37253 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload15"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload15"
)), 0))
) {
37254 return false;
37255 }
37256 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37256); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37256; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37257 args.rval().setUndefined();
37258 return true;
37259 break;
37260 }
37261 case 1: {
37262 if (args[0].isUndefined()) {
37263 Optional<NonNull<mozilla::dom::TestInterface>> arg0;
37264 if (args.hasDefined(0)) {
37265 arg0.Construct();
37266 if (args[0].isObject()) {
37267 {
37268 // Our JSContext should be in the right global to do unwrapping in.
37269 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0.Value(), cx);
37270 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
37271 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
37272 return false;
37273 }
37274 }
37275 } else {
37276 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
37277 return false;
37278 }
37279 }
37280 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37281 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37282 if (objIsXray) {
37283 unwrappedObj.emplace(cx, obj);
37284 }
37285 if (objIsXray) {
37286 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37287 // we know Xrays have no dynamic unwrap behavior.
37288 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37289 if (!unwrappedObj.ref()) {
37290 return false;
37291 }
37292 }
37293 FastErrorResult rv;
37294 // NOTE: This assert does NOT call the function.
37295 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload15(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37296 MOZ_KnownLive(self)(self)->Overload15(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37297 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload15"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload15"
)), 0))
) {
37298 return false;
37299 }
37300 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37300); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37300; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37301 args.rval().setUndefined();
37302 return true;
37303 }
37304 if (args[0].isObject()) {
37305 do {
37306 Optional<NonNull<mozilla::dom::TestInterface>> arg0;
37307 if (args.hasDefined(0)) {
37308 arg0.Construct();
37309 {
37310 // Our JSContext should be in the right global to do unwrapping in.
37311 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0.Value(), cx);
37312 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
37313 break;
37314 }
37315 }
37316 }
37317 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37318 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37319 if (objIsXray) {
37320 unwrappedObj.emplace(cx, obj);
37321 }
37322 if (objIsXray) {
37323 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37324 // we know Xrays have no dynamic unwrap behavior.
37325 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37326 if (!unwrappedObj.ref()) {
37327 return false;
37328 }
37329 }
37330 FastErrorResult rv;
37331 // NOTE: This assert does NOT call the function.
37332 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload15(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37333 MOZ_KnownLive(self)(self)->Overload15(MOZ_KnownLive(NonNullHelper(Constify(arg0)))(NonNullHelper(Constify(arg0))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37334 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload15"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload15"
)), 0))
) {
37335 return false;
37336 }
37337 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37337); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37337; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37338 args.rval().setUndefined();
37339 return true;
37340 } while (false);
37341 }
37342 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37343 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37344 if (objIsXray) {
37345 unwrappedObj.emplace(cx, obj);
37346 }
37347 int32_t arg0;
37348 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
37349 return false;
37350 }
37351 if (objIsXray) {
37352 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37353 // we know Xrays have no dynamic unwrap behavior.
37354 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37355 if (!unwrappedObj.ref()) {
37356 return false;
37357 }
37358 }
37359 FastErrorResult rv;
37360 // NOTE: This assert does NOT call the function.
37361 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload15(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37362 MOZ_KnownLive(self)(self)->Overload15(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37363 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload15"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload15"
)), 0))
) {
37364 return false;
37365 }
37366 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37366); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37366; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37367 args.rval().setUndefined();
37368 return true;
37369 break;
37370 }
37371 default: {
37372 // Using nsPrintfCString here would require including that
37373 // header. Let's not worry about it.
37374 nsAutoCString argCountStr;
37375 argCountStr.AppendPrintf("%u", args.length());
37376 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
37377 }
37378 }
37379 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 37379); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 37379; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
37380 return false;
37381}
37382
37383static const JSJitInfo overload15_methodinfo = {
37384 { (JSJitGetterOp)overload15 },
37385 { prototypes::id::TestJSImplInterface },
37386 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
37387 JSJitInfo::Method,
37388 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37389 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37390 false, /* isInfallible. False in setters. */
37391 false, /* isMovable. Not relevant for setters. */
37392 false, /* isEliminatable. Not relevant for setters. */
37393 false, /* isAlwaysInSlot. Only relevant for getters. */
37394 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37395 false, /* isTypedMethod. Only relevant for methods. */
37396 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37397};
37398
37399MOZ_CAN_RUN_SCRIPT static bool
37400overload16(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
37401{
37402 BindingCallContext cx(cx_, "TestJSImplInterface.overload16");
37403 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37406( cx, "TestJSImplInterface"
, "overload16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37404 "TestJSImplInterface", "overload16", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37406( cx, "TestJSImplInterface"
, "overload16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37405 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject37406( cx, "TestJSImplInterface"
, "overload16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37406 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37406( cx, "TestJSImplInterface"
, "overload16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37407
37408 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
37409 unsigned argcount = std::min(args.length(), 1u);
37410 switch (argcount) {
37411 case 0: {
37412 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37413 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37414 if (objIsXray) {
37415 unwrappedObj.emplace(cx, obj);
37416 }
37417 Optional<mozilla::dom::TestInterface*> arg0;
37418 if (args.hasDefined(0)) {
37419 arg0.Construct();
37420 if (args[0].isObject()) {
37421 {
37422 // Our JSContext should be in the right global to do unwrapping in.
37423 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0.Value(), cx);
37424 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
37425 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestInterface");
37426 return false;
37427 }
37428 }
37429 } else if (args[0].isNullOrUndefined()) {
37430 arg0.Value() = nullptr;
37431 } else {
37432 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
37433 return false;
37434 }
37435 }
37436 if (objIsXray) {
37437 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37438 // we know Xrays have no dynamic unwrap behavior.
37439 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37440 if (!unwrappedObj.ref()) {
37441 return false;
37442 }
37443 }
37444 FastErrorResult rv;
37445 // NOTE: This assert does NOT call the function.
37446 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload16(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37447 MOZ_KnownLive(self)(self)->Overload16(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37448 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload16"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload16"
)), 0))
) {
37449 return false;
37450 }
37451 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37451); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37451; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37452 args.rval().setUndefined();
37453 return true;
37454 break;
37455 }
37456 case 1: {
37457 if (args[0].isNullOrUndefined()) {
37458 Optional<mozilla::dom::TestInterface*> arg0;
37459 if (args.hasDefined(0)) {
37460 arg0.Construct();
37461 arg0.Value() = nullptr;
37462 }
37463 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37464 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37465 if (objIsXray) {
37466 unwrappedObj.emplace(cx, obj);
37467 }
37468 if (objIsXray) {
37469 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37470 // we know Xrays have no dynamic unwrap behavior.
37471 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37472 if (!unwrappedObj.ref()) {
37473 return false;
37474 }
37475 }
37476 FastErrorResult rv;
37477 // NOTE: This assert does NOT call the function.
37478 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload16(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37479 MOZ_KnownLive(self)(self)->Overload16(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37480 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload16"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload16"
)), 0))
) {
37481 return false;
37482 }
37483 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37483); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37483; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37484 args.rval().setUndefined();
37485 return true;
37486 }
37487 if (args[0].isObject()) {
37488 do {
37489 Optional<mozilla::dom::TestInterface*> arg0;
37490 if (args.hasDefined(0)) {
37491 arg0.Construct();
37492 {
37493 // Our JSContext should be in the right global to do unwrapping in.
37494 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[0], arg0.Value(), cx);
37495 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
37496 break;
37497 }
37498 }
37499 }
37500 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37501 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37502 if (objIsXray) {
37503 unwrappedObj.emplace(cx, obj);
37504 }
37505 if (objIsXray) {
37506 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37507 // we know Xrays have no dynamic unwrap behavior.
37508 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37509 if (!unwrappedObj.ref()) {
37510 return false;
37511 }
37512 }
37513 FastErrorResult rv;
37514 // NOTE: This assert does NOT call the function.
37515 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload16(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37516 MOZ_KnownLive(self)(self)->Overload16(MOZ_KnownLive(Constify(arg0))(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37517 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload16"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload16"
)), 0))
) {
37518 return false;
37519 }
37520 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37520); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37520; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37521 args.rval().setUndefined();
37522 return true;
37523 } while (false);
37524 }
37525 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37526 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37527 if (objIsXray) {
37528 unwrappedObj.emplace(cx, obj);
37529 }
37530 int32_t arg0;
37531 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0)) {
37532 return false;
37533 }
37534 if (objIsXray) {
37535 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37536 // we know Xrays have no dynamic unwrap behavior.
37537 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37538 if (!unwrappedObj.ref()) {
37539 return false;
37540 }
37541 }
37542 FastErrorResult rv;
37543 // NOTE: This assert does NOT call the function.
37544 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload16(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37545 MOZ_KnownLive(self)(self)->Overload16(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37546 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload16"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload16"
)), 0))
) {
37547 return false;
37548 }
37549 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37549); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37549; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37550 args.rval().setUndefined();
37551 return true;
37552 break;
37553 }
37554 default: {
37555 // Using nsPrintfCString here would require including that
37556 // header. Let's not worry about it.
37557 nsAutoCString argCountStr;
37558 argCountStr.AppendPrintf("%u", args.length());
37559 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
37560 }
37561 }
37562 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 37562); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 37562; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
37563 return false;
37564}
37565
37566static const JSJitInfo overload16_methodinfo = {
37567 { (JSJitGetterOp)overload16 },
37568 { prototypes::id::TestJSImplInterface },
37569 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
37570 JSJitInfo::Method,
37571 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37572 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37573 false, /* isInfallible. False in setters. */
37574 false, /* isMovable. Not relevant for setters. */
37575 false, /* isEliminatable. Not relevant for setters. */
37576 false, /* isAlwaysInSlot. Only relevant for getters. */
37577 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37578 false, /* isTypedMethod. Only relevant for methods. */
37579 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37580};
37581
37582MOZ_CAN_RUN_SCRIPT static bool
37583overload17(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
37584{
37585 BindingCallContext cx(cx_, "TestJSImplInterface.overload17");
37586 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37589( cx, "TestJSImplInterface"
, "overload17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37587 "TestJSImplInterface", "overload17", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37589( cx, "TestJSImplInterface"
, "overload17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37588 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject37589( cx, "TestJSImplInterface"
, "overload17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37589 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37589( cx, "TestJSImplInterface"
, "overload17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37590
37591 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
37592 unsigned argcount = std::min(args.length(), 1u);
37593 switch (argcount) {
37594 case 1: {
37595 if (args[0].isObject()) {
37596 do {
37597 binding_detail::AutoSequence<int32_t> arg0;
37598 JS::ForOfIterator iter(cx);
37599 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
37600 return false;
37601 }
37602 if (!iter.valueIsIterable()) {
37603 break;
37604 }
37605 binding_detail::AutoSequence<int32_t> &arr = arg0;
37606 JS::Rooted<JS::Value> temp(cx);
37607 while (true) {
37608 bool done;
37609 if (!iter.next(&temp, &done)) {
37610 return false;
37611 }
37612 if (done) {
37613 break;
37614 }
37615 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
37616 if (!slotPtr) {
37617 JS_ReportOutOfMemory(cx);
37618 return false;
37619 }
37620 int32_t& slot = *slotPtr;
37621 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
37622 return false;
37623 }
37624 }
37625 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37626 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37627 if (objIsXray) {
37628 unwrappedObj.emplace(cx, obj);
37629 }
37630 if (objIsXray) {
37631 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37632 // we know Xrays have no dynamic unwrap behavior.
37633 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37634 if (!unwrappedObj.ref()) {
37635 return false;
37636 }
37637 }
37638 FastErrorResult rv;
37639 // NOTE: This assert does NOT call the function.
37640 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload17(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37641 MOZ_KnownLive(self)(self)->Overload17(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37642 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload17"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload17"
)), 0))
) {
37643 return false;
37644 }
37645 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37645); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37645; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37646 args.rval().setUndefined();
37647 return true;
37648 } while (false);
37649 do {
37650 Record<nsString, int32_t> arg0;
37651 auto& recordEntries = arg0.Entries();
37652
37653 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
37654 JS::RootedVector<jsid> ids(cx);
37655 if (!js::GetPropertyKeys(cx, recordObj,
37656 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
37657 return false;
37658 }
37659 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
37660 JS_ReportOutOfMemory(cx);
37661 return false;
37662 }
37663 JS::Rooted<JS::Value> propNameValue(cx);
37664 JS::Rooted<JS::Value> temp(cx);
37665 JS::Rooted<jsid> curId(cx);
37666 JS::Rooted<JS::Value> idVal(cx);
37667 // Use a hashset to keep track of ids seen, to avoid
37668 // introducing nasty O(N^2) behavior scanning for them all the
37669 // time. Ideally we'd use a data structure with O(1) lookup
37670 // _and_ ordering for the MozMap, but we don't have one lying
37671 // around.
37672 nsTHashtable<nsStringHashKey> idsSeen;
37673 for (size_t i = 0; i < ids.length(); ++i) {
37674 curId = ids[i];
37675
37676 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
37677 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
37678 &desc)) {
37679 return false;
37680 }
37681
37682 if (desc.isNothing() || !desc->enumerable()) {
37683 continue;
37684 }
37685
37686 idVal = js::IdToValue(curId);
37687 nsString propName;
37688 // This will just throw if idVal is a Symbol, like the spec says
37689 // to do.
37690 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
37691 return false;
37692 }
37693
37694 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
37695 return false;
37696 }
37697
37698 Record<nsString, int32_t>::EntryType* entry;
37699 if (!idsSeen.EnsureInserted(propName)) {
37700 // Find the existing entry.
37701 auto idx = recordEntries.IndexOf(propName);
37702 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 37703); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 37703; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
37703 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 37703); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 37703; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
37704 // Now blow it away to make it look like it was just added
37705 // to the array, because it's not obvious that it's
37706 // safe to write to its already-initialized mValue via our
37707 // normal codegen conversions. For example, the value
37708 // could be a union and this would change its type, but
37709 // codegen assumes we won't do that.
37710 entry = recordEntries.ReconstructElementAt(idx);
37711 } else {
37712 // Safe to do an infallible append here, because we did a
37713 // SetCapacity above to the right capacity.
37714 entry = recordEntries.AppendElement();
37715 }
37716 entry->mKey = propName;
37717 int32_t& slot = entry->mValue;
37718 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in argument 1", &slot)) {
37719 return false;
37720 }
37721 }
37722 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37723 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37724 if (objIsXray) {
37725 unwrappedObj.emplace(cx, obj);
37726 }
37727 if (objIsXray) {
37728 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37729 // we know Xrays have no dynamic unwrap behavior.
37730 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37731 if (!unwrappedObj.ref()) {
37732 return false;
37733 }
37734 }
37735 FastErrorResult rv;
37736 // NOTE: This assert does NOT call the function.
37737 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload17(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37738 MOZ_KnownLive(self)(self)->Overload17(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37739 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload17"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload17"
)), 0))
) {
37740 return false;
37741 }
37742 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37742); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37742; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37743 args.rval().setUndefined();
37744 return true;
37745 } while (false);
37746 }
37747 return cx.ThrowErrorMessage<MSG_OVERLOAD_RESOLUTION_FAILED>("1", "1");
37748 break;
37749 }
37750 default: {
37751 // Using nsPrintfCString here would require including that
37752 // header. Let's not worry about it.
37753 nsAutoCString argCountStr;
37754 argCountStr.AppendPrintf("%u", args.length());
37755 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
37756 }
37757 }
37758 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 37758); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 37758; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
37759 return false;
37760}
37761
37762static const JSJitInfo overload17_methodinfo = {
37763 { (JSJitGetterOp)overload17 },
37764 { prototypes::id::TestJSImplInterface },
37765 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
37766 JSJitInfo::Method,
37767 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37768 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37769 false, /* isInfallible. False in setters. */
37770 false, /* isMovable. Not relevant for setters. */
37771 false, /* isEliminatable. Not relevant for setters. */
37772 false, /* isAlwaysInSlot. Only relevant for getters. */
37773 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37774 false, /* isTypedMethod. Only relevant for methods. */
37775 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37776};
37777
37778MOZ_CAN_RUN_SCRIPT static bool
37779overload18(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
37780{
37781 BindingCallContext cx(cx_, "TestJSImplInterface.overload18");
37782 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37785( cx, "TestJSImplInterface"
, "overload18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37783 "TestJSImplInterface", "overload18", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37785( cx, "TestJSImplInterface"
, "overload18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37784 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject37785( cx, "TestJSImplInterface"
, "overload18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37785 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37785( cx, "TestJSImplInterface"
, "overload18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37786
37787 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
37788 unsigned argcount = std::min(args.length(), 1u);
37789 switch (argcount) {
37790 case 1: {
37791 if (args[0].isObject()) {
37792 do {
37793 binding_detail::AutoSequence<nsString> arg0;
37794 JS::ForOfIterator iter(cx);
37795 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
37796 return false;
37797 }
37798 if (!iter.valueIsIterable()) {
37799 break;
37800 }
37801 binding_detail::AutoSequence<nsString> &arr = arg0;
37802 JS::Rooted<JS::Value> temp(cx);
37803 while (true) {
37804 bool done;
37805 if (!iter.next(&temp, &done)) {
37806 return false;
37807 }
37808 if (done) {
37809 break;
37810 }
37811 nsString* slotPtr = arr.AppendElement(mozilla::fallible);
37812 if (!slotPtr) {
37813 JS_ReportOutOfMemory(cx);
37814 return false;
37815 }
37816 nsString& slot = *slotPtr;
37817 if (!ConvertJSValueToString(cx, temp, eStringify, eStringify, slot)) {
37818 return false;
37819 }
37820 }
37821 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37822 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37823 if (objIsXray) {
37824 unwrappedObj.emplace(cx, obj);
37825 }
37826 if (objIsXray) {
37827 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37828 // we know Xrays have no dynamic unwrap behavior.
37829 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37830 if (!unwrappedObj.ref()) {
37831 return false;
37832 }
37833 }
37834 FastErrorResult rv;
37835 // NOTE: This assert does NOT call the function.
37836 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload18(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37837 MOZ_KnownLive(self)(self)->Overload18(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37838 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload18"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload18"
)), 0))
) {
37839 return false;
37840 }
37841 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37841); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37841; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37842 args.rval().setUndefined();
37843 return true;
37844 } while (false);
37845 do {
37846 Record<nsString, nsString> arg0;
37847 auto& recordEntries = arg0.Entries();
37848
37849 JS::Rooted<JSObject*> recordObj(cx, &args[0].toObject());
37850 JS::RootedVector<jsid> ids(cx);
37851 if (!js::GetPropertyKeys(cx, recordObj,
37852 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
37853 return false;
37854 }
37855 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
37856 JS_ReportOutOfMemory(cx);
37857 return false;
37858 }
37859 JS::Rooted<JS::Value> propNameValue(cx);
37860 JS::Rooted<JS::Value> temp(cx);
37861 JS::Rooted<jsid> curId(cx);
37862 JS::Rooted<JS::Value> idVal(cx);
37863 // Use a hashset to keep track of ids seen, to avoid
37864 // introducing nasty O(N^2) behavior scanning for them all the
37865 // time. Ideally we'd use a data structure with O(1) lookup
37866 // _and_ ordering for the MozMap, but we don't have one lying
37867 // around.
37868 nsTHashtable<nsStringHashKey> idsSeen;
37869 for (size_t i = 0; i < ids.length(); ++i) {
37870 curId = ids[i];
37871
37872 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
37873 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
37874 &desc)) {
37875 return false;
37876 }
37877
37878 if (desc.isNothing() || !desc->enumerable()) {
37879 continue;
37880 }
37881
37882 idVal = js::IdToValue(curId);
37883 nsString propName;
37884 // This will just throw if idVal is a Symbol, like the spec says
37885 // to do.
37886 if (!ConvertJSValueToString(cx, idVal, "key of argument 1", propName)) {
37887 return false;
37888 }
37889
37890 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
37891 return false;
37892 }
37893
37894 Record<nsString, nsString>::EntryType* entry;
37895 if (!idsSeen.EnsureInserted(propName)) {
37896 // Find the existing entry.
37897 auto idx = recordEntries.IndexOf(propName);
37898 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 37899); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 37899; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
37899 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 37899); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 37899; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
37900 // Now blow it away to make it look like it was just added
37901 // to the array, because it's not obvious that it's
37902 // safe to write to its already-initialized mValue via our
37903 // normal codegen conversions. For example, the value
37904 // could be a union and this would change its type, but
37905 // codegen assumes we won't do that.
37906 entry = recordEntries.ReconstructElementAt(idx);
37907 } else {
37908 // Safe to do an infallible append here, because we did a
37909 // SetCapacity above to the right capacity.
37910 entry = recordEntries.AppendElement();
37911 }
37912 entry->mKey = propName;
37913 nsString& slot = entry->mValue;
37914 if (!ConvertJSValueToString(cx, temp, eStringify, eStringify, slot)) {
37915 return false;
37916 }
37917 }
37918 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37919 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37920 if (objIsXray) {
37921 unwrappedObj.emplace(cx, obj);
37922 }
37923 if (objIsXray) {
37924 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37925 // we know Xrays have no dynamic unwrap behavior.
37926 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
37927 if (!unwrappedObj.ref()) {
37928 return false;
37929 }
37930 }
37931 FastErrorResult rv;
37932 // NOTE: This assert does NOT call the function.
37933 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload18(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
37934 MOZ_KnownLive(self)(self)->Overload18(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
37935 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload18"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload18"
)), 0))
) {
37936 return false;
37937 }
37938 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 37938); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 37938; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
37939 args.rval().setUndefined();
37940 return true;
37941 } while (false);
37942 }
37943 return cx.ThrowErrorMessage<MSG_OVERLOAD_RESOLUTION_FAILED>("1", "1");
37944 break;
37945 }
37946 default: {
37947 // Using nsPrintfCString here would require including that
37948 // header. Let's not worry about it.
37949 nsAutoCString argCountStr;
37950 argCountStr.AppendPrintf("%u", args.length());
37951 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
37952 }
37953 }
37954 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 37954); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 37954; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
37955 return false;
37956}
37957
37958static const JSJitInfo overload18_methodinfo = {
37959 { (JSJitGetterOp)overload18 },
37960 { prototypes::id::TestJSImplInterface },
37961 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
37962 JSJitInfo::Method,
37963 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
37964 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
37965 false, /* isInfallible. False in setters. */
37966 false, /* isMovable. Not relevant for setters. */
37967 false, /* isEliminatable. Not relevant for setters. */
37968 false, /* isAlwaysInSlot. Only relevant for getters. */
37969 false, /* isLazilyCachedInSlot. Only relevant for getters. */
37970 false, /* isTypedMethod. Only relevant for methods. */
37971 0 /* Reserved slot index, if we're stored in a slot, else 0. */
37972};
37973
37974MOZ_CAN_RUN_SCRIPT static bool
37975overload19(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
37976{
37977 BindingCallContext cx(cx_, "TestJSImplInterface.overload19");
37978 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject37981( cx, "TestJSImplInterface"
, "overload19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37979 "TestJSImplInterface", "overload19", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject37981( cx, "TestJSImplInterface"
, "overload19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37980 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject37981( cx, "TestJSImplInterface"
, "overload19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
37981 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject37981( cx, "TestJSImplInterface"
, "overload19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
37982
37983 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
37984 unsigned argcount = std::min(args.length(), 1u);
37985 switch (argcount) {
37986 case 0: {
37987 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
37988 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
37989 if (objIsXray) {
37990 unwrappedObj.emplace(cx, obj);
37991 }
37992 RootedDictionary<binding_detail::FastDict> arg0(cx);
37993 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", true)) {
37994 return false;
37995 }
37996 if (objIsXray) {
37997 // Since our object is an Xray, we can just CheckedUnwrapStatic:
37998 // we know Xrays have no dynamic unwrap behavior.
37999 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38000 if (!unwrappedObj.ref()) {
38001 return false;
38002 }
38003 }
38004 FastErrorResult rv;
38005 // NOTE: This assert does NOT call the function.
38006 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload19(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
38007 MOZ_KnownLive(self)(self)->Overload19(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
38008 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload19"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload19"
)), 0))
) {
38009 return false;
38010 }
38011 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38011); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38011; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38012 args.rval().setUndefined();
38013 return true;
38014 break;
38015 }
38016 case 1: {
38017 if (args[0].isNullOrUndefined()) {
38018 RootedDictionary<binding_detail::FastDict> arg0(cx);
38019 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
38020 return false;
38021 }
38022 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38023 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38024 if (objIsXray) {
38025 unwrappedObj.emplace(cx, obj);
38026 }
38027 if (objIsXray) {
38028 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38029 // we know Xrays have no dynamic unwrap behavior.
38030 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38031 if (!unwrappedObj.ref()) {
38032 return false;
38033 }
38034 }
38035 FastErrorResult rv;
38036 // NOTE: This assert does NOT call the function.
38037 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload19(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
38038 MOZ_KnownLive(self)(self)->Overload19(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
38039 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload19"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload19"
)), 0))
) {
38040 return false;
38041 }
38042 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38042); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38042; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38043 args.rval().setUndefined();
38044 return true;
38045 }
38046 if (args[0].isObject()) {
38047 do {
38048 binding_detail::AutoSequence<int32_t> arg0;
38049 JS::ForOfIterator iter(cx);
38050 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
38051 return false;
38052 }
38053 if (!iter.valueIsIterable()) {
38054 break;
38055 }
38056 binding_detail::AutoSequence<int32_t> &arr = arg0;
38057 JS::Rooted<JS::Value> temp(cx);
38058 while (true) {
38059 bool done;
38060 if (!iter.next(&temp, &done)) {
38061 return false;
38062 }
38063 if (done) {
38064 break;
38065 }
38066 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
38067 if (!slotPtr) {
38068 JS_ReportOutOfMemory(cx);
38069 return false;
38070 }
38071 int32_t& slot = *slotPtr;
38072 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
38073 return false;
38074 }
38075 }
38076 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38077 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38078 if (objIsXray) {
38079 unwrappedObj.emplace(cx, obj);
38080 }
38081 if (objIsXray) {
38082 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38083 // we know Xrays have no dynamic unwrap behavior.
38084 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38085 if (!unwrappedObj.ref()) {
38086 return false;
38087 }
38088 }
38089 FastErrorResult rv;
38090 // NOTE: This assert does NOT call the function.
38091 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload19(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
38092 MOZ_KnownLive(self)(self)->Overload19(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
38093 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload19"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload19"
)), 0))
) {
38094 return false;
38095 }
38096 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38096); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38096; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38097 args.rval().setUndefined();
38098 return true;
38099 } while (false);
38100 do {
38101 RootedDictionary<binding_detail::FastDict> arg0(cx);
38102 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
38103 return false;
38104 }
38105 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38106 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38107 if (objIsXray) {
38108 unwrappedObj.emplace(cx, obj);
38109 }
38110 if (objIsXray) {
38111 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38112 // we know Xrays have no dynamic unwrap behavior.
38113 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38114 if (!unwrappedObj.ref()) {
38115 return false;
38116 }
38117 }
38118 FastErrorResult rv;
38119 // NOTE: This assert does NOT call the function.
38120 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload19(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
38121 MOZ_KnownLive(self)(self)->Overload19(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
38122 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload19"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload19"
)), 0))
) {
38123 return false;
38124 }
38125 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38125); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38125; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38126 args.rval().setUndefined();
38127 return true;
38128 } while (false);
38129 }
38130 return cx.ThrowErrorMessage<MSG_OVERLOAD_RESOLUTION_FAILED>("1", "1");
38131 break;
38132 }
38133 default: {
38134 // Using nsPrintfCString here would require including that
38135 // header. Let's not worry about it.
38136 nsAutoCString argCountStr;
38137 argCountStr.AppendPrintf("%u", args.length());
38138 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
38139 }
38140 }
38141 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 38141); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 38141; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
38142 return false;
38143}
38144
38145static const JSJitInfo overload19_methodinfo = {
38146 { (JSJitGetterOp)overload19 },
38147 { prototypes::id::TestJSImplInterface },
38148 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
38149 JSJitInfo::Method,
38150 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38151 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38152 false, /* isInfallible. False in setters. */
38153 false, /* isMovable. Not relevant for setters. */
38154 false, /* isEliminatable. Not relevant for setters. */
38155 false, /* isAlwaysInSlot. Only relevant for getters. */
38156 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38157 false, /* isTypedMethod. Only relevant for methods. */
38158 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38159};
38160
38161MOZ_CAN_RUN_SCRIPT static bool
38162overload20(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
38163{
38164 BindingCallContext cx(cx_, "TestJSImplInterface.overload20");
38165 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38168( cx, "TestJSImplInterface"
, "overload20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38166 "TestJSImplInterface", "overload20", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38168( cx, "TestJSImplInterface"
, "overload20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38167 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject38168( cx, "TestJSImplInterface"
, "overload20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38168 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38168( cx, "TestJSImplInterface"
, "overload20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
38169
38170 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
38171 unsigned argcount = std::min(args.length(), 1u);
38172 switch (argcount) {
38173 case 0: {
38174 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38175 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38176 if (objIsXray) {
38177 unwrappedObj.emplace(cx, obj);
38178 }
38179 RootedDictionary<binding_detail::FastDict> arg0(cx);
38180 if (!arg0.Init(cx, (args.hasDefined(0)) ? args[0] : JS::NullHandleValue, "Argument 1", true)) {
38181 return false;
38182 }
38183 if (objIsXray) {
38184 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38185 // we know Xrays have no dynamic unwrap behavior.
38186 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38187 if (!unwrappedObj.ref()) {
38188 return false;
38189 }
38190 }
38191 FastErrorResult rv;
38192 // NOTE: This assert does NOT call the function.
38193 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload20(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
38194 MOZ_KnownLive(self)(self)->Overload20(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
38195 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload20"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload20"
)), 0))
) {
38196 return false;
38197 }
38198 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38198); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38198; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38199 args.rval().setUndefined();
38200 return true;
38201 break;
38202 }
38203 case 1: {
38204 if (args[0].isNullOrUndefined()) {
38205 RootedDictionary<binding_detail::FastDict> arg0(cx);
38206 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
38207 return false;
38208 }
38209 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38210 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38211 if (objIsXray) {
38212 unwrappedObj.emplace(cx, obj);
38213 }
38214 if (objIsXray) {
38215 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38216 // we know Xrays have no dynamic unwrap behavior.
38217 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38218 if (!unwrappedObj.ref()) {
38219 return false;
38220 }
38221 }
38222 FastErrorResult rv;
38223 // NOTE: This assert does NOT call the function.
38224 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload20(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
38225 MOZ_KnownLive(self)(self)->Overload20(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
38226 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload20"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload20"
)), 0))
) {
38227 return false;
38228 }
38229 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38229); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38229; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38230 args.rval().setUndefined();
38231 return true;
38232 }
38233 if (args[0].isObject()) {
38234 do {
38235 binding_detail::AutoSequence<int32_t> arg0;
38236 JS::ForOfIterator iter(cx);
38237 if (!iter.init(args[0], JS::ForOfIterator::AllowNonIterable)) {
38238 return false;
38239 }
38240 if (!iter.valueIsIterable()) {
38241 break;
38242 }
38243 binding_detail::AutoSequence<int32_t> &arr = arg0;
38244 JS::Rooted<JS::Value> temp(cx);
38245 while (true) {
38246 bool done;
38247 if (!iter.next(&temp, &done)) {
38248 return false;
38249 }
38250 if (done) {
38251 break;
38252 }
38253 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
38254 if (!slotPtr) {
38255 JS_ReportOutOfMemory(cx);
38256 return false;
38257 }
38258 int32_t& slot = *slotPtr;
38259 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of argument 1", &slot)) {
38260 return false;
38261 }
38262 }
38263 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38264 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38265 if (objIsXray) {
38266 unwrappedObj.emplace(cx, obj);
38267 }
38268 if (objIsXray) {
38269 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38270 // we know Xrays have no dynamic unwrap behavior.
38271 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38272 if (!unwrappedObj.ref()) {
38273 return false;
38274 }
38275 }
38276 FastErrorResult rv;
38277 // NOTE: This assert does NOT call the function.
38278 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload20(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
38279 MOZ_KnownLive(self)(self)->Overload20(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
38280 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload20"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload20"
)), 0))
) {
38281 return false;
38282 }
38283 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38283); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38283; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38284 args.rval().setUndefined();
38285 return true;
38286 } while (false);
38287 do {
38288 RootedDictionary<binding_detail::FastDict> arg0(cx);
38289 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
38290 return false;
38291 }
38292 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38293 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38294 if (objIsXray) {
38295 unwrappedObj.emplace(cx, obj);
38296 }
38297 if (objIsXray) {
38298 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38299 // we know Xrays have no dynamic unwrap behavior.
38300 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38301 if (!unwrappedObj.ref()) {
38302 return false;
38303 }
38304 }
38305 FastErrorResult rv;
38306 // NOTE: This assert does NOT call the function.
38307 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Overload20(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
38308 MOZ_KnownLive(self)(self)->Overload20(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
38309 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload20"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.overload20"
)), 0))
) {
38310 return false;
38311 }
38312 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38312); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38312; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38313 args.rval().setUndefined();
38314 return true;
38315 } while (false);
38316 }
38317 return cx.ThrowErrorMessage<MSG_OVERLOAD_RESOLUTION_FAILED>("1", "1");
38318 break;
38319 }
38320 default: {
38321 // Using nsPrintfCString here would require including that
38322 // header. Let's not worry about it.
38323 nsAutoCString argCountStr;
38324 argCountStr.AppendPrintf("%u", args.length());
38325 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
38326 }
38327 }
38328 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 38328); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 38328; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
38329 return false;
38330}
38331
38332static const JSJitInfo overload20_methodinfo = {
38333 { (JSJitGetterOp)overload20 },
38334 { prototypes::id::TestJSImplInterface },
38335 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
38336 JSJitInfo::Method,
38337 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38338 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38339 false, /* isInfallible. False in setters. */
38340 false, /* isMovable. Not relevant for setters. */
38341 false, /* isEliminatable. Not relevant for setters. */
38342 false, /* isAlwaysInSlot. Only relevant for getters. */
38343 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38344 false, /* isTypedMethod. Only relevant for methods. */
38345 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38346};
38347
38348MOZ_CAN_RUN_SCRIPT static bool
38349passVariadicThirdArg(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
38350{
38351 BindingCallContext cx(cx_, "TestJSImplInterface.passVariadicThirdArg");
38352 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38355( cx, "TestJSImplInterface"
, "passVariadicThirdArg", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38353 "TestJSImplInterface", "passVariadicThirdArg", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38355( cx, "TestJSImplInterface"
, "passVariadicThirdArg", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38354 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject38355( cx, "TestJSImplInterface"
, "passVariadicThirdArg", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38355 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38355( cx, "TestJSImplInterface"
, "passVariadicThirdArg", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
38356
38357 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
38358 if (!args.requireAtLeast(cx, "TestJSImplInterface.passVariadicThirdArg", 2)) {
38359 return false;
38360 }
38361 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38362 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38363 if (objIsXray) {
38364 unwrappedObj.emplace(cx, obj);
38365 }
38366 binding_detail::FakeString<char16_t> arg0;
38367 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
38368 return false;
38369 }
38370 int32_t arg1;
38371 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[1], "Argument 2", &arg1)) {
38372 return false;
38373 }
38374 AutoSequence<OwningNonNull<mozilla::dom::TestJSImplInterface>> arg2;
38375 if (args.length() > 2) {
38376 if (!arg2.SetCapacity(args.length() - 2, mozilla::fallible)) {
38377 JS_ReportOutOfMemory(cx);
38378 return false;
38379 }
38380 for (uint32_t variadicArg = 2; variadicArg < args.length(); ++variadicArg) {
38381 // OK to do infallible append here, since we ensured capacity already.
38382 OwningNonNull<mozilla::dom::TestJSImplInterface>& slot = *arg2.AppendElement();
38383 if (args[variadicArg].isObject()) {
38384 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
38385 {
38386 // Our JSContext should be in the right global to do unwrapping in.
38387 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(args[variadicArg], slot, cx);
38388 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
38389 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 3", "TestJSImplInterface");
38390 return false;
38391 }
38392 }
38393 } else {
38394 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 3");
38395 return false;
38396 }
38397 }
38398 }
38399 if (objIsXray) {
38400 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38401 // we know Xrays have no dynamic unwrap behavior.
38402 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38403 if (!unwrappedObj.ref()) {
38404 return false;
38405 }
38406 }
38407 FastErrorResult rv;
38408 // NOTE: This assert does NOT call the function.
38409 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassVariadicThirdArg(NonNullHelper(Constify(arg0)), arg1, MOZ_KnownLive(NonNullHelper(Constify(arg2)))(NonNullHelper(Constify(arg2))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
38410 MOZ_KnownLive(self)(self)->PassVariadicThirdArg(NonNullHelper(Constify(arg0)), arg1, MOZ_KnownLive(NonNullHelper(Constify(arg2)))(NonNullHelper(Constify(arg2))), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
38411 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicThirdArg"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passVariadicThirdArg"
)), 0))
) {
38412 return false;
38413 }
38414 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38414); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38414; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38415 args.rval().setUndefined();
38416 return true;
38417}
38418
38419static const JSJitInfo passVariadicThirdArg_methodinfo = {
38420 { (JSJitGetterOp)passVariadicThirdArg },
38421 { prototypes::id::TestJSImplInterface },
38422 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
38423 JSJitInfo::Method,
38424 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38425 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38426 false, /* isInfallible. False in setters. */
38427 false, /* isMovable. Not relevant for setters. */
38428 false, /* isEliminatable. Not relevant for setters. */
38429 false, /* isAlwaysInSlot. Only relevant for getters. */
38430 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38431 false, /* isTypedMethod. Only relevant for methods. */
38432 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38433};
38434
38435MOZ_CAN_RUN_SCRIPT static bool
38436get_prefable1(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38437{
38438 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38441( cx, "TestJSImplInterface"
, "prefable1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38439 "TestJSImplInterface", "prefable1", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38441( cx, "TestJSImplInterface"
, "prefable1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38440 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38441( cx, "TestJSImplInterface"
, "prefable1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38441 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38441( cx, "TestJSImplInterface"
, "prefable1", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
38442
38443 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
38444 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38445 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38446 if (objIsXray) {
38447 unwrappedObj.emplace(cx, obj);
38448 }
38449 if (objIsXray) {
38450 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38451 // we know Xrays have no dynamic unwrap behavior.
38452 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38453 if (!unwrappedObj.ref()) {
38454 return false;
38455 }
38456 }
38457 FastErrorResult rv;
38458 bool result(MOZ_KnownLive(self)(self)->GetPrefable1(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
38459 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable1 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable1 getter"
)), 0))
) {
38460 return false;
38461 }
38462 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38462); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38462; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38463 args.rval().setBoolean(result);
38464 return true;
38465}
38466
38467static const JSJitInfo prefable1_getterinfo = {
38468 { get_prefable1 },
38469 { prototypes::id::TestJSImplInterface },
38470 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
38471 JSJitInfo::Getter,
38472 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38473 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
38474 false, /* isInfallible. False in setters. */
38475 false, /* isMovable. Not relevant for setters. */
38476 false, /* isEliminatable. Not relevant for setters. */
38477 false, /* isAlwaysInSlot. Only relevant for getters. */
38478 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38479 false, /* isTypedMethod. Only relevant for methods. */
38480 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38481};
38482
38483MOZ_CAN_RUN_SCRIPT static bool
38484get_prefable2(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38485{
38486 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38489( cx, "TestJSImplInterface"
, "prefable2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38487 "TestJSImplInterface", "prefable2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38489( cx, "TestJSImplInterface"
, "prefable2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38488 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38489( cx, "TestJSImplInterface"
, "prefable2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38489 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38489( cx, "TestJSImplInterface"
, "prefable2", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
38490
38491 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
38492 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38493 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38494 if (objIsXray) {
38495 unwrappedObj.emplace(cx, obj);
38496 }
38497 if (objIsXray) {
38498 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38499 // we know Xrays have no dynamic unwrap behavior.
38500 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38501 if (!unwrappedObj.ref()) {
38502 return false;
38503 }
38504 }
38505 FastErrorResult rv;
38506 bool result(MOZ_KnownLive(self)(self)->GetPrefable2(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
38507 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable2 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable2 getter"
)), 0))
) {
38508 return false;
38509 }
38510 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38510); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38510; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38511 args.rval().setBoolean(result);
38512 return true;
38513}
38514
38515static const JSJitInfo prefable2_getterinfo = {
38516 { get_prefable2 },
38517 { prototypes::id::TestJSImplInterface },
38518 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
38519 JSJitInfo::Getter,
38520 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38521 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
38522 false, /* isInfallible. False in setters. */
38523 false, /* isMovable. Not relevant for setters. */
38524 false, /* isEliminatable. Not relevant for setters. */
38525 false, /* isAlwaysInSlot. Only relevant for getters. */
38526 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38527 false, /* isTypedMethod. Only relevant for methods. */
38528 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38529};
38530
38531MOZ_CAN_RUN_SCRIPT static bool
38532get_prefable3(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38533{
38534 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38537( cx, "TestJSImplInterface"
, "prefable3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38535 "TestJSImplInterface", "prefable3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38537( cx, "TestJSImplInterface"
, "prefable3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38536 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38537( cx, "TestJSImplInterface"
, "prefable3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38537 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38537( cx, "TestJSImplInterface"
, "prefable3", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
38538
38539 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
38540 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38541 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38542 if (objIsXray) {
38543 unwrappedObj.emplace(cx, obj);
38544 }
38545 if (objIsXray) {
38546 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38547 // we know Xrays have no dynamic unwrap behavior.
38548 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38549 if (!unwrappedObj.ref()) {
38550 return false;
38551 }
38552 }
38553 FastErrorResult rv;
38554 bool result(MOZ_KnownLive(self)(self)->GetPrefable3(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
38555 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable3 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable3 getter"
)), 0))
) {
38556 return false;
38557 }
38558 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38558); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38558; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38559 args.rval().setBoolean(result);
38560 return true;
38561}
38562
38563static const JSJitInfo prefable3_getterinfo = {
38564 { get_prefable3 },
38565 { prototypes::id::TestJSImplInterface },
38566 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
38567 JSJitInfo::Getter,
38568 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38569 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
38570 false, /* isInfallible. False in setters. */
38571 false, /* isMovable. Not relevant for setters. */
38572 false, /* isEliminatable. Not relevant for setters. */
38573 false, /* isAlwaysInSlot. Only relevant for getters. */
38574 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38575 false, /* isTypedMethod. Only relevant for methods. */
38576 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38577};
38578
38579MOZ_CAN_RUN_SCRIPT static bool
38580get_prefable4(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38581{
38582 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38585( cx, "TestJSImplInterface"
, "prefable4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38583 "TestJSImplInterface", "prefable4", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38585( cx, "TestJSImplInterface"
, "prefable4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38584 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38585( cx, "TestJSImplInterface"
, "prefable4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38585 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38585( cx, "TestJSImplInterface"
, "prefable4", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
38586
38587 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
38588 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38589 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38590 if (objIsXray) {
38591 unwrappedObj.emplace(cx, obj);
38592 }
38593 if (objIsXray) {
38594 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38595 // we know Xrays have no dynamic unwrap behavior.
38596 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38597 if (!unwrappedObj.ref()) {
38598 return false;
38599 }
38600 }
38601 FastErrorResult rv;
38602 bool result(MOZ_KnownLive(self)(self)->GetPrefable4(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
38603 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable4 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable4 getter"
)), 0))
) {
38604 return false;
38605 }
38606 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38606); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38606; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38607 args.rval().setBoolean(result);
38608 return true;
38609}
38610
38611static const JSJitInfo prefable4_getterinfo = {
38612 { get_prefable4 },
38613 { prototypes::id::TestJSImplInterface },
38614 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
38615 JSJitInfo::Getter,
38616 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38617 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
38618 false, /* isInfallible. False in setters. */
38619 false, /* isMovable. Not relevant for setters. */
38620 false, /* isEliminatable. Not relevant for setters. */
38621 false, /* isAlwaysInSlot. Only relevant for getters. */
38622 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38623 false, /* isTypedMethod. Only relevant for methods. */
38624 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38625};
38626
38627MOZ_CAN_RUN_SCRIPT static bool
38628get_prefable5(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38629{
38630 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38633( cx, "TestJSImplInterface"
, "prefable5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38631 "TestJSImplInterface", "prefable5", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38633( cx, "TestJSImplInterface"
, "prefable5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38632 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38633( cx, "TestJSImplInterface"
, "prefable5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38633 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38633( cx, "TestJSImplInterface"
, "prefable5", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
38634
38635 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
38636 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38637 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38638 if (objIsXray) {
38639 unwrappedObj.emplace(cx, obj);
38640 }
38641 if (objIsXray) {
38642 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38643 // we know Xrays have no dynamic unwrap behavior.
38644 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38645 if (!unwrappedObj.ref()) {
38646 return false;
38647 }
38648 }
38649 FastErrorResult rv;
38650 bool result(MOZ_KnownLive(self)(self)->GetPrefable5(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
38651 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable5 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable5 getter"
)), 0))
) {
38652 return false;
38653 }
38654 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38654); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38654; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38655 args.rval().setBoolean(result);
38656 return true;
38657}
38658
38659static const JSJitInfo prefable5_getterinfo = {
38660 { get_prefable5 },
38661 { prototypes::id::TestJSImplInterface },
38662 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
38663 JSJitInfo::Getter,
38664 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38665 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
38666 false, /* isInfallible. False in setters. */
38667 false, /* isMovable. Not relevant for setters. */
38668 false, /* isEliminatable. Not relevant for setters. */
38669 false, /* isAlwaysInSlot. Only relevant for getters. */
38670 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38671 false, /* isTypedMethod. Only relevant for methods. */
38672 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38673};
38674
38675MOZ_CAN_RUN_SCRIPT static bool
38676get_prefable6(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38677{
38678 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38681( cx, "TestJSImplInterface"
, "prefable6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38679 "TestJSImplInterface", "prefable6", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38681( cx, "TestJSImplInterface"
, "prefable6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38680 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38681( cx, "TestJSImplInterface"
, "prefable6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38681 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38681( cx, "TestJSImplInterface"
, "prefable6", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
38682
38683 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
38684 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38685 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38686 if (objIsXray) {
38687 unwrappedObj.emplace(cx, obj);
38688 }
38689 if (objIsXray) {
38690 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38691 // we know Xrays have no dynamic unwrap behavior.
38692 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38693 if (!unwrappedObj.ref()) {
38694 return false;
38695 }
38696 }
38697 FastErrorResult rv;
38698 bool result(MOZ_KnownLive(self)(self)->GetPrefable6(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
38699 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable6 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable6 getter"
)), 0))
) {
38700 return false;
38701 }
38702 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38702); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38702; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38703 args.rval().setBoolean(result);
38704 return true;
38705}
38706
38707static const JSJitInfo prefable6_getterinfo = {
38708 { get_prefable6 },
38709 { prototypes::id::TestJSImplInterface },
38710 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
38711 JSJitInfo::Getter,
38712 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38713 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
38714 false, /* isInfallible. False in setters. */
38715 false, /* isMovable. Not relevant for setters. */
38716 false, /* isEliminatable. Not relevant for setters. */
38717 false, /* isAlwaysInSlot. Only relevant for getters. */
38718 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38719 false, /* isTypedMethod. Only relevant for methods. */
38720 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38721};
38722
38723MOZ_CAN_RUN_SCRIPT static bool
38724get_prefable7(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38725{
38726 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38729( cx, "TestJSImplInterface"
, "prefable7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38727 "TestJSImplInterface", "prefable7", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38729( cx, "TestJSImplInterface"
, "prefable7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38728 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38729( cx, "TestJSImplInterface"
, "prefable7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38729 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38729( cx, "TestJSImplInterface"
, "prefable7", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
38730
38731 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
38732 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38733 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38734 if (objIsXray) {
38735 unwrappedObj.emplace(cx, obj);
38736 }
38737 if (objIsXray) {
38738 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38739 // we know Xrays have no dynamic unwrap behavior.
38740 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38741 if (!unwrappedObj.ref()) {
38742 return false;
38743 }
38744 }
38745 FastErrorResult rv;
38746 bool result(MOZ_KnownLive(self)(self)->GetPrefable7(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
38747 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable7 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable7 getter"
)), 0))
) {
38748 return false;
38749 }
38750 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38750); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38750; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38751 args.rval().setBoolean(result);
38752 return true;
38753}
38754
38755static const JSJitInfo prefable7_getterinfo = {
38756 { get_prefable7 },
38757 { prototypes::id::TestJSImplInterface },
38758 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
38759 JSJitInfo::Getter,
38760 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38761 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
38762 false, /* isInfallible. False in setters. */
38763 false, /* isMovable. Not relevant for setters. */
38764 false, /* isEliminatable. Not relevant for setters. */
38765 false, /* isAlwaysInSlot. Only relevant for getters. */
38766 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38767 false, /* isTypedMethod. Only relevant for methods. */
38768 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38769};
38770
38771MOZ_CAN_RUN_SCRIPT static bool
38772get_prefable8(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38773{
38774 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38777( cx, "TestJSImplInterface"
, "prefable8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38775 "TestJSImplInterface", "prefable8", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38777( cx, "TestJSImplInterface"
, "prefable8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38776 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38777( cx, "TestJSImplInterface"
, "prefable8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38777 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38777( cx, "TestJSImplInterface"
, "prefable8", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
38778
38779 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
38780 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38781 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38782 if (objIsXray) {
38783 unwrappedObj.emplace(cx, obj);
38784 }
38785 if (objIsXray) {
38786 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38787 // we know Xrays have no dynamic unwrap behavior.
38788 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38789 if (!unwrappedObj.ref()) {
38790 return false;
38791 }
38792 }
38793 FastErrorResult rv;
38794 bool result(MOZ_KnownLive(self)(self)->GetPrefable8(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
38795 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable8 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable8 getter"
)), 0))
) {
38796 return false;
38797 }
38798 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38798); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38798; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38799 args.rval().setBoolean(result);
38800 return true;
38801}
38802
38803static const JSJitInfo prefable8_getterinfo = {
38804 { get_prefable8 },
38805 { prototypes::id::TestJSImplInterface },
38806 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
38807 JSJitInfo::Getter,
38808 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38809 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
38810 false, /* isInfallible. False in setters. */
38811 false, /* isMovable. Not relevant for setters. */
38812 false, /* isEliminatable. Not relevant for setters. */
38813 false, /* isAlwaysInSlot. Only relevant for getters. */
38814 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38815 false, /* isTypedMethod. Only relevant for methods. */
38816 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38817};
38818
38819MOZ_CAN_RUN_SCRIPT static bool
38820get_prefable9(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38821{
38822 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38825( cx, "TestJSImplInterface"
, "prefable9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38823 "TestJSImplInterface", "prefable9", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38825( cx, "TestJSImplInterface"
, "prefable9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38824 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38825( cx, "TestJSImplInterface"
, "prefable9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
38825 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38825( cx, "TestJSImplInterface"
, "prefable9", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_GETTER) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
38826
38827 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
38828 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38829 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38830 if (objIsXray) {
38831 unwrappedObj.emplace(cx, obj);
38832 }
38833 if (objIsXray) {
38834 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38835 // we know Xrays have no dynamic unwrap behavior.
38836 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38837 if (!unwrappedObj.ref()) {
38838 return false;
38839 }
38840 }
38841 FastErrorResult rv;
38842 bool result(MOZ_KnownLive(self)(self)->GetPrefable9(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
38843 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable9 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable9 getter"
)), 0))
) {
38844 return false;
38845 }
38846 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38846); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38846; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38847 args.rval().setBoolean(result);
38848 return true;
38849}
38850
38851static const JSJitInfo prefable9_getterinfo = {
38852 { get_prefable9 },
38853 { prototypes::id::TestJSImplInterface },
38854 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
38855 JSJitInfo::Getter,
38856 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38857 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
38858 false, /* isInfallible. False in setters. */
38859 false, /* isMovable. Not relevant for setters. */
38860 false, /* isEliminatable. Not relevant for setters. */
38861 false, /* isAlwaysInSlot. Only relevant for getters. */
38862 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38863 false, /* isTypedMethod. Only relevant for methods. */
38864 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38865};
38866
38867MOZ_CAN_RUN_SCRIPT static bool
38868prefable10(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
38869{
38870 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38873( cx, "TestJSImplInterface"
, "prefable10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38871 "TestJSImplInterface", "prefable10", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38873( cx, "TestJSImplInterface"
, "prefable10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38872 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject38873( cx, "TestJSImplInterface"
, "prefable10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38873 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38873( cx, "TestJSImplInterface"
, "prefable10", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
38874
38875 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
38876 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38877 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38878 if (objIsXray) {
38879 unwrappedObj.emplace(cx, obj);
38880 }
38881 if (objIsXray) {
38882 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38883 // we know Xrays have no dynamic unwrap behavior.
38884 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38885 if (!unwrappedObj.ref()) {
38886 return false;
38887 }
38888 }
38889 FastErrorResult rv;
38890 // NOTE: This assert does NOT call the function.
38891 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Prefable10(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
38892 MOZ_KnownLive(self)(self)->Prefable10(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
38893 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable10"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable10"
)), 0))
) {
38894 return false;
38895 }
38896 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38896); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38896; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38897 args.rval().setUndefined();
38898 return true;
38899}
38900
38901static const JSJitInfo prefable10_methodinfo = {
38902 { (JSJitGetterOp)prefable10 },
38903 { prototypes::id::TestJSImplInterface },
38904 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
38905 JSJitInfo::Method,
38906 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38907 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38908 false, /* isInfallible. False in setters. */
38909 false, /* isMovable. Not relevant for setters. */
38910 false, /* isEliminatable. Not relevant for setters. */
38911 false, /* isAlwaysInSlot. Only relevant for getters. */
38912 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38913 false, /* isTypedMethod. Only relevant for methods. */
38914 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38915};
38916
38917MOZ_CAN_RUN_SCRIPT static bool
38918prefable11(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
38919{
38920 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38923( cx, "TestJSImplInterface"
, "prefable11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38921 "TestJSImplInterface", "prefable11", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38923( cx, "TestJSImplInterface"
, "prefable11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38922 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject38923( cx, "TestJSImplInterface"
, "prefable11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38923 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38923( cx, "TestJSImplInterface"
, "prefable11", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
38924
38925 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
38926 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38927 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38928 if (objIsXray) {
38929 unwrappedObj.emplace(cx, obj);
38930 }
38931 if (objIsXray) {
38932 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38933 // we know Xrays have no dynamic unwrap behavior.
38934 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38935 if (!unwrappedObj.ref()) {
38936 return false;
38937 }
38938 }
38939 FastErrorResult rv;
38940 // NOTE: This assert does NOT call the function.
38941 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Prefable11(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
38942 MOZ_KnownLive(self)(self)->Prefable11(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
38943 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable11"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable11"
)), 0))
) {
38944 return false;
38945 }
38946 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38946); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38946; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38947 args.rval().setUndefined();
38948 return true;
38949}
38950
38951static const JSJitInfo prefable11_methodinfo = {
38952 { (JSJitGetterOp)prefable11 },
38953 { prototypes::id::TestJSImplInterface },
38954 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
38955 JSJitInfo::Method,
38956 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
38957 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
38958 false, /* isInfallible. False in setters. */
38959 false, /* isMovable. Not relevant for setters. */
38960 false, /* isEliminatable. Not relevant for setters. */
38961 false, /* isAlwaysInSlot. Only relevant for getters. */
38962 false, /* isLazilyCachedInSlot. Only relevant for getters. */
38963 false, /* isTypedMethod. Only relevant for methods. */
38964 0 /* Reserved slot index, if we're stored in a slot, else 0. */
38965};
38966
38967MOZ_CAN_RUN_SCRIPT static bool
38968get_prefable12(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
38969{
38970 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject38973( cx, "TestJSImplInterface"
, "prefable12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38971 "TestJSImplInterface", "prefable12", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject38973( cx, "TestJSImplInterface"
, "prefable12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38972 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject38973( cx, "TestJSImplInterface"
, "prefable12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
38973 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject38973( cx, "TestJSImplInterface"
, "prefable12", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
38974
38975 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
38976 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
38977 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
38978 if (objIsXray) {
38979 unwrappedObj.emplace(cx, obj);
38980 }
38981 if (objIsXray) {
38982 // Since our object is an Xray, we can just CheckedUnwrapStatic:
38983 // we know Xrays have no dynamic unwrap behavior.
38984 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
38985 if (!unwrappedObj.ref()) {
38986 return false;
38987 }
38988 }
38989 FastErrorResult rv;
38990 bool result(MOZ_KnownLive(self)(self)->GetPrefable12(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
38991 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable12 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable12 getter"
)), 0))
) {
38992 return false;
38993 }
38994 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 38994); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 38994; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
38995 args.rval().setBoolean(result);
38996 return true;
38997}
38998
38999static const JSJitInfo prefable12_getterinfo = {
39000 { get_prefable12 },
39001 { prototypes::id::TestJSImplInterface },
39002 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39003 JSJitInfo::Getter,
39004 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39005 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
39006 false, /* isInfallible. False in setters. */
39007 false, /* isMovable. Not relevant for setters. */
39008 false, /* isEliminatable. Not relevant for setters. */
39009 false, /* isAlwaysInSlot. Only relevant for getters. */
39010 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39011 false, /* isTypedMethod. Only relevant for methods. */
39012 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39013};
39014
39015MOZ_CAN_RUN_SCRIPT static bool
39016prefable13(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
39017{
39018 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39021( cx, "TestJSImplInterface"
, "prefable13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39019 "TestJSImplInterface", "prefable13", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39021( cx, "TestJSImplInterface"
, "prefable13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39020 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject39021( cx, "TestJSImplInterface"
, "prefable13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39021 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39021( cx, "TestJSImplInterface"
, "prefable13", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
39022
39023 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39024 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39025 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39026 if (objIsXray) {
39027 unwrappedObj.emplace(cx, obj);
39028 }
39029 if (objIsXray) {
39030 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39031 // we know Xrays have no dynamic unwrap behavior.
39032 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39033 if (!unwrappedObj.ref()) {
39034 return false;
39035 }
39036 }
39037 FastErrorResult rv;
39038 // NOTE: This assert does NOT call the function.
39039 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Prefable13(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
39040 MOZ_KnownLive(self)(self)->Prefable13(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
39041 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable13"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable13"
)), 0))
) {
39042 return false;
39043 }
39044 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39044); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39044; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39045 args.rval().setUndefined();
39046 return true;
39047}
39048
39049static const JSJitInfo prefable13_methodinfo = {
39050 { (JSJitGetterOp)prefable13 },
39051 { prototypes::id::TestJSImplInterface },
39052 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39053 JSJitInfo::Method,
39054 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39055 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
39056 false, /* isInfallible. False in setters. */
39057 false, /* isMovable. Not relevant for setters. */
39058 false, /* isEliminatable. Not relevant for setters. */
39059 false, /* isAlwaysInSlot. Only relevant for getters. */
39060 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39061 false, /* isTypedMethod. Only relevant for methods. */
39062 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39063};
39064
39065MOZ_CAN_RUN_SCRIPT static bool
39066get_prefable14(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
39067{
39068 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39071( cx, "TestJSImplInterface"
, "prefable14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39069 "TestJSImplInterface", "prefable14", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39071( cx, "TestJSImplInterface"
, "prefable14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39070 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject39071( cx, "TestJSImplInterface"
, "prefable14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39071 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39071( cx, "TestJSImplInterface"
, "prefable14", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
39072
39073 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39074 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39075 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39076 if (objIsXray) {
39077 unwrappedObj.emplace(cx, obj);
39078 }
39079 if (objIsXray) {
39080 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39081 // we know Xrays have no dynamic unwrap behavior.
39082 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39083 if (!unwrappedObj.ref()) {
39084 return false;
39085 }
39086 }
39087 FastErrorResult rv;
39088 bool result(MOZ_KnownLive(self)(self)->GetPrefable14(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
39089 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable14 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable14 getter"
)), 0))
) {
39090 return false;
39091 }
39092 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39092); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39092; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39093 args.rval().setBoolean(result);
39094 return true;
39095}
39096
39097static const JSJitInfo prefable14_getterinfo = {
39098 { get_prefable14 },
39099 { prototypes::id::TestJSImplInterface },
39100 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39101 JSJitInfo::Getter,
39102 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39103 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
39104 false, /* isInfallible. False in setters. */
39105 false, /* isMovable. Not relevant for setters. */
39106 false, /* isEliminatable. Not relevant for setters. */
39107 false, /* isAlwaysInSlot. Only relevant for getters. */
39108 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39109 false, /* isTypedMethod. Only relevant for methods. */
39110 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39111};
39112
39113MOZ_CAN_RUN_SCRIPT static bool
39114get_prefable15(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
39115{
39116 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39119( cx, "TestJSImplInterface"
, "prefable15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39117 "TestJSImplInterface", "prefable15", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39119( cx, "TestJSImplInterface"
, "prefable15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39118 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject39119( cx, "TestJSImplInterface"
, "prefable15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39119 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39119( cx, "TestJSImplInterface"
, "prefable15", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
39120
39121 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39122 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39123 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39124 if (objIsXray) {
39125 unwrappedObj.emplace(cx, obj);
39126 }
39127 if (objIsXray) {
39128 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39129 // we know Xrays have no dynamic unwrap behavior.
39130 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39131 if (!unwrappedObj.ref()) {
39132 return false;
39133 }
39134 }
39135 FastErrorResult rv;
39136 bool result(MOZ_KnownLive(self)(self)->GetPrefable15(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
39137 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable15 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable15 getter"
)), 0))
) {
39138 return false;
39139 }
39140 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39140); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39140; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39141 args.rval().setBoolean(result);
39142 return true;
39143}
39144
39145static const JSJitInfo prefable15_getterinfo = {
39146 { get_prefable15 },
39147 { prototypes::id::TestJSImplInterface },
39148 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39149 JSJitInfo::Getter,
39150 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39151 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
39152 false, /* isInfallible. False in setters. */
39153 false, /* isMovable. Not relevant for setters. */
39154 false, /* isEliminatable. Not relevant for setters. */
39155 false, /* isAlwaysInSlot. Only relevant for getters. */
39156 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39157 false, /* isTypedMethod. Only relevant for methods. */
39158 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39159};
39160
39161MOZ_CAN_RUN_SCRIPT static bool
39162get_prefable16(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
39163{
39164 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39167( cx, "TestJSImplInterface"
, "prefable16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39165 "TestJSImplInterface", "prefable16", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39167( cx, "TestJSImplInterface"
, "prefable16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39166 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject39167( cx, "TestJSImplInterface"
, "prefable16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39167 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39167( cx, "TestJSImplInterface"
, "prefable16", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
39168
39169 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39170 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39171 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39172 if (objIsXray) {
39173 unwrappedObj.emplace(cx, obj);
39174 }
39175 if (objIsXray) {
39176 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39177 // we know Xrays have no dynamic unwrap behavior.
39178 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39179 if (!unwrappedObj.ref()) {
39180 return false;
39181 }
39182 }
39183 FastErrorResult rv;
39184 bool result(MOZ_KnownLive(self)(self)->GetPrefable16(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
39185 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable16 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable16 getter"
)), 0))
) {
39186 return false;
39187 }
39188 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39188); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39188; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39189 args.rval().setBoolean(result);
39190 return true;
39191}
39192
39193static const JSJitInfo prefable16_getterinfo = {
39194 { get_prefable16 },
39195 { prototypes::id::TestJSImplInterface },
39196 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39197 JSJitInfo::Getter,
39198 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39199 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
39200 false, /* isInfallible. False in setters. */
39201 false, /* isMovable. Not relevant for setters. */
39202 false, /* isEliminatable. Not relevant for setters. */
39203 false, /* isAlwaysInSlot. Only relevant for getters. */
39204 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39205 false, /* isTypedMethod. Only relevant for methods. */
39206 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39207};
39208
39209MOZ_CAN_RUN_SCRIPT static bool
39210prefable17(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
39211{
39212 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39215( cx, "TestJSImplInterface"
, "prefable17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39213 "TestJSImplInterface", "prefable17", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39215( cx, "TestJSImplInterface"
, "prefable17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39214 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject39215( cx, "TestJSImplInterface"
, "prefable17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39215 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39215( cx, "TestJSImplInterface"
, "prefable17", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
39216
39217 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39218 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39219 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39220 if (objIsXray) {
39221 unwrappedObj.emplace(cx, obj);
39222 }
39223 if (objIsXray) {
39224 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39225 // we know Xrays have no dynamic unwrap behavior.
39226 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39227 if (!unwrappedObj.ref()) {
39228 return false;
39229 }
39230 }
39231 FastErrorResult rv;
39232 // NOTE: This assert does NOT call the function.
39233 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Prefable17(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
39234 MOZ_KnownLive(self)(self)->Prefable17(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
39235 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable17"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable17"
)), 0))
) {
39236 return false;
39237 }
39238 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39238); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39238; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39239 args.rval().setUndefined();
39240 return true;
39241}
39242
39243static const JSJitInfo prefable17_methodinfo = {
39244 { (JSJitGetterOp)prefable17 },
39245 { prototypes::id::TestJSImplInterface },
39246 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39247 JSJitInfo::Method,
39248 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39249 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
39250 false, /* isInfallible. False in setters. */
39251 false, /* isMovable. Not relevant for setters. */
39252 false, /* isEliminatable. Not relevant for setters. */
39253 false, /* isAlwaysInSlot. Only relevant for getters. */
39254 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39255 false, /* isTypedMethod. Only relevant for methods. */
39256 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39257};
39258
39259MOZ_CAN_RUN_SCRIPT static bool
39260prefable18(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
39261{
39262 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39265( cx, "TestJSImplInterface"
, "prefable18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39263 "TestJSImplInterface", "prefable18", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39265( cx, "TestJSImplInterface"
, "prefable18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39264 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject39265( cx, "TestJSImplInterface"
, "prefable18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39265 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39265( cx, "TestJSImplInterface"
, "prefable18", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
39266
39267 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39268 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39269 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39270 if (objIsXray) {
39271 unwrappedObj.emplace(cx, obj);
39272 }
39273 if (objIsXray) {
39274 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39275 // we know Xrays have no dynamic unwrap behavior.
39276 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39277 if (!unwrappedObj.ref()) {
39278 return false;
39279 }
39280 }
39281 FastErrorResult rv;
39282 // NOTE: This assert does NOT call the function.
39283 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Prefable18(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
39284 MOZ_KnownLive(self)(self)->Prefable18(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
39285 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable18"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable18"
)), 0))
) {
39286 return false;
39287 }
39288 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39288); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39288; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39289 args.rval().setUndefined();
39290 return true;
39291}
39292
39293static const JSJitInfo prefable18_methodinfo = {
39294 { (JSJitGetterOp)prefable18 },
39295 { prototypes::id::TestJSImplInterface },
39296 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39297 JSJitInfo::Method,
39298 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39299 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
39300 false, /* isInfallible. False in setters. */
39301 false, /* isMovable. Not relevant for setters. */
39302 false, /* isEliminatable. Not relevant for setters. */
39303 false, /* isAlwaysInSlot. Only relevant for getters. */
39304 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39305 false, /* isTypedMethod. Only relevant for methods. */
39306 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39307};
39308
39309MOZ_CAN_RUN_SCRIPT static bool
39310prefable19(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
39311{
39312 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39315( cx, "TestJSImplInterface"
, "prefable19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39313 "TestJSImplInterface", "prefable19", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39315( cx, "TestJSImplInterface"
, "prefable19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39314 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject39315( cx, "TestJSImplInterface"
, "prefable19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39315 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39315( cx, "TestJSImplInterface"
, "prefable19", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
39316
39317 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39318 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39319 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39320 if (objIsXray) {
39321 unwrappedObj.emplace(cx, obj);
39322 }
39323 if (objIsXray) {
39324 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39325 // we know Xrays have no dynamic unwrap behavior.
39326 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39327 if (!unwrappedObj.ref()) {
39328 return false;
39329 }
39330 }
39331 FastErrorResult rv;
39332 // NOTE: This assert does NOT call the function.
39333 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Prefable19(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
39334 MOZ_KnownLive(self)(self)->Prefable19(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
39335 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable19"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable19"
)), 0))
) {
39336 return false;
39337 }
39338 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39338); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39338; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39339 args.rval().setUndefined();
39340 return true;
39341}
39342
39343static const JSJitInfo prefable19_methodinfo = {
39344 { (JSJitGetterOp)prefable19 },
39345 { prototypes::id::TestJSImplInterface },
39346 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39347 JSJitInfo::Method,
39348 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39349 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
39350 false, /* isInfallible. False in setters. */
39351 false, /* isMovable. Not relevant for setters. */
39352 false, /* isEliminatable. Not relevant for setters. */
39353 false, /* isAlwaysInSlot. Only relevant for getters. */
39354 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39355 false, /* isTypedMethod. Only relevant for methods. */
39356 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39357};
39358
39359MOZ_CAN_RUN_SCRIPT static bool
39360prefable20(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
39361{
39362 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39365( cx, "TestJSImplInterface"
, "prefable20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39363 "TestJSImplInterface", "prefable20", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39365( cx, "TestJSImplInterface"
, "prefable20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39364 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject39365( cx, "TestJSImplInterface"
, "prefable20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39365 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39365( cx, "TestJSImplInterface"
, "prefable20", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
39366
39367 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39368 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39369 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39370 if (objIsXray) {
39371 unwrappedObj.emplace(cx, obj);
39372 }
39373 if (objIsXray) {
39374 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39375 // we know Xrays have no dynamic unwrap behavior.
39376 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39377 if (!unwrappedObj.ref()) {
39378 return false;
39379 }
39380 }
39381 FastErrorResult rv;
39382 // NOTE: This assert does NOT call the function.
39383 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Prefable20(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
39384 MOZ_KnownLive(self)(self)->Prefable20(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
39385 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable20"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.prefable20"
)), 0))
) {
39386 return false;
39387 }
39388 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39388); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39388; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39389 args.rval().setUndefined();
39390 return true;
39391}
39392
39393static const JSJitInfo prefable20_methodinfo = {
39394 { (JSJitGetterOp)prefable20 },
39395 { prototypes::id::TestJSImplInterface },
39396 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39397 JSJitInfo::Method,
39398 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39399 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
39400 false, /* isInfallible. False in setters. */
39401 false, /* isMovable. Not relevant for setters. */
39402 false, /* isEliminatable. Not relevant for setters. */
39403 false, /* isAlwaysInSlot. Only relevant for getters. */
39404 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39405 false, /* isTypedMethod. Only relevant for methods. */
39406 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39407};
39408
39409MOZ_CAN_RUN_SCRIPT static bool
39410get_conditionalOnSecureContext1(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
39411{
39412 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39415( cx, "TestJSImplInterface"
, "conditionalOnSecureContext1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39413 "TestJSImplInterface", "conditionalOnSecureContext1", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39415( cx, "TestJSImplInterface"
, "conditionalOnSecureContext1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39414 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject39415( cx, "TestJSImplInterface"
, "conditionalOnSecureContext1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39415 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39415( cx, "TestJSImplInterface"
, "conditionalOnSecureContext1", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
39416
39417 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39418 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39419 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39420 if (objIsXray) {
39421 unwrappedObj.emplace(cx, obj);
39422 }
39423 if (objIsXray) {
39424 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39425 // we know Xrays have no dynamic unwrap behavior.
39426 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39427 if (!unwrappedObj.ref()) {
39428 return false;
39429 }
39430 }
39431 FastErrorResult rv;
39432 bool result(MOZ_KnownLive(self)(self)->GetConditionalOnSecureContext1(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
39433 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext1 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext1 getter"
)), 0))
) {
39434 return false;
39435 }
39436 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39436); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39436; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39437 args.rval().setBoolean(result);
39438 return true;
39439}
39440
39441static const JSJitInfo conditionalOnSecureContext1_getterinfo = {
39442 { get_conditionalOnSecureContext1 },
39443 { prototypes::id::TestJSImplInterface },
39444 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39445 JSJitInfo::Getter,
39446 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39447 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
39448 false, /* isInfallible. False in setters. */
39449 false, /* isMovable. Not relevant for setters. */
39450 false, /* isEliminatable. Not relevant for setters. */
39451 false, /* isAlwaysInSlot. Only relevant for getters. */
39452 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39453 false, /* isTypedMethod. Only relevant for methods. */
39454 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39455};
39456
39457MOZ_CAN_RUN_SCRIPT static bool
39458get_conditionalOnSecureContext2(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
39459{
39460 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39463( cx, "TestJSImplInterface"
, "conditionalOnSecureContext2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39461 "TestJSImplInterface", "conditionalOnSecureContext2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39463( cx, "TestJSImplInterface"
, "conditionalOnSecureContext2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39462 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject39463( cx, "TestJSImplInterface"
, "conditionalOnSecureContext2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39463 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39463( cx, "TestJSImplInterface"
, "conditionalOnSecureContext2", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
39464
39465 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39466 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39467 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39468 if (objIsXray) {
39469 unwrappedObj.emplace(cx, obj);
39470 }
39471 if (objIsXray) {
39472 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39473 // we know Xrays have no dynamic unwrap behavior.
39474 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39475 if (!unwrappedObj.ref()) {
39476 return false;
39477 }
39478 }
39479 FastErrorResult rv;
39480 bool result(MOZ_KnownLive(self)(self)->GetConditionalOnSecureContext2(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
39481 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext2 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext2 getter"
)), 0))
) {
39482 return false;
39483 }
39484 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39484); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39484; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39485 args.rval().setBoolean(result);
39486 return true;
39487}
39488
39489static const JSJitInfo conditionalOnSecureContext2_getterinfo = {
39490 { get_conditionalOnSecureContext2 },
39491 { prototypes::id::TestJSImplInterface },
39492 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39493 JSJitInfo::Getter,
39494 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39495 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
39496 false, /* isInfallible. False in setters. */
39497 false, /* isMovable. Not relevant for setters. */
39498 false, /* isEliminatable. Not relevant for setters. */
39499 false, /* isAlwaysInSlot. Only relevant for getters. */
39500 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39501 false, /* isTypedMethod. Only relevant for methods. */
39502 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39503};
39504
39505MOZ_CAN_RUN_SCRIPT static bool
39506get_conditionalOnSecureContext3(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
39507{
39508 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39511( cx, "TestJSImplInterface"
, "conditionalOnSecureContext3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39509 "TestJSImplInterface", "conditionalOnSecureContext3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39511( cx, "TestJSImplInterface"
, "conditionalOnSecureContext3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39510 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject39511( cx, "TestJSImplInterface"
, "conditionalOnSecureContext3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39511 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39511( cx, "TestJSImplInterface"
, "conditionalOnSecureContext3", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
39512
39513 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39514 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39515 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39516 if (objIsXray) {
39517 unwrappedObj.emplace(cx, obj);
39518 }
39519 if (objIsXray) {
39520 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39521 // we know Xrays have no dynamic unwrap behavior.
39522 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39523 if (!unwrappedObj.ref()) {
39524 return false;
39525 }
39526 }
39527 FastErrorResult rv;
39528 bool result(MOZ_KnownLive(self)(self)->GetConditionalOnSecureContext3(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
39529 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext3 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext3 getter"
)), 0))
) {
39530 return false;
39531 }
39532 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39532); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39532; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39533 args.rval().setBoolean(result);
39534 return true;
39535}
39536
39537static const JSJitInfo conditionalOnSecureContext3_getterinfo = {
39538 { get_conditionalOnSecureContext3 },
39539 { prototypes::id::TestJSImplInterface },
39540 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39541 JSJitInfo::Getter,
39542 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39543 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
39544 false, /* isInfallible. False in setters. */
39545 false, /* isMovable. Not relevant for setters. */
39546 false, /* isEliminatable. Not relevant for setters. */
39547 false, /* isAlwaysInSlot. Only relevant for getters. */
39548 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39549 false, /* isTypedMethod. Only relevant for methods. */
39550 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39551};
39552
39553MOZ_CAN_RUN_SCRIPT static bool
39554get_conditionalOnSecureContext4(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
39555{
39556 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39559( cx, "TestJSImplInterface"
, "conditionalOnSecureContext4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39557 "TestJSImplInterface", "conditionalOnSecureContext4", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39559( cx, "TestJSImplInterface"
, "conditionalOnSecureContext4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39558 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject39559( cx, "TestJSImplInterface"
, "conditionalOnSecureContext4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39559 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39559( cx, "TestJSImplInterface"
, "conditionalOnSecureContext4", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
39560
39561 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39562 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39563 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39564 if (objIsXray) {
39565 unwrappedObj.emplace(cx, obj);
39566 }
39567 if (objIsXray) {
39568 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39569 // we know Xrays have no dynamic unwrap behavior.
39570 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39571 if (!unwrappedObj.ref()) {
39572 return false;
39573 }
39574 }
39575 FastErrorResult rv;
39576 bool result(MOZ_KnownLive(self)(self)->GetConditionalOnSecureContext4(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
39577 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext4 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext4 getter"
)), 0))
) {
39578 return false;
39579 }
39580 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39580); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39580; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39581 args.rval().setBoolean(result);
39582 return true;
39583}
39584
39585static const JSJitInfo conditionalOnSecureContext4_getterinfo = {
39586 { get_conditionalOnSecureContext4 },
39587 { prototypes::id::TestJSImplInterface },
39588 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39589 JSJitInfo::Getter,
39590 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39591 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
39592 false, /* isInfallible. False in setters. */
39593 false, /* isMovable. Not relevant for setters. */
39594 false, /* isEliminatable. Not relevant for setters. */
39595 false, /* isAlwaysInSlot. Only relevant for getters. */
39596 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39597 false, /* isTypedMethod. Only relevant for methods. */
39598 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39599};
39600
39601MOZ_CAN_RUN_SCRIPT static bool
39602conditionalOnSecureContext5(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
39603{
39604 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39607( cx, "TestJSImplInterface"
, "conditionalOnSecureContext5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39605 "TestJSImplInterface", "conditionalOnSecureContext5", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39607( cx, "TestJSImplInterface"
, "conditionalOnSecureContext5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39606 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject39607( cx, "TestJSImplInterface"
, "conditionalOnSecureContext5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39607 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39607( cx, "TestJSImplInterface"
, "conditionalOnSecureContext5", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
39608
39609 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39610 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39611 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39612 if (objIsXray) {
39613 unwrappedObj.emplace(cx, obj);
39614 }
39615 if (objIsXray) {
39616 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39617 // we know Xrays have no dynamic unwrap behavior.
39618 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39619 if (!unwrappedObj.ref()) {
39620 return false;
39621 }
39622 }
39623 FastErrorResult rv;
39624 // NOTE: This assert does NOT call the function.
39625 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ConditionalOnSecureContext5(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
39626 MOZ_KnownLive(self)(self)->ConditionalOnSecureContext5(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
39627 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext5"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext5"
)), 0))
) {
39628 return false;
39629 }
39630 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39630); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39630; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39631 args.rval().setUndefined();
39632 return true;
39633}
39634
39635static const JSJitInfo conditionalOnSecureContext5_methodinfo = {
39636 { (JSJitGetterOp)conditionalOnSecureContext5 },
39637 { prototypes::id::TestJSImplInterface },
39638 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39639 JSJitInfo::Method,
39640 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39641 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
39642 false, /* isInfallible. False in setters. */
39643 false, /* isMovable. Not relevant for setters. */
39644 false, /* isEliminatable. Not relevant for setters. */
39645 false, /* isAlwaysInSlot. Only relevant for getters. */
39646 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39647 false, /* isTypedMethod. Only relevant for methods. */
39648 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39649};
39650
39651MOZ_CAN_RUN_SCRIPT static bool
39652conditionalOnSecureContext6(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
39653{
39654 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39657( cx, "TestJSImplInterface"
, "conditionalOnSecureContext6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39655 "TestJSImplInterface", "conditionalOnSecureContext6", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39657( cx, "TestJSImplInterface"
, "conditionalOnSecureContext6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39656 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject39657( cx, "TestJSImplInterface"
, "conditionalOnSecureContext6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39657 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39657( cx, "TestJSImplInterface"
, "conditionalOnSecureContext6", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
39658
39659 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39660 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39661 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39662 if (objIsXray) {
39663 unwrappedObj.emplace(cx, obj);
39664 }
39665 if (objIsXray) {
39666 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39667 // we know Xrays have no dynamic unwrap behavior.
39668 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39669 if (!unwrappedObj.ref()) {
39670 return false;
39671 }
39672 }
39673 FastErrorResult rv;
39674 // NOTE: This assert does NOT call the function.
39675 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ConditionalOnSecureContext6(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
39676 MOZ_KnownLive(self)(self)->ConditionalOnSecureContext6(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
39677 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext6"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext6"
)), 0))
) {
39678 return false;
39679 }
39680 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39680); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39680; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39681 args.rval().setUndefined();
39682 return true;
39683}
39684
39685static const JSJitInfo conditionalOnSecureContext6_methodinfo = {
39686 { (JSJitGetterOp)conditionalOnSecureContext6 },
39687 { prototypes::id::TestJSImplInterface },
39688 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39689 JSJitInfo::Method,
39690 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39691 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
39692 false, /* isInfallible. False in setters. */
39693 false, /* isMovable. Not relevant for setters. */
39694 false, /* isEliminatable. Not relevant for setters. */
39695 false, /* isAlwaysInSlot. Only relevant for getters. */
39696 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39697 false, /* isTypedMethod. Only relevant for methods. */
39698 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39699};
39700
39701MOZ_CAN_RUN_SCRIPT static bool
39702conditionalOnSecureContext7(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
39703{
39704 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39707( cx, "TestJSImplInterface"
, "conditionalOnSecureContext7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39705 "TestJSImplInterface", "conditionalOnSecureContext7", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39707( cx, "TestJSImplInterface"
, "conditionalOnSecureContext7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39706 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject39707( cx, "TestJSImplInterface"
, "conditionalOnSecureContext7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39707 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39707( cx, "TestJSImplInterface"
, "conditionalOnSecureContext7", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
39708
39709 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39710 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39711 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39712 if (objIsXray) {
39713 unwrappedObj.emplace(cx, obj);
39714 }
39715 if (objIsXray) {
39716 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39717 // we know Xrays have no dynamic unwrap behavior.
39718 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39719 if (!unwrappedObj.ref()) {
39720 return false;
39721 }
39722 }
39723 FastErrorResult rv;
39724 // NOTE: This assert does NOT call the function.
39725 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ConditionalOnSecureContext7(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
39726 MOZ_KnownLive(self)(self)->ConditionalOnSecureContext7(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
39727 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext7"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext7"
)), 0))
) {
39728 return false;
39729 }
39730 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39730); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39730; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39731 args.rval().setUndefined();
39732 return true;
39733}
39734
39735static const JSJitInfo conditionalOnSecureContext7_methodinfo = {
39736 { (JSJitGetterOp)conditionalOnSecureContext7 },
39737 { prototypes::id::TestJSImplInterface },
39738 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39739 JSJitInfo::Method,
39740 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39741 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
39742 false, /* isInfallible. False in setters. */
39743 false, /* isMovable. Not relevant for setters. */
39744 false, /* isEliminatable. Not relevant for setters. */
39745 false, /* isAlwaysInSlot. Only relevant for getters. */
39746 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39747 false, /* isTypedMethod. Only relevant for methods. */
39748 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39749};
39750
39751MOZ_CAN_RUN_SCRIPT static bool
39752conditionalOnSecureContext8(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
39753{
39754 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39757( cx, "TestJSImplInterface"
, "conditionalOnSecureContext8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39755 "TestJSImplInterface", "conditionalOnSecureContext8", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39757( cx, "TestJSImplInterface"
, "conditionalOnSecureContext8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39756 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject39757( cx, "TestJSImplInterface"
, "conditionalOnSecureContext8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
39757 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39757( cx, "TestJSImplInterface"
, "conditionalOnSecureContext8", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
39758
39759 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39760 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39761 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39762 if (objIsXray) {
39763 unwrappedObj.emplace(cx, obj);
39764 }
39765 if (objIsXray) {
39766 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39767 // we know Xrays have no dynamic unwrap behavior.
39768 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39769 if (!unwrappedObj.ref()) {
39770 return false;
39771 }
39772 }
39773 FastErrorResult rv;
39774 // NOTE: This assert does NOT call the function.
39775 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ConditionalOnSecureContext8(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
39776 MOZ_KnownLive(self)(self)->ConditionalOnSecureContext8(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
39777 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext8"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.conditionalOnSecureContext8"
)), 0))
) {
39778 return false;
39779 }
39780 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39780); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39780; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39781 args.rval().setUndefined();
39782 return true;
39783}
39784
39785static const JSJitInfo conditionalOnSecureContext8_methodinfo = {
39786 { (JSJitGetterOp)conditionalOnSecureContext8 },
39787 { prototypes::id::TestJSImplInterface },
39788 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39789 JSJitInfo::Method,
39790 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39791 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
39792 false, /* isInfallible. False in setters. */
39793 false, /* isMovable. Not relevant for setters. */
39794 false, /* isEliminatable. Not relevant for setters. */
39795 false, /* isAlwaysInSlot. Only relevant for getters. */
39796 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39797 false, /* isTypedMethod. Only relevant for methods. */
39798 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39799};
39800
39801MOZ_CAN_RUN_SCRIPT static bool
39802get_attrWithLenientThis(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
39803{
39804 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39807( cx, "TestJSImplInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39805 "TestJSImplInterface", "attrWithLenientThis", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39807( cx, "TestJSImplInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39806 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject39807( cx, "TestJSImplInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39807 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39807( cx, "TestJSImplInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
39808
39809 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39810 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39811 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39812 if (objIsXray) {
39813 unwrappedObj.emplace(cx, obj);
39814 }
39815 if (objIsXray) {
39816 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39817 // we know Xrays have no dynamic unwrap behavior.
39818 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39819 if (!unwrappedObj.ref()) {
39820 return false;
39821 }
39822 }
39823 FastErrorResult rv;
39824 int32_t result(MOZ_KnownLive(self)(self)->GetAttrWithLenientThis(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
39825 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.attrWithLenientThis getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.attrWithLenientThis getter"
)), 0))
) {
39826 return false;
39827 }
39828 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39828); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39828; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39829 args.rval().setInt32(int32_t(result));
39830 return true;
39831}
39832
39833MOZ_CAN_RUN_SCRIPT static bool
39834set_attrWithLenientThis(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
39835{
39836 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39839( cx, "TestJSImplInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39837 "TestJSImplInterface", "attrWithLenientThis", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39839( cx, "TestJSImplInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39838 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject39839( cx, "TestJSImplInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39839 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39839( cx, "TestJSImplInterface"
, "attrWithLenientThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
39840
39841 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39842 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39843 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39844 if (objIsXray) {
39845 unwrappedObj.emplace(cx, obj);
39846 }
39847 int32_t arg0;
39848 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
39849 return false;
39850 }
39851 if (objIsXray) {
39852 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39853 // we know Xrays have no dynamic unwrap behavior.
39854 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39855 if (!unwrappedObj.ref()) {
39856 return false;
39857 }
39858 }
39859 FastErrorResult rv;
39860 // NOTE: This assert does NOT call the function.
39861 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetAttrWithLenientThis(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
39862 MOZ_KnownLive(self)(self)->SetAttrWithLenientThis(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
39863 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.attrWithLenientThis setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.attrWithLenientThis setter"
)), 0))
) {
39864 return false;
39865 }
39866 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39866); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39866; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39867
39868 return true;
39869}
39870
39871static const JSJitInfo attrWithLenientThis_getterinfo = {
39872 { get_attrWithLenientThis },
39873 { prototypes::id::TestJSImplInterface },
39874 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39875 JSJitInfo::Getter,
39876 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39877 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
39878 false, /* isInfallible. False in setters. */
39879 false, /* isMovable. Not relevant for setters. */
39880 false, /* isEliminatable. Not relevant for setters. */
39881 false, /* isAlwaysInSlot. Only relevant for getters. */
39882 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39883 false, /* isTypedMethod. Only relevant for methods. */
39884 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39885};
39886static const JSJitInfo attrWithLenientThis_setterinfo = {
39887 { (JSJitGetterOp)set_attrWithLenientThis },
39888 { prototypes::id::TestJSImplInterface },
39889 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39890 JSJitInfo::Setter,
39891 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39892 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
39893 false, /* isInfallible. False in setters. */
39894 false, /* isMovable. Not relevant for setters. */
39895 false, /* isEliminatable. Not relevant for setters. */
39896 false, /* isAlwaysInSlot. Only relevant for getters. */
39897 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39898 false, /* isTypedMethod. Only relevant for methods. */
39899 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39900};
39901
39902MOZ_CAN_RUN_SCRIPT static bool
39903passRenamedInterface(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
39904{
39905 BindingCallContext cx(cx_, "TestJSImplInterface.passRenamedInterface");
39906 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39909( cx, "TestJSImplInterface"
, "passRenamedInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39907 "TestJSImplInterface", "passRenamedInterface", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39909( cx, "TestJSImplInterface"
, "passRenamedInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39908 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject39909( cx, "TestJSImplInterface"
, "passRenamedInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39909 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39909( cx, "TestJSImplInterface"
, "passRenamedInterface", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
39910
39911 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39912 if (!args.requireAtLeast(cx, "TestJSImplInterface.passRenamedInterface", 1)) {
39913 return false;
39914 }
39915 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39916 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39917 if (objIsXray) {
39918 unwrappedObj.emplace(cx, obj);
39919 }
39920 NonNull<nsRenamedInterface> arg0;
39921 if (args[0].isObject()) {
39922 {
39923 // Our JSContext should be in the right global to do unwrapping in.
39924 nsresult rv = UnwrapObject<prototypes::id::TestRenamedInterface, nsRenamedInterface>(args[0], arg0, cx);
39925 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
39926 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "TestRenamedInterface");
39927 return false;
39928 }
39929 }
39930 } else {
39931 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
39932 return false;
39933 }
39934 if (objIsXray) {
39935 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39936 // we know Xrays have no dynamic unwrap behavior.
39937 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39938 if (!unwrappedObj.ref()) {
39939 return false;
39940 }
39941 }
39942 FastErrorResult rv;
39943 // NOTE: This assert does NOT call the function.
39944 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassRenamedInterface(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
39945 MOZ_KnownLive(self)(self)->PassRenamedInterface(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
39946 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRenamedInterface"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passRenamedInterface"
)), 0))
) {
39947 return false;
39948 }
39949 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39949); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39949; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39950 args.rval().setUndefined();
39951 return true;
39952}
39953
39954static const JSJitInfo passRenamedInterface_methodinfo = {
39955 { (JSJitGetterOp)passRenamedInterface },
39956 { prototypes::id::TestJSImplInterface },
39957 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
39958 JSJitInfo::Method,
39959 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
39960 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
39961 false, /* isInfallible. False in setters. */
39962 false, /* isMovable. Not relevant for setters. */
39963 false, /* isEliminatable. Not relevant for setters. */
39964 false, /* isAlwaysInSlot. Only relevant for getters. */
39965 false, /* isLazilyCachedInSlot. Only relevant for getters. */
39966 false, /* isTypedMethod. Only relevant for methods. */
39967 0 /* Reserved slot index, if we're stored in a slot, else 0. */
39968};
39969
39970MOZ_CAN_RUN_SCRIPT static bool
39971get_putForwardsAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
39972{
39973 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject39976( cx, "TestJSImplInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39974 "TestJSImplInterface", "putForwardsAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject39976( cx, "TestJSImplInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39975 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject39976( cx, "TestJSImplInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
39976 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject39976( cx, "TestJSImplInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
39977
39978 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
39979 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
39980 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
39981 if (objIsXray) {
39982 unwrappedObj.emplace(cx, obj);
39983 }
39984 if (objIsXray) {
39985 // Since our object is an Xray, we can just CheckedUnwrapStatic:
39986 // we know Xrays have no dynamic unwrap behavior.
39987 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
39988 if (!unwrappedObj.ref()) {
39989 return false;
39990 }
39991 }
39992 FastErrorResult rv;
39993 auto result(StrongOrRawPtr<mozilla::dom::TestJSImplInterface>(MOZ_KnownLive(self)(self)->GetPutForwardsAttr(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
39994 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.putForwardsAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.putForwardsAttr getter"
)), 0))
) {
39995 return false;
39996 }
39997 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39997); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 39997; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
39998 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
39999 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 39999); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 39999; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
40000 return false;
40001 }
40002 return true;
40003}
40004
40005MOZ_CAN_RUN_SCRIPT static bool
40006set_putForwardsAttr(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
40007{
40008 BindingCallContext cx(cx_, "TestJSImplInterface.putForwardsAttr setter");
40009 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40012( cx, "TestJSImplInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40010 "TestJSImplInterface", "putForwardsAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40012( cx, "TestJSImplInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40011 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject40012( cx, "TestJSImplInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40012 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40012( cx, "TestJSImplInterface"
, "putForwardsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40013
40014 JS::Rooted<JS::Value> v(cx);
40015 if (!JS_GetProperty(cx, obj, "putForwardsAttr", &v)) {
40016 return false;
40017 }
40018
40019 if (!v.isObject()) {
40020 return cx.ThrowErrorMessage<MSG_NOT_OBJECT>("TestJSImplInterface.putForwardsAttr");
40021 }
40022
40023 JS::Rooted<JSObject*> targetObj(cx, &v.toObject());
40024 return JS_SetProperty(cx, targetObj, "writableByte", args[0]);
40025}
40026
40027static const JSJitInfo putForwardsAttr_getterinfo = {
40028 { get_putForwardsAttr },
40029 { prototypes::id::TestJSImplInterface },
40030 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40031 JSJitInfo::Getter,
40032 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40033 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
40034 false, /* isInfallible. False in setters. */
40035 false, /* isMovable. Not relevant for setters. */
40036 false, /* isEliminatable. Not relevant for setters. */
40037 false, /* isAlwaysInSlot. Only relevant for getters. */
40038 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40039 false, /* isTypedMethod. Only relevant for methods. */
40040 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40041};
40042static const JSJitInfo putForwardsAttr_setterinfo = {
40043 { (JSJitGetterOp)set_putForwardsAttr },
40044 { prototypes::id::TestJSImplInterface },
40045 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40046 JSJitInfo::Setter,
40047 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40048 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
40049 false, /* isInfallible. False in setters. */
40050 false, /* isMovable. Not relevant for setters. */
40051 false, /* isEliminatable. Not relevant for setters. */
40052 false, /* isAlwaysInSlot. Only relevant for getters. */
40053 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40054 false, /* isTypedMethod. Only relevant for methods. */
40055 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40056};
40057
40058MOZ_CAN_RUN_SCRIPT static bool
40059get_putForwardsAttr2(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
40060{
40061 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40064( cx, "TestJSImplInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40062 "TestJSImplInterface", "putForwardsAttr2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40064( cx, "TestJSImplInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40063 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject40064( cx, "TestJSImplInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40064 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40064( cx, "TestJSImplInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40065
40066 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40067 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40068 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40069 if (objIsXray) {
40070 unwrappedObj.emplace(cx, obj);
40071 }
40072 if (objIsXray) {
40073 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40074 // we know Xrays have no dynamic unwrap behavior.
40075 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40076 if (!unwrappedObj.ref()) {
40077 return false;
40078 }
40079 }
40080 FastErrorResult rv;
40081 auto result(StrongOrRawPtr<mozilla::dom::TestJSImplInterface>(MOZ_KnownLive(self)(self)->GetPutForwardsAttr2(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
40082 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.putForwardsAttr2 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.putForwardsAttr2 getter"
)), 0))
) {
40083 return false;
40084 }
40085 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40085); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40085; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40086 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
40087 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40087); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 40087; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
40088 return false;
40089 }
40090 return true;
40091}
40092
40093MOZ_CAN_RUN_SCRIPT static bool
40094set_putForwardsAttr2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
40095{
40096 BindingCallContext cx(cx_, "TestJSImplInterface.putForwardsAttr2 setter");
40097 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40100( cx, "TestJSImplInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40098 "TestJSImplInterface", "putForwardsAttr2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40100( cx, "TestJSImplInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40099 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject40100( cx, "TestJSImplInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40100 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40100( cx, "TestJSImplInterface"
, "putForwardsAttr2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40101
40102 JS::Rooted<JS::Value> v(cx);
40103 if (!JS_GetProperty(cx, obj, "putForwardsAttr2", &v)) {
40104 return false;
40105 }
40106
40107 if (!v.isObject()) {
40108 return cx.ThrowErrorMessage<MSG_NOT_OBJECT>("TestJSImplInterface.putForwardsAttr2");
40109 }
40110
40111 JS::Rooted<JSObject*> targetObj(cx, &v.toObject());
40112 return JS_SetProperty(cx, targetObj, "writableByte", args[0]);
40113}
40114
40115static const JSJitInfo putForwardsAttr2_getterinfo = {
40116 { get_putForwardsAttr2 },
40117 { prototypes::id::TestJSImplInterface },
40118 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40119 JSJitInfo::Getter,
40120 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40121 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
40122 false, /* isInfallible. False in setters. */
40123 false, /* isMovable. Not relevant for setters. */
40124 false, /* isEliminatable. Not relevant for setters. */
40125 false, /* isAlwaysInSlot. Only relevant for getters. */
40126 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40127 false, /* isTypedMethod. Only relevant for methods. */
40128 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40129};
40130static const JSJitInfo putForwardsAttr2_setterinfo = {
40131 { (JSJitGetterOp)set_putForwardsAttr2 },
40132 { prototypes::id::TestJSImplInterface },
40133 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40134 JSJitInfo::Setter,
40135 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40136 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
40137 false, /* isInfallible. False in setters. */
40138 false, /* isMovable. Not relevant for setters. */
40139 false, /* isEliminatable. Not relevant for setters. */
40140 false, /* isAlwaysInSlot. Only relevant for getters. */
40141 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40142 false, /* isTypedMethod. Only relevant for methods. */
40143 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40144};
40145
40146MOZ_CAN_RUN_SCRIPT static bool
40147get_putForwardsAttr3(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
40148{
40149 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40152( cx, "TestJSImplInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40150 "TestJSImplInterface", "putForwardsAttr3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40152( cx, "TestJSImplInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40151 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject40152( cx, "TestJSImplInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40152 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40152( cx, "TestJSImplInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40153
40154 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40155 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40156 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40157 if (objIsXray) {
40158 unwrappedObj.emplace(cx, obj);
40159 }
40160 if (objIsXray) {
40161 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40162 // we know Xrays have no dynamic unwrap behavior.
40163 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40164 if (!unwrappedObj.ref()) {
40165 return false;
40166 }
40167 }
40168 FastErrorResult rv;
40169 auto result(StrongOrRawPtr<mozilla::dom::TestJSImplInterface>(MOZ_KnownLive(self)(self)->GetPutForwardsAttr3(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
40170 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.putForwardsAttr3 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.putForwardsAttr3 getter"
)), 0))
) {
40171 return false;
40172 }
40173 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40173); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40173; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40174 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
40175 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40175); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 40175; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
40176 return false;
40177 }
40178 return true;
40179}
40180
40181MOZ_CAN_RUN_SCRIPT static bool
40182set_putForwardsAttr3(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
40183{
40184 BindingCallContext cx(cx_, "TestJSImplInterface.putForwardsAttr3 setter");
40185 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40188( cx, "TestJSImplInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40186 "TestJSImplInterface", "putForwardsAttr3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40188( cx, "TestJSImplInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40187 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject40188( cx, "TestJSImplInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40188 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40188( cx, "TestJSImplInterface"
, "putForwardsAttr3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40189
40190 JS::Rooted<JS::Value> v(cx);
40191 if (!JS_GetProperty(cx, obj, "putForwardsAttr3", &v)) {
40192 return false;
40193 }
40194
40195 if (!v.isObject()) {
40196 return cx.ThrowErrorMessage<MSG_NOT_OBJECT>("TestJSImplInterface.putForwardsAttr3");
40197 }
40198
40199 JS::Rooted<JSObject*> targetObj(cx, &v.toObject());
40200 return JS_SetProperty(cx, targetObj, "writableByte", args[0]);
40201}
40202
40203static const JSJitInfo putForwardsAttr3_getterinfo = {
40204 { get_putForwardsAttr3 },
40205 { prototypes::id::TestJSImplInterface },
40206 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40207 JSJitInfo::Getter,
40208 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40209 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
40210 false, /* isInfallible. False in setters. */
40211 false, /* isMovable. Not relevant for setters. */
40212 false, /* isEliminatable. Not relevant for setters. */
40213 false, /* isAlwaysInSlot. Only relevant for getters. */
40214 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40215 false, /* isTypedMethod. Only relevant for methods. */
40216 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40217};
40218static const JSJitInfo putForwardsAttr3_setterinfo = {
40219 { (JSJitGetterOp)set_putForwardsAttr3 },
40220 { prototypes::id::TestJSImplInterface },
40221 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40222 JSJitInfo::Setter,
40223 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40224 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
40225 false, /* isInfallible. False in setters. */
40226 false, /* isMovable. Not relevant for setters. */
40227 false, /* isEliminatable. Not relevant for setters. */
40228 false, /* isAlwaysInSlot. Only relevant for getters. */
40229 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40230 false, /* isTypedMethod. Only relevant for methods. */
40231 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40232};
40233
40234MOZ_CAN_RUN_SCRIPT static bool
40235throwingMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
40236{
40237 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40240( cx, "TestJSImplInterface"
, "throwingMethod", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40238 "TestJSImplInterface", "throwingMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40240( cx, "TestJSImplInterface"
, "throwingMethod", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40239 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject40240( cx, "TestJSImplInterface"
, "throwingMethod", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40240 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40240( cx, "TestJSImplInterface"
, "throwingMethod", JS::ProfilingCategoryPair::DOM, uint32_t(
js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40241
40242 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40243 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40244 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40245 if (objIsXray) {
40246 unwrappedObj.emplace(cx, obj);
40247 }
40248 if (objIsXray) {
40249 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40250 // we know Xrays have no dynamic unwrap behavior.
40251 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40252 if (!unwrappedObj.ref()) {
40253 return false;
40254 }
40255 }
40256 FastErrorResult rv;
40257 // NOTE: This assert does NOT call the function.
40258 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->ThrowingMethod(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
40259 MOZ_KnownLive(self)(self)->ThrowingMethod(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
40260 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.throwingMethod"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.throwingMethod"
)), 0))
) {
40261 return false;
40262 }
40263 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40263); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40263; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40264 args.rval().setUndefined();
40265 return true;
40266}
40267
40268static const JSJitInfo throwingMethod_methodinfo = {
40269 { (JSJitGetterOp)throwingMethod },
40270 { prototypes::id::TestJSImplInterface },
40271 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40272 JSJitInfo::Method,
40273 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40274 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
40275 false, /* isInfallible. False in setters. */
40276 false, /* isMovable. Not relevant for setters. */
40277 false, /* isEliminatable. Not relevant for setters. */
40278 false, /* isAlwaysInSlot. Only relevant for getters. */
40279 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40280 false, /* isTypedMethod. Only relevant for methods. */
40281 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40282};
40283
40284MOZ_CAN_RUN_SCRIPT static bool
40285get_throwingAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
40286{
40287 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40290( cx, "TestJSImplInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40288 "TestJSImplInterface", "throwingAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40290( cx, "TestJSImplInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40289 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject40290( cx, "TestJSImplInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40290 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40290( cx, "TestJSImplInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40291
40292 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40293 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40294 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40295 if (objIsXray) {
40296 unwrappedObj.emplace(cx, obj);
40297 }
40298 if (objIsXray) {
40299 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40300 // we know Xrays have no dynamic unwrap behavior.
40301 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40302 if (!unwrappedObj.ref()) {
40303 return false;
40304 }
40305 }
40306 FastErrorResult rv;
40307 bool result(MOZ_KnownLive(self)(self)->GetThrowingAttr(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
40308 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.throwingAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.throwingAttr getter"
)), 0))
) {
40309 return false;
40310 }
40311 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40311); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40311; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40312 args.rval().setBoolean(result);
40313 return true;
40314}
40315
40316MOZ_CAN_RUN_SCRIPT static bool
40317set_throwingAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
40318{
40319 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40322( cx, "TestJSImplInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40320 "TestJSImplInterface", "throwingAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40322( cx, "TestJSImplInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40321 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject40322( cx, "TestJSImplInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40322 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40322( cx, "TestJSImplInterface"
, "throwingAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40323
40324 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40325 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40326 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40327 if (objIsXray) {
40328 unwrappedObj.emplace(cx, obj);
40329 }
40330 bool arg0;
40331 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
40332 return false;
40333 }
40334 if (objIsXray) {
40335 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40336 // we know Xrays have no dynamic unwrap behavior.
40337 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40338 if (!unwrappedObj.ref()) {
40339 return false;
40340 }
40341 }
40342 FastErrorResult rv;
40343 // NOTE: This assert does NOT call the function.
40344 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetThrowingAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
40345 MOZ_KnownLive(self)(self)->SetThrowingAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
40346 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.throwingAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.throwingAttr setter"
)), 0))
) {
40347 return false;
40348 }
40349 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40349); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40349; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40350
40351 return true;
40352}
40353
40354static const JSJitInfo throwingAttr_getterinfo = {
40355 { get_throwingAttr },
40356 { prototypes::id::TestJSImplInterface },
40357 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40358 JSJitInfo::Getter,
40359 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40360 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
40361 false, /* isInfallible. False in setters. */
40362 false, /* isMovable. Not relevant for setters. */
40363 false, /* isEliminatable. Not relevant for setters. */
40364 false, /* isAlwaysInSlot. Only relevant for getters. */
40365 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40366 false, /* isTypedMethod. Only relevant for methods. */
40367 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40368};
40369static const JSJitInfo throwingAttr_setterinfo = {
40370 { (JSJitGetterOp)set_throwingAttr },
40371 { prototypes::id::TestJSImplInterface },
40372 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40373 JSJitInfo::Setter,
40374 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40375 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
40376 false, /* isInfallible. False in setters. */
40377 false, /* isMovable. Not relevant for setters. */
40378 false, /* isEliminatable. Not relevant for setters. */
40379 false, /* isAlwaysInSlot. Only relevant for getters. */
40380 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40381 false, /* isTypedMethod. Only relevant for methods. */
40382 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40383};
40384
40385MOZ_CAN_RUN_SCRIPT static bool
40386get_throwingGetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
40387{
40388 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40391( cx, "TestJSImplInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40389 "TestJSImplInterface", "throwingGetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40391( cx, "TestJSImplInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40390 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject40391( cx, "TestJSImplInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40391 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40391( cx, "TestJSImplInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40392
40393 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40394 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40395 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40396 if (objIsXray) {
40397 unwrappedObj.emplace(cx, obj);
40398 }
40399 if (objIsXray) {
40400 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40401 // we know Xrays have no dynamic unwrap behavior.
40402 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40403 if (!unwrappedObj.ref()) {
40404 return false;
40405 }
40406 }
40407 FastErrorResult rv;
40408 bool result(MOZ_KnownLive(self)(self)->GetThrowingGetterAttr(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
40409 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.throwingGetterAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.throwingGetterAttr getter"
)), 0))
) {
40410 return false;
40411 }
40412 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40412); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40412; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40413 args.rval().setBoolean(result);
40414 return true;
40415}
40416
40417MOZ_CAN_RUN_SCRIPT static bool
40418set_throwingGetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
40419{
40420 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40423( cx, "TestJSImplInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40421 "TestJSImplInterface", "throwingGetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40423( cx, "TestJSImplInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40422 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject40423( cx, "TestJSImplInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40423 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40423( cx, "TestJSImplInterface"
, "throwingGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40424
40425 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40426 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40427 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40428 if (objIsXray) {
40429 unwrappedObj.emplace(cx, obj);
40430 }
40431 bool arg0;
40432 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
40433 return false;
40434 }
40435 if (objIsXray) {
40436 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40437 // we know Xrays have no dynamic unwrap behavior.
40438 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40439 if (!unwrappedObj.ref()) {
40440 return false;
40441 }
40442 }
40443 FastErrorResult rv;
40444 // NOTE: This assert does NOT call the function.
40445 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetThrowingGetterAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
40446 MOZ_KnownLive(self)(self)->SetThrowingGetterAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
40447 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.throwingGetterAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.throwingGetterAttr setter"
)), 0))
) {
40448 return false;
40449 }
40450 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40450); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40450; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40451
40452 return true;
40453}
40454
40455static const JSJitInfo throwingGetterAttr_getterinfo = {
40456 { get_throwingGetterAttr },
40457 { prototypes::id::TestJSImplInterface },
40458 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40459 JSJitInfo::Getter,
40460 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40461 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
40462 false, /* isInfallible. False in setters. */
40463 false, /* isMovable. Not relevant for setters. */
40464 false, /* isEliminatable. Not relevant for setters. */
40465 false, /* isAlwaysInSlot. Only relevant for getters. */
40466 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40467 false, /* isTypedMethod. Only relevant for methods. */
40468 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40469};
40470static const JSJitInfo throwingGetterAttr_setterinfo = {
40471 { (JSJitGetterOp)set_throwingGetterAttr },
40472 { prototypes::id::TestJSImplInterface },
40473 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40474 JSJitInfo::Setter,
40475 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40476 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
40477 false, /* isInfallible. False in setters. */
40478 false, /* isMovable. Not relevant for setters. */
40479 false, /* isEliminatable. Not relevant for setters. */
40480 false, /* isAlwaysInSlot. Only relevant for getters. */
40481 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40482 false, /* isTypedMethod. Only relevant for methods. */
40483 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40484};
40485
40486MOZ_CAN_RUN_SCRIPT static bool
40487get_throwingSetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
40488{
40489 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40492( cx, "TestJSImplInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40490 "TestJSImplInterface", "throwingSetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40492( cx, "TestJSImplInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40491 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject40492( cx, "TestJSImplInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40492 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40492( cx, "TestJSImplInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40493
40494 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40495 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40496 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40497 if (objIsXray) {
40498 unwrappedObj.emplace(cx, obj);
40499 }
40500 if (objIsXray) {
40501 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40502 // we know Xrays have no dynamic unwrap behavior.
40503 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40504 if (!unwrappedObj.ref()) {
40505 return false;
40506 }
40507 }
40508 FastErrorResult rv;
40509 bool result(MOZ_KnownLive(self)(self)->GetThrowingSetterAttr(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
40510 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.throwingSetterAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.throwingSetterAttr getter"
)), 0))
) {
40511 return false;
40512 }
40513 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40513); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40513; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40514 args.rval().setBoolean(result);
40515 return true;
40516}
40517
40518MOZ_CAN_RUN_SCRIPT static bool
40519set_throwingSetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
40520{
40521 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40524( cx, "TestJSImplInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40522 "TestJSImplInterface", "throwingSetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40524( cx, "TestJSImplInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40523 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject40524( cx, "TestJSImplInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40524 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40524( cx, "TestJSImplInterface"
, "throwingSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40525
40526 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40527 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40528 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40529 if (objIsXray) {
40530 unwrappedObj.emplace(cx, obj);
40531 }
40532 bool arg0;
40533 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
40534 return false;
40535 }
40536 if (objIsXray) {
40537 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40538 // we know Xrays have no dynamic unwrap behavior.
40539 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40540 if (!unwrappedObj.ref()) {
40541 return false;
40542 }
40543 }
40544 FastErrorResult rv;
40545 // NOTE: This assert does NOT call the function.
40546 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetThrowingSetterAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
40547 MOZ_KnownLive(self)(self)->SetThrowingSetterAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
40548 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.throwingSetterAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.throwingSetterAttr setter"
)), 0))
) {
40549 return false;
40550 }
40551 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40551); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40551; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40552
40553 return true;
40554}
40555
40556static const JSJitInfo throwingSetterAttr_getterinfo = {
40557 { get_throwingSetterAttr },
40558 { prototypes::id::TestJSImplInterface },
40559 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40560 JSJitInfo::Getter,
40561 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40562 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
40563 false, /* isInfallible. False in setters. */
40564 false, /* isMovable. Not relevant for setters. */
40565 false, /* isEliminatable. Not relevant for setters. */
40566 false, /* isAlwaysInSlot. Only relevant for getters. */
40567 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40568 false, /* isTypedMethod. Only relevant for methods. */
40569 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40570};
40571static const JSJitInfo throwingSetterAttr_setterinfo = {
40572 { (JSJitGetterOp)set_throwingSetterAttr },
40573 { prototypes::id::TestJSImplInterface },
40574 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40575 JSJitInfo::Setter,
40576 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40577 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
40578 false, /* isInfallible. False in setters. */
40579 false, /* isMovable. Not relevant for setters. */
40580 false, /* isEliminatable. Not relevant for setters. */
40581 false, /* isAlwaysInSlot. Only relevant for getters. */
40582 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40583 false, /* isTypedMethod. Only relevant for methods. */
40584 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40585};
40586
40587MOZ_CAN_RUN_SCRIPT static bool
40588canOOMMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
40589{
40590 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40593( cx, "TestJSImplInterface"
, "canOOMMethod", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40591 "TestJSImplInterface", "canOOMMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40593( cx, "TestJSImplInterface"
, "canOOMMethod", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40592 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject40593( cx, "TestJSImplInterface"
, "canOOMMethod", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40593 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40593( cx, "TestJSImplInterface"
, "canOOMMethod", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40594
40595 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40596 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40597 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40598 if (objIsXray) {
40599 unwrappedObj.emplace(cx, obj);
40600 }
40601 if (objIsXray) {
40602 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40603 // we know Xrays have no dynamic unwrap behavior.
40604 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40605 if (!unwrappedObj.ref()) {
40606 return false;
40607 }
40608 }
40609 FastErrorResult rv;
40610 // NOTE: This assert does NOT call the function.
40611 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->CanOOMMethod(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
40612 MOZ_KnownLive(self)(self)->CanOOMMethod(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
40613 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.canOOMMethod"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.canOOMMethod"
)), 0))
) {
40614 return false;
40615 }
40616 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40616); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40616; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40617 args.rval().setUndefined();
40618 return true;
40619}
40620
40621static const JSJitInfo canOOMMethod_methodinfo = {
40622 { (JSJitGetterOp)canOOMMethod },
40623 { prototypes::id::TestJSImplInterface },
40624 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40625 JSJitInfo::Method,
40626 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40627 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
40628 false, /* isInfallible. False in setters. */
40629 false, /* isMovable. Not relevant for setters. */
40630 false, /* isEliminatable. Not relevant for setters. */
40631 false, /* isAlwaysInSlot. Only relevant for getters. */
40632 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40633 false, /* isTypedMethod. Only relevant for methods. */
40634 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40635};
40636
40637MOZ_CAN_RUN_SCRIPT static bool
40638get_canOOMAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
40639{
40640 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40643( cx, "TestJSImplInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40641 "TestJSImplInterface", "canOOMAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40643( cx, "TestJSImplInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40642 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject40643( cx, "TestJSImplInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40643 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40643( cx, "TestJSImplInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40644
40645 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40646 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40647 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40648 if (objIsXray) {
40649 unwrappedObj.emplace(cx, obj);
40650 }
40651 if (objIsXray) {
40652 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40653 // we know Xrays have no dynamic unwrap behavior.
40654 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40655 if (!unwrappedObj.ref()) {
40656 return false;
40657 }
40658 }
40659 FastErrorResult rv;
40660 bool result(MOZ_KnownLive(self)(self)->GetCanOOMAttr(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
40661 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.canOOMAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.canOOMAttr getter"
)), 0))
) {
40662 return false;
40663 }
40664 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40664); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40664; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40665 args.rval().setBoolean(result);
40666 return true;
40667}
40668
40669MOZ_CAN_RUN_SCRIPT static bool
40670set_canOOMAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
40671{
40672 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40675( cx, "TestJSImplInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40673 "TestJSImplInterface", "canOOMAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40675( cx, "TestJSImplInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40674 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject40675( cx, "TestJSImplInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40675 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40675( cx, "TestJSImplInterface"
, "canOOMAttr", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40676
40677 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40678 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40679 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40680 if (objIsXray) {
40681 unwrappedObj.emplace(cx, obj);
40682 }
40683 bool arg0;
40684 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
40685 return false;
40686 }
40687 if (objIsXray) {
40688 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40689 // we know Xrays have no dynamic unwrap behavior.
40690 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40691 if (!unwrappedObj.ref()) {
40692 return false;
40693 }
40694 }
40695 FastErrorResult rv;
40696 // NOTE: This assert does NOT call the function.
40697 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetCanOOMAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
40698 MOZ_KnownLive(self)(self)->SetCanOOMAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
40699 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.canOOMAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.canOOMAttr setter"
)), 0))
) {
40700 return false;
40701 }
40702 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40702); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40702; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40703
40704 return true;
40705}
40706
40707static const JSJitInfo canOOMAttr_getterinfo = {
40708 { get_canOOMAttr },
40709 { prototypes::id::TestJSImplInterface },
40710 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40711 JSJitInfo::Getter,
40712 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40713 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
40714 false, /* isInfallible. False in setters. */
40715 false, /* isMovable. Not relevant for setters. */
40716 false, /* isEliminatable. Not relevant for setters. */
40717 false, /* isAlwaysInSlot. Only relevant for getters. */
40718 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40719 false, /* isTypedMethod. Only relevant for methods. */
40720 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40721};
40722static const JSJitInfo canOOMAttr_setterinfo = {
40723 { (JSJitGetterOp)set_canOOMAttr },
40724 { prototypes::id::TestJSImplInterface },
40725 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40726 JSJitInfo::Setter,
40727 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40728 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
40729 false, /* isInfallible. False in setters. */
40730 false, /* isMovable. Not relevant for setters. */
40731 false, /* isEliminatable. Not relevant for setters. */
40732 false, /* isAlwaysInSlot. Only relevant for getters. */
40733 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40734 false, /* isTypedMethod. Only relevant for methods. */
40735 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40736};
40737
40738MOZ_CAN_RUN_SCRIPT static bool
40739get_canOOMGetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
40740{
40741 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40744( cx, "TestJSImplInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40742 "TestJSImplInterface", "canOOMGetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40744( cx, "TestJSImplInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40743 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject40744( cx, "TestJSImplInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40744 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40744( cx, "TestJSImplInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40745
40746 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40747 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40748 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40749 if (objIsXray) {
40750 unwrappedObj.emplace(cx, obj);
40751 }
40752 if (objIsXray) {
40753 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40754 // we know Xrays have no dynamic unwrap behavior.
40755 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40756 if (!unwrappedObj.ref()) {
40757 return false;
40758 }
40759 }
40760 FastErrorResult rv;
40761 bool result(MOZ_KnownLive(self)(self)->GetCanOOMGetterAttr(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
40762 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.canOOMGetterAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.canOOMGetterAttr getter"
)), 0))
) {
40763 return false;
40764 }
40765 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40765); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40765; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40766 args.rval().setBoolean(result);
40767 return true;
40768}
40769
40770MOZ_CAN_RUN_SCRIPT static bool
40771set_canOOMGetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
40772{
40773 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40776( cx, "TestJSImplInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40774 "TestJSImplInterface", "canOOMGetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40776( cx, "TestJSImplInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40775 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject40776( cx, "TestJSImplInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40776 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40776( cx, "TestJSImplInterface"
, "canOOMGetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40777
40778 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40779 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40780 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40781 if (objIsXray) {
40782 unwrappedObj.emplace(cx, obj);
40783 }
40784 bool arg0;
40785 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
40786 return false;
40787 }
40788 if (objIsXray) {
40789 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40790 // we know Xrays have no dynamic unwrap behavior.
40791 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40792 if (!unwrappedObj.ref()) {
40793 return false;
40794 }
40795 }
40796 FastErrorResult rv;
40797 // NOTE: This assert does NOT call the function.
40798 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetCanOOMGetterAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
40799 MOZ_KnownLive(self)(self)->SetCanOOMGetterAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
40800 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.canOOMGetterAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.canOOMGetterAttr setter"
)), 0))
) {
40801 return false;
40802 }
40803 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40803); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40803; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40804
40805 return true;
40806}
40807
40808static const JSJitInfo canOOMGetterAttr_getterinfo = {
40809 { get_canOOMGetterAttr },
40810 { prototypes::id::TestJSImplInterface },
40811 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40812 JSJitInfo::Getter,
40813 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40814 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
40815 false, /* isInfallible. False in setters. */
40816 false, /* isMovable. Not relevant for setters. */
40817 false, /* isEliminatable. Not relevant for setters. */
40818 false, /* isAlwaysInSlot. Only relevant for getters. */
40819 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40820 false, /* isTypedMethod. Only relevant for methods. */
40821 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40822};
40823static const JSJitInfo canOOMGetterAttr_setterinfo = {
40824 { (JSJitGetterOp)set_canOOMGetterAttr },
40825 { prototypes::id::TestJSImplInterface },
40826 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40827 JSJitInfo::Setter,
40828 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40829 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
40830 false, /* isInfallible. False in setters. */
40831 false, /* isMovable. Not relevant for setters. */
40832 false, /* isEliminatable. Not relevant for setters. */
40833 false, /* isAlwaysInSlot. Only relevant for getters. */
40834 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40835 false, /* isTypedMethod. Only relevant for methods. */
40836 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40837};
40838
40839MOZ_CAN_RUN_SCRIPT static bool
40840get_canOOMSetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
40841{
40842 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40845( cx, "TestJSImplInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40843 "TestJSImplInterface", "canOOMSetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40845( cx, "TestJSImplInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40844 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject40845( cx, "TestJSImplInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40845 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40845( cx, "TestJSImplInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40846
40847 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40848 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40849 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40850 if (objIsXray) {
40851 unwrappedObj.emplace(cx, obj);
40852 }
40853 if (objIsXray) {
40854 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40855 // we know Xrays have no dynamic unwrap behavior.
40856 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40857 if (!unwrappedObj.ref()) {
40858 return false;
40859 }
40860 }
40861 FastErrorResult rv;
40862 bool result(MOZ_KnownLive(self)(self)->GetCanOOMSetterAttr(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
40863 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.canOOMSetterAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.canOOMSetterAttr getter"
)), 0))
) {
40864 return false;
40865 }
40866 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40866); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40866; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40867 args.rval().setBoolean(result);
40868 return true;
40869}
40870
40871MOZ_CAN_RUN_SCRIPT static bool
40872set_canOOMSetterAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
40873{
40874 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40877( cx, "TestJSImplInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40875 "TestJSImplInterface", "canOOMSetterAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40877( cx, "TestJSImplInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40876 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject40877( cx, "TestJSImplInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40877 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40877( cx, "TestJSImplInterface"
, "canOOMSetterAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40878
40879 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40880 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40881 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40882 if (objIsXray) {
40883 unwrappedObj.emplace(cx, obj);
40884 }
40885 bool arg0;
40886 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
40887 return false;
40888 }
40889 if (objIsXray) {
40890 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40891 // we know Xrays have no dynamic unwrap behavior.
40892 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40893 if (!unwrappedObj.ref()) {
40894 return false;
40895 }
40896 }
40897 FastErrorResult rv;
40898 // NOTE: This assert does NOT call the function.
40899 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetCanOOMSetterAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
40900 MOZ_KnownLive(self)(self)->SetCanOOMSetterAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
40901 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.canOOMSetterAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.canOOMSetterAttr setter"
)), 0))
) {
40902 return false;
40903 }
40904 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40904); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40904; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40905
40906 return true;
40907}
40908
40909static const JSJitInfo canOOMSetterAttr_getterinfo = {
40910 { get_canOOMSetterAttr },
40911 { prototypes::id::TestJSImplInterface },
40912 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40913 JSJitInfo::Getter,
40914 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40915 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
40916 false, /* isInfallible. False in setters. */
40917 false, /* isMovable. Not relevant for setters. */
40918 false, /* isEliminatable. Not relevant for setters. */
40919 false, /* isAlwaysInSlot. Only relevant for getters. */
40920 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40921 false, /* isTypedMethod. Only relevant for methods. */
40922 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40923};
40924static const JSJitInfo canOOMSetterAttr_setterinfo = {
40925 { (JSJitGetterOp)set_canOOMSetterAttr },
40926 { prototypes::id::TestJSImplInterface },
40927 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40928 JSJitInfo::Setter,
40929 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40930 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
40931 false, /* isInfallible. False in setters. */
40932 false, /* isMovable. Not relevant for setters. */
40933 false, /* isEliminatable. Not relevant for setters. */
40934 false, /* isAlwaysInSlot. Only relevant for getters. */
40935 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40936 false, /* isTypedMethod. Only relevant for methods. */
40937 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40938};
40939
40940MOZ_CAN_RUN_SCRIPT static bool
40941ceReactionsMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
40942{
40943 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject40946( cx, "TestJSImplInterface"
, "ceReactionsMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40944 "TestJSImplInterface", "ceReactionsMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject40946( cx, "TestJSImplInterface"
, "ceReactionsMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40945 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject40946( cx, "TestJSImplInterface"
, "ceReactionsMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
40946 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject40946( cx, "TestJSImplInterface"
, "ceReactionsMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
40947
40948 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
40949 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
40950 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
40951 if (objIsXray) {
40952 unwrappedObj.emplace(cx, obj);
40953 }
40954 if (objIsXray) {
40955 // Since our object is an Xray, we can just CheckedUnwrapStatic:
40956 // we know Xrays have no dynamic unwrap behavior.
40957 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
40958 if (!unwrappedObj.ref()) {
40959 return false;
40960 }
40961 }
40962 Maybe<AutoCEReaction> ceReaction;
40963 DocGroup* docGroup = self->GetDocGroup();
40964 if (docGroup) {
40965 ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx);
40966 }
40967 FastErrorResult rv;
40968 // NOTE: This assert does NOT call the function.
40969 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->CeReactionsMethod(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
40970 MOZ_KnownLive(self)(self)->CeReactionsMethod(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
40971 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.ceReactionsMethod"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.ceReactionsMethod"
)), 0))
) {
40972 return false;
40973 }
40974 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 40974); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 40974; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
40975 args.rval().setUndefined();
40976 return true;
40977}
40978
40979static const JSJitInfo ceReactionsMethod_methodinfo = {
40980 { (JSJitGetterOp)ceReactionsMethod },
40981 { prototypes::id::TestJSImplInterface },
40982 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
40983 JSJitInfo::Method,
40984 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
40985 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
40986 false, /* isInfallible. False in setters. */
40987 false, /* isMovable. Not relevant for setters. */
40988 false, /* isEliminatable. Not relevant for setters. */
40989 false, /* isAlwaysInSlot. Only relevant for getters. */
40990 false, /* isLazilyCachedInSlot. Only relevant for getters. */
40991 false, /* isTypedMethod. Only relevant for methods. */
40992 0 /* Reserved slot index, if we're stored in a slot, else 0. */
40993};
40994
40995MOZ_CAN_RUN_SCRIPT static bool
40996ceReactionsMethodOverload(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
40997{
40998 BindingCallContext cx(cx_, "TestJSImplInterface.ceReactionsMethodOverload");
40999 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41002( cx, "TestJSImplInterface"
, "ceReactionsMethodOverload", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
41000 "TestJSImplInterface", "ceReactionsMethodOverload", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41002( cx, "TestJSImplInterface"
, "ceReactionsMethodOverload", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
41001 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject41002( cx, "TestJSImplInterface"
, "ceReactionsMethodOverload", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
41002 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41002( cx, "TestJSImplInterface"
, "ceReactionsMethodOverload", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
41003
41004 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41005 unsigned argcount = std::min(args.length(), 1u);
41006 switch (argcount) {
41007 case 0: {
41008 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41009 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41010 if (objIsXray) {
41011 unwrappedObj.emplace(cx, obj);
41012 }
41013 if (objIsXray) {
41014 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41015 // we know Xrays have no dynamic unwrap behavior.
41016 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41017 if (!unwrappedObj.ref()) {
41018 return false;
41019 }
41020 }
41021 Maybe<AutoCEReaction> ceReaction;
41022 DocGroup* docGroup = self->GetDocGroup();
41023 if (docGroup) {
41024 ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx);
41025 }
41026 FastErrorResult rv;
41027 // NOTE: This assert does NOT call the function.
41028 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->CeReactionsMethodOverload(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
41029 MOZ_KnownLive(self)(self)->CeReactionsMethodOverload(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
41030 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.ceReactionsMethodOverload"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.ceReactionsMethodOverload"
)), 0))
) {
41031 return false;
41032 }
41033 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41033); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41033; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41034 args.rval().setUndefined();
41035 return true;
41036 break;
41037 }
41038 case 1: {
41039 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41040 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41041 if (objIsXray) {
41042 unwrappedObj.emplace(cx, obj);
41043 }
41044 binding_detail::FakeString<char16_t> arg0;
41045 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
41046 return false;
41047 }
41048 if (objIsXray) {
41049 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41050 // we know Xrays have no dynamic unwrap behavior.
41051 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41052 if (!unwrappedObj.ref()) {
41053 return false;
41054 }
41055 }
41056 Maybe<AutoCEReaction> ceReaction;
41057 DocGroup* docGroup = self->GetDocGroup();
41058 if (docGroup) {
41059 ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx);
41060 }
41061 FastErrorResult rv;
41062 // NOTE: This assert does NOT call the function.
41063 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->CeReactionsMethodOverload(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
41064 MOZ_KnownLive(self)(self)->CeReactionsMethodOverload(NonNullHelper(Constify(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
41065 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.ceReactionsMethodOverload"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.ceReactionsMethodOverload"
)), 0))
) {
41066 return false;
41067 }
41068 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41068); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41068; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41069 args.rval().setUndefined();
41070 return true;
41071 break;
41072 }
41073 default: {
41074 // Using nsPrintfCString here would require including that
41075 // header. Let's not worry about it.
41076 nsAutoCString argCountStr;
41077 argCountStr.AppendPrintf("%u", args.length());
41078 return cx.ThrowErrorMessage<MSG_INVALID_OVERLOAD_ARGCOUNT>(argCountStr.get());
41079 }
41080 }
41081 MOZ_CRASH("We have an always-returning default case")do { do { } while (false); MOZ_ReportCrash("" "We have an always-returning default case"
, "../TestJSImplGenBinding.cpp", 41081); AnnotateMozCrashReason
("MOZ_CRASH(" "We have an always-returning default case" ")")
; do { *((volatile int*)__null) = 41081; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
41082 return false;
41083}
41084
41085static const JSJitInfo ceReactionsMethodOverload_methodinfo = {
41086 { (JSJitGetterOp)ceReactionsMethodOverload },
41087 { prototypes::id::TestJSImplInterface },
41088 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41089 JSJitInfo::Method,
41090 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41091 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
41092 false, /* isInfallible. False in setters. */
41093 false, /* isMovable. Not relevant for setters. */
41094 false, /* isEliminatable. Not relevant for setters. */
41095 false, /* isAlwaysInSlot. Only relevant for getters. */
41096 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41097 false, /* isTypedMethod. Only relevant for methods. */
41098 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41099};
41100
41101MOZ_CAN_RUN_SCRIPT static bool
41102get_ceReactionsAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
41103{
41104 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41107( cx, "TestJSImplInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41105 "TestJSImplInterface", "ceReactionsAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41107( cx, "TestJSImplInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41106 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject41107( cx, "TestJSImplInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41107 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41107( cx, "TestJSImplInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41108
41109 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41110 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41111 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41112 if (objIsXray) {
41113 unwrappedObj.emplace(cx, obj);
41114 }
41115 if (objIsXray) {
41116 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41117 // we know Xrays have no dynamic unwrap behavior.
41118 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41119 if (!unwrappedObj.ref()) {
41120 return false;
41121 }
41122 }
41123 FastErrorResult rv;
41124 bool result(MOZ_KnownLive(self)(self)->GetCeReactionsAttr(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
41125 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.ceReactionsAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.ceReactionsAttr getter"
)), 0))
) {
41126 return false;
41127 }
41128 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41128); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41128; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41129 args.rval().setBoolean(result);
41130 return true;
41131}
41132
41133MOZ_CAN_RUN_SCRIPT static bool
41134set_ceReactionsAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
41135{
41136 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41139( cx, "TestJSImplInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41137 "TestJSImplInterface", "ceReactionsAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41139( cx, "TestJSImplInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41138 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject41139( cx, "TestJSImplInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41139 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41139( cx, "TestJSImplInterface"
, "ceReactionsAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41140
41141 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41142 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41143 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41144 if (objIsXray) {
41145 unwrappedObj.emplace(cx, obj);
41146 }
41147 bool arg0;
41148 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
41149 return false;
41150 }
41151 if (objIsXray) {
41152 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41153 // we know Xrays have no dynamic unwrap behavior.
41154 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41155 if (!unwrappedObj.ref()) {
41156 return false;
41157 }
41158 }
41159 Maybe<AutoCEReaction> ceReaction;
41160 DocGroup* docGroup = self->GetDocGroup();
41161 if (docGroup) {
41162 ceReaction.emplace(docGroup->CustomElementReactionsStack(), cx);
41163 }
41164 FastErrorResult rv;
41165 // NOTE: This assert does NOT call the function.
41166 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetCeReactionsAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
41167 MOZ_KnownLive(self)(self)->SetCeReactionsAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
41168 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.ceReactionsAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.ceReactionsAttr setter"
)), 0))
) {
41169 return false;
41170 }
41171 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41171); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41171; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41172
41173 return true;
41174}
41175
41176static const JSJitInfo ceReactionsAttr_getterinfo = {
41177 { get_ceReactionsAttr },
41178 { prototypes::id::TestJSImplInterface },
41179 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41180 JSJitInfo::Getter,
41181 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41182 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
41183 false, /* isInfallible. False in setters. */
41184 false, /* isMovable. Not relevant for setters. */
41185 false, /* isEliminatable. Not relevant for setters. */
41186 false, /* isAlwaysInSlot. Only relevant for getters. */
41187 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41188 false, /* isTypedMethod. Only relevant for methods. */
41189 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41190};
41191static const JSJitInfo ceReactionsAttr_setterinfo = {
41192 { (JSJitGetterOp)set_ceReactionsAttr },
41193 { prototypes::id::TestJSImplInterface },
41194 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41195 JSJitInfo::Setter,
41196 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41197 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
41198 false, /* isInfallible. False in setters. */
41199 false, /* isMovable. Not relevant for setters. */
41200 false, /* isEliminatable. Not relevant for setters. */
41201 false, /* isAlwaysInSlot. Only relevant for getters. */
41202 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41203 false, /* isTypedMethod. Only relevant for methods. */
41204 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41205};
41206
41207MOZ_CAN_RUN_SCRIPT static bool
41208passArgsWithDefaults(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
41209{
41210 BindingCallContext cx(cx_, "TestJSImplInterface.passArgsWithDefaults");
41211 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41214( cx, "TestJSImplInterface"
, "passArgsWithDefaults", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41212 "TestJSImplInterface", "passArgsWithDefaults", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41214( cx, "TestJSImplInterface"
, "passArgsWithDefaults", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41213 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject41214( cx, "TestJSImplInterface"
, "passArgsWithDefaults", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41214 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41214( cx, "TestJSImplInterface"
, "passArgsWithDefaults", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41215
41216 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41217 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41218 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41219 if (objIsXray) {
41220 unwrappedObj.emplace(cx, obj);
41221 }
41222 Optional<int32_t> arg0;
41223 if (args.hasDefined(0)) {
41224 arg0.Construct();
41225 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[0], "Argument 1", &arg0.Value())) {
41226 return false;
41227 }
41228 }
41229 mozilla::dom::TestInterface* arg1;
41230 if (args.hasDefined(1)) {
41231 if (args[1].isObject()) {
41232 {
41233 // Our JSContext should be in the right global to do unwrapping in.
41234 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[1], arg1, cx);
41235 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
41236 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 2", "TestInterface");
41237 return false;
41238 }
41239 }
41240 } else if (args[1].isNullOrUndefined()) {
41241 arg1 = nullptr;
41242 } else {
41243 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 2");
41244 return false;
41245 }
41246 } else {
41247 arg1 = nullptr;
41248 }
41249 RootedDictionary<binding_detail::FastDict> arg2(cx);
41250 if (!arg2.Init(cx, (args.hasDefined(2)) ? args[2] : JS::NullHandleValue, "Argument 3", true)) {
41251 return false;
41252 }
41253 double arg3;
41254 if (args.hasDefined(3)) {
41255 if (!ValueToPrimitive<double, eDefault>(cx, args[3], "Argument 4", &arg3)) {
41256 return false;
41257 } else if (!std::isfinite(arg3)) {
41258 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Argument 4");
41259 return false;
41260 }
41261 } else {
41262 arg3 = 5.0;
41263 }
41264 Optional<float> arg4;
41265 if (args.hasDefined(4)) {
41266 arg4.Construct();
41267 if (!ValueToPrimitive<float, eDefault>(cx, args[4], "Argument 5", &arg4.Value())) {
41268 return false;
41269 } else if (!std::isfinite(arg4.Value())) {
41270 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Argument 5");
41271 return false;
41272 }
41273 }
41274 if (objIsXray) {
41275 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41276 // we know Xrays have no dynamic unwrap behavior.
41277 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41278 if (!unwrappedObj.ref()) {
41279 return false;
41280 }
41281 }
41282 FastErrorResult rv;
41283 // NOTE: This assert does NOT call the function.
41284 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassArgsWithDefaults(Constify(arg0), MOZ_KnownLive(Constify(arg1))(Constify(arg1)), Constify(arg2), arg3, Constify(arg4), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
41285 MOZ_KnownLive(self)(self)->PassArgsWithDefaults(Constify(arg0), MOZ_KnownLive(Constify(arg1))(Constify(arg1)), Constify(arg2), arg3, Constify(arg4), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
41286 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passArgsWithDefaults"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passArgsWithDefaults"
)), 0))
) {
41287 return false;
41288 }
41289 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41289); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41289; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41290 args.rval().setUndefined();
41291 return true;
41292}
41293
41294static const JSJitInfo passArgsWithDefaults_methodinfo = {
41295 { (JSJitGetterOp)passArgsWithDefaults },
41296 { prototypes::id::TestJSImplInterface },
41297 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41298 JSJitInfo::Method,
41299 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41300 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
41301 false, /* isInfallible. False in setters. */
41302 false, /* isMovable. Not relevant for setters. */
41303 false, /* isEliminatable. Not relevant for setters. */
41304 false, /* isAlwaysInSlot. Only relevant for getters. */
41305 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41306 false, /* isTypedMethod. Only relevant for methods. */
41307 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41308};
41309
41310MOZ_CAN_RUN_SCRIPT static bool
41311get_toJSONShouldSkipThis(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
41312{
41313 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41316( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41314 "TestJSImplInterface", "toJSONShouldSkipThis", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41316( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41315 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject41316( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41316 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41316( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41317
41318 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41319 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41320 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41321 if (objIsXray) {
41322 unwrappedObj.emplace(cx, obj);
41323 }
41324 if (objIsXray) {
41325 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41326 // we know Xrays have no dynamic unwrap behavior.
41327 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41328 if (!unwrappedObj.ref()) {
41329 return false;
41330 }
41331 }
41332 FastErrorResult rv;
41333 JS::Rooted<JS::Value> result(cx);
41334 // NOTE: This assert does NOT call the function.
41335 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetToJSONShouldSkipThis(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
41336 MOZ_KnownLive(self)(self)->GetToJSONShouldSkipThis(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
41337 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.toJSONShouldSkipThis getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.toJSONShouldSkipThis getter"
)), 0))
) {
41338 return false;
41339 }
41340 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41340); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41340; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41341 JS::ExposeValueToActiveJS(result);
41342 args.rval().set(result);
41343 if (!MaybeWrapValue(cx, args.rval())) {
41344 return false;
41345 }
41346 return true;
41347}
41348
41349MOZ_CAN_RUN_SCRIPT static bool
41350set_toJSONShouldSkipThis(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
41351{
41352 BindingCallContext cx(cx_, "TestJSImplInterface.toJSONShouldSkipThis setter");
41353 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41356( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41354 "TestJSImplInterface", "toJSONShouldSkipThis", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41356( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41355 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject41356( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41356 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41356( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41357
41358 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41359 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41360 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41361 if (objIsXray) {
41362 unwrappedObj.emplace(cx, obj);
41363 }
41364 JS::Rooted<JS::Value> arg0(cx);
41365#ifdef __clang__1
41366#pragma clang diagnostic push
41367#pragma clang diagnostic ignored "-Wunreachable-code"
41368#pragma clang diagnostic ignored "-Wunreachable-code-return"
41369#endif // __clang__
41370 if ((true) && !CallerSubsumes(args[0])) {
41371 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("value being assigned");
41372 return false;
41373 }
41374#ifdef __clang__1
41375#pragma clang diagnostic pop
41376#endif // __clang__
41377 arg0 = args[0];
41378 if (objIsXray) {
41379 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41380 // we know Xrays have no dynamic unwrap behavior.
41381 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41382 if (!unwrappedObj.ref()) {
41383 return false;
41384 }
41385 }
41386 FastErrorResult rv;
41387 // NOTE: This assert does NOT call the function.
41388 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetToJSONShouldSkipThis(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
41389 MOZ_KnownLive(self)(self)->SetToJSONShouldSkipThis(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
41390 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.toJSONShouldSkipThis setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.toJSONShouldSkipThis setter"
)), 0))
) {
41391 return false;
41392 }
41393 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41393); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41393; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41394
41395 return true;
41396}
41397
41398static const JSJitInfo toJSONShouldSkipThis_getterinfo = {
41399 { get_toJSONShouldSkipThis },
41400 { prototypes::id::TestJSImplInterface },
41401 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41402 JSJitInfo::Getter,
41403 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41404 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
41405 false, /* isInfallible. False in setters. */
41406 false, /* isMovable. Not relevant for setters. */
41407 false, /* isEliminatable. Not relevant for setters. */
41408 false, /* isAlwaysInSlot. Only relevant for getters. */
41409 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41410 false, /* isTypedMethod. Only relevant for methods. */
41411 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41412};
41413static const JSJitInfo toJSONShouldSkipThis_setterinfo = {
41414 { (JSJitGetterOp)set_toJSONShouldSkipThis },
41415 { prototypes::id::TestJSImplInterface },
41416 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41417 JSJitInfo::Setter,
41418 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41419 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
41420 false, /* isInfallible. False in setters. */
41421 false, /* isMovable. Not relevant for setters. */
41422 false, /* isEliminatable. Not relevant for setters. */
41423 false, /* isAlwaysInSlot. Only relevant for getters. */
41424 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41425 false, /* isTypedMethod. Only relevant for methods. */
41426 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41427};
41428
41429MOZ_CAN_RUN_SCRIPT static bool
41430get_toJSONShouldSkipThis2(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
41431{
41432 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41435( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41433 "TestJSImplInterface", "toJSONShouldSkipThis2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41435( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41434 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject41435( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41435 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41435( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41436
41437 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41438 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41439 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41440 if (objIsXray) {
41441 unwrappedObj.emplace(cx, obj);
41442 }
41443 if (objIsXray) {
41444 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41445 // we know Xrays have no dynamic unwrap behavior.
41446 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41447 if (!unwrappedObj.ref()) {
41448 return false;
41449 }
41450 }
41451 FastErrorResult rv;
41452 auto result(StrongOrRawPtr<mozilla::dom::TestParentInterface>(MOZ_KnownLive(self)(self)->GetToJSONShouldSkipThis2(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
41453 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.toJSONShouldSkipThis2 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.toJSONShouldSkipThis2 getter"
)), 0))
) {
41454 return false;
41455 }
41456 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41456); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41456; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41457 if (!GetOrCreateDOMReflector(cx, result, args.rval())) {
41458 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41458); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 41458; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
41459 return false;
41460 }
41461 return true;
41462}
41463
41464MOZ_CAN_RUN_SCRIPT static bool
41465set_toJSONShouldSkipThis2(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
41466{
41467 BindingCallContext cx(cx_, "TestJSImplInterface.toJSONShouldSkipThis2 setter");
41468 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41471( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41469 "TestJSImplInterface", "toJSONShouldSkipThis2", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41471( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41470 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject41471( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41471 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41471( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis2", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41472
41473 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41474 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41475 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41476 if (objIsXray) {
41477 unwrappedObj.emplace(cx, obj);
41478 }
41479 NonNull<mozilla::dom::TestParentInterface> arg0;
41480 if (args[0].isObject()) {
41481 {
41482 // Our JSContext should be in the right global to do unwrapping in.
41483 nsresult rv = UnwrapObject<prototypes::id::TestParentInterface, mozilla::dom::TestParentInterface>(args[0], arg0, cx);
41484 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
41485 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "TestParentInterface");
41486 return false;
41487 }
41488 }
41489 } else {
41490 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
41491 return false;
41492 }
41493 if (objIsXray) {
41494 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41495 // we know Xrays have no dynamic unwrap behavior.
41496 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41497 if (!unwrappedObj.ref()) {
41498 return false;
41499 }
41500 }
41501 FastErrorResult rv;
41502 // NOTE: This assert does NOT call the function.
41503 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetToJSONShouldSkipThis2(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
41504 MOZ_KnownLive(self)(self)->SetToJSONShouldSkipThis2(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
41505 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.toJSONShouldSkipThis2 setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.toJSONShouldSkipThis2 setter"
)), 0))
) {
41506 return false;
41507 }
41508 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41508); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41508; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41509
41510 return true;
41511}
41512
41513static const JSJitInfo toJSONShouldSkipThis2_getterinfo = {
41514 { get_toJSONShouldSkipThis2 },
41515 { prototypes::id::TestJSImplInterface },
41516 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41517 JSJitInfo::Getter,
41518 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41519 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
41520 false, /* isInfallible. False in setters. */
41521 false, /* isMovable. Not relevant for setters. */
41522 false, /* isEliminatable. Not relevant for setters. */
41523 false, /* isAlwaysInSlot. Only relevant for getters. */
41524 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41525 false, /* isTypedMethod. Only relevant for methods. */
41526 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41527};
41528static const JSJitInfo toJSONShouldSkipThis2_setterinfo = {
41529 { (JSJitGetterOp)set_toJSONShouldSkipThis2 },
41530 { prototypes::id::TestJSImplInterface },
41531 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41532 JSJitInfo::Setter,
41533 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41534 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
41535 false, /* isInfallible. False in setters. */
41536 false, /* isMovable. Not relevant for setters. */
41537 false, /* isEliminatable. Not relevant for setters. */
41538 false, /* isAlwaysInSlot. Only relevant for getters. */
41539 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41540 false, /* isTypedMethod. Only relevant for methods. */
41541 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41542};
41543
41544MOZ_CAN_RUN_SCRIPT static bool
41545get_toJSONShouldSkipThis3(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
41546{
41547 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41550( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41548 "TestJSImplInterface", "toJSONShouldSkipThis3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41550( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41549 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject41550( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41550 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41550( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41551
41552 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41553 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41554 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41555 if (objIsXray) {
41556 unwrappedObj.emplace(cx, obj);
41557 }
41558 if (objIsXray) {
41559 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41560 // we know Xrays have no dynamic unwrap behavior.
41561 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41562 if (!unwrappedObj.ref()) {
41563 return false;
41564 }
41565 }
41566 FastErrorResult rv;
41567 auto result(StrongOrRawPtr<mozilla::dom::TestCallbackInterface>(MOZ_KnownLive(self)(self)->GetToJSONShouldSkipThis3(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)))));
41568 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.toJSONShouldSkipThis3 getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.toJSONShouldSkipThis3 getter"
)), 0))
) {
41569 return false;
41570 }
41571 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41571); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41571; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41572 args.rval().setObjectOrNull(GetCallbackFromCallbackObject(cx, result));
41573 if (!MaybeWrapObjectValue(cx, args.rval())) {
41574 return false;
41575 }
41576 return true;
41577}
41578
41579MOZ_CAN_RUN_SCRIPT static bool
41580set_toJSONShouldSkipThis3(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
41581{
41582 BindingCallContext cx(cx_, "TestJSImplInterface.toJSONShouldSkipThis3 setter");
41583 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41586( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41584 "TestJSImplInterface", "toJSONShouldSkipThis3", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41586( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41585 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject41586( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41586 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41586( cx, "TestJSImplInterface"
, "toJSONShouldSkipThis3", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41587
41588 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41589 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41590 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41591 if (objIsXray) {
41592 unwrappedObj.emplace(cx, obj);
41593 }
41594 RootedCallback<OwningNonNull<binding_detail::FastTestCallbackInterface>> arg0(cx);
41595 if (args[0].isObject()) {
41596 { // scope for tempRoot and tempGlobalRoot if needed
41597 arg0 = new binding_detail::FastTestCallbackInterface(&args[0].toObject(), JS::CurrentGlobalOrNull(cx));
41598 }
41599 } else {
41600 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
41601 return false;
41602 }
41603 if (objIsXray) {
41604 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41605 // we know Xrays have no dynamic unwrap behavior.
41606 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41607 if (!unwrappedObj.ref()) {
41608 return false;
41609 }
41610 }
41611 FastErrorResult rv;
41612 // NOTE: This assert does NOT call the function.
41613 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetToJSONShouldSkipThis3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
41614 MOZ_KnownLive(self)(self)->SetToJSONShouldSkipThis3(MOZ_KnownLive(NonNullHelper(arg0))(NonNullHelper(arg0)), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
41615 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.toJSONShouldSkipThis3 setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.toJSONShouldSkipThis3 setter"
)), 0))
) {
41616 return false;
41617 }
41618 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41618); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41618; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41619
41620 return true;
41621}
41622
41623static const JSJitInfo toJSONShouldSkipThis3_getterinfo = {
41624 { get_toJSONShouldSkipThis3 },
41625 { prototypes::id::TestJSImplInterface },
41626 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41627 JSJitInfo::Getter,
41628 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41629 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
41630 false, /* isInfallible. False in setters. */
41631 false, /* isMovable. Not relevant for setters. */
41632 false, /* isEliminatable. Not relevant for setters. */
41633 false, /* isAlwaysInSlot. Only relevant for getters. */
41634 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41635 false, /* isTypedMethod. Only relevant for methods. */
41636 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41637};
41638static const JSJitInfo toJSONShouldSkipThis3_setterinfo = {
41639 { (JSJitGetterOp)set_toJSONShouldSkipThis3 },
41640 { prototypes::id::TestJSImplInterface },
41641 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41642 JSJitInfo::Setter,
41643 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41644 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
41645 false, /* isInfallible. False in setters. */
41646 false, /* isMovable. Not relevant for setters. */
41647 false, /* isEliminatable. Not relevant for setters. */
41648 false, /* isAlwaysInSlot. Only relevant for getters. */
41649 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41650 false, /* isTypedMethod. Only relevant for methods. */
41651 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41652};
41653
41654MOZ_CAN_RUN_SCRIPT static bool
41655get_dashed_attribute(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
41656{
41657 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41660( cx, "TestJSImplInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41658 "TestJSImplInterface", "dashed-attribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41660( cx, "TestJSImplInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41659 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject41660( cx, "TestJSImplInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41660 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41660( cx, "TestJSImplInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41661
41662 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41663 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41664 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41665 if (objIsXray) {
41666 unwrappedObj.emplace(cx, obj);
41667 }
41668 if (objIsXray) {
41669 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41670 // we know Xrays have no dynamic unwrap behavior.
41671 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41672 if (!unwrappedObj.ref()) {
41673 return false;
41674 }
41675 }
41676 FastErrorResult rv;
41677 int8_t result(MOZ_KnownLive(self)(self)->GetDashed_attribute(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
41678 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.dashed-attribute getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.dashed-attribute getter"
)), 0))
) {
41679 return false;
41680 }
41681 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41681); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41681; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41682 args.rval().setInt32(int32_t(result));
41683 return true;
41684}
41685
41686MOZ_CAN_RUN_SCRIPT static bool
41687set_dashed_attribute(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
41688{
41689 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41692( cx, "TestJSImplInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41690 "TestJSImplInterface", "dashed-attribute", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41692( cx, "TestJSImplInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41691 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject41692( cx, "TestJSImplInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41692 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41692( cx, "TestJSImplInterface"
, "dashed-attribute", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41693
41694 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41695 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41696 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41697 if (objIsXray) {
41698 unwrappedObj.emplace(cx, obj);
41699 }
41700 int8_t arg0;
41701 if (!ValueToPrimitive<int8_t, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
41702 return false;
41703 }
41704 if (objIsXray) {
41705 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41706 // we know Xrays have no dynamic unwrap behavior.
41707 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41708 if (!unwrappedObj.ref()) {
41709 return false;
41710 }
41711 }
41712 FastErrorResult rv;
41713 // NOTE: This assert does NOT call the function.
41714 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetDashed_attribute(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
41715 MOZ_KnownLive(self)(self)->SetDashed_attribute(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
41716 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.dashed-attribute setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.dashed-attribute setter"
)), 0))
) {
41717 return false;
41718 }
41719 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41719); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41719; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41720
41721 return true;
41722}
41723
41724static const JSJitInfo dashed_attribute_getterinfo = {
41725 { get_dashed_attribute },
41726 { prototypes::id::TestJSImplInterface },
41727 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41728 JSJitInfo::Getter,
41729 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41730 JSVAL_TYPE_INT32, /* returnType. Not relevant for setters. */
41731 false, /* isInfallible. False in setters. */
41732 false, /* isMovable. Not relevant for setters. */
41733 false, /* isEliminatable. Not relevant for setters. */
41734 false, /* isAlwaysInSlot. Only relevant for getters. */
41735 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41736 false, /* isTypedMethod. Only relevant for methods. */
41737 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41738};
41739static const JSJitInfo dashed_attribute_setterinfo = {
41740 { (JSJitGetterOp)set_dashed_attribute },
41741 { prototypes::id::TestJSImplInterface },
41742 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41743 JSJitInfo::Setter,
41744 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41745 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
41746 false, /* isInfallible. False in setters. */
41747 false, /* isMovable. Not relevant for setters. */
41748 false, /* isEliminatable. Not relevant for setters. */
41749 false, /* isAlwaysInSlot. Only relevant for getters. */
41750 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41751 false, /* isTypedMethod. Only relevant for methods. */
41752 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41753};
41754
41755MOZ_CAN_RUN_SCRIPT static bool
41756dashed_method(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
41757{
41758 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41761( cx, "TestJSImplInterface"
, "dashed-method", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41759 "TestJSImplInterface", "dashed-method", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41761( cx, "TestJSImplInterface"
, "dashed-method", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41760 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject41761( cx, "TestJSImplInterface"
, "dashed-method", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41761 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41761( cx, "TestJSImplInterface"
, "dashed-method", JS::ProfilingCategoryPair::DOM, uint32_t(js
::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41762
41763 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41764 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41765 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41766 if (objIsXray) {
41767 unwrappedObj.emplace(cx, obj);
41768 }
41769 if (objIsXray) {
41770 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41771 // we know Xrays have no dynamic unwrap behavior.
41772 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41773 if (!unwrappedObj.ref()) {
41774 return false;
41775 }
41776 }
41777 FastErrorResult rv;
41778 // NOTE: This assert does NOT call the function.
41779 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->Dashed_method(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
41780 MOZ_KnownLive(self)(self)->Dashed_method(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
41781 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.dashed-method"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.dashed-method"
)), 0))
) {
41782 return false;
41783 }
41784 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41784); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41784; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41785 args.rval().setUndefined();
41786 return true;
41787}
41788
41789static const JSJitInfo dashed_method_methodinfo = {
41790 { (JSJitGetterOp)dashed_method },
41791 { prototypes::id::TestJSImplInterface },
41792 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41793 JSJitInfo::Method,
41794 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41795 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
41796 false, /* isInfallible. False in setters. */
41797 false, /* isMovable. Not relevant for setters. */
41798 false, /* isEliminatable. Not relevant for setters. */
41799 false, /* isAlwaysInSlot. Only relevant for getters. */
41800 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41801 false, /* isTypedMethod. Only relevant for methods. */
41802 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41803};
41804
41805MOZ_CAN_RUN_SCRIPT static bool
41806get_nonEnumerableAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
41807{
41808 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41811( cx, "TestJSImplInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41809 "TestJSImplInterface", "nonEnumerableAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41811( cx, "TestJSImplInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41810 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject41811( cx, "TestJSImplInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41811 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41811( cx, "TestJSImplInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41812
41813 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41814 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41815 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41816 if (objIsXray) {
41817 unwrappedObj.emplace(cx, obj);
41818 }
41819 if (objIsXray) {
41820 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41821 // we know Xrays have no dynamic unwrap behavior.
41822 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41823 if (!unwrappedObj.ref()) {
41824 return false;
41825 }
41826 }
41827 FastErrorResult rv;
41828 bool result(MOZ_KnownLive(self)(self)->GetNonEnumerableAttr(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))));
41829 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonEnumerableAttr getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonEnumerableAttr getter"
)), 0))
) {
41830 return false;
41831 }
41832 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41832); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41832; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41833 args.rval().setBoolean(result);
41834 return true;
41835}
41836
41837MOZ_CAN_RUN_SCRIPT static bool
41838set_nonEnumerableAttr(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
41839{
41840 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41843( cx, "TestJSImplInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41841 "TestJSImplInterface", "nonEnumerableAttr", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41843( cx, "TestJSImplInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41842 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject41843( cx, "TestJSImplInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41843 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41843( cx, "TestJSImplInterface"
, "nonEnumerableAttr", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41844
41845 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41846 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41847 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41848 if (objIsXray) {
41849 unwrappedObj.emplace(cx, obj);
41850 }
41851 bool arg0;
41852 if (!ValueToPrimitive<bool, eDefault>(cx, args[0], "Value being assigned", &arg0)) {
41853 return false;
41854 }
41855 if (objIsXray) {
41856 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41857 // we know Xrays have no dynamic unwrap behavior.
41858 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41859 if (!unwrappedObj.ref()) {
41860 return false;
41861 }
41862 }
41863 FastErrorResult rv;
41864 // NOTE: This assert does NOT call the function.
41865 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetNonEnumerableAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
41866 MOZ_KnownLive(self)(self)->SetNonEnumerableAttr(arg0, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
41867 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonEnumerableAttr setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonEnumerableAttr setter"
)), 0))
) {
41868 return false;
41869 }
41870 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41870); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41870; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41871
41872 return true;
41873}
41874
41875static const JSJitInfo nonEnumerableAttr_getterinfo = {
41876 { get_nonEnumerableAttr },
41877 { prototypes::id::TestJSImplInterface },
41878 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41879 JSJitInfo::Getter,
41880 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41881 JSVAL_TYPE_BOOLEAN, /* returnType. Not relevant for setters. */
41882 false, /* isInfallible. False in setters. */
41883 false, /* isMovable. Not relevant for setters. */
41884 false, /* isEliminatable. Not relevant for setters. */
41885 false, /* isAlwaysInSlot. Only relevant for getters. */
41886 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41887 false, /* isTypedMethod. Only relevant for methods. */
41888 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41889};
41890static const JSJitInfo nonEnumerableAttr_setterinfo = {
41891 { (JSJitGetterOp)set_nonEnumerableAttr },
41892 { prototypes::id::TestJSImplInterface },
41893 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41894 JSJitInfo::Setter,
41895 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41896 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
41897 false, /* isInfallible. False in setters. */
41898 false, /* isMovable. Not relevant for setters. */
41899 false, /* isEliminatable. Not relevant for setters. */
41900 false, /* isAlwaysInSlot. Only relevant for getters. */
41901 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41902 false, /* isTypedMethod. Only relevant for methods. */
41903 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41904};
41905
41906MOZ_CAN_RUN_SCRIPT static bool
41907nonEnumerableMethod(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
41908{
41909 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41912( cx, "TestJSImplInterface"
, "nonEnumerableMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41910 "TestJSImplInterface", "nonEnumerableMethod", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41912( cx, "TestJSImplInterface"
, "nonEnumerableMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41911 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject41912( cx, "TestJSImplInterface"
, "nonEnumerableMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
41912 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41912( cx, "TestJSImplInterface"
, "nonEnumerableMethod", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
41913
41914 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41915 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41916 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41917 if (objIsXray) {
41918 unwrappedObj.emplace(cx, obj);
41919 }
41920 if (objIsXray) {
41921 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41922 // we know Xrays have no dynamic unwrap behavior.
41923 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41924 if (!unwrappedObj.ref()) {
41925 return false;
41926 }
41927 }
41928 FastErrorResult rv;
41929 // NOTE: This assert does NOT call the function.
41930 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->NonEnumerableMethod(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
41931 MOZ_KnownLive(self)(self)->NonEnumerableMethod(rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
41932 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonEnumerableMethod"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.nonEnumerableMethod"
)), 0))
) {
41933 return false;
41934 }
41935 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41935); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41935; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41936 args.rval().setUndefined();
41937 return true;
41938}
41939
41940static const JSJitInfo nonEnumerableMethod_methodinfo = {
41941 { (JSJitGetterOp)nonEnumerableMethod },
41942 { prototypes::id::TestJSImplInterface },
41943 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
41944 JSJitInfo::Method,
41945 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
41946 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
41947 false, /* isInfallible. False in setters. */
41948 false, /* isMovable. Not relevant for setters. */
41949 false, /* isEliminatable. Not relevant for setters. */
41950 false, /* isAlwaysInSlot. Only relevant for getters. */
41951 false, /* isLazilyCachedInSlot. Only relevant for getters. */
41952 false, /* isTypedMethod. Only relevant for methods. */
41953 0 /* Reserved slot index, if we're stored in a slot, else 0. */
41954};
41955
41956MOZ_CAN_RUN_SCRIPT static bool
41957get_allowSharedArrayBufferViewTypedef(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
41958{
41959 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject41962( cx, "TestJSImplInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
41960 "TestJSImplInterface", "allowSharedArrayBufferViewTypedef", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject41962( cx, "TestJSImplInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
41961 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject41962( cx, "TestJSImplInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
41962 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject41962( cx, "TestJSImplInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
41963
41964 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
41965 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
41966 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
41967 if (objIsXray) {
41968 unwrappedObj.emplace(cx, obj);
41969 }
41970 if (objIsXray) {
41971 // Since our object is an Xray, we can just CheckedUnwrapStatic:
41972 // we know Xrays have no dynamic unwrap behavior.
41973 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
41974 if (!unwrappedObj.ref()) {
41975 return false;
41976 }
41977 }
41978 FastErrorResult rv;
41979 JS::Rooted<JSObject*> result(cx);
41980 // NOTE: This assert does NOT call the function.
41981 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetAllowSharedArrayBufferViewTypedef(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
41982 MOZ_KnownLive(self)(self)->GetAllowSharedArrayBufferViewTypedef(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
41983 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedArrayBufferViewTypedef getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedArrayBufferViewTypedef getter"
)), 0))
) {
41984 return false;
41985 }
41986 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 41986); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 41986; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
41987 JS::ExposeObjectToActiveJS(result);
41988 args.rval().setObject(*result);
41989 if (!MaybeWrapNonDOMObjectValue(cx, args.rval())) {
41990 return false;
41991 }
41992 return true;
41993}
41994
41995MOZ_CAN_RUN_SCRIPT static bool
41996set_allowSharedArrayBufferViewTypedef(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
41997{
41998 BindingCallContext cx(cx_, "TestJSImplInterface.allowSharedArrayBufferViewTypedef setter");
41999 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42002( cx, "TestJSImplInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42000 "TestJSImplInterface", "allowSharedArrayBufferViewTypedef", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42002( cx, "TestJSImplInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42001 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject42002( cx, "TestJSImplInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42002 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42002( cx, "TestJSImplInterface"
, "allowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
42003
42004 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42005 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42006 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42007 if (objIsXray) {
42008 unwrappedObj.emplace(cx, obj);
42009 }
42010 RootedSpiderMonkeyInterface<ArrayBufferView> arg0(cx);
42011 if (args[0].isObject()) {
42012 if (!arg0.Init(&args[0].toObject())) {
42013 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "ArrayBufferView");
42014 return false;
42015 }
42016 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
42017 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value being assigned");
42018 return false;
42019 }
42020 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
42021 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value being assigned");
42022 return false;
42023 }
42024 } else {
42025 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
42026 return false;
42027 }
42028 if (objIsXray) {
42029 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42030 // we know Xrays have no dynamic unwrap behavior.
42031 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42032 if (!unwrappedObj.ref()) {
42033 return false;
42034 }
42035 }
42036 FastErrorResult rv;
42037 // NOTE: This assert does NOT call the function.
42038 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetAllowSharedArrayBufferViewTypedef(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42039 MOZ_KnownLive(self)(self)->SetAllowSharedArrayBufferViewTypedef(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42040 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedArrayBufferViewTypedef setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedArrayBufferViewTypedef setter"
)), 0))
) {
42041 return false;
42042 }
42043 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42043); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42043; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42044
42045 return true;
42046}
42047
42048static const JSJitInfo allowSharedArrayBufferViewTypedef_getterinfo = {
42049 { get_allowSharedArrayBufferViewTypedef },
42050 { prototypes::id::TestJSImplInterface },
42051 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42052 JSJitInfo::Getter,
42053 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42054 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
42055 false, /* isInfallible. False in setters. */
42056 false, /* isMovable. Not relevant for setters. */
42057 false, /* isEliminatable. Not relevant for setters. */
42058 false, /* isAlwaysInSlot. Only relevant for getters. */
42059 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42060 false, /* isTypedMethod. Only relevant for methods. */
42061 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42062};
42063static const JSJitInfo allowSharedArrayBufferViewTypedef_setterinfo = {
42064 { (JSJitGetterOp)set_allowSharedArrayBufferViewTypedef },
42065 { prototypes::id::TestJSImplInterface },
42066 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42067 JSJitInfo::Setter,
42068 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42069 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
42070 false, /* isInfallible. False in setters. */
42071 false, /* isMovable. Not relevant for setters. */
42072 false, /* isEliminatable. Not relevant for setters. */
42073 false, /* isAlwaysInSlot. Only relevant for getters. */
42074 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42075 false, /* isTypedMethod. Only relevant for methods. */
42076 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42077};
42078
42079MOZ_CAN_RUN_SCRIPT static bool
42080get_allowSharedArrayBufferView(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
42081{
42082 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42085( cx, "TestJSImplInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42083 "TestJSImplInterface", "allowSharedArrayBufferView", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42085( cx, "TestJSImplInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42084 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject42085( cx, "TestJSImplInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42085 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42085( cx, "TestJSImplInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
42086
42087 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42088 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42089 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42090 if (objIsXray) {
42091 unwrappedObj.emplace(cx, obj);
42092 }
42093 if (objIsXray) {
42094 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42095 // we know Xrays have no dynamic unwrap behavior.
42096 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42097 if (!unwrappedObj.ref()) {
42098 return false;
42099 }
42100 }
42101 FastErrorResult rv;
42102 JS::Rooted<JSObject*> result(cx);
42103 // NOTE: This assert does NOT call the function.
42104 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetAllowSharedArrayBufferView(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42105 MOZ_KnownLive(self)(self)->GetAllowSharedArrayBufferView(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42106 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedArrayBufferView getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedArrayBufferView getter"
)), 0))
) {
42107 return false;
42108 }
42109 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42109); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42109; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42110 JS::ExposeObjectToActiveJS(result);
42111 args.rval().setObject(*result);
42112 if (!MaybeWrapNonDOMObjectValue(cx, args.rval())) {
42113 return false;
42114 }
42115 return true;
42116}
42117
42118MOZ_CAN_RUN_SCRIPT static bool
42119set_allowSharedArrayBufferView(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
42120{
42121 BindingCallContext cx(cx_, "TestJSImplInterface.allowSharedArrayBufferView setter");
42122 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42125( cx, "TestJSImplInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42123 "TestJSImplInterface", "allowSharedArrayBufferView", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42125( cx, "TestJSImplInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42124 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject42125( cx, "TestJSImplInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42125 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42125( cx, "TestJSImplInterface"
, "allowSharedArrayBufferView", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
42126
42127 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42128 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42129 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42130 if (objIsXray) {
42131 unwrappedObj.emplace(cx, obj);
42132 }
42133 RootedSpiderMonkeyInterface<ArrayBufferView> arg0(cx);
42134 if (args[0].isObject()) {
42135 if (!arg0.Init(&args[0].toObject())) {
42136 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "ArrayBufferView");
42137 return false;
42138 }
42139 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
42140 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value being assigned");
42141 return false;
42142 }
42143 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
42144 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value being assigned");
42145 return false;
42146 }
42147 } else {
42148 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
42149 return false;
42150 }
42151 if (objIsXray) {
42152 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42153 // we know Xrays have no dynamic unwrap behavior.
42154 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42155 if (!unwrappedObj.ref()) {
42156 return false;
42157 }
42158 }
42159 FastErrorResult rv;
42160 // NOTE: This assert does NOT call the function.
42161 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetAllowSharedArrayBufferView(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42162 MOZ_KnownLive(self)(self)->SetAllowSharedArrayBufferView(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42163 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedArrayBufferView setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedArrayBufferView setter"
)), 0))
) {
42164 return false;
42165 }
42166 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42166); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42166; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42167
42168 return true;
42169}
42170
42171static const JSJitInfo allowSharedArrayBufferView_getterinfo = {
42172 { get_allowSharedArrayBufferView },
42173 { prototypes::id::TestJSImplInterface },
42174 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42175 JSJitInfo::Getter,
42176 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42177 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
42178 false, /* isInfallible. False in setters. */
42179 false, /* isMovable. Not relevant for setters. */
42180 false, /* isEliminatable. Not relevant for setters. */
42181 false, /* isAlwaysInSlot. Only relevant for getters. */
42182 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42183 false, /* isTypedMethod. Only relevant for methods. */
42184 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42185};
42186static const JSJitInfo allowSharedArrayBufferView_setterinfo = {
42187 { (JSJitGetterOp)set_allowSharedArrayBufferView },
42188 { prototypes::id::TestJSImplInterface },
42189 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42190 JSJitInfo::Setter,
42191 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42192 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
42193 false, /* isInfallible. False in setters. */
42194 false, /* isMovable. Not relevant for setters. */
42195 false, /* isEliminatable. Not relevant for setters. */
42196 false, /* isAlwaysInSlot. Only relevant for getters. */
42197 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42198 false, /* isTypedMethod. Only relevant for methods. */
42199 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42200};
42201
42202MOZ_CAN_RUN_SCRIPT static bool
42203get_allowSharedNullableArrayBufferView(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
42204{
42205 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42208( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42206 "TestJSImplInterface", "allowSharedNullableArrayBufferView", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42208( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42207 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject42208( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42208 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42208( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
42209
42210 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42211 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42212 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42213 if (objIsXray) {
42214 unwrappedObj.emplace(cx, obj);
42215 }
42216 if (objIsXray) {
42217 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42218 // we know Xrays have no dynamic unwrap behavior.
42219 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42220 if (!unwrappedObj.ref()) {
42221 return false;
42222 }
42223 }
42224 FastErrorResult rv;
42225 JS::Rooted<JSObject*> result(cx);
42226 // NOTE: This assert does NOT call the function.
42227 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetAllowSharedNullableArrayBufferView(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42228 MOZ_KnownLive(self)(self)->GetAllowSharedNullableArrayBufferView(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42229 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedNullableArrayBufferView getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedNullableArrayBufferView getter"
)), 0))
) {
42230 return false;
42231 }
42232 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42232); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42232; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42233 if (result) {
42234 JS::ExposeObjectToActiveJS(result);
42235 }
42236 args.rval().setObjectOrNull(result);
42237 if (!MaybeWrapNonDOMObjectOrNullValue(cx, args.rval())) {
42238 return false;
42239 }
42240 return true;
42241}
42242
42243MOZ_CAN_RUN_SCRIPT static bool
42244set_allowSharedNullableArrayBufferView(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
42245{
42246 BindingCallContext cx(cx_, "TestJSImplInterface.allowSharedNullableArrayBufferView setter");
42247 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42250( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42248 "TestJSImplInterface", "allowSharedNullableArrayBufferView", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42250( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42249 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject42250( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42250 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42250( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
42251
42252 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42253 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42254 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42255 if (objIsXray) {
42256 unwrappedObj.emplace(cx, obj);
42257 }
42258 RootedSpiderMonkeyInterface<Nullable<ArrayBufferView>> arg0(cx);
42259 if (args[0].isObject()) {
42260 if (!arg0.SetValue().Init(&args[0].toObject())) {
42261 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "ArrayBufferViewOrNull");
42262 return false;
42263 }
42264 if (JS::IsLargeArrayBufferView(arg0.SetValue().Obj())) {
42265 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value being assigned");
42266 return false;
42267 }
42268 if (JS::IsResizableArrayBufferView(arg0.SetValue().Obj())) {
42269 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value being assigned");
42270 return false;
42271 }
42272 } else if (args[0].isNullOrUndefined()) {
42273 arg0.SetNull();
42274 } else {
42275 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
42276 return false;
42277 }
42278 if (objIsXray) {
42279 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42280 // we know Xrays have no dynamic unwrap behavior.
42281 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42282 if (!unwrappedObj.ref()) {
42283 return false;
42284 }
42285 }
42286 FastErrorResult rv;
42287 // NOTE: This assert does NOT call the function.
42288 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetAllowSharedNullableArrayBufferView(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42289 MOZ_KnownLive(self)(self)->SetAllowSharedNullableArrayBufferView(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42290 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedNullableArrayBufferView setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedNullableArrayBufferView setter"
)), 0))
) {
42291 return false;
42292 }
42293 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42293); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42293; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42294
42295 return true;
42296}
42297
42298static const JSJitInfo allowSharedNullableArrayBufferView_getterinfo = {
42299 { get_allowSharedNullableArrayBufferView },
42300 { prototypes::id::TestJSImplInterface },
42301 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42302 JSJitInfo::Getter,
42303 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42304 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
42305 false, /* isInfallible. False in setters. */
42306 false, /* isMovable. Not relevant for setters. */
42307 false, /* isEliminatable. Not relevant for setters. */
42308 false, /* isAlwaysInSlot. Only relevant for getters. */
42309 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42310 false, /* isTypedMethod. Only relevant for methods. */
42311 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42312};
42313static const JSJitInfo allowSharedNullableArrayBufferView_setterinfo = {
42314 { (JSJitGetterOp)set_allowSharedNullableArrayBufferView },
42315 { prototypes::id::TestJSImplInterface },
42316 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42317 JSJitInfo::Setter,
42318 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42319 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
42320 false, /* isInfallible. False in setters. */
42321 false, /* isMovable. Not relevant for setters. */
42322 false, /* isEliminatable. Not relevant for setters. */
42323 false, /* isAlwaysInSlot. Only relevant for getters. */
42324 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42325 false, /* isTypedMethod. Only relevant for methods. */
42326 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42327};
42328
42329MOZ_CAN_RUN_SCRIPT static bool
42330get_allowSharedArrayBuffer(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
42331{
42332 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42335( cx, "TestJSImplInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42333 "TestJSImplInterface", "allowSharedArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42335( cx, "TestJSImplInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42334 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject42335( cx, "TestJSImplInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42335 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42335( cx, "TestJSImplInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
42336
42337 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42338 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42339 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42340 if (objIsXray) {
42341 unwrappedObj.emplace(cx, obj);
42342 }
42343 if (objIsXray) {
42344 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42345 // we know Xrays have no dynamic unwrap behavior.
42346 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42347 if (!unwrappedObj.ref()) {
42348 return false;
42349 }
42350 }
42351 FastErrorResult rv;
42352 JS::Rooted<JSObject*> result(cx);
42353 // NOTE: This assert does NOT call the function.
42354 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetAllowSharedArrayBuffer(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42355 MOZ_KnownLive(self)(self)->GetAllowSharedArrayBuffer(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42356 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedArrayBuffer getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedArrayBuffer getter"
)), 0))
) {
42357 return false;
42358 }
42359 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42359); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42359; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42360 JS::ExposeObjectToActiveJS(result);
42361 args.rval().setObject(*result);
42362 if (!MaybeWrapNonDOMObjectValue(cx, args.rval())) {
42363 return false;
42364 }
42365 return true;
42366}
42367
42368MOZ_CAN_RUN_SCRIPT static bool
42369set_allowSharedArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
42370{
42371 BindingCallContext cx(cx_, "TestJSImplInterface.allowSharedArrayBuffer setter");
42372 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42375( cx, "TestJSImplInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42373 "TestJSImplInterface", "allowSharedArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42375( cx, "TestJSImplInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42374 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject42375( cx, "TestJSImplInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42375 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42375( cx, "TestJSImplInterface"
, "allowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
42376
42377 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42378 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42379 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42380 if (objIsXray) {
42381 unwrappedObj.emplace(cx, obj);
42382 }
42383 RootedSpiderMonkeyInterface<ArrayBuffer> arg0(cx);
42384 if (args[0].isObject()) {
42385 if (!arg0.Init(&args[0].toObject())) {
42386 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "ArrayBuffer");
42387 return false;
42388 }
42389 if (JS::IsLargeArrayBufferMaybeShared(arg0.Obj())) {
42390 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value being assigned");
42391 return false;
42392 }
42393 if (JS::IsResizableArrayBufferMaybeShared(arg0.Obj())) {
42394 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value being assigned");
42395 return false;
42396 }
42397 } else {
42398 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
42399 return false;
42400 }
42401 if (objIsXray) {
42402 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42403 // we know Xrays have no dynamic unwrap behavior.
42404 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42405 if (!unwrappedObj.ref()) {
42406 return false;
42407 }
42408 }
42409 FastErrorResult rv;
42410 // NOTE: This assert does NOT call the function.
42411 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetAllowSharedArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42412 MOZ_KnownLive(self)(self)->SetAllowSharedArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42413 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedArrayBuffer setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedArrayBuffer setter"
)), 0))
) {
42414 return false;
42415 }
42416 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42416); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42416; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42417
42418 return true;
42419}
42420
42421static const JSJitInfo allowSharedArrayBuffer_getterinfo = {
42422 { get_allowSharedArrayBuffer },
42423 { prototypes::id::TestJSImplInterface },
42424 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42425 JSJitInfo::Getter,
42426 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42427 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
42428 false, /* isInfallible. False in setters. */
42429 false, /* isMovable. Not relevant for setters. */
42430 false, /* isEliminatable. Not relevant for setters. */
42431 false, /* isAlwaysInSlot. Only relevant for getters. */
42432 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42433 false, /* isTypedMethod. Only relevant for methods. */
42434 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42435};
42436static const JSJitInfo allowSharedArrayBuffer_setterinfo = {
42437 { (JSJitGetterOp)set_allowSharedArrayBuffer },
42438 { prototypes::id::TestJSImplInterface },
42439 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42440 JSJitInfo::Setter,
42441 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42442 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
42443 false, /* isInfallible. False in setters. */
42444 false, /* isMovable. Not relevant for setters. */
42445 false, /* isEliminatable. Not relevant for setters. */
42446 false, /* isAlwaysInSlot. Only relevant for getters. */
42447 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42448 false, /* isTypedMethod. Only relevant for methods. */
42449 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42450};
42451
42452MOZ_CAN_RUN_SCRIPT static bool
42453get_allowSharedNullableArrayBuffer(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, JSJitGetterCallArgs args)
42454{
42455 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42458( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42456 "TestJSImplInterface", "allowSharedNullableArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42458( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42457 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER) |mozilla::AutoProfilerLabelHot raiiObject42458( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42458 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42458( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_GETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
42459
42460 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42461 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42462 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42463 if (objIsXray) {
42464 unwrappedObj.emplace(cx, obj);
42465 }
42466 if (objIsXray) {
42467 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42468 // we know Xrays have no dynamic unwrap behavior.
42469 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42470 if (!unwrappedObj.ref()) {
42471 return false;
42472 }
42473 }
42474 FastErrorResult rv;
42475 JS::Rooted<JSObject*> result(cx);
42476 // NOTE: This assert does NOT call the function.
42477 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->GetAllowSharedNullableArrayBuffer(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42478 MOZ_KnownLive(self)(self)->GetAllowSharedNullableArrayBuffer(&result, rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42479 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedNullableArrayBuffer getter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedNullableArrayBuffer getter"
)), 0))
) {
42480 return false;
42481 }
42482 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42482); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42482; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42483 if (result) {
42484 JS::ExposeObjectToActiveJS(result);
42485 }
42486 args.rval().setObjectOrNull(result);
42487 if (!MaybeWrapNonDOMObjectOrNullValue(cx, args.rval())) {
42488 return false;
42489 }
42490 return true;
42491}
42492
42493MOZ_CAN_RUN_SCRIPT static bool
42494set_allowSharedNullableArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, JSJitSetterCallArgs args)
42495{
42496 BindingCallContext cx(cx_, "TestJSImplInterface.allowSharedNullableArrayBuffer setter");
42497 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42500( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42498 "TestJSImplInterface", "allowSharedNullableArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42500( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42499 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER) |mozilla::AutoProfilerLabelHot raiiObject42500( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42500 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42500( cx, "TestJSImplInterface"
, "allowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_SETTER
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
42501
42502 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42503 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42504 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42505 if (objIsXray) {
42506 unwrappedObj.emplace(cx, obj);
42507 }
42508 RootedSpiderMonkeyInterface<Nullable<ArrayBuffer>> arg0(cx);
42509 if (args[0].isObject()) {
42510 if (!arg0.SetValue().Init(&args[0].toObject())) {
42511 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Value being assigned", "ArrayBufferOrNull");
42512 return false;
42513 }
42514 if (JS::IsLargeArrayBufferMaybeShared(arg0.SetValue().Obj())) {
42515 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Value being assigned");
42516 return false;
42517 }
42518 if (JS::IsResizableArrayBufferMaybeShared(arg0.SetValue().Obj())) {
42519 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Value being assigned");
42520 return false;
42521 }
42522 } else if (args[0].isNullOrUndefined()) {
42523 arg0.SetNull();
42524 } else {
42525 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Value being assigned");
42526 return false;
42527 }
42528 if (objIsXray) {
42529 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42530 // we know Xrays have no dynamic unwrap behavior.
42531 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42532 if (!unwrappedObj.ref()) {
42533 return false;
42534 }
42535 }
42536 FastErrorResult rv;
42537 // NOTE: This assert does NOT call the function.
42538 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->SetAllowSharedNullableArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42539 MOZ_KnownLive(self)(self)->SetAllowSharedNullableArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42540 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedNullableArrayBuffer setter"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.allowSharedNullableArrayBuffer setter"
)), 0))
) {
42541 return false;
42542 }
42543 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42543); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42543; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42544
42545 return true;
42546}
42547
42548static const JSJitInfo allowSharedNullableArrayBuffer_getterinfo = {
42549 { get_allowSharedNullableArrayBuffer },
42550 { prototypes::id::TestJSImplInterface },
42551 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42552 JSJitInfo::Getter,
42553 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42554 JSVAL_TYPE_UNKNOWN, /* returnType. Not relevant for setters. */
42555 false, /* isInfallible. False in setters. */
42556 false, /* isMovable. Not relevant for setters. */
42557 false, /* isEliminatable. Not relevant for setters. */
42558 false, /* isAlwaysInSlot. Only relevant for getters. */
42559 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42560 false, /* isTypedMethod. Only relevant for methods. */
42561 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42562};
42563static const JSJitInfo allowSharedNullableArrayBuffer_setterinfo = {
42564 { (JSJitGetterOp)set_allowSharedNullableArrayBuffer },
42565 { prototypes::id::TestJSImplInterface },
42566 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42567 JSJitInfo::Setter,
42568 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42569 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
42570 false, /* isInfallible. False in setters. */
42571 false, /* isMovable. Not relevant for setters. */
42572 false, /* isEliminatable. Not relevant for setters. */
42573 false, /* isAlwaysInSlot. Only relevant for getters. */
42574 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42575 false, /* isTypedMethod. Only relevant for methods. */
42576 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42577};
42578
42579MOZ_CAN_RUN_SCRIPT static bool
42580passAllowSharedArrayBufferViewTypedef(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
42581{
42582 BindingCallContext cx(cx_, "TestJSImplInterface.passAllowSharedArrayBufferViewTypedef");
42583 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42586( cx, "TestJSImplInterface"
, "passAllowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42584 "TestJSImplInterface", "passAllowSharedArrayBufferViewTypedef", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42586( cx, "TestJSImplInterface"
, "passAllowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42585 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject42586( cx, "TestJSImplInterface"
, "passAllowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42586 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42586( cx, "TestJSImplInterface"
, "passAllowSharedArrayBufferViewTypedef", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
42587
42588 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42589 if (!args.requireAtLeast(cx, "TestJSImplInterface.passAllowSharedArrayBufferViewTypedef", 1)) {
42590 return false;
42591 }
42592 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42593 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42594 if (objIsXray) {
42595 unwrappedObj.emplace(cx, obj);
42596 }
42597 RootedSpiderMonkeyInterface<ArrayBufferView> arg0(cx);
42598 if (args[0].isObject()) {
42599 if (!arg0.Init(&args[0].toObject())) {
42600 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferView");
42601 return false;
42602 }
42603 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
42604 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
42605 return false;
42606 }
42607 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
42608 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
42609 return false;
42610 }
42611 } else {
42612 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
42613 return false;
42614 }
42615 if (objIsXray) {
42616 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42617 // we know Xrays have no dynamic unwrap behavior.
42618 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42619 if (!unwrappedObj.ref()) {
42620 return false;
42621 }
42622 }
42623 FastErrorResult rv;
42624 // NOTE: This assert does NOT call the function.
42625 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassAllowSharedArrayBufferViewTypedef(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42626 MOZ_KnownLive(self)(self)->PassAllowSharedArrayBufferViewTypedef(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42627 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passAllowSharedArrayBufferViewTypedef"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passAllowSharedArrayBufferViewTypedef"
)), 0))
) {
42628 return false;
42629 }
42630 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42630); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42630; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42631 args.rval().setUndefined();
42632 return true;
42633}
42634
42635static const JSJitInfo passAllowSharedArrayBufferViewTypedef_methodinfo = {
42636 { (JSJitGetterOp)passAllowSharedArrayBufferViewTypedef },
42637 { prototypes::id::TestJSImplInterface },
42638 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42639 JSJitInfo::Method,
42640 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42641 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
42642 false, /* isInfallible. False in setters. */
42643 false, /* isMovable. Not relevant for setters. */
42644 false, /* isEliminatable. Not relevant for setters. */
42645 false, /* isAlwaysInSlot. Only relevant for getters. */
42646 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42647 false, /* isTypedMethod. Only relevant for methods. */
42648 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42649};
42650
42651MOZ_CAN_RUN_SCRIPT static bool
42652passAllowSharedArrayBufferView(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
42653{
42654 BindingCallContext cx(cx_, "TestJSImplInterface.passAllowSharedArrayBufferView");
42655 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42658( cx, "TestJSImplInterface"
, "passAllowSharedArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42656 "TestJSImplInterface", "passAllowSharedArrayBufferView", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42658( cx, "TestJSImplInterface"
, "passAllowSharedArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42657 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject42658( cx, "TestJSImplInterface"
, "passAllowSharedArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42658 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42658( cx, "TestJSImplInterface"
, "passAllowSharedArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
42659
42660 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42661 if (!args.requireAtLeast(cx, "TestJSImplInterface.passAllowSharedArrayBufferView", 1)) {
42662 return false;
42663 }
42664 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42665 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42666 if (objIsXray) {
42667 unwrappedObj.emplace(cx, obj);
42668 }
42669 RootedSpiderMonkeyInterface<ArrayBufferView> arg0(cx);
42670 if (args[0].isObject()) {
42671 if (!arg0.Init(&args[0].toObject())) {
42672 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferView");
42673 return false;
42674 }
42675 if (JS::IsLargeArrayBufferView(arg0.Obj())) {
42676 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
42677 return false;
42678 }
42679 if (JS::IsResizableArrayBufferView(arg0.Obj())) {
42680 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
42681 return false;
42682 }
42683 } else {
42684 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
42685 return false;
42686 }
42687 if (objIsXray) {
42688 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42689 // we know Xrays have no dynamic unwrap behavior.
42690 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42691 if (!unwrappedObj.ref()) {
42692 return false;
42693 }
42694 }
42695 FastErrorResult rv;
42696 // NOTE: This assert does NOT call the function.
42697 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassAllowSharedArrayBufferView(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42698 MOZ_KnownLive(self)(self)->PassAllowSharedArrayBufferView(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42699 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passAllowSharedArrayBufferView"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passAllowSharedArrayBufferView"
)), 0))
) {
42700 return false;
42701 }
42702 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42702); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42702; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42703 args.rval().setUndefined();
42704 return true;
42705}
42706
42707static const JSJitInfo passAllowSharedArrayBufferView_methodinfo = {
42708 { (JSJitGetterOp)passAllowSharedArrayBufferView },
42709 { prototypes::id::TestJSImplInterface },
42710 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42711 JSJitInfo::Method,
42712 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42713 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
42714 false, /* isInfallible. False in setters. */
42715 false, /* isMovable. Not relevant for setters. */
42716 false, /* isEliminatable. Not relevant for setters. */
42717 false, /* isAlwaysInSlot. Only relevant for getters. */
42718 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42719 false, /* isTypedMethod. Only relevant for methods. */
42720 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42721};
42722
42723MOZ_CAN_RUN_SCRIPT static bool
42724passAllowSharedNullableArrayBufferView(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
42725{
42726 BindingCallContext cx(cx_, "TestJSImplInterface.passAllowSharedNullableArrayBufferView");
42727 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42730( cx, "TestJSImplInterface"
, "passAllowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42728 "TestJSImplInterface", "passAllowSharedNullableArrayBufferView", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42730( cx, "TestJSImplInterface"
, "passAllowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42729 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject42730( cx, "TestJSImplInterface"
, "passAllowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42730 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42730( cx, "TestJSImplInterface"
, "passAllowSharedNullableArrayBufferView", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
42731
42732 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42733 if (!args.requireAtLeast(cx, "TestJSImplInterface.passAllowSharedNullableArrayBufferView", 1)) {
42734 return false;
42735 }
42736 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42737 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42738 if (objIsXray) {
42739 unwrappedObj.emplace(cx, obj);
42740 }
42741 RootedSpiderMonkeyInterface<Nullable<ArrayBufferView>> arg0(cx);
42742 if (args[0].isObject()) {
42743 if (!arg0.SetValue().Init(&args[0].toObject())) {
42744 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferViewOrNull");
42745 return false;
42746 }
42747 if (JS::IsLargeArrayBufferView(arg0.SetValue().Obj())) {
42748 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
42749 return false;
42750 }
42751 if (JS::IsResizableArrayBufferView(arg0.SetValue().Obj())) {
42752 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
42753 return false;
42754 }
42755 } else if (args[0].isNullOrUndefined()) {
42756 arg0.SetNull();
42757 } else {
42758 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
42759 return false;
42760 }
42761 if (objIsXray) {
42762 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42763 // we know Xrays have no dynamic unwrap behavior.
42764 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42765 if (!unwrappedObj.ref()) {
42766 return false;
42767 }
42768 }
42769 FastErrorResult rv;
42770 // NOTE: This assert does NOT call the function.
42771 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassAllowSharedNullableArrayBufferView(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42772 MOZ_KnownLive(self)(self)->PassAllowSharedNullableArrayBufferView(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42773 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passAllowSharedNullableArrayBufferView"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passAllowSharedNullableArrayBufferView"
)), 0))
) {
42774 return false;
42775 }
42776 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42776); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42776; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42777 args.rval().setUndefined();
42778 return true;
42779}
42780
42781static const JSJitInfo passAllowSharedNullableArrayBufferView_methodinfo = {
42782 { (JSJitGetterOp)passAllowSharedNullableArrayBufferView },
42783 { prototypes::id::TestJSImplInterface },
42784 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42785 JSJitInfo::Method,
42786 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42787 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
42788 false, /* isInfallible. False in setters. */
42789 false, /* isMovable. Not relevant for setters. */
42790 false, /* isEliminatable. Not relevant for setters. */
42791 false, /* isAlwaysInSlot. Only relevant for getters. */
42792 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42793 false, /* isTypedMethod. Only relevant for methods. */
42794 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42795};
42796
42797MOZ_CAN_RUN_SCRIPT static bool
42798passAllowSharedArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
42799{
42800 BindingCallContext cx(cx_, "TestJSImplInterface.passAllowSharedArrayBuffer");
42801 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42804( cx, "TestJSImplInterface"
, "passAllowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42802 "TestJSImplInterface", "passAllowSharedArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42804( cx, "TestJSImplInterface"
, "passAllowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42803 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject42804( cx, "TestJSImplInterface"
, "passAllowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42804 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42804( cx, "TestJSImplInterface"
, "passAllowSharedArrayBuffer", JS::ProfilingCategoryPair::DOM
, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
42805
42806 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42807 if (!args.requireAtLeast(cx, "TestJSImplInterface.passAllowSharedArrayBuffer", 1)) {
42808 return false;
42809 }
42810 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42811 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42812 if (objIsXray) {
42813 unwrappedObj.emplace(cx, obj);
42814 }
42815 RootedSpiderMonkeyInterface<ArrayBuffer> arg0(cx);
42816 if (args[0].isObject()) {
42817 if (!arg0.Init(&args[0].toObject())) {
42818 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBuffer");
42819 return false;
42820 }
42821 if (JS::IsLargeArrayBufferMaybeShared(arg0.Obj())) {
42822 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
42823 return false;
42824 }
42825 if (JS::IsResizableArrayBufferMaybeShared(arg0.Obj())) {
42826 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
42827 return false;
42828 }
42829 } else {
42830 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
42831 return false;
42832 }
42833 if (objIsXray) {
42834 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42835 // we know Xrays have no dynamic unwrap behavior.
42836 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42837 if (!unwrappedObj.ref()) {
42838 return false;
42839 }
42840 }
42841 FastErrorResult rv;
42842 // NOTE: This assert does NOT call the function.
42843 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassAllowSharedArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42844 MOZ_KnownLive(self)(self)->PassAllowSharedArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42845 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passAllowSharedArrayBuffer"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passAllowSharedArrayBuffer"
)), 0))
) {
42846 return false;
42847 }
42848 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42848); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42848; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42849 args.rval().setUndefined();
42850 return true;
42851}
42852
42853static const JSJitInfo passAllowSharedArrayBuffer_methodinfo = {
42854 { (JSJitGetterOp)passAllowSharedArrayBuffer },
42855 { prototypes::id::TestJSImplInterface },
42856 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42857 JSJitInfo::Method,
42858 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42859 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
42860 false, /* isInfallible. False in setters. */
42861 false, /* isMovable. Not relevant for setters. */
42862 false, /* isEliminatable. Not relevant for setters. */
42863 false, /* isAlwaysInSlot. Only relevant for getters. */
42864 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42865 false, /* isTypedMethod. Only relevant for methods. */
42866 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42867};
42868
42869MOZ_CAN_RUN_SCRIPT static bool
42870passAllowSharedNullableArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
42871{
42872 BindingCallContext cx(cx_, "TestJSImplInterface.passAllowSharedNullableArrayBuffer");
42873 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42876( cx, "TestJSImplInterface"
, "passAllowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42874 "TestJSImplInterface", "passAllowSharedNullableArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42876( cx, "TestJSImplInterface"
, "passAllowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42875 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject42876( cx, "TestJSImplInterface"
, "passAllowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
42876 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42876( cx, "TestJSImplInterface"
, "passAllowSharedNullableArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
42877
42878 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42879 if (!args.requireAtLeast(cx, "TestJSImplInterface.passAllowSharedNullableArrayBuffer", 1)) {
42880 return false;
42881 }
42882 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42883 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42884 if (objIsXray) {
42885 unwrappedObj.emplace(cx, obj);
42886 }
42887 RootedSpiderMonkeyInterface<Nullable<ArrayBuffer>> arg0(cx);
42888 if (args[0].isObject()) {
42889 if (!arg0.SetValue().Init(&args[0].toObject())) {
42890 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 1", "ArrayBufferOrNull");
42891 return false;
42892 }
42893 if (JS::IsLargeArrayBufferMaybeShared(arg0.SetValue().Obj())) {
42894 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 1");
42895 return false;
42896 }
42897 if (JS::IsResizableArrayBufferMaybeShared(arg0.SetValue().Obj())) {
42898 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 1");
42899 return false;
42900 }
42901 } else if (args[0].isNullOrUndefined()) {
42902 arg0.SetNull();
42903 } else {
42904 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
42905 return false;
42906 }
42907 if (objIsXray) {
42908 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42909 // we know Xrays have no dynamic unwrap behavior.
42910 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42911 if (!unwrappedObj.ref()) {
42912 return false;
42913 }
42914 }
42915 FastErrorResult rv;
42916 // NOTE: This assert does NOT call the function.
42917 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassAllowSharedNullableArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42918 MOZ_KnownLive(self)(self)->PassAllowSharedNullableArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42919 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passAllowSharedNullableArrayBuffer"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passAllowSharedNullableArrayBuffer"
)), 0))
) {
42920 return false;
42921 }
42922 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42922); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42922; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42923 args.rval().setUndefined();
42924 return true;
42925}
42926
42927static const JSJitInfo passAllowSharedNullableArrayBuffer_methodinfo = {
42928 { (JSJitGetterOp)passAllowSharedNullableArrayBuffer },
42929 { prototypes::id::TestJSImplInterface },
42930 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42931 JSJitInfo::Method,
42932 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42933 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
42934 false, /* isInfallible. False in setters. */
42935 false, /* isMovable. Not relevant for setters. */
42936 false, /* isEliminatable. Not relevant for setters. */
42937 false, /* isAlwaysInSlot. Only relevant for getters. */
42938 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42939 false, /* isTypedMethod. Only relevant for methods. */
42940 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42941};
42942
42943MOZ_CAN_RUN_SCRIPT static bool
42944passUnionArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
42945{
42946 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionArrayBuffer");
42947 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject42950( cx, "TestJSImplInterface"
, "passUnionArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42948 "TestJSImplInterface", "passUnionArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject42950( cx, "TestJSImplInterface"
, "passUnionArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42949 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject42950( cx, "TestJSImplInterface"
, "passUnionArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
42950 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject42950( cx, "TestJSImplInterface"
, "passUnionArrayBuffer", JS::ProfilingCategoryPair::DOM, uint32_t
(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) | uint32_t
(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
42951
42952 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
42953 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionArrayBuffer", 1)) {
42954 return false;
42955 }
42956 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
42957 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
42958 if (objIsXray) {
42959 unwrappedObj.emplace(cx, obj);
42960 }
42961 StringOrArrayBuffer arg0;
42962 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
42963 return false;
42964 }
42965 if (objIsXray) {
42966 // Since our object is an Xray, we can just CheckedUnwrapStatic:
42967 // we know Xrays have no dynamic unwrap behavior.
42968 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
42969 if (!unwrappedObj.ref()) {
42970 return false;
42971 }
42972 }
42973 FastErrorResult rv;
42974 // NOTE: This assert does NOT call the function.
42975 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
42976 MOZ_KnownLive(self)(self)->PassUnionArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
42977 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionArrayBuffer"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionArrayBuffer"
)), 0))
) {
42978 return false;
42979 }
42980 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 42980); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 42980; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
42981 args.rval().setUndefined();
42982 return true;
42983}
42984
42985static const JSJitInfo passUnionArrayBuffer_methodinfo = {
42986 { (JSJitGetterOp)passUnionArrayBuffer },
42987 { prototypes::id::TestJSImplInterface },
42988 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
42989 JSJitInfo::Method,
42990 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
42991 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
42992 false, /* isInfallible. False in setters. */
42993 false, /* isMovable. Not relevant for setters. */
42994 false, /* isEliminatable. Not relevant for setters. */
42995 false, /* isAlwaysInSlot. Only relevant for getters. */
42996 false, /* isLazilyCachedInSlot. Only relevant for getters. */
42997 false, /* isTypedMethod. Only relevant for methods. */
42998 0 /* Reserved slot index, if we're stored in a slot, else 0. */
42999};
43000
43001MOZ_CAN_RUN_SCRIPT static bool
43002passUnionAllowSharedArrayBuffer(JSContext* cx_, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
43003{
43004 BindingCallContext cx(cx_, "TestJSImplInterface.passUnionAllowSharedArrayBuffer");
43005 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject43008( cx, "TestJSImplInterface"
, "passUnionAllowSharedArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43006 "TestJSImplInterface", "passUnionAllowSharedArrayBuffer", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject43008( cx, "TestJSImplInterface"
, "passUnionAllowSharedArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43007 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject43008( cx, "TestJSImplInterface"
, "passUnionAllowSharedArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
43008 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject43008( cx, "TestJSImplInterface"
, "passUnionAllowSharedArrayBuffer", JS::ProfilingCategoryPair
::DOM, uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD
) | uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS)
)
;
43009
43010 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
43011 if (!args.requireAtLeast(cx, "TestJSImplInterface.passUnionAllowSharedArrayBuffer", 1)) {
43012 return false;
43013 }
43014 Maybe<JS::Rooted<JSObject*> > unwrappedObj;
43015 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
43016 if (objIsXray) {
43017 unwrappedObj.emplace(cx, obj);
43018 }
43019 StringOrMaybeSharedArrayBuffer arg0;
43020 if (!arg0.Init(cx, args[0], "Argument 1", true)) {
43021 return false;
43022 }
43023 if (objIsXray) {
43024 // Since our object is an Xray, we can just CheckedUnwrapStatic:
43025 // we know Xrays have no dynamic unwrap behavior.
43026 unwrappedObj.ref() = js::CheckedUnwrapStatic(unwrappedObj.ref());
43027 if (!unwrappedObj.ref()) {
43028 return false;
43029 }
43030 }
43031 FastErrorResult rv;
43032 // NOTE: This assert does NOT call the function.
43033 static_assert(std::is_void_v<decltype(MOZ_KnownLive(self)(self)->PassUnionAllowSharedArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx))))>, "Should be returning void here");
43034 MOZ_KnownLive(self)(self)->PassUnionAllowSharedArrayBuffer(Constify(arg0), rv, (unwrappedObj ? js::GetNonCCWObjectRealm(*unwrappedObj) : js::GetContextRealm(cx)));
43035 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionAllowSharedArrayBuffer"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface.passUnionAllowSharedArrayBuffer"
)), 0))
) {
43036 return false;
43037 }
43038 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 43038); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 43038; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
43039 args.rval().setUndefined();
43040 return true;
43041}
43042
43043static const JSJitInfo passUnionAllowSharedArrayBuffer_methodinfo = {
43044 { (JSJitGetterOp)passUnionAllowSharedArrayBuffer },
43045 { prototypes::id::TestJSImplInterface },
43046 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
43047 JSJitInfo::Method,
43048 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
43049 JSVAL_TYPE_UNDEFINED, /* returnType. Not relevant for setters. */
43050 false, /* isInfallible. False in setters. */
43051 false, /* isMovable. Not relevant for setters. */
43052 false, /* isEliminatable. Not relevant for setters. */
43053 false, /* isAlwaysInSlot. Only relevant for getters. */
43054 false, /* isLazilyCachedInSlot. Only relevant for getters. */
43055 false, /* isTypedMethod. Only relevant for methods. */
43056 0 /* Reserved slot index, if we're stored in a slot, else 0. */
43057};
43058
43059MOZ_CAN_RUN_SCRIPT static bool
43060toJSON(JSContext* cx, JS::Handle<JSObject*> obj, void* void_self, const JSJitMethodCallArgs& args)
43061{
43062 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject43065( cx, "TestJSImplInterface"
, "toJSON", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
43063 "TestJSImplInterface", "toJSON", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject43065( cx, "TestJSImplInterface"
, "toJSON", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
43064 uint32_t(js::ProfilingStackFrame::Flags::STRING_TEMPLATE_METHOD) |mozilla::AutoProfilerLabelHot raiiObject43065( cx, "TestJSImplInterface"
, "toJSON", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
43065 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject43065( cx, "TestJSImplInterface"
, "toJSON", JS::ProfilingCategoryPair::DOM, uint32_t(js::ProfilingStackFrame
::Flags::STRING_TEMPLATE_METHOD) | uint32_t(js::ProfilingStackFrame
::Flags::RELEVANT_FOR_JS))
;
43066
43067 auto* self = static_cast<mozilla::dom::TestJSImplInterface*>(void_self);
43068 JS::Rooted<JSObject*> result(cx, JS_NewPlainObject(cx));
43069 if (!result) {
43070 return false;
43071 }
43072 if (!TestJSImplInterface_Binding::CollectJSONAttributes(cx, obj, MOZ_KnownLive(self)(self), result)) {
43073 return false;
43074 }
43075 args.rval().setObject(*result);
43076 return true;
43077}
43078
43079static const JSJitInfo toJSON_methodinfo = {
43080 { (JSJitGetterOp)toJSON },
43081 { prototypes::id::TestJSImplInterface },
43082 { PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth },
43083 JSJitInfo::Method,
43084 JSJitInfo::AliasEverything, /* aliasSet. Not relevant for setters. */
43085 JSVAL_TYPE_OBJECT, /* returnType. Not relevant for setters. */
43086 false, /* isInfallible. False in setters. */
43087 false, /* isMovable. Not relevant for setters. */
43088 false, /* isEliminatable. Not relevant for setters. */
43089 false, /* isAlwaysInSlot. Only relevant for getters. */
43090 false, /* isLazilyCachedInSlot. Only relevant for getters. */
43091 false, /* isTypedMethod. Only relevant for methods. */
43092 0 /* Reserved slot index, if we're stored in a slot, else 0. */
43093};
43094
43095static bool
43096_addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
43097{
43098 mozilla::dom::TestJSImplInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestJSImplInterface>(obj);
43099 // We don't want to preserve if we don't have a wrapper, and we
43100 // obviously can't preserve if we're not initialized.
43101 if (self && self->GetWrapperPreserveColor()) {
43102 PreserveWrapper(self);
43103 }
43104 return true;
43105}
43106
43107static void
43108_finalize(JS::GCContext* gcx, JSObject* obj)
43109{
43110 mozilla::dom::TestJSImplInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestJSImplInterface>(obj);
43111 if (self) {
43112 JS::SetReservedSlot(obj, DOM_OBJECT_SLOT0, JS::UndefinedValue());
43113 ClearWrapper(self, self, obj);
43114 if (size_t mallocBytes = BindingJSObjectMallocBytes(self)) {
43115 JS::RemoveAssociatedMemory(obj, mallocBytes,
43116 JS::MemoryUse::DOMBinding);
43117 }
43118 AddForDeferredFinalization<mozilla::dom::TestJSImplInterface>(self);
43119 }
43120}
43121
43122static nsWrapperCache*
43123_getWrapperCache(JS::Handle<JSObject*> obj)
43124{
43125 mozilla::dom::TestJSImplInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestJSImplInterface>(obj);
43126 return self;
43127}
43128
43129static size_t
43130_objectMoved(JSObject* obj, JSObject* old)
43131{
43132 mozilla::dom::TestJSImplInterface* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestJSImplInterface>(obj);
43133 if (self) {
43134 UpdateWrapper(self, self, obj, old);
43135 }
43136
43137 return 0;
43138}
43139
43140static const JSFunctionSpec sChromeStaticMethods_specs[] = {
43141 JS_FNSPEC("_create", TestJSImplInterface::_Create, nullptr, 2, 0, nullptr){JSFunctionSpec::Name("_create"), {TestJSImplInterface::_Create
, nullptr}, 2, 0, nullptr}
,
43142 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
43143};
43144
43145
43146static const Prefable<const JSFunctionSpec> sChromeStaticMethods[] = {
43147 { nullptr, &sChromeStaticMethods_specs[0] },
43148 { nullptr, nullptr }
43149};
43150
43151static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
43152 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
43153static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
43154 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
43155
43156static const JSFunctionSpec sMethods_specs[] = {
43157 JS_FNSPEC("passByte", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passByte_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passByte"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passByte_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43158 JS_FNSPEC("receiveByte", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveByte_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveByte"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&receiveByte_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43159 JS_FNSPEC("passOptionalByte", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalByte_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalByte"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passOptionalByte_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43160 JS_FNSPEC("passOptionalByteBeforeRequired", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalByteBeforeRequired_methodinfo), 2, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalByteBeforeRequired"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalByteBeforeRequired_methodinfo
)}, 2, JSPROP_ENUMERATE, nullptr}
,
43161 JS_FNSPEC("passOptionalByteWithDefault", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalByteWithDefault_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalByteWithDefault"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalByteWithDefault_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43162 JS_FNSPEC("passOptionalByteWithDefaultBeforeRequired", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalByteWithDefaultBeforeRequired_methodinfo), 2, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalByteWithDefaultBeforeRequired"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalByteWithDefaultBeforeRequired_methodinfo
)}, 2, JSPROP_ENUMERATE, nullptr}
,
43163 JS_FNSPEC("passNullableByte", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableByte_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableByte"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passNullableByte_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43164 JS_FNSPEC("passOptionalNullableByte", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableByte_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableByte"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNullableByte_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43165 JS_FNSPEC("passVariadicByte", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passVariadicByte_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passVariadicByte"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passVariadicByte_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43166 JS_FNSPEC("returnByteSideEffectFree", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&returnByteSideEffectFree_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("returnByteSideEffectFree"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&returnByteSideEffectFree_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43167 JS_FNSPEC("returnDOMDependentByte", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&returnDOMDependentByte_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("returnDOMDependentByte"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&returnDOMDependentByte_methodinfo)}
, 0, JSPROP_ENUMERATE, nullptr}
,
43168 JS_FNSPEC("returnConstantByte", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&returnConstantByte_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("returnConstantByte"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&returnConstantByte_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43169 JS_FNSPEC("returnDeviceStateDependentByte", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&returnDeviceStateDependentByte_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("returnDeviceStateDependentByte"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&returnDeviceStateDependentByte_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43170 JS_FNSPEC("passShort", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passShort_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passShort"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passShort_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43171 JS_FNSPEC("receiveShort", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveShort_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveShort"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&receiveShort_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr
}
,
43172 JS_FNSPEC("passOptionalShort", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalShort_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalShort"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passOptionalShort_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43173 JS_FNSPEC("passOptionalShortWithDefault", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalShortWithDefault_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalShortWithDefault"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalShortWithDefault_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43174 JS_FNSPEC("passLong", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passLong_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passLong"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passLong_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43175 JS_FNSPEC("receiveLong", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveLong_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveLong"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&receiveLong_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43176 JS_FNSPEC("passOptionalLong", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalLong_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalLong"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passOptionalLong_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43177 JS_FNSPEC("passOptionalLongWithDefault", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalLongWithDefault_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalLongWithDefault"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalLongWithDefault_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43178 JS_FNSPEC("passLongLong", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passLongLong_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passLongLong"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passLongLong_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr
}
,
43179 JS_FNSPEC("receiveLongLong", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveLongLong_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveLongLong"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&receiveLongLong_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43180 JS_FNSPEC("passOptionalLongLong", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalLongLong_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalLongLong"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalLongLong_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43181 JS_FNSPEC("passOptionalLongLongWithDefault", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalLongLongWithDefault_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalLongLongWithDefault"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalLongLongWithDefault_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43182 JS_FNSPEC("passOctet", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOctet_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOctet"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passOctet_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43183 JS_FNSPEC("receiveOctet", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveOctet_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveOctet"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&receiveOctet_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr
}
,
43184 JS_FNSPEC("passOptionalOctet", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalOctet_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalOctet"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passOptionalOctet_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43185 JS_FNSPEC("passOptionalOctetWithDefault", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalOctetWithDefault_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalOctetWithDefault"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalOctetWithDefault_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43186 JS_FNSPEC("passUnsignedShort", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnsignedShort_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnsignedShort"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passUnsignedShort_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43187 JS_FNSPEC("receiveUnsignedShort", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveUnsignedShort_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveUnsignedShort"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveUnsignedShort_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43188 JS_FNSPEC("passOptionalUnsignedShort", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalUnsignedShort_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalUnsignedShort"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalUnsignedShort_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43189 JS_FNSPEC("passOptionalUnsignedShortWithDefault", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalUnsignedShortWithDefault_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalUnsignedShortWithDefault")
, {(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passOptionalUnsignedShortWithDefault_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43190 JS_FNSPEC("passUnsignedLong", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnsignedLong_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnsignedLong"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passUnsignedLong_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43191 JS_FNSPEC("receiveUnsignedLong", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveUnsignedLong_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveUnsignedLong"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveUnsignedLong_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43192 JS_FNSPEC("passOptionalUnsignedLong", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalUnsignedLong_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalUnsignedLong"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalUnsignedLong_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43193 JS_FNSPEC("passOptionalUnsignedLongWithDefault", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalUnsignedLongWithDefault_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalUnsignedLongWithDefault"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passOptionalUnsignedLongWithDefault_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43194 JS_FNSPEC("passUnsignedLongLong", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnsignedLongLong_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnsignedLongLong"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnsignedLongLong_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43195 JS_FNSPEC("receiveUnsignedLongLong", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveUnsignedLongLong_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveUnsignedLongLong"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveUnsignedLongLong_methodinfo)
}, 0, JSPROP_ENUMERATE, nullptr}
,
43196 JS_FNSPEC("passOptionalUnsignedLongLong", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalUnsignedLongLong_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalUnsignedLongLong"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalUnsignedLongLong_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43197 JS_FNSPEC("passOptionalUnsignedLongLongWithDefault", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalUnsignedLongLongWithDefault_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalUnsignedLongLongWithDefault"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalUnsignedLongLongWithDefault_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43198 JS_FNSPEC("passFloat", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passFloat_methodinfo), 16, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passFloat"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passFloat_methodinfo)}, 16, JSPROP_ENUMERATE, nullptr}
,
43199 JS_FNSPEC("passLenientFloat", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passLenientFloat_methodinfo), 16, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passLenientFloat"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passLenientFloat_methodinfo)}, 16, JSPROP_ENUMERATE
, nullptr}
,
43200 JS_FNSPEC("receiveSelf", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveSelf_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveSelf"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&receiveSelf_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43201 JS_FNSPEC("receiveNullableSelf", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableSelf_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableSelf"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveNullableSelf_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43202 JS_FNSPEC("receiveWeakSelf", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveWeakSelf_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveWeakSelf"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&receiveWeakSelf_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43203 JS_FNSPEC("receiveWeakNullableSelf", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveWeakNullableSelf_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveWeakNullableSelf"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveWeakNullableSelf_methodinfo)
}, 0, JSPROP_ENUMERATE, nullptr}
,
43204 JS_FNSPEC("passSelf", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSelf_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSelf"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passSelf_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43205 JS_FNSPEC("passNullableSelf", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableSelf_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableSelf"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passNullableSelf_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43206 JS_FNSPEC("passOptionalSelf", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalSelf_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalSelf"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passOptionalSelf_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43207 JS_FNSPEC("passOptionalNonNullSelf", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNonNullSelf_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNonNullSelf"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNonNullSelf_methodinfo)
}, 0, JSPROP_ENUMERATE, nullptr}
,
43208 JS_FNSPEC("passOptionalSelfWithDefault", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalSelfWithDefault_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalSelfWithDefault"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalSelfWithDefault_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43209 JS_FNSPEC("receiveNonWrapperCacheInterface", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNonWrapperCacheInterface_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNonWrapperCacheInterface"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveNonWrapperCacheInterface_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43210 JS_FNSPEC("receiveNullableNonWrapperCacheInterface", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableNonWrapperCacheInterface_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableNonWrapperCacheInterface"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&receiveNullableNonWrapperCacheInterface_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43211 JS_FNSPEC("receiveNonWrapperCacheInterfaceSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNonWrapperCacheInterfaceSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNonWrapperCacheInterfaceSequence"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&receiveNonWrapperCacheInterfaceSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43212 JS_FNSPEC("receiveNullableNonWrapperCacheInterfaceSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableNonWrapperCacheInterfaceSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableNonWrapperCacheInterfaceSequence"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&receiveNullableNonWrapperCacheInterfaceSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43213 JS_FNSPEC("receiveNonWrapperCacheInterfaceNullableSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNonWrapperCacheInterfaceNullableSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNonWrapperCacheInterfaceNullableSequence"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&receiveNonWrapperCacheInterfaceNullableSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43214 JS_FNSPEC("receiveNullableNonWrapperCacheInterfaceNullableSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableNonWrapperCacheInterfaceNullableSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableNonWrapperCacheInterfaceNullableSequence"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&receiveNullableNonWrapperCacheInterfaceNullableSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43215 JS_FNSPEC("receiveExternal", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveExternal_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveExternal"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&receiveExternal_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43216 JS_FNSPEC("receiveNullableExternal", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableExternal_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableExternal"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveNullableExternal_methodinfo)
}, 0, JSPROP_ENUMERATE, nullptr}
,
43217 JS_FNSPEC("receiveWeakExternal", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveWeakExternal_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveWeakExternal"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveWeakExternal_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43218 JS_FNSPEC("receiveWeakNullableExternal", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveWeakNullableExternal_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveWeakNullableExternal"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveWeakNullableExternal_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43219 JS_FNSPEC("passExternal", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passExternal_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passExternal"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passExternal_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr
}
,
43220 JS_FNSPEC("passNullableExternal", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableExternal_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableExternal"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passNullableExternal_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43221 JS_FNSPEC("passOptionalExternal", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalExternal_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalExternal"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalExternal_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43222 JS_FNSPEC("passOptionalNonNullExternal", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNonNullExternal_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNonNullExternal"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNonNullExternal_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43223 JS_FNSPEC("passOptionalExternalWithDefault", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalExternalWithDefault_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalExternalWithDefault"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalExternalWithDefault_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43224 JS_FNSPEC("receiveCallbackInterface", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveCallbackInterface_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveCallbackInterface"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveCallbackInterface_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43225 JS_FNSPEC("receiveNullableCallbackInterface", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableCallbackInterface_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableCallbackInterface"), {(
GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&receiveNullableCallbackInterface_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43226 JS_FNSPEC("receiveWeakCallbackInterface", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveWeakCallbackInterface_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveWeakCallbackInterface"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveWeakCallbackInterface_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43227 JS_FNSPEC("receiveWeakNullableCallbackInterface", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveWeakNullableCallbackInterface_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveWeakNullableCallbackInterface")
, {(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&receiveWeakNullableCallbackInterface_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43228 JS_FNSPEC("passCallbackInterface", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passCallbackInterface_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passCallbackInterface"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passCallbackInterface_methodinfo)},
1, JSPROP_ENUMERATE, nullptr}
,
43229 JS_FNSPEC("passNullableCallbackInterface", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableCallbackInterface_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableCallbackInterface"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passNullableCallbackInterface_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43230 JS_FNSPEC("passOptionalCallbackInterface", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalCallbackInterface_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalCallbackInterface"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalCallbackInterface_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43231 JS_FNSPEC("passOptionalNonNullCallbackInterface", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNonNullCallbackInterface_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNonNullCallbackInterface")
, {(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passOptionalNonNullCallbackInterface_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43232 JS_FNSPEC("passOptionalCallbackInterfaceWithDefault", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalCallbackInterfaceWithDefault_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalCallbackInterfaceWithDefault"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalCallbackInterfaceWithDefault_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43233 JS_FNSPEC("receiveSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveSequence"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&receiveSequence_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43234 JS_FNSPEC("receiveNullableSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveNullableSequence_methodinfo)
}, 0, JSPROP_ENUMERATE, nullptr}
,
43235 JS_FNSPEC("receiveSequenceOfNullableInts", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveSequenceOfNullableInts_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveSequenceOfNullableInts"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveSequenceOfNullableInts_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43236 JS_FNSPEC("receiveNullableSequenceOfNullableInts", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableSequenceOfNullableInts_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableSequenceOfNullableInts"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&receiveNullableSequenceOfNullableInts_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43237 JS_FNSPEC("passSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequence_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequence"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passSequence_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr
}
,
43238 JS_FNSPEC("passNullableSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableSequence_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passNullableSequence_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43239 JS_FNSPEC("passSequenceOfNullableInts", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequenceOfNullableInts_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequenceOfNullableInts"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passSequenceOfNullableInts_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43240 JS_FNSPEC("passOptionalSequenceOfNullableInts", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalSequenceOfNullableInts_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalSequenceOfNullableInts"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passOptionalSequenceOfNullableInts_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43241 JS_FNSPEC("passOptionalNullableSequenceOfNullableInts", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceOfNullableInts_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableSequenceOfNullableInts"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceOfNullableInts_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43242 JS_FNSPEC("receiveCastableObjectSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveCastableObjectSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveCastableObjectSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveCastableObjectSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43243 JS_FNSPEC("receiveCallbackObjectSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveCallbackObjectSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveCallbackObjectSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveCallbackObjectSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43244 JS_FNSPEC("receiveNullableCastableObjectSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableCastableObjectSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableCastableObjectSequence"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&receiveNullableCastableObjectSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43245 JS_FNSPEC("receiveNullableCallbackObjectSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableCallbackObjectSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableCallbackObjectSequence"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&receiveNullableCallbackObjectSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43246 JS_FNSPEC("receiveCastableObjectNullableSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveCastableObjectNullableSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveCastableObjectNullableSequence"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&receiveCastableObjectNullableSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43247 JS_FNSPEC("receiveNullableCastableObjectNullableSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableCastableObjectNullableSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableCastableObjectNullableSequence"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&receiveNullableCastableObjectNullableSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43248 JS_FNSPEC("receiveWeakCastableObjectSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveWeakCastableObjectSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveWeakCastableObjectSequence"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&receiveWeakCastableObjectSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43249 JS_FNSPEC("receiveWeakNullableCastableObjectSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveWeakNullableCastableObjectSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveWeakNullableCastableObjectSequence"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&receiveWeakNullableCastableObjectSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43250 JS_FNSPEC("receiveWeakCastableObjectNullableSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveWeakCastableObjectNullableSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveWeakCastableObjectNullableSequence"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&receiveWeakCastableObjectNullableSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43251 JS_FNSPEC("receiveWeakNullableCastableObjectNullableSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveWeakNullableCastableObjectNullableSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveWeakNullableCastableObjectNullableSequence"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&receiveWeakNullableCastableObjectNullableSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43252 JS_FNSPEC("passCastableObjectSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passCastableObjectSequence_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passCastableObjectSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passCastableObjectSequence_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43253 JS_FNSPEC("passNullableCastableObjectSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableCastableObjectSequence_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableCastableObjectSequence"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableCastableObjectSequence_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43254 JS_FNSPEC("passCastableObjectNullableSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passCastableObjectNullableSequence_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passCastableObjectNullableSequence"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passCastableObjectNullableSequence_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43255 JS_FNSPEC("passNullableCastableObjectNullableSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableCastableObjectNullableSequence_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableCastableObjectNullableSequence"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passNullableCastableObjectNullableSequence_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43256 JS_FNSPEC("passOptionalSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalSequence_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43257 JS_FNSPEC("passOptionalSequenceWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalSequenceWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalSequenceWithDefaultValue")
, {(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passOptionalSequenceWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43258 JS_FNSPEC("passOptionalNullableSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNullableSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43259 JS_FNSPEC("passOptionalNullableSequenceWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableSequenceWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43260 JS_FNSPEC("passOptionalNullableSequenceWithDefaultValue2", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceWithDefaultValue2_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableSequenceWithDefaultValue2"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceWithDefaultValue2_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43261 JS_FNSPEC("passOptionalObjectSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalObjectSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalObjectSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalObjectSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43262 JS_FNSPEC("passExternalInterfaceSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passExternalInterfaceSequence_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passExternalInterfaceSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passExternalInterfaceSequence_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43263 JS_FNSPEC("passNullableExternalInterfaceSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableExternalInterfaceSequence_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableExternalInterfaceSequence"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passNullableExternalInterfaceSequence_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43264 JS_FNSPEC("receiveStringSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveStringSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveStringSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveStringSequence_methodinfo)},
0, JSPROP_ENUMERATE, nullptr}
,
43265 JS_FNSPEC("receiveByteStringSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveByteStringSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveByteStringSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveByteStringSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43266 JS_FNSPEC("receiveUTF8StringSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveUTF8StringSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveUTF8StringSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveUTF8StringSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43267 JS_FNSPEC("receiveAnySequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveAnySequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveAnySequence"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&receiveAnySequence_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43268 JS_FNSPEC("receiveNullableAnySequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableAnySequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableAnySequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveNullableAnySequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43269 JS_FNSPEC("receiveObjectSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveObjectSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveObjectSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveObjectSequence_methodinfo)},
0, JSPROP_ENUMERATE, nullptr}
,
43270 JS_FNSPEC("receiveNullableObjectSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableObjectSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableObjectSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveNullableObjectSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43271 JS_FNSPEC("passSequenceOfSequences", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequenceOfSequences_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequenceOfSequences"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passSequenceOfSequences_methodinfo)
}, 1, JSPROP_ENUMERATE, nullptr}
,
43272 JS_FNSPEC("passSequenceOfSequencesOfSequences", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequenceOfSequencesOfSequences_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequenceOfSequencesOfSequences"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passSequenceOfSequencesOfSequences_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43273 JS_FNSPEC("passRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passRecord_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passRecord"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passRecord_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43274 JS_FNSPEC("passNullableRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableRecord_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableRecord"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passNullableRecord_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43275 JS_FNSPEC("passRecordOfNullableInts", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passRecordOfNullableInts_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passRecordOfNullableInts"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passRecordOfNullableInts_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43276 JS_FNSPEC("passOptionalRecordOfNullableInts", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalRecordOfNullableInts_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalRecordOfNullableInts"), {(
GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passOptionalRecordOfNullableInts_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43277 JS_FNSPEC("passOptionalNullableRecordOfNullableInts", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableRecordOfNullableInts_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableRecordOfNullableInts"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableRecordOfNullableInts_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43278 JS_FNSPEC("passCastableObjectRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passCastableObjectRecord_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passCastableObjectRecord"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passCastableObjectRecord_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43279 JS_FNSPEC("passNullableCastableObjectRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableCastableObjectRecord_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableCastableObjectRecord"), {(
GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableCastableObjectRecord_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43280 JS_FNSPEC("passCastableObjectNullableRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passCastableObjectNullableRecord_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passCastableObjectNullableRecord"), {(
GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passCastableObjectNullableRecord_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43281 JS_FNSPEC("passNullableCastableObjectNullableRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableCastableObjectNullableRecord_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableCastableObjectNullableRecord"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passNullableCastableObjectNullableRecord_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43282 JS_FNSPEC("passOptionalRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalRecord_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalRecord"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passOptionalRecord_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43283 JS_FNSPEC("passOptionalNullableRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableRecord_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableRecord"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNullableRecord_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43284 JS_FNSPEC("passOptionalNullableRecordWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableRecordWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableRecordWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableRecordWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43285 JS_FNSPEC("passOptionalObjectRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalObjectRecord_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalObjectRecord"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalObjectRecord_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43286 JS_FNSPEC("passExternalInterfaceRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passExternalInterfaceRecord_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passExternalInterfaceRecord"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passExternalInterfaceRecord_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43287 JS_FNSPEC("passNullableExternalInterfaceRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableExternalInterfaceRecord_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableExternalInterfaceRecord"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableExternalInterfaceRecord_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43288 JS_FNSPEC("passStringRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passStringRecord_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passStringRecord"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passStringRecord_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43289 JS_FNSPEC("passByteStringRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passByteStringRecord_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passByteStringRecord"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passByteStringRecord_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43290 JS_FNSPEC("passUTF8StringRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUTF8StringRecord_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUTF8StringRecord"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUTF8StringRecord_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43291 JS_FNSPEC("passRecordOfRecords", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passRecordOfRecords_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passRecordOfRecords"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passRecordOfRecords_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43292 JS_FNSPEC("receiveRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveRecord_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveRecord"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&receiveRecord_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr
}
,
43293 JS_FNSPEC("receiveNullableRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableRecord_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableRecord"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveNullableRecord_methodinfo)},
0, JSPROP_ENUMERATE, nullptr}
,
43294 JS_FNSPEC("receiveRecordOfNullableInts", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveRecordOfNullableInts_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveRecordOfNullableInts"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveRecordOfNullableInts_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43295 JS_FNSPEC("receiveNullableRecordOfNullableInts", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableRecordOfNullableInts_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableRecordOfNullableInts"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&receiveNullableRecordOfNullableInts_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43296 JS_FNSPEC("receiveAnyRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveAnyRecord_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveAnyRecord"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&receiveAnyRecord_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43297 JS_FNSPEC("passArrayBuffer", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passArrayBuffer_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passArrayBuffer"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passArrayBuffer_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43298 JS_FNSPEC("passNullableArrayBuffer", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableArrayBuffer_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableArrayBuffer"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passNullableArrayBuffer_methodinfo)
}, 1, JSPROP_ENUMERATE, nullptr}
,
43299 JS_FNSPEC("passOptionalArrayBuffer", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalArrayBuffer_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalArrayBuffer"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalArrayBuffer_methodinfo)
}, 0, JSPROP_ENUMERATE, nullptr}
,
43300 JS_FNSPEC("passOptionalNullableArrayBuffer", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableArrayBuffer_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableArrayBuffer"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNullableArrayBuffer_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43301 JS_FNSPEC("passOptionalNullableArrayBufferWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableArrayBufferWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableArrayBufferWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableArrayBufferWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43302 JS_FNSPEC("passArrayBufferView", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passArrayBufferView_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passArrayBufferView"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passArrayBufferView_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43303 JS_FNSPEC("passInt8Array", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passInt8Array_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passInt8Array"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passInt8Array_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr
}
,
43304 JS_FNSPEC("passInt16Array", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passInt16Array_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passInt16Array"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passInt16Array_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr
}
,
43305 JS_FNSPEC("passInt32Array", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passInt32Array_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passInt32Array"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passInt32Array_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr
}
,
43306 JS_FNSPEC("passUint8Array", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUint8Array_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUint8Array"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUint8Array_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr
}
,
43307 JS_FNSPEC("passUint16Array", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUint16Array_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUint16Array"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passUint16Array_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43308 JS_FNSPEC("passUint32Array", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUint32Array_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUint32Array"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passUint32Array_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43309 JS_FNSPEC("passUint8ClampedArray", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUint8ClampedArray_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUint8ClampedArray"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUint8ClampedArray_methodinfo)},
1, JSPROP_ENUMERATE, nullptr}
,
43310 JS_FNSPEC("passFloat32Array", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passFloat32Array_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passFloat32Array"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passFloat32Array_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43311 JS_FNSPEC("passFloat64Array", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passFloat64Array_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passFloat64Array"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passFloat64Array_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43312 JS_FNSPEC("passSequenceOfArrayBuffers", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequenceOfArrayBuffers_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequenceOfArrayBuffers"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passSequenceOfArrayBuffers_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43313 JS_FNSPEC("passSequenceOfNullableArrayBuffers", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequenceOfNullableArrayBuffers_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequenceOfNullableArrayBuffers"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passSequenceOfNullableArrayBuffers_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43314 JS_FNSPEC("passRecordOfArrayBuffers", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passRecordOfArrayBuffers_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passRecordOfArrayBuffers"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passRecordOfArrayBuffers_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43315 JS_FNSPEC("passRecordOfNullableArrayBuffers", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passRecordOfNullableArrayBuffers_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passRecordOfNullableArrayBuffers"), {(
GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passRecordOfNullableArrayBuffers_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43316 JS_FNSPEC("passVariadicTypedArray", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passVariadicTypedArray_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passVariadicTypedArray"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passVariadicTypedArray_methodinfo)}
, 0, JSPROP_ENUMERATE, nullptr}
,
43317 JS_FNSPEC("passVariadicNullableTypedArray", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passVariadicNullableTypedArray_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passVariadicNullableTypedArray"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passVariadicNullableTypedArray_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43318 JS_FNSPEC("receiveUint8Array", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveUint8Array_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveUint8Array"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&receiveUint8Array_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43319 JS_FNSPEC("passString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passString_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passString"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passString_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43320 JS_FNSPEC("passNullableString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableString_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableString"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passNullableString_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43321 JS_FNSPEC("passOptionalString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalString_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalString"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passOptionalString_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43322 JS_FNSPEC("passOptionalStringWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalStringWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalStringWithDefaultValue"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passOptionalStringWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43323 JS_FNSPEC("passOptionalNullableString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableString_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableString"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNullableString_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43324 JS_FNSPEC("passOptionalNullableStringWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableStringWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableStringWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableStringWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43325 JS_FNSPEC("passVariadicString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passVariadicString_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passVariadicString"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passVariadicString_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43326 JS_FNSPEC("passByteString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passByteString_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passByteString"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passByteString_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr
}
,
43327 JS_FNSPEC("passNullableByteString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableByteString_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableByteString"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passNullableByteString_methodinfo)}
, 1, JSPROP_ENUMERATE, nullptr}
,
43328 JS_FNSPEC("passOptionalByteString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalByteString_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalByteString"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalByteString_methodinfo)}
, 0, JSPROP_ENUMERATE, nullptr}
,
43329 JS_FNSPEC("passOptionalByteStringWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalByteStringWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalByteStringWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalByteStringWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43330 JS_FNSPEC("passOptionalNullableByteString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableByteString_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableByteString"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNullableByteString_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43331 JS_FNSPEC("passOptionalNullableByteStringWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableByteStringWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableByteStringWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableByteStringWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43332 JS_FNSPEC("passVariadicByteString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passVariadicByteString_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passVariadicByteString"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passVariadicByteString_methodinfo)}
, 0, JSPROP_ENUMERATE, nullptr}
,
43333 JS_FNSPEC("passUnionByteString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionByteString_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionByteString"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionByteString_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43334 JS_FNSPEC("passOptionalUnionByteString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalUnionByteString_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalUnionByteString"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalUnionByteString_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43335 JS_FNSPEC("passOptionalUnionByteStringWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalUnionByteStringWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalUnionByteStringWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalUnionByteStringWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43336 JS_FNSPEC("passUTF8String", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUTF8String_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUTF8String"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUTF8String_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr
}
,
43337 JS_FNSPEC("passNullableUTF8String", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUTF8String_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUTF8String"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passNullableUTF8String_methodinfo)}
, 1, JSPROP_ENUMERATE, nullptr}
,
43338 JS_FNSPEC("passOptionalUTF8String", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalUTF8String_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalUTF8String"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalUTF8String_methodinfo)}
, 0, JSPROP_ENUMERATE, nullptr}
,
43339 JS_FNSPEC("passOptionalUTF8StringWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalUTF8StringWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalUTF8StringWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalUTF8StringWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43340 JS_FNSPEC("passOptionalNullableUTF8String", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableUTF8String_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableUTF8String"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNullableUTF8String_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43341 JS_FNSPEC("passOptionalNullableUTF8StringWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableUTF8StringWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableUTF8StringWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableUTF8StringWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43342 JS_FNSPEC("passVariadicUTF8String", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passVariadicUTF8String_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passVariadicUTF8String"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passVariadicUTF8String_methodinfo)}
, 0, JSPROP_ENUMERATE, nullptr}
,
43343 JS_FNSPEC("passUnionUTF8String", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionUTF8String_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionUTF8String"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionUTF8String_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43344 JS_FNSPEC("passOptionalUnionUTF8String", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalUnionUTF8String_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalUnionUTF8String"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalUnionUTF8String_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43345 JS_FNSPEC("passOptionalUnionUTF8StringWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalUnionUTF8StringWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalUnionUTF8StringWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalUnionUTF8StringWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43346 JS_FNSPEC("passSVS", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSVS_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSVS"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passSVS_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43347 JS_FNSPEC("passNullableSVS", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableSVS_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableSVS"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passNullableSVS_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43348 JS_FNSPEC("passOptionalSVS", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalSVS_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalSVS"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passOptionalSVS_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43349 JS_FNSPEC("passOptionalSVSWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalSVSWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalSVSWithDefaultValue"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalSVSWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43350 JS_FNSPEC("passOptionalNullableSVS", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSVS_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableSVS"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNullableSVS_methodinfo)
}, 0, JSPROP_ENUMERATE, nullptr}
,
43351 JS_FNSPEC("passOptionalNullableSVSWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSVSWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableSVSWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSVSWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43352 JS_FNSPEC("passVariadicSVS", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passVariadicSVS_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passVariadicSVS"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passVariadicSVS_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43353 JS_FNSPEC("receiveSVS", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveSVS_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveSVS"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&receiveSVS_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43354 JS_FNSPEC("passJSString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passJSString_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passJSString"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passJSString_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr
}
,
43355 JS_FNSPEC("passOptionalJSStringWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalJSStringWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalJSStringWithDefaultValue")
, {(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passOptionalJSStringWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43356 JS_FNSPEC("receiveJSString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveJSString_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveJSString"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&receiveJSString_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43357 JS_FNSPEC("passEnum", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passEnum_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passEnum"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passEnum_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43358 JS_FNSPEC("passNullableEnum", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableEnum_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableEnum"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passNullableEnum_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43359 JS_FNSPEC("passOptionalEnum", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalEnum_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalEnum"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passOptionalEnum_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43360 JS_FNSPEC("passEnumWithDefault", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passEnumWithDefault_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passEnumWithDefault"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passEnumWithDefault_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43361 JS_FNSPEC("passOptionalNullableEnum", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableEnum_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableEnum"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNullableEnum_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43362 JS_FNSPEC("passOptionalNullableEnumWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableEnumWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableEnumWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableEnumWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43363 JS_FNSPEC("passOptionalNullableEnumWithDefaultValue2", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableEnumWithDefaultValue2_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableEnumWithDefaultValue2"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableEnumWithDefaultValue2_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43364 JS_FNSPEC("receiveEnum", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveEnum_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveEnum"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&receiveEnum_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43365 JS_FNSPEC("receiveNullableEnum", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableEnum_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableEnum"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveNullableEnum_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43366 JS_FNSPEC("passCallback", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passCallback_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passCallback"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passCallback_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr
}
,
43367 JS_FNSPEC("passNullableCallback", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableCallback_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableCallback"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passNullableCallback_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43368 JS_FNSPEC("passOptionalCallback", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalCallback_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalCallback"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalCallback_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43369 JS_FNSPEC("passOptionalNullableCallback", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableCallback_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableCallback"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNullableCallback_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43370 JS_FNSPEC("passOptionalNullableCallbackWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableCallbackWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableCallbackWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableCallbackWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43371 JS_FNSPEC("receiveCallback", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveCallback_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveCallback"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&receiveCallback_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43372 JS_FNSPEC("receiveNullableCallback", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableCallback_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableCallback"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveNullableCallback_methodinfo)
}, 0, JSPROP_ENUMERATE, nullptr}
,
43373 JS_FNSPEC("passOptionalNullableTreatAsNullCallbackWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableTreatAsNullCallbackWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableTreatAsNullCallbackWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableTreatAsNullCallbackWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43374 JS_FNSPEC("passAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passAny_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passAny"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passAny_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43375 JS_FNSPEC("passVariadicAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passVariadicAny_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passVariadicAny"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passVariadicAny_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43376 JS_FNSPEC("passOptionalAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalAny_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalAny"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passOptionalAny_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43377 JS_FNSPEC("passAnyDefaultNull", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passAnyDefaultNull_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passAnyDefaultNull"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passAnyDefaultNull_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43378 JS_FNSPEC("passSequenceOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequenceOfAny_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequenceOfAny"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passSequenceOfAny_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43379 JS_FNSPEC("passNullableSequenceOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableSequenceOfAny_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableSequenceOfAny"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passNullableSequenceOfAny_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43380 JS_FNSPEC("passOptionalSequenceOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalSequenceOfAny_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalSequenceOfAny"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalSequenceOfAny_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43381 JS_FNSPEC("passOptionalNullableSequenceOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceOfAny_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableSequenceOfAny"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passOptionalNullableSequenceOfAny_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43382 JS_FNSPEC("passOptionalSequenceOfAnyWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalSequenceOfAnyWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalSequenceOfAnyWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalSequenceOfAnyWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43383 JS_FNSPEC("passSequenceOfSequenceOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequenceOfSequenceOfAny_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequenceOfSequenceOfAny"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passSequenceOfSequenceOfAny_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43384 JS_FNSPEC("passSequenceOfNullableSequenceOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequenceOfNullableSequenceOfAny_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequenceOfNullableSequenceOfAny"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passSequenceOfNullableSequenceOfAny_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43385 JS_FNSPEC("passNullableSequenceOfNullableSequenceOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableSequenceOfNullableSequenceOfAny_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableSequenceOfNullableSequenceOfAny"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passNullableSequenceOfNullableSequenceOfAny_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43386 JS_FNSPEC("passOptionalNullableSequenceOfNullableSequenceOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceOfNullableSequenceOfAny_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableSequenceOfNullableSequenceOfAny"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceOfNullableSequenceOfAny_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43387 JS_FNSPEC("passRecordOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passRecordOfAny_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passRecordOfAny"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passRecordOfAny_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43388 JS_FNSPEC("passNullableRecordOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableRecordOfAny_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableRecordOfAny"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passNullableRecordOfAny_methodinfo)
}, 1, JSPROP_ENUMERATE, nullptr}
,
43389 JS_FNSPEC("passOptionalRecordOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalRecordOfAny_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalRecordOfAny"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalRecordOfAny_methodinfo)
}, 0, JSPROP_ENUMERATE, nullptr}
,
43390 JS_FNSPEC("passOptionalNullableRecordOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableRecordOfAny_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableRecordOfAny"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNullableRecordOfAny_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43391 JS_FNSPEC("passOptionalRecordOfAnyWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalRecordOfAnyWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalRecordOfAnyWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalRecordOfAnyWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43392 JS_FNSPEC("passRecordOfRecordOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passRecordOfRecordOfAny_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passRecordOfRecordOfAny"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passRecordOfRecordOfAny_methodinfo)
}, 1, JSPROP_ENUMERATE, nullptr}
,
43393 JS_FNSPEC("passRecordOfNullableRecordOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passRecordOfNullableRecordOfAny_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passRecordOfNullableRecordOfAny"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passRecordOfNullableRecordOfAny_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43394 JS_FNSPEC("passNullableRecordOfNullableRecordOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableRecordOfNullableRecordOfAny_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableRecordOfNullableRecordOfAny"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passNullableRecordOfNullableRecordOfAny_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43395 JS_FNSPEC("passOptionalNullableRecordOfNullableRecordOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableRecordOfNullableRecordOfAny_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableRecordOfNullableRecordOfAny"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableRecordOfNullableRecordOfAny_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43396 JS_FNSPEC("passOptionalNullableRecordOfNullableSequenceOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableRecordOfNullableSequenceOfAny_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableRecordOfNullableSequenceOfAny"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableRecordOfNullableSequenceOfAny_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43397 JS_FNSPEC("passOptionalNullableSequenceOfNullableRecordOfAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceOfNullableRecordOfAny_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableSequenceOfNullableRecordOfAny"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceOfNullableRecordOfAny_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43398 JS_FNSPEC("receiveAny", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveAny_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveAny"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&receiveAny_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43399 JS_FNSPEC("passObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passObject_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passObject"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passObject_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43400 JS_FNSPEC("passVariadicObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passVariadicObject_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passVariadicObject"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passVariadicObject_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43401 JS_FNSPEC("passNullableObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableObject_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableObject"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passNullableObject_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43402 JS_FNSPEC("passVariadicNullableObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passVariadicNullableObject_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passVariadicNullableObject"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passVariadicNullableObject_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43403 JS_FNSPEC("passOptionalObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalObject_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalObject"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passOptionalObject_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43404 JS_FNSPEC("passOptionalNullableObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableObject_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableObject"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNullableObject_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43405 JS_FNSPEC("passOptionalNullableObjectWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableObjectWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableObjectWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableObjectWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43406 JS_FNSPEC("passSequenceOfObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequenceOfObject_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequenceOfObject"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passSequenceOfObject_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43407 JS_FNSPEC("passSequenceOfNullableObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequenceOfNullableObject_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequenceOfNullableObject"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passSequenceOfNullableObject_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43408 JS_FNSPEC("passNullableSequenceOfObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableSequenceOfObject_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableSequenceOfObject"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passNullableSequenceOfObject_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43409 JS_FNSPEC("passOptionalNullableSequenceOfNullableSequenceOfObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceOfNullableSequenceOfObject_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableSequenceOfNullableSequenceOfObject"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceOfNullableSequenceOfObject_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43410 JS_FNSPEC("passOptionalNullableSequenceOfNullableSequenceOfNullableObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceOfNullableSequenceOfNullableObject_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableSequenceOfNullableSequenceOfNullableObject"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableSequenceOfNullableSequenceOfNullableObject_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43411 JS_FNSPEC("passRecordOfObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passRecordOfObject_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passRecordOfObject"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passRecordOfObject_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43412 JS_FNSPEC("receiveObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveObject_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveObject"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&receiveObject_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr
}
,
43413 JS_FNSPEC("receiveNullableObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableObject_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableObject"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveNullableObject_methodinfo)},
0, JSPROP_ENUMERATE, nullptr}
,
43414 JS_FNSPEC("passUnion", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43415 JS_FNSPEC("passUnion2", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion2_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion2"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion2_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43416 JS_FNSPEC("passUnion3", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion3_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion3"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion3_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43417 JS_FNSPEC("passUnion4", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion4_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion4"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion4_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43418 JS_FNSPEC("passUnion5", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion5_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion5"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion5_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43419 JS_FNSPEC("passUnion6", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion6_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion6"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion6_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43420 JS_FNSPEC("passUnion7", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion7_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion7"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion7_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43421 JS_FNSPEC("passUnion8", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion8_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion8"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion8_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43422 JS_FNSPEC("passUnion9", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion9_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion9"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion9_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43423 JS_FNSPEC("passUnion10", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion10_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion10"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion10_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43424 JS_FNSPEC("passUnion11", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion11_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion11"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion11_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43425 JS_FNSPEC("passUnion12", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion12_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion12"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion12_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43426 JS_FNSPEC("passUnion13", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion13_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion13"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion13_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43427 JS_FNSPEC("passUnion14", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion14_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion14"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion14_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43428 JS_FNSPEC("passUnion15", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion15_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion15"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion15_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43429 JS_FNSPEC("passUnion16", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion16_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion16"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion16_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43430 JS_FNSPEC("passUnion17", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion17_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion17"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion17_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43431 JS_FNSPEC("passUnion18", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion18_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion18"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion18_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43432 JS_FNSPEC("passUnion19", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion19_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion19"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion19_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43433 JS_FNSPEC("passUnion20", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion20_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion20"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion20_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43434 JS_FNSPEC("passUnion21", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion21_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion21"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion21_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43435 JS_FNSPEC("passUnion22", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion22_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion22"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion22_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43436 JS_FNSPEC("passUnion23", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion23_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion23"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion23_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43437 JS_FNSPEC("passUnion24", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion24_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion24"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion24_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43438 JS_FNSPEC("passUnion25", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion25_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion25"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion25_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43439 JS_FNSPEC("passUnion26", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion26_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion26"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion26_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43440 JS_FNSPEC("passUnion27", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion27_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion27"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion27_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43441 JS_FNSPEC("passUnion28", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnion28_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnion28"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passUnion28_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43442 JS_FNSPEC("passUnionWithCallback", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithCallback_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithCallback"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithCallback_methodinfo)},
1, JSPROP_ENUMERATE, nullptr}
,
43443 JS_FNSPEC("passUnionWithByteString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithByteString_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithByteString"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithByteString_methodinfo)
}, 1, JSPROP_ENUMERATE, nullptr}
,
43444 JS_FNSPEC("passUnionWithUTF8String", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithUTF8String_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithUTF8String"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithUTF8String_methodinfo)
}, 1, JSPROP_ENUMERATE, nullptr}
,
43445 JS_FNSPEC("passUnionWithRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithRecord_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithRecord"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithRecord_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43446 JS_FNSPEC("passUnionWithRecordAndSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithRecordAndSequence_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithRecordAndSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithRecordAndSequence_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43447 JS_FNSPEC("passUnionWithSequenceAndRecord", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithSequenceAndRecord_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithSequenceAndRecord"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithSequenceAndRecord_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43448 JS_FNSPEC("passUnionWithSVS", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithSVS_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithSVS"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passUnionWithSVS_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43449 JS_FNSPEC("passUnionWithNullable", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithNullable_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithNullable"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithNullable_methodinfo)},
1, JSPROP_ENUMERATE, nullptr}
,
43450 JS_FNSPEC("passNullableUnion", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnion_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnion"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passNullableUnion_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43451 JS_FNSPEC("passOptionalUnion", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalUnion_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalUnion"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passOptionalUnion_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43452 JS_FNSPEC("passOptionalNullableUnion", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableUnion_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableUnion"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalNullableUnion_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43453 JS_FNSPEC("passOptionalNullableUnionWithDefaultValue", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalNullableUnionWithDefaultValue_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalNullableUnionWithDefaultValue"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passOptionalNullableUnionWithDefaultValue_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43454 JS_FNSPEC("passUnionWithArrayBuffer", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithArrayBuffer_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithArrayBuffer"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithArrayBuffer_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43455 JS_FNSPEC("passUnionWithArrayBufferOrNull", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithArrayBufferOrNull_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithArrayBufferOrNull"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithArrayBufferOrNull_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43456 JS_FNSPEC("passUnionWithTypedArrays", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithTypedArrays_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithTypedArrays"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithTypedArrays_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43457 JS_FNSPEC("passUnionWithTypedArraysOrNull", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithTypedArraysOrNull_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithTypedArraysOrNull"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithTypedArraysOrNull_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43458 JS_FNSPEC("passUnionWithString", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithString_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithString"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithString_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43459 JS_FNSPEC("passUnionWithEnum", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithEnum_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithEnum"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passUnionWithEnum_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43460 JS_FNSPEC("passUnionWithObject", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithObject_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithObject"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithObject_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43461 JS_FNSPEC("passUnionWithDefaultValue1", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue1_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue1"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue1_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43462 JS_FNSPEC("passUnionWithDefaultValue2", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue2_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue2"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue2_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43463 JS_FNSPEC("passUnionWithDefaultValue3", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue3_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue3"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue3_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43464 JS_FNSPEC("passUnionWithDefaultValue4", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue4_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue4"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue4_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43465 JS_FNSPEC("passUnionWithDefaultValue5", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue5_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue5"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue5_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43466 JS_FNSPEC("passUnionWithDefaultValue6", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue6_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue6"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue6_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43467 JS_FNSPEC("passUnionWithDefaultValue7", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue7_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue7"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue7_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43468 JS_FNSPEC("passUnionWithDefaultValue8", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue8_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue8"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue8_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43469 JS_FNSPEC("passUnionWithDefaultValue9", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue9_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue9"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue9_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43470 JS_FNSPEC("passUnionWithDefaultValue10", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue10_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue10"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue10_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43471 JS_FNSPEC("passUnionWithDefaultValue11", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue11_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue11"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue11_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43472 JS_FNSPEC("passUnionWithDefaultValue12", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue12_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue12"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue12_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43473 JS_FNSPEC("passUnionWithDefaultValue13", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue13_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue13"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue13_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43474 JS_FNSPEC("passUnionWithDefaultValue14", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue14_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue14"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue14_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43475 JS_FNSPEC("passUnionWithDefaultValue15", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue15_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue15"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue15_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43476 JS_FNSPEC("passUnionWithDefaultValue16", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue16_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue16"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue16_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43477 JS_FNSPEC("passUnionWithDefaultValue17", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue17_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue17"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue17_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43478 JS_FNSPEC("passUnionWithDefaultValue18", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue18_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue18"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue18_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43479 JS_FNSPEC("passUnionWithDefaultValue19", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue19_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue19"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue19_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43480 JS_FNSPEC("passUnionWithDefaultValue20", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue20_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue20"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue20_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43481 JS_FNSPEC("passUnionWithDefaultValue21", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue21_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue21"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue21_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43482 JS_FNSPEC("passUnionWithDefaultValue22", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue22_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue22"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue22_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43483 JS_FNSPEC("passUnionWithDefaultValue23", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue23_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue23"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue23_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43484 JS_FNSPEC("passUnionWithDefaultValue24", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue24_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue24"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue24_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43485 JS_FNSPEC("passUnionWithDefaultValue25", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionWithDefaultValue25_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionWithDefaultValue25"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionWithDefaultValue25_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43486 JS_FNSPEC("passNullableUnionWithDefaultValue1", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue1_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue1"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue1_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43487 JS_FNSPEC("passNullableUnionWithDefaultValue2", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue2_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue2"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue2_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43488 JS_FNSPEC("passNullableUnionWithDefaultValue3", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue3_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue3"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue3_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43489 JS_FNSPEC("passNullableUnionWithDefaultValue4", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue4_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue4"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue4_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43490 JS_FNSPEC("passNullableUnionWithDefaultValue5", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue5_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue5"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue5_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43491 JS_FNSPEC("passNullableUnionWithDefaultValue6", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue6_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue6"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue6_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43492 JS_FNSPEC("passNullableUnionWithDefaultValue7", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue7_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue7"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue7_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43493 JS_FNSPEC("passNullableUnionWithDefaultValue8", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue8_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue8"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue8_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43494 JS_FNSPEC("passNullableUnionWithDefaultValue9", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue9_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue9"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue9_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43495 JS_FNSPEC("passNullableUnionWithDefaultValue10", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue10_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue10"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue10_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43496 JS_FNSPEC("passNullableUnionWithDefaultValue11", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue11_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue11"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue11_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43497 JS_FNSPEC("passNullableUnionWithDefaultValue12", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue12_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue12"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue12_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43498 JS_FNSPEC("passNullableUnionWithDefaultValue13", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue13_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue13"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue13_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43499 JS_FNSPEC("passNullableUnionWithDefaultValue14", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue14_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue14"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue14_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43500 JS_FNSPEC("passNullableUnionWithDefaultValue15", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue15_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue15"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue15_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43501 JS_FNSPEC("passNullableUnionWithDefaultValue16", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue16_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue16"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue16_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43502 JS_FNSPEC("passNullableUnionWithDefaultValue17", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue17_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue17"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue17_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43503 JS_FNSPEC("passNullableUnionWithDefaultValue18", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue18_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue18"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue18_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43504 JS_FNSPEC("passNullableUnionWithDefaultValue19", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue19_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue19"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue19_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43505 JS_FNSPEC("passNullableUnionWithDefaultValue20", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue20_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue20"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue20_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43506 JS_FNSPEC("passNullableUnionWithDefaultValue21", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue21_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue21"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue21_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43507 JS_FNSPEC("passNullableUnionWithDefaultValue22", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue22_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue22"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue22_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43508 JS_FNSPEC("passNullableUnionWithDefaultValue23", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue23_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue23"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue23_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43509 JS_FNSPEC("passNullableUnionWithDefaultValue24", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue24_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue24"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue24_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43510 JS_FNSPEC("passNullableUnionWithDefaultValue25", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue25_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue25"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue25_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43511 JS_FNSPEC("passNullableUnionWithDefaultValue26", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue26_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue26"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue26_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43512 JS_FNSPEC("passNullableUnionWithDefaultValue27", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue27_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue27"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue27_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43513 JS_FNSPEC("passNullableUnionWithDefaultValue28", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passNullableUnionWithDefaultValue28_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passNullableUnionWithDefaultValue28"),
{(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passNullableUnionWithDefaultValue28_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43514 JS_FNSPEC("passSequenceOfUnions", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequenceOfUnions_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequenceOfUnions"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passSequenceOfUnions_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43515 JS_FNSPEC("passSequenceOfUnions2", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequenceOfUnions2_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequenceOfUnions2"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passSequenceOfUnions2_methodinfo)},
1, JSPROP_ENUMERATE, nullptr}
,
43516 JS_FNSPEC("passVariadicUnion", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passVariadicUnion_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passVariadicUnion"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passVariadicUnion_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43517 JS_FNSPEC("passSequenceOfNullableUnions", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequenceOfNullableUnions_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequenceOfNullableUnions"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passSequenceOfNullableUnions_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43518 JS_FNSPEC("passVariadicNullableUnion", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passVariadicNullableUnion_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passVariadicNullableUnion"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passVariadicNullableUnion_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43519 JS_FNSPEC("passRecordOfUnions", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passRecordOfUnions_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passRecordOfUnions"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passRecordOfUnions_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43520 JS_FNSPEC("receiveUnion", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveUnion_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveUnion"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&receiveUnion_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr
}
,
43521 JS_FNSPEC("receiveUnion2", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveUnion2_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveUnion2"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&receiveUnion2_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr
}
,
43522 JS_FNSPEC("receiveUnionContainingNull", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveUnionContainingNull_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveUnionContainingNull"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveUnionContainingNull_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43523 JS_FNSPEC("receiveNullableUnion", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableUnion_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableUnion"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveNullableUnion_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43524 JS_FNSPEC("receiveNullableUnion2", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableUnion2_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableUnion2"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveNullableUnion2_methodinfo)},
0, JSPROP_ENUMERATE, nullptr}
,
43525 JS_FNSPEC("passPromise", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passPromise_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passPromise"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passPromise_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43526 JS_FNSPEC("passOptionalPromise", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOptionalPromise_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOptionalPromise"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOptionalPromise_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43527 JS_FNSPEC("passPromiseSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passPromiseSequence_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passPromiseSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passPromiseSequence_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43528 JS_FNSPEC("receivePromise", (GenericMethod<NormalThisPolicy, ConvertExceptionsToPromises>), reinterpret_cast<const JSJitInfo*>(&receivePromise_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receivePromise"), {(GenericMethod<NormalThisPolicy
, ConvertExceptionsToPromises>), reinterpret_cast<const
JSJitInfo*>(&receivePromise_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43529 JS_FNSPEC("receiveAddrefedPromise", (GenericMethod<NormalThisPolicy, ConvertExceptionsToPromises>), reinterpret_cast<const JSJitInfo*>(&receiveAddrefedPromise_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveAddrefedPromise"), {(GenericMethod
<NormalThisPolicy, ConvertExceptionsToPromises>), reinterpret_cast
<const JSJitInfo*>(&receiveAddrefedPromise_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43530 JS_FNSPEC("methodRenamedFrom", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&methodRenamedFrom_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("methodRenamedFrom"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&methodRenamedFrom_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43531 JS_FNSPEC("passDictionary", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passDictionary_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passDictionary"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&passDictionary_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr
}
,
43532 JS_FNSPEC("passDictionary2", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passDictionary2_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passDictionary2"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&passDictionary2_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43533 JS_FNSPEC("receiveDictionary", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveDictionary_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveDictionary"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&receiveDictionary_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43534 JS_FNSPEC("receiveNullableDictionary", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveNullableDictionary_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveNullableDictionary"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveNullableDictionary_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43535 JS_FNSPEC("passOtherDictionary", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passOtherDictionary_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passOtherDictionary"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passOtherDictionary_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43536 JS_FNSPEC("passSequenceOfDictionaries", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passSequenceOfDictionaries_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passSequenceOfDictionaries"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passSequenceOfDictionaries_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43537 JS_FNSPEC("passRecordOfDictionaries", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passRecordOfDictionaries_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passRecordOfDictionaries"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passRecordOfDictionaries_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43538 JS_FNSPEC("passDictionaryOrLong", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passDictionaryOrLong_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passDictionaryOrLong"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passDictionaryOrLong_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43539 JS_FNSPEC("passDictContainingDict", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passDictContainingDict_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passDictContainingDict"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passDictContainingDict_methodinfo)}
, 0, JSPROP_ENUMERATE, nullptr}
,
43540 JS_FNSPEC("passDictContainingSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passDictContainingSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passDictContainingSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passDictContainingSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43541 JS_FNSPEC("receiveDictContainingSequence", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&receiveDictContainingSequence_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("receiveDictContainingSequence"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&receiveDictContainingSequence_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43542 JS_FNSPEC("passVariadicDictionary", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passVariadicDictionary_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passVariadicDictionary"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passVariadicDictionary_methodinfo)}
, 0, JSPROP_ENUMERATE, nullptr}
,
43543 JS_FNSPEC("dontEnforceRangeOrClamp", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&dontEnforceRangeOrClamp_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("dontEnforceRangeOrClamp"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&dontEnforceRangeOrClamp_methodinfo)
}, 1, JSPROP_ENUMERATE, nullptr}
,
43544 JS_FNSPEC("doEnforceRange", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&doEnforceRange_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("doEnforceRange"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&doEnforceRange_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr
}
,
43545 JS_FNSPEC("doEnforceRangeNullable", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&doEnforceRangeNullable_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("doEnforceRangeNullable"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&doEnforceRangeNullable_methodinfo)}
, 1, JSPROP_ENUMERATE, nullptr}
,
43546 JS_FNSPEC("doClamp", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&doClamp_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("doClamp"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&doClamp_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43547 JS_FNSPEC("doClampNullable", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&doClampNullable_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("doClampNullable"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&doClampNullable_methodinfo)}, 1, JSPROP_ENUMERATE
, nullptr}
,
43548 JS_FNSPEC("exerciseTypedefInterfaces1", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&exerciseTypedefInterfaces1_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("exerciseTypedefInterfaces1"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&exerciseTypedefInterfaces1_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43549 JS_FNSPEC("exerciseTypedefInterfaces2", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&exerciseTypedefInterfaces2_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("exerciseTypedefInterfaces2"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&exerciseTypedefInterfaces2_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43550 JS_FNSPEC("exerciseTypedefInterfaces3", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&exerciseTypedefInterfaces3_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("exerciseTypedefInterfaces3"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&exerciseTypedefInterfaces3_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43551 JS_FNSPEC("deprecatedMethod", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&deprecatedMethod_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("deprecatedMethod"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&deprecatedMethod_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43552 JS_FNSPEC("deprecatedMethodWithContext", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&deprecatedMethodWithContext_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("deprecatedMethodWithContext"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&deprecatedMethodWithContext_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43553 JS_FNSPEC("overload1", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload1_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload1"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload1_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43554 JS_FNSPEC("overload2", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload2_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload2"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload2_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43555 JS_FNSPEC("overload3", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload3_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload3"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload3_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43556 JS_FNSPEC("overload4", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload4_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload4"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload4_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43557 JS_FNSPEC("overload5", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload5_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload5"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload5_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43558 JS_FNSPEC("overload6", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload6_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload6"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload6_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43559 JS_FNSPEC("overload7", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload7_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload7"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload7_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43560 JS_FNSPEC("overload8", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload8_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload8"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload8_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43561 JS_FNSPEC("overload9", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload9_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload9"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload9_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43562 JS_FNSPEC("overload10", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload10_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload10"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload10_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43563 JS_FNSPEC("overload11", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload11_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload11"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload11_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43564 JS_FNSPEC("overload12", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload12_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload12"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload12_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43565 JS_FNSPEC("overload13", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload13_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload13"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload13_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43566 JS_FNSPEC("overload14", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload14_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload14"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload14_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43567 JS_FNSPEC("overload15", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload15_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload15"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload15_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43568 JS_FNSPEC("overload16", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload16_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload16"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload16_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43569 JS_FNSPEC("overload17", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload17_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload17"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload17_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43570 JS_FNSPEC("overload18", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload18_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload18"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload18_methodinfo)}, 1, JSPROP_ENUMERATE, nullptr}
,
43571 JS_FNSPEC("overload19", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload19_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload19"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload19_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43572 JS_FNSPEC("overload20", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&overload20_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("overload20"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&overload20_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43573 JS_FNSPEC("passVariadicThirdArg", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passVariadicThirdArg_methodinfo), 2, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passVariadicThirdArg"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passVariadicThirdArg_methodinfo)}, 2
, JSPROP_ENUMERATE, nullptr}
,
43574 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
43575 JS_FNSPEC("prefable10", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&prefable10_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("prefable10"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&prefable10_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43576 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
43577 JS_FNSPEC("prefable11", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&prefable11_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("prefable11"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&prefable11_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43578 JS_FNSPEC("prefable13", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&prefable13_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("prefable13"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&prefable13_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43579 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
43580 JS_FNSPEC("prefable17", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&prefable17_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("prefable17"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&prefable17_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43581 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
43582 JS_FNSPEC("prefable18", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&prefable18_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("prefable18"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&prefable18_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43583 JS_FNSPEC("prefable19", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&prefable19_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("prefable19"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&prefable19_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43584 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
43585 JS_FNSPEC("conditionalOnSecureContext5", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&conditionalOnSecureContext5_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("conditionalOnSecureContext5"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&conditionalOnSecureContext5_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43586 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
43587 JS_FNSPEC("conditionalOnSecureContext6", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&conditionalOnSecureContext6_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("conditionalOnSecureContext6"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&conditionalOnSecureContext6_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43588 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
43589 JS_FNSPEC("conditionalOnSecureContext7", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&conditionalOnSecureContext7_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("conditionalOnSecureContext7"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&conditionalOnSecureContext7_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43590 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
43591 JS_FNSPEC("conditionalOnSecureContext8", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&conditionalOnSecureContext8_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("conditionalOnSecureContext8"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&conditionalOnSecureContext8_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43592 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
,
43593 JS_FNSPEC("passRenamedInterface", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passRenamedInterface_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passRenamedInterface"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passRenamedInterface_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43594 JS_FNSPEC("throwingMethod", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&throwingMethod_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("throwingMethod"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&throwingMethod_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr
}
,
43595 JS_FNSPEC("canOOMMethod", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&canOOMMethod_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("canOOMMethod"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&canOOMMethod_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr
}
,
43596 JS_FNSPEC("ceReactionsMethod", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&ceReactionsMethod_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("ceReactionsMethod"), {(GenericMethod<
NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const
JSJitInfo*>(&ceReactionsMethod_methodinfo)}, 0, JSPROP_ENUMERATE
, nullptr}
,
43597 JS_FNSPEC("ceReactionsMethodOverload", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&ceReactionsMethodOverload_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("ceReactionsMethodOverload"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&ceReactionsMethodOverload_methodinfo
)}, 0, JSPROP_ENUMERATE, nullptr}
,
43598 JS_FNSPEC("passArgsWithDefaults", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passArgsWithDefaults_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passArgsWithDefaults"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passArgsWithDefaults_methodinfo)}, 0
, JSPROP_ENUMERATE, nullptr}
,
43599 JS_FNSPEC("toJSON", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&toJSON_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("toJSON"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&toJSON_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43600 JS_FNSPEC("dashed-method", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&dashed_method_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("dashed-method"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&dashed_method_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr
}
,
43601 JS_FNSPEC("nonEnumerableMethod", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&nonEnumerableMethod_methodinfo), 0, 0, nullptr){JSFunctionSpec::Name("nonEnumerableMethod"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&nonEnumerableMethod_methodinfo)}, 0
, 0, nullptr}
,
43602 JS_FNSPEC("passAllowSharedArrayBufferViewTypedef", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passAllowSharedArrayBufferViewTypedef_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passAllowSharedArrayBufferViewTypedef"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passAllowSharedArrayBufferViewTypedef_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43603 JS_FNSPEC("passAllowSharedArrayBufferView", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passAllowSharedArrayBufferView_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passAllowSharedArrayBufferView"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passAllowSharedArrayBufferView_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43604 JS_FNSPEC("passAllowSharedNullableArrayBufferView", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passAllowSharedNullableArrayBufferView_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passAllowSharedNullableArrayBufferView"
), {(GenericMethod<NormalThisPolicy, ThrowExceptions>),
reinterpret_cast<const JSJitInfo*>(&passAllowSharedNullableArrayBufferView_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43605 JS_FNSPEC("passAllowSharedArrayBuffer", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passAllowSharedArrayBuffer_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passAllowSharedArrayBuffer"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passAllowSharedArrayBuffer_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43606 JS_FNSPEC("passAllowSharedNullableArrayBuffer", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passAllowSharedNullableArrayBuffer_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passAllowSharedNullableArrayBuffer"), {
(GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast
<const JSJitInfo*>(&passAllowSharedNullableArrayBuffer_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43607 JS_FNSPEC("passUnionArrayBuffer", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionArrayBuffer_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionArrayBuffer"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionArrayBuffer_methodinfo)}, 1
, JSPROP_ENUMERATE, nullptr}
,
43608 JS_FNSPEC("passUnionAllowSharedArrayBuffer", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&passUnionAllowSharedArrayBuffer_methodinfo), 1, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("passUnionAllowSharedArrayBuffer"), {(GenericMethod
<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<
const JSJitInfo*>(&passUnionAllowSharedArrayBuffer_methodinfo
)}, 1, JSPROP_ENUMERATE, nullptr}
,
43609 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
43610};
43611
43612static const PrefableDisablers sMethods_disablers418 = {
43613 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), nullptr
43614};
43615
43616static const PrefableDisablers sMethods_disablers420 = {
43617 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), &nsGenericHTMLElement::LegacyTouchAPIEnabled
43618};
43619
43620static const PrefableDisablers sMethods_disablers423 = {
43621 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), &TestFuncControlledMember
43622};
43623
43624static const PrefableDisablers sMethods_disablers425 = {
43625 WebIDLPrefIndex::NoPref, 0, false, OriginTrial(0), &TestFuncControlledMember
43626};
43627
43628static const PrefableDisablers sMethods_disablers428 = {
43629 WebIDLPrefIndex::NoPref, 0, true, OriginTrial(0), nullptr
43630};
43631
43632static const PrefableDisablers sMethods_disablers430 = {
43633 WebIDLPrefIndex::dom_webidl_test1, 0, true, OriginTrial(0), nullptr
43634};
43635
43636static const PrefableDisablers sMethods_disablers432 = {
43637 WebIDLPrefIndex::dom_webidl_test1, 0, true, OriginTrial(0), &nsGenericHTMLElement::LegacyTouchAPIEnabled
43638};
43639
43640static const PrefableDisablers sMethods_disablers434 = {
43641 WebIDLPrefIndex::dom_webidl_test1, 0, true, OriginTrial(0), &TestFuncControlledMember
43642};
43643
43644static const Prefable<const JSFunctionSpec> sMethods[] = {
43645 { nullptr, &sMethods_specs[0] },
43646 { &sMethods_disablers418, &sMethods_specs[418] },
43647 { &sMethods_disablers420, &sMethods_specs[420] },
43648 { &sMethods_disablers423, &sMethods_specs[423] },
43649 { &sMethods_disablers425, &sMethods_specs[425] },
43650 { &sMethods_disablers428, &sMethods_specs[428] },
43651 { &sMethods_disablers430, &sMethods_specs[430] },
43652 { &sMethods_disablers432, &sMethods_specs[432] },
43653 { &sMethods_disablers434, &sMethods_specs[434] },
43654 { nullptr, &sMethods_specs[436] },
43655 { nullptr, nullptr }
43656};
43657
43658static_assert(10 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
43659 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
43660static_assert(417 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
43661 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
43662
43663static const JSFunctionSpec sChromeMethods_specs[] = {
43664 JS_FNSPEC("prefable20", (GenericMethod<NormalThisPolicy, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>(&prefable20_methodinfo), 0, JSPROP_ENUMERATE, nullptr){JSFunctionSpec::Name("prefable20"), {(GenericMethod<NormalThisPolicy
, ThrowExceptions>), reinterpret_cast<const JSJitInfo*>
(&prefable20_methodinfo)}, 0, JSPROP_ENUMERATE, nullptr}
,
43665 JS_FS_END{JSFunctionSpec::Name(nullptr), {nullptr, nullptr}, 0, 0, nullptr
}
43666};
43667
43668static const PrefableDisablers sChromeMethods_disablers0 = {
43669 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), &TestFuncControlledMember
43670};
43671
43672static const Prefable<const JSFunctionSpec> sChromeMethods[] = {
43673 { &sChromeMethods_disablers0, &sChromeMethods_specs[0] },
43674 { nullptr, nullptr }
43675};
43676
43677static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
43678 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
43679static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
43680 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
43681
43682static const JSPropertySpec sAttributes_specs[] = {
43683 JSPropertySpec::nativeAccessors("readonlyByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyByte_getterinfo, nullptr, nullptr),
43684 JSPropertySpec::nativeAccessors("writableByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableByte_getterinfo, GenericSetter<NormalThisPolicy>, &writableByte_setterinfo),
43685 JSPropertySpec::nativeAccessors("sideEffectFreeByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &sideEffectFreeByte_getterinfo, GenericSetter<NormalThisPolicy>, &sideEffectFreeByte_setterinfo),
43686 JSPropertySpec::nativeAccessors("domDependentByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &domDependentByte_getterinfo, GenericSetter<NormalThisPolicy>, &domDependentByte_setterinfo),
43687 JSPropertySpec::nativeAccessors("constantByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &constantByte_getterinfo, nullptr, nullptr),
43688 JSPropertySpec::nativeAccessors("deviceStateDependentByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &deviceStateDependentByte_getterinfo, nullptr, nullptr),
43689 JSPropertySpec::nativeAccessors("readonlyShort", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyShort_getterinfo, nullptr, nullptr),
43690 JSPropertySpec::nativeAccessors("writableShort", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableShort_getterinfo, GenericSetter<NormalThisPolicy>, &writableShort_setterinfo),
43691 JSPropertySpec::nativeAccessors("readonlyLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyLong_getterinfo, nullptr, nullptr),
43692 JSPropertySpec::nativeAccessors("writableLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableLong_getterinfo, GenericSetter<NormalThisPolicy>, &writableLong_setterinfo),
43693 JSPropertySpec::nativeAccessors("readonlyLongLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyLongLong_getterinfo, nullptr, nullptr),
43694 JSPropertySpec::nativeAccessors("writableLongLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableLongLong_getterinfo, GenericSetter<NormalThisPolicy>, &writableLongLong_setterinfo),
43695 JSPropertySpec::nativeAccessors("readonlyOctet", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyOctet_getterinfo, nullptr, nullptr),
43696 JSPropertySpec::nativeAccessors("writableOctet", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableOctet_getterinfo, GenericSetter<NormalThisPolicy>, &writableOctet_setterinfo),
43697 JSPropertySpec::nativeAccessors("readonlyUnsignedShort", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyUnsignedShort_getterinfo, nullptr, nullptr),
43698 JSPropertySpec::nativeAccessors("writableUnsignedShort", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnsignedShort_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnsignedShort_setterinfo),
43699 JSPropertySpec::nativeAccessors("readonlyUnsignedLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyUnsignedLong_getterinfo, nullptr, nullptr),
43700 JSPropertySpec::nativeAccessors("writableUnsignedLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnsignedLong_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnsignedLong_setterinfo),
43701 JSPropertySpec::nativeAccessors("readonlyUnsignedLongLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyUnsignedLongLong_getterinfo, nullptr, nullptr),
43702 JSPropertySpec::nativeAccessors("writableUnsignedLongLong", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnsignedLongLong_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnsignedLongLong_setterinfo),
43703 JSPropertySpec::nativeAccessors("writableFloat", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableFloat_getterinfo, GenericSetter<NormalThisPolicy>, &writableFloat_setterinfo),
43704 JSPropertySpec::nativeAccessors("writableUnrestrictedFloat", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnrestrictedFloat_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnrestrictedFloat_setterinfo),
43705 JSPropertySpec::nativeAccessors("writableNullableFloat", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableNullableFloat_getterinfo, GenericSetter<NormalThisPolicy>, &writableNullableFloat_setterinfo),
43706 JSPropertySpec::nativeAccessors("writableNullableUnrestrictedFloat", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableNullableUnrestrictedFloat_getterinfo, GenericSetter<NormalThisPolicy>, &writableNullableUnrestrictedFloat_setterinfo),
43707 JSPropertySpec::nativeAccessors("writableDouble", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableDouble_getterinfo, GenericSetter<NormalThisPolicy>, &writableDouble_setterinfo),
43708 JSPropertySpec::nativeAccessors("writableUnrestrictedDouble", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnrestrictedDouble_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnrestrictedDouble_setterinfo),
43709 JSPropertySpec::nativeAccessors("writableNullableDouble", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableNullableDouble_getterinfo, GenericSetter<NormalThisPolicy>, &writableNullableDouble_setterinfo),
43710 JSPropertySpec::nativeAccessors("writableNullableUnrestrictedDouble", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableNullableUnrestrictedDouble_getterinfo, GenericSetter<NormalThisPolicy>, &writableNullableUnrestrictedDouble_setterinfo),
43711 JSPropertySpec::nativeAccessors("lenientFloatAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &lenientFloatAttr_getterinfo, GenericSetter<NormalThisPolicy>, &lenientFloatAttr_setterinfo),
43712 JSPropertySpec::nativeAccessors("lenientDoubleAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &lenientDoubleAttr_getterinfo, GenericSetter<NormalThisPolicy>, &lenientDoubleAttr_setterinfo),
43713 JSPropertySpec::nativeAccessors("nonNullSelf", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nonNullSelf_getterinfo, GenericSetter<NormalThisPolicy>, &nonNullSelf_setterinfo),
43714 JSPropertySpec::nativeAccessors("nullableSelf", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nullableSelf_getterinfo, GenericSetter<NormalThisPolicy>, &nullableSelf_setterinfo),
43715 JSPropertySpec::nativeAccessors("nonNullExternal", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nonNullExternal_getterinfo, GenericSetter<NormalThisPolicy>, &nonNullExternal_setterinfo),
43716 JSPropertySpec::nativeAccessors("nullableExternal", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nullableExternal_getterinfo, GenericSetter<NormalThisPolicy>, &nullableExternal_setterinfo),
43717 JSPropertySpec::nativeAccessors("nonNullCallbackInterface", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nonNullCallbackInterface_getterinfo, GenericSetter<NormalThisPolicy>, &nonNullCallbackInterface_setterinfo),
43718 JSPropertySpec::nativeAccessors("nullableCallbackInterface", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nullableCallbackInterface_getterinfo, GenericSetter<NormalThisPolicy>, &nullableCallbackInterface_setterinfo),
43719 JSPropertySpec::nativeAccessors("uint8ArrayAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &uint8ArrayAttr_getterinfo, GenericSetter<NormalThisPolicy>, &uint8ArrayAttr_setterinfo),
43720 JSPropertySpec::nativeAccessors("readonlyJSStringAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyJSStringAttr_getterinfo, nullptr, nullptr),
43721 JSPropertySpec::nativeAccessors("jsStringAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &jsStringAttr_getterinfo, GenericSetter<NormalThisPolicy>, &jsStringAttr_setterinfo),
43722 JSPropertySpec::nativeAccessors("enumAttribute", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &enumAttribute_getterinfo, GenericSetter<NormalThisPolicy>, &enumAttribute_setterinfo),
43723 JSPropertySpec::nativeAccessors("readonlyEnumAttribute", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &readonlyEnumAttribute_getterinfo, nullptr, nullptr),
43724 JSPropertySpec::nativeAccessors("writableUnion", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnion_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnion_setterinfo),
43725 JSPropertySpec::nativeAccessors("writableUnionContainingNull", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableUnionContainingNull_getterinfo, GenericSetter<NormalThisPolicy>, &writableUnionContainingNull_setterinfo),
43726 JSPropertySpec::nativeAccessors("writableNullableUnion", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &writableNullableUnion_getterinfo, GenericSetter<NormalThisPolicy>, &writableNullableUnion_setterinfo),
43727 JSPropertySpec::nativeAccessors("attributeGetterRenamedFrom", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &attributeGetterRenamedFrom_getterinfo, nullptr, nullptr),
43728 JSPropertySpec::nativeAccessors("attributeRenamedFrom", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &attributeRenamedFrom_getterinfo, GenericSetter<NormalThisPolicy>, &attributeRenamedFrom_setterinfo),
43729 JSPropertySpec::nativeAccessors("enforcedByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &enforcedByte_getterinfo, GenericSetter<NormalThisPolicy>, &enforcedByte_setterinfo),
43730 JSPropertySpec::nativeAccessors("enforcedByteNullable", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &enforcedByteNullable_getterinfo, GenericSetter<NormalThisPolicy>, &enforcedByteNullable_setterinfo),
43731 JSPropertySpec::nativeAccessors("clampedByte", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &clampedByte_getterinfo, GenericSetter<NormalThisPolicy>, &clampedByte_setterinfo),
43732 JSPropertySpec::nativeAccessors("clampedByteNullable", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &clampedByteNullable_getterinfo, GenericSetter<NormalThisPolicy>, &clampedByteNullable_setterinfo),
43733 JSPropertySpec::nativeAccessors("deprecatedAttribute", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &deprecatedAttribute_getterinfo, GenericSetter<NormalThisPolicy>, &deprecatedAttribute_setterinfo),
43734 JS_PS_ENDJSPropertySpec::sentinel(),
43735 JSPropertySpec::nativeAccessors("prefable1", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable1_getterinfo, nullptr, nullptr),
43736 JSPropertySpec::nativeAccessors("prefable2", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable2_getterinfo, nullptr, nullptr),
43737 JS_PS_ENDJSPropertySpec::sentinel(),
43738 JSPropertySpec::nativeAccessors("prefable3", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable3_getterinfo, nullptr, nullptr),
43739 JSPropertySpec::nativeAccessors("prefable4", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable4_getterinfo, nullptr, nullptr),
43740 JS_PS_ENDJSPropertySpec::sentinel(),
43741 JSPropertySpec::nativeAccessors("prefable5", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable5_getterinfo, nullptr, nullptr),
43742 JS_PS_ENDJSPropertySpec::sentinel(),
43743 JSPropertySpec::nativeAccessors("prefable6", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable6_getterinfo, nullptr, nullptr),
43744 JSPropertySpec::nativeAccessors("prefable7", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable7_getterinfo, nullptr, nullptr),
43745 JS_PS_ENDJSPropertySpec::sentinel(),
43746 JSPropertySpec::nativeAccessors("prefable8", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable8_getterinfo, nullptr, nullptr),
43747 JS_PS_ENDJSPropertySpec::sentinel(),
43748 JSPropertySpec::nativeAccessors("prefable9", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable9_getterinfo, nullptr, nullptr),
43749 JS_PS_ENDJSPropertySpec::sentinel(),
43750 JSPropertySpec::nativeAccessors("prefable12", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable12_getterinfo, nullptr, nullptr),
43751 JSPropertySpec::nativeAccessors("prefable14", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable14_getterinfo, nullptr, nullptr),
43752 JS_PS_ENDJSPropertySpec::sentinel(),
43753 JSPropertySpec::nativeAccessors("prefable15", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable15_getterinfo, nullptr, nullptr),
43754 JSPropertySpec::nativeAccessors("prefable16", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &prefable16_getterinfo, nullptr, nullptr),
43755 JS_PS_ENDJSPropertySpec::sentinel(),
43756 JSPropertySpec::nativeAccessors("conditionalOnSecureContext1", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &conditionalOnSecureContext1_getterinfo, nullptr, nullptr),
43757 JS_PS_ENDJSPropertySpec::sentinel(),
43758 JSPropertySpec::nativeAccessors("conditionalOnSecureContext2", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &conditionalOnSecureContext2_getterinfo, nullptr, nullptr),
43759 JS_PS_ENDJSPropertySpec::sentinel(),
43760 JSPropertySpec::nativeAccessors("conditionalOnSecureContext3", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &conditionalOnSecureContext3_getterinfo, nullptr, nullptr),
43761 JS_PS_ENDJSPropertySpec::sentinel(),
43762 JSPropertySpec::nativeAccessors("conditionalOnSecureContext4", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &conditionalOnSecureContext4_getterinfo, nullptr, nullptr),
43763 JS_PS_ENDJSPropertySpec::sentinel(),
43764 JSPropertySpec::nativeAccessors("attrWithLenientThis", JSPROP_ENUMERATE, GenericGetter<LenientThisPolicy, ThrowExceptions>, &attrWithLenientThis_getterinfo, GenericSetter<LenientThisPolicy>, &attrWithLenientThis_setterinfo),
43765 JSPropertySpec::nativeAccessors("putForwardsAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &putForwardsAttr_getterinfo, GenericSetter<NormalThisPolicy>, &putForwardsAttr_setterinfo),
43766 JSPropertySpec::nativeAccessors("putForwardsAttr2", JSPROP_ENUMERATE, GenericGetter<LenientThisPolicy, ThrowExceptions>, &putForwardsAttr2_getterinfo, GenericSetter<LenientThisPolicy>, &putForwardsAttr2_setterinfo),
43767 JSPropertySpec::nativeAccessors("throwingAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &throwingAttr_getterinfo, GenericSetter<NormalThisPolicy>, &throwingAttr_setterinfo),
43768 JSPropertySpec::nativeAccessors("throwingGetterAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &throwingGetterAttr_getterinfo, GenericSetter<NormalThisPolicy>, &throwingGetterAttr_setterinfo),
43769 JSPropertySpec::nativeAccessors("throwingSetterAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &throwingSetterAttr_getterinfo, GenericSetter<NormalThisPolicy>, &throwingSetterAttr_setterinfo),
43770 JSPropertySpec::nativeAccessors("canOOMAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &canOOMAttr_getterinfo, GenericSetter<NormalThisPolicy>, &canOOMAttr_setterinfo),
43771 JSPropertySpec::nativeAccessors("canOOMGetterAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &canOOMGetterAttr_getterinfo, GenericSetter<NormalThisPolicy>, &canOOMGetterAttr_setterinfo),
43772 JSPropertySpec::nativeAccessors("canOOMSetterAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &canOOMSetterAttr_getterinfo, GenericSetter<NormalThisPolicy>, &canOOMSetterAttr_setterinfo),
43773 JSPropertySpec::nativeAccessors("ceReactionsAttr", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &ceReactionsAttr_getterinfo, GenericSetter<NormalThisPolicy>, &ceReactionsAttr_setterinfo),
43774 JSPropertySpec::nativeAccessors("toJSONShouldSkipThis", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &toJSONShouldSkipThis_getterinfo, GenericSetter<NormalThisPolicy>, &toJSONShouldSkipThis_setterinfo),
43775 JSPropertySpec::nativeAccessors("toJSONShouldSkipThis2", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &toJSONShouldSkipThis2_getterinfo, GenericSetter<NormalThisPolicy>, &toJSONShouldSkipThis2_setterinfo),
43776 JSPropertySpec::nativeAccessors("toJSONShouldSkipThis3", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &toJSONShouldSkipThis3_getterinfo, GenericSetter<NormalThisPolicy>, &toJSONShouldSkipThis3_setterinfo),
43777 JSPropertySpec::nativeAccessors("dashed-attribute", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &dashed_attribute_getterinfo, GenericSetter<NormalThisPolicy>, &dashed_attribute_setterinfo),
43778 JSPropertySpec::nativeAccessors("nonEnumerableAttr", 0, GenericGetter<NormalThisPolicy, ThrowExceptions>, &nonEnumerableAttr_getterinfo, GenericSetter<NormalThisPolicy>, &nonEnumerableAttr_setterinfo),
43779 JSPropertySpec::nativeAccessors("allowSharedArrayBufferViewTypedef", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &allowSharedArrayBufferViewTypedef_getterinfo, GenericSetter<NormalThisPolicy>, &allowSharedArrayBufferViewTypedef_setterinfo),
43780 JSPropertySpec::nativeAccessors("allowSharedArrayBufferView", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &allowSharedArrayBufferView_getterinfo, GenericSetter<NormalThisPolicy>, &allowSharedArrayBufferView_setterinfo),
43781 JSPropertySpec::nativeAccessors("allowSharedNullableArrayBufferView", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &allowSharedNullableArrayBufferView_getterinfo, GenericSetter<NormalThisPolicy>, &allowSharedNullableArrayBufferView_setterinfo),
43782 JSPropertySpec::nativeAccessors("allowSharedArrayBuffer", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &allowSharedArrayBuffer_getterinfo, GenericSetter<NormalThisPolicy>, &allowSharedArrayBuffer_setterinfo),
43783 JSPropertySpec::nativeAccessors("allowSharedNullableArrayBuffer", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &allowSharedNullableArrayBuffer_getterinfo, GenericSetter<NormalThisPolicy>, &allowSharedNullableArrayBuffer_setterinfo),
43784 JS_PS_ENDJSPropertySpec::sentinel()
43785};
43786
43787static const PrefableDisablers sAttributes_disablers52 = {
43788 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), nullptr
43789};
43790
43791static const PrefableDisablers sAttributes_disablers55 = {
43792 WebIDLPrefIndex::dom_webidl_test2, 0, false, OriginTrial(0), nullptr
43793};
43794
43795static const PrefableDisablers sAttributes_disablers58 = {
43796 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), nullptr
43797};
43798
43799static const PrefableDisablers sAttributes_disablers60 = {
43800 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), &nsGenericHTMLElement::LegacyTouchAPIEnabled
43801};
43802
43803static const PrefableDisablers sAttributes_disablers63 = {
43804 WebIDLPrefIndex::dom_webidl_test2, 0, false, OriginTrial(0), &nsGenericHTMLElement::LegacyTouchAPIEnabled
43805};
43806
43807static const PrefableDisablers sAttributes_disablers65 = {
43808 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), &nsGenericHTMLElement::LegacyTouchAPIEnabled
43809};
43810
43811static const PrefableDisablers sAttributes_disablers67 = {
43812 WebIDLPrefIndex::dom_webidl_test1, 0, false, OriginTrial(0), &TestFuncControlledMember
43813};
43814
43815static const PrefableDisablers sAttributes_disablers70 = {
43816 WebIDLPrefIndex::NoPref, 0, false, OriginTrial(0), &TestFuncControlledMember
43817};
43818
43819static const PrefableDisablers sAttributes_disablers73 = {
43820 WebIDLPrefIndex::NoPref, 0, true, OriginTrial(0), nullptr
43821};
43822
43823static const PrefableDisablers sAttributes_disablers75 = {
43824 WebIDLPrefIndex::dom_webidl_test1, 0, true, OriginTrial(0), nullptr
43825};
43826
43827static const PrefableDisablers sAttributes_disablers77 = {
43828 WebIDLPrefIndex::dom_webidl_test1, 0, true, OriginTrial(0), &nsGenericHTMLElement::LegacyTouchAPIEnabled
43829};
43830
43831static const PrefableDisablers sAttributes_disablers79 = {
43832 WebIDLPrefIndex::dom_webidl_test1, 0, true, OriginTrial(0), &TestFuncControlledMember
43833};
43834
43835static const Prefable<const JSPropertySpec> sAttributes[] = {
43836 { nullptr, &sAttributes_specs[0] },
43837 { &sAttributes_disablers52, &sAttributes_specs[52] },
43838 { &sAttributes_disablers55, &sAttributes_specs[55] },
43839 { &sAttributes_disablers58, &sAttributes_specs[58] },
43840 { &sAttributes_disablers60, &sAttributes_specs[60] },
43841 { &sAttributes_disablers63, &sAttributes_specs[63] },
43842 { &sAttributes_disablers65, &sAttributes_specs[65] },
43843 { &sAttributes_disablers67, &sAttributes_specs[67] },
43844 { &sAttributes_disablers70, &sAttributes_specs[70] },
43845 { &sAttributes_disablers73, &sAttributes_specs[73] },
43846 { &sAttributes_disablers75, &sAttributes_specs[75] },
43847 { &sAttributes_disablers77, &sAttributes_specs[77] },
43848 { &sAttributes_disablers79, &sAttributes_specs[79] },
43849 { nullptr, &sAttributes_specs[81] },
43850 { nullptr, nullptr }
43851};
43852
43853static_assert(14 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
43854 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
43855static_assert(51 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
43856 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
43857
43858static const JSPropertySpec sChromeAttributes_specs[] = {
43859 JSPropertySpec::nativeAccessors("putForwardsAttr3", JSPROP_ENUMERATE, GenericGetter<NormalThisPolicy, ThrowExceptions>, &putForwardsAttr3_getterinfo, GenericSetter<NormalThisPolicy>, &putForwardsAttr3_setterinfo),
43860 JS_PS_ENDJSPropertySpec::sentinel()
43861};
43862
43863
43864static const Prefable<const JSPropertySpec> sChromeAttributes[] = {
43865 { nullptr, &sChromeAttributes_specs[0] },
43866 { nullptr, nullptr }
43867};
43868
43869static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
43870 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
43871static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
43872 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
43873
43874static const ConstantSpec sConstants_specs[] = {
43875 { "myLongConstant", JS::Int32Value(5) },
43876 { "nonEnumerableConst", JS::BooleanValue(true) },
43877 { 0, JS::UndefinedValue() }
43878};
43879
43880
43881static const Prefable<const ConstantSpec> sConstants[] = {
43882 { nullptr, &sConstants_specs[0] },
43883 { nullptr, nullptr }
43884};
43885
43886static_assert(1 <= 1ull << NUM_BITS_PROPERTY_INFO_PREF_INDEX13,
43887 "We have a prefable index that is >= (1 << NUM_BITS_PROPERTY_INFO_PREF_INDEX)");
43888static_assert(2 <= 1ull << NUM_BITS_PROPERTY_INFO_SPEC_INDEX16,
43889 "We have a spec index that is >= (1 << NUM_BITS_PROPERTY_INFO_SPEC_INDEX)");
43890
43891
43892static uint16_t sNativeProperties_sortedPropertyIndices[533];
43893static PropertyInfo sNativeProperties_propertyInfos[533];
43894
43895static const NativePropertiesN<3> sNativeProperties = {
43896 false, 0,
43897 false, 0,
43898 true, 0 /* sMethods */,
43899 true, 1 /* sAttributes */,
43900 false, 0,
43901 false, 0,
43902 true, 2 /* sConstants */,
43903 -1,
43904 533,
43905 sNativeProperties_sortedPropertyIndices,
43906 {
43907 { sMethods, &sNativeProperties_propertyInfos[0] },
43908 { sAttributes, &sNativeProperties_propertyInfos[443] },
43909 { sConstants, &sNativeProperties_propertyInfos[531] }
43910 }
43911};
43912static_assert(533 < 1ull << (CHAR_BIT8 * sizeof(sNativeProperties.propertyInfoCount)),
43913 "We have a property info count that is oversized");
43914
43915static uint16_t sChromeOnlyNativeProperties_sortedPropertyIndices[3];
43916static PropertyInfo sChromeOnlyNativeProperties_propertyInfos[3];
43917
43918static const NativePropertiesN<3> sChromeOnlyNativeProperties = {
43919 true, 0 /* sChromeStaticMethods */,
43920 false, 0,
43921 true, 1 /* sChromeMethods */,
43922 true, 2 /* sChromeAttributes */,
43923 false, 0,
43924 false, 0,
43925 false, 0,
43926 -1,
43927 3,
43928 sChromeOnlyNativeProperties_sortedPropertyIndices,
43929 {
43930 { sChromeStaticMethods, &sChromeOnlyNativeProperties_propertyInfos[0] },
43931 { sChromeMethods, &sChromeOnlyNativeProperties_propertyInfos[1] },
43932 { sChromeAttributes, &sChromeOnlyNativeProperties_propertyInfos[2] }
43933 }
43934};
43935static_assert(3 < 1ull << (CHAR_BIT8 * sizeof(sChromeOnlyNativeProperties.propertyInfoCount)),
43936 "We have a property info count that is oversized");
43937
43938MOZ_CAN_RUN_SCRIPT bool
43939CollectJSONAttributes(JSContext* cx, JS::Handle<JSObject*> obj, mozilla::dom::TestJSImplInterface* self, JS::Rooted<JSObject*>& result)
43940{
43941 JS::Rooted<JSObject*> unwrappedObj(cx, js::CheckedUnwrapStatic(obj));
43942 if (!unwrappedObj) {
43943 // How did that happen? We managed to get called with that
43944 // object as "this"! Just give up on sanity.
43945 return false;
43946 }
43947
43948 { // scope for "temp"
43949 JS::Rooted<JS::Value> temp(cx);
43950 if (!get_readonlyByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
43951 return false;
43952 }
43953 if (!JS_DefineProperty(cx, result, "readonlyByte", temp, JSPROP_ENUMERATE)) {
43954 return false;
43955 }
43956 }
43957 { // scope for "temp"
43958 JS::Rooted<JS::Value> temp(cx);
43959 if (!get_writableByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
43960 return false;
43961 }
43962 if (!JS_DefineProperty(cx, result, "writableByte", temp, JSPROP_ENUMERATE)) {
43963 return false;
43964 }
43965 }
43966 { // scope for "temp"
43967 JS::Rooted<JS::Value> temp(cx);
43968 if (!get_sideEffectFreeByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
43969 return false;
43970 }
43971 if (!JS_DefineProperty(cx, result, "sideEffectFreeByte", temp, JSPROP_ENUMERATE)) {
43972 return false;
43973 }
43974 }
43975 { // scope for "temp"
43976 JS::Rooted<JS::Value> temp(cx);
43977 if (!get_domDependentByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
43978 return false;
43979 }
43980 if (!JS_DefineProperty(cx, result, "domDependentByte", temp, JSPROP_ENUMERATE)) {
43981 return false;
43982 }
43983 }
43984 { // scope for "temp"
43985 JS::Rooted<JS::Value> temp(cx);
43986 if (!get_constantByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
43987 return false;
43988 }
43989 if (!JS_DefineProperty(cx, result, "constantByte", temp, JSPROP_ENUMERATE)) {
43990 return false;
43991 }
43992 }
43993 { // scope for "temp"
43994 JS::Rooted<JS::Value> temp(cx);
43995 if (!get_deviceStateDependentByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
43996 return false;
43997 }
43998 if (!JS_DefineProperty(cx, result, "deviceStateDependentByte", temp, JSPROP_ENUMERATE)) {
43999 return false;
44000 }
44001 }
44002 { // scope for "temp"
44003 JS::Rooted<JS::Value> temp(cx);
44004 if (!get_readonlyShort(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44005 return false;
44006 }
44007 if (!JS_DefineProperty(cx, result, "readonlyShort", temp, JSPROP_ENUMERATE)) {
44008 return false;
44009 }
44010 }
44011 { // scope for "temp"
44012 JS::Rooted<JS::Value> temp(cx);
44013 if (!get_writableShort(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44014 return false;
44015 }
44016 if (!JS_DefineProperty(cx, result, "writableShort", temp, JSPROP_ENUMERATE)) {
44017 return false;
44018 }
44019 }
44020 { // scope for "temp"
44021 JS::Rooted<JS::Value> temp(cx);
44022 if (!get_readonlyLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44023 return false;
44024 }
44025 if (!JS_DefineProperty(cx, result, "readonlyLong", temp, JSPROP_ENUMERATE)) {
44026 return false;
44027 }
44028 }
44029 { // scope for "temp"
44030 JS::Rooted<JS::Value> temp(cx);
44031 if (!get_writableLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44032 return false;
44033 }
44034 if (!JS_DefineProperty(cx, result, "writableLong", temp, JSPROP_ENUMERATE)) {
44035 return false;
44036 }
44037 }
44038 { // scope for "temp"
44039 JS::Rooted<JS::Value> temp(cx);
44040 if (!get_readonlyLongLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44041 return false;
44042 }
44043 if (!JS_DefineProperty(cx, result, "readonlyLongLong", temp, JSPROP_ENUMERATE)) {
44044 return false;
44045 }
44046 }
44047 { // scope for "temp"
44048 JS::Rooted<JS::Value> temp(cx);
44049 if (!get_writableLongLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44050 return false;
44051 }
44052 if (!JS_DefineProperty(cx, result, "writableLongLong", temp, JSPROP_ENUMERATE)) {
44053 return false;
44054 }
44055 }
44056 { // scope for "temp"
44057 JS::Rooted<JS::Value> temp(cx);
44058 if (!get_readonlyOctet(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44059 return false;
44060 }
44061 if (!JS_DefineProperty(cx, result, "readonlyOctet", temp, JSPROP_ENUMERATE)) {
44062 return false;
44063 }
44064 }
44065 { // scope for "temp"
44066 JS::Rooted<JS::Value> temp(cx);
44067 if (!get_writableOctet(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44068 return false;
44069 }
44070 if (!JS_DefineProperty(cx, result, "writableOctet", temp, JSPROP_ENUMERATE)) {
44071 return false;
44072 }
44073 }
44074 { // scope for "temp"
44075 JS::Rooted<JS::Value> temp(cx);
44076 if (!get_readonlyUnsignedShort(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44077 return false;
44078 }
44079 if (!JS_DefineProperty(cx, result, "readonlyUnsignedShort", temp, JSPROP_ENUMERATE)) {
44080 return false;
44081 }
44082 }
44083 { // scope for "temp"
44084 JS::Rooted<JS::Value> temp(cx);
44085 if (!get_writableUnsignedShort(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44086 return false;
44087 }
44088 if (!JS_DefineProperty(cx, result, "writableUnsignedShort", temp, JSPROP_ENUMERATE)) {
44089 return false;
44090 }
44091 }
44092 { // scope for "temp"
44093 JS::Rooted<JS::Value> temp(cx);
44094 if (!get_readonlyUnsignedLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44095 return false;
44096 }
44097 if (!JS_DefineProperty(cx, result, "readonlyUnsignedLong", temp, JSPROP_ENUMERATE)) {
44098 return false;
44099 }
44100 }
44101 { // scope for "temp"
44102 JS::Rooted<JS::Value> temp(cx);
44103 if (!get_writableUnsignedLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44104 return false;
44105 }
44106 if (!JS_DefineProperty(cx, result, "writableUnsignedLong", temp, JSPROP_ENUMERATE)) {
44107 return false;
44108 }
44109 }
44110 { // scope for "temp"
44111 JS::Rooted<JS::Value> temp(cx);
44112 if (!get_readonlyUnsignedLongLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44113 return false;
44114 }
44115 if (!JS_DefineProperty(cx, result, "readonlyUnsignedLongLong", temp, JSPROP_ENUMERATE)) {
44116 return false;
44117 }
44118 }
44119 { // scope for "temp"
44120 JS::Rooted<JS::Value> temp(cx);
44121 if (!get_writableUnsignedLongLong(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44122 return false;
44123 }
44124 if (!JS_DefineProperty(cx, result, "writableUnsignedLongLong", temp, JSPROP_ENUMERATE)) {
44125 return false;
44126 }
44127 }
44128 { // scope for "temp"
44129 JS::Rooted<JS::Value> temp(cx);
44130 if (!get_writableFloat(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44131 return false;
44132 }
44133 if (!JS_DefineProperty(cx, result, "writableFloat", temp, JSPROP_ENUMERATE)) {
44134 return false;
44135 }
44136 }
44137 { // scope for "temp"
44138 JS::Rooted<JS::Value> temp(cx);
44139 if (!get_writableUnrestrictedFloat(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44140 return false;
44141 }
44142 if (!JS_DefineProperty(cx, result, "writableUnrestrictedFloat", temp, JSPROP_ENUMERATE)) {
44143 return false;
44144 }
44145 }
44146 { // scope for "temp"
44147 JS::Rooted<JS::Value> temp(cx);
44148 if (!get_writableNullableFloat(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44149 return false;
44150 }
44151 if (!JS_DefineProperty(cx, result, "writableNullableFloat", temp, JSPROP_ENUMERATE)) {
44152 return false;
44153 }
44154 }
44155 { // scope for "temp"
44156 JS::Rooted<JS::Value> temp(cx);
44157 if (!get_writableNullableUnrestrictedFloat(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44158 return false;
44159 }
44160 if (!JS_DefineProperty(cx, result, "writableNullableUnrestrictedFloat", temp, JSPROP_ENUMERATE)) {
44161 return false;
44162 }
44163 }
44164 { // scope for "temp"
44165 JS::Rooted<JS::Value> temp(cx);
44166 if (!get_writableDouble(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44167 return false;
44168 }
44169 if (!JS_DefineProperty(cx, result, "writableDouble", temp, JSPROP_ENUMERATE)) {
44170 return false;
44171 }
44172 }
44173 { // scope for "temp"
44174 JS::Rooted<JS::Value> temp(cx);
44175 if (!get_writableUnrestrictedDouble(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44176 return false;
44177 }
44178 if (!JS_DefineProperty(cx, result, "writableUnrestrictedDouble", temp, JSPROP_ENUMERATE)) {
44179 return false;
44180 }
44181 }
44182 { // scope for "temp"
44183 JS::Rooted<JS::Value> temp(cx);
44184 if (!get_writableNullableDouble(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44185 return false;
44186 }
44187 if (!JS_DefineProperty(cx, result, "writableNullableDouble", temp, JSPROP_ENUMERATE)) {
44188 return false;
44189 }
44190 }
44191 { // scope for "temp"
44192 JS::Rooted<JS::Value> temp(cx);
44193 if (!get_writableNullableUnrestrictedDouble(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44194 return false;
44195 }
44196 if (!JS_DefineProperty(cx, result, "writableNullableUnrestrictedDouble", temp, JSPROP_ENUMERATE)) {
44197 return false;
44198 }
44199 }
44200 { // scope for "temp"
44201 JS::Rooted<JS::Value> temp(cx);
44202 if (!get_lenientFloatAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44203 return false;
44204 }
44205 if (!JS_DefineProperty(cx, result, "lenientFloatAttr", temp, JSPROP_ENUMERATE)) {
44206 return false;
44207 }
44208 }
44209 { // scope for "temp"
44210 JS::Rooted<JS::Value> temp(cx);
44211 if (!get_lenientDoubleAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44212 return false;
44213 }
44214 if (!JS_DefineProperty(cx, result, "lenientDoubleAttr", temp, JSPROP_ENUMERATE)) {
44215 return false;
44216 }
44217 }
44218 { // scope for "temp"
44219 JS::Rooted<JS::Value> temp(cx);
44220 if (!get_nonNullSelf(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44221 return false;
44222 }
44223 if (!JS_DefineProperty(cx, result, "nonNullSelf", temp, JSPROP_ENUMERATE)) {
44224 return false;
44225 }
44226 }
44227 { // scope for "temp"
44228 JS::Rooted<JS::Value> temp(cx);
44229 if (!get_nullableSelf(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44230 return false;
44231 }
44232 if (!JS_DefineProperty(cx, result, "nullableSelf", temp, JSPROP_ENUMERATE)) {
44233 return false;
44234 }
44235 }
44236 { // scope for "temp"
44237 JS::Rooted<JS::Value> temp(cx);
44238 if (!get_readonlyJSStringAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44239 return false;
44240 }
44241 if (!JS_DefineProperty(cx, result, "readonlyJSStringAttr", temp, JSPROP_ENUMERATE)) {
44242 return false;
44243 }
44244 }
44245 { // scope for "temp"
44246 JS::Rooted<JS::Value> temp(cx);
44247 if (!get_jsStringAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44248 return false;
44249 }
44250 if (!JS_DefineProperty(cx, result, "jsStringAttr", temp, JSPROP_ENUMERATE)) {
44251 return false;
44252 }
44253 }
44254 { // scope for "temp"
44255 JS::Rooted<JS::Value> temp(cx);
44256 if (!get_enumAttribute(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44257 return false;
44258 }
44259 if (!JS_DefineProperty(cx, result, "enumAttribute", temp, JSPROP_ENUMERATE)) {
44260 return false;
44261 }
44262 }
44263 { // scope for "temp"
44264 JS::Rooted<JS::Value> temp(cx);
44265 if (!get_readonlyEnumAttribute(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44266 return false;
44267 }
44268 if (!JS_DefineProperty(cx, result, "readonlyEnumAttribute", temp, JSPROP_ENUMERATE)) {
44269 return false;
44270 }
44271 }
44272 { // scope for "temp"
44273 JS::Rooted<JS::Value> temp(cx);
44274 if (!get_attributeGetterRenamedFrom(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44275 return false;
44276 }
44277 if (!JS_DefineProperty(cx, result, "attributeGetterRenamedFrom", temp, JSPROP_ENUMERATE)) {
44278 return false;
44279 }
44280 }
44281 { // scope for "temp"
44282 JS::Rooted<JS::Value> temp(cx);
44283 if (!get_attributeRenamedFrom(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44284 return false;
44285 }
44286 if (!JS_DefineProperty(cx, result, "attributeRenamedFrom", temp, JSPROP_ENUMERATE)) {
44287 return false;
44288 }
44289 }
44290 { // scope for "temp"
44291 JS::Rooted<JS::Value> temp(cx);
44292 if (!get_enforcedByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44293 return false;
44294 }
44295 if (!JS_DefineProperty(cx, result, "enforcedByte", temp, JSPROP_ENUMERATE)) {
44296 return false;
44297 }
44298 }
44299 { // scope for "temp"
44300 JS::Rooted<JS::Value> temp(cx);
44301 if (!get_enforcedByteNullable(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44302 return false;
44303 }
44304 if (!JS_DefineProperty(cx, result, "enforcedByteNullable", temp, JSPROP_ENUMERATE)) {
44305 return false;
44306 }
44307 }
44308 { // scope for "temp"
44309 JS::Rooted<JS::Value> temp(cx);
44310 if (!get_clampedByte(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44311 return false;
44312 }
44313 if (!JS_DefineProperty(cx, result, "clampedByte", temp, JSPROP_ENUMERATE)) {
44314 return false;
44315 }
44316 }
44317 { // scope for "temp"
44318 JS::Rooted<JS::Value> temp(cx);
44319 if (!get_clampedByteNullable(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44320 return false;
44321 }
44322 if (!JS_DefineProperty(cx, result, "clampedByteNullable", temp, JSPROP_ENUMERATE)) {
44323 return false;
44324 }
44325 }
44326 { // scope for "temp"
44327 JS::Rooted<JS::Value> temp(cx);
44328 if (!get_deprecatedAttribute(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44329 return false;
44330 }
44331 if (!JS_DefineProperty(cx, result, "deprecatedAttribute", temp, JSPROP_ENUMERATE)) {
44332 return false;
44333 }
44334 }
44335 // This is unfortunately a linear scan through sAttributes, but we
44336 // only do it for things which _might_ be disabled, which should
44337 // help keep the performance problems down.
44338 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable1, sAttributes)) {
44339 JS::Rooted<JS::Value> temp(cx);
44340 if (!get_prefable1(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44341 return false;
44342 }
44343 if (!JS_DefineProperty(cx, result, "prefable1", temp, JSPROP_ENUMERATE)) {
44344 return false;
44345 }
44346 }
44347 // This is unfortunately a linear scan through sAttributes, but we
44348 // only do it for things which _might_ be disabled, which should
44349 // help keep the performance problems down.
44350 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable2, sAttributes)) {
44351 JS::Rooted<JS::Value> temp(cx);
44352 if (!get_prefable2(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44353 return false;
44354 }
44355 if (!JS_DefineProperty(cx, result, "prefable2", temp, JSPROP_ENUMERATE)) {
44356 return false;
44357 }
44358 }
44359 // This is unfortunately a linear scan through sAttributes, but we
44360 // only do it for things which _might_ be disabled, which should
44361 // help keep the performance problems down.
44362 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable3, sAttributes)) {
44363 JS::Rooted<JS::Value> temp(cx);
44364 if (!get_prefable3(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44365 return false;
44366 }
44367 if (!JS_DefineProperty(cx, result, "prefable3", temp, JSPROP_ENUMERATE)) {
44368 return false;
44369 }
44370 }
44371 // This is unfortunately a linear scan through sAttributes, but we
44372 // only do it for things which _might_ be disabled, which should
44373 // help keep the performance problems down.
44374 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable4, sAttributes)) {
44375 JS::Rooted<JS::Value> temp(cx);
44376 if (!get_prefable4(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44377 return false;
44378 }
44379 if (!JS_DefineProperty(cx, result, "prefable4", temp, JSPROP_ENUMERATE)) {
44380 return false;
44381 }
44382 }
44383 // This is unfortunately a linear scan through sAttributes, but we
44384 // only do it for things which _might_ be disabled, which should
44385 // help keep the performance problems down.
44386 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable5, sAttributes)) {
44387 JS::Rooted<JS::Value> temp(cx);
44388 if (!get_prefable5(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44389 return false;
44390 }
44391 if (!JS_DefineProperty(cx, result, "prefable5", temp, JSPROP_ENUMERATE)) {
44392 return false;
44393 }
44394 }
44395 // This is unfortunately a linear scan through sAttributes, but we
44396 // only do it for things which _might_ be disabled, which should
44397 // help keep the performance problems down.
44398 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable6, sAttributes)) {
44399 JS::Rooted<JS::Value> temp(cx);
44400 if (!get_prefable6(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44401 return false;
44402 }
44403 if (!JS_DefineProperty(cx, result, "prefable6", temp, JSPROP_ENUMERATE)) {
44404 return false;
44405 }
44406 }
44407 // This is unfortunately a linear scan through sAttributes, but we
44408 // only do it for things which _might_ be disabled, which should
44409 // help keep the performance problems down.
44410 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable7, sAttributes)) {
44411 JS::Rooted<JS::Value> temp(cx);
44412 if (!get_prefable7(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44413 return false;
44414 }
44415 if (!JS_DefineProperty(cx, result, "prefable7", temp, JSPROP_ENUMERATE)) {
44416 return false;
44417 }
44418 }
44419 // This is unfortunately a linear scan through sAttributes, but we
44420 // only do it for things which _might_ be disabled, which should
44421 // help keep the performance problems down.
44422 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable8, sAttributes)) {
44423 JS::Rooted<JS::Value> temp(cx);
44424 if (!get_prefable8(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44425 return false;
44426 }
44427 if (!JS_DefineProperty(cx, result, "prefable8", temp, JSPROP_ENUMERATE)) {
44428 return false;
44429 }
44430 }
44431 // This is unfortunately a linear scan through sAttributes, but we
44432 // only do it for things which _might_ be disabled, which should
44433 // help keep the performance problems down.
44434 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable9, sAttributes)) {
44435 JS::Rooted<JS::Value> temp(cx);
44436 if (!get_prefable9(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44437 return false;
44438 }
44439 if (!JS_DefineProperty(cx, result, "prefable9", temp, JSPROP_ENUMERATE)) {
44440 return false;
44441 }
44442 }
44443 // This is unfortunately a linear scan through sAttributes, but we
44444 // only do it for things which _might_ be disabled, which should
44445 // help keep the performance problems down.
44446 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable12, sAttributes)) {
44447 JS::Rooted<JS::Value> temp(cx);
44448 if (!get_prefable12(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44449 return false;
44450 }
44451 if (!JS_DefineProperty(cx, result, "prefable12", temp, JSPROP_ENUMERATE)) {
44452 return false;
44453 }
44454 }
44455 // This is unfortunately a linear scan through sAttributes, but we
44456 // only do it for things which _might_ be disabled, which should
44457 // help keep the performance problems down.
44458 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable14, sAttributes)) {
44459 JS::Rooted<JS::Value> temp(cx);
44460 if (!get_prefable14(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44461 return false;
44462 }
44463 if (!JS_DefineProperty(cx, result, "prefable14", temp, JSPROP_ENUMERATE)) {
44464 return false;
44465 }
44466 }
44467 // This is unfortunately a linear scan through sAttributes, but we
44468 // only do it for things which _might_ be disabled, which should
44469 // help keep the performance problems down.
44470 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable15, sAttributes)) {
44471 JS::Rooted<JS::Value> temp(cx);
44472 if (!get_prefable15(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44473 return false;
44474 }
44475 if (!JS_DefineProperty(cx, result, "prefable15", temp, JSPROP_ENUMERATE)) {
44476 return false;
44477 }
44478 }
44479 // This is unfortunately a linear scan through sAttributes, but we
44480 // only do it for things which _might_ be disabled, which should
44481 // help keep the performance problems down.
44482 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_prefable16, sAttributes)) {
44483 JS::Rooted<JS::Value> temp(cx);
44484 if (!get_prefable16(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44485 return false;
44486 }
44487 if (!JS_DefineProperty(cx, result, "prefable16", temp, JSPROP_ENUMERATE)) {
44488 return false;
44489 }
44490 }
44491 // This is unfortunately a linear scan through sAttributes, but we
44492 // only do it for things which _might_ be disabled, which should
44493 // help keep the performance problems down.
44494 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_conditionalOnSecureContext1, sAttributes)) {
44495 JS::Rooted<JS::Value> temp(cx);
44496 if (!get_conditionalOnSecureContext1(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44497 return false;
44498 }
44499 if (!JS_DefineProperty(cx, result, "conditionalOnSecureContext1", temp, JSPROP_ENUMERATE)) {
44500 return false;
44501 }
44502 }
44503 // This is unfortunately a linear scan through sAttributes, but we
44504 // only do it for things which _might_ be disabled, which should
44505 // help keep the performance problems down.
44506 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_conditionalOnSecureContext2, sAttributes)) {
44507 JS::Rooted<JS::Value> temp(cx);
44508 if (!get_conditionalOnSecureContext2(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44509 return false;
44510 }
44511 if (!JS_DefineProperty(cx, result, "conditionalOnSecureContext2", temp, JSPROP_ENUMERATE)) {
44512 return false;
44513 }
44514 }
44515 // This is unfortunately a linear scan through sAttributes, but we
44516 // only do it for things which _might_ be disabled, which should
44517 // help keep the performance problems down.
44518 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_conditionalOnSecureContext3, sAttributes)) {
44519 JS::Rooted<JS::Value> temp(cx);
44520 if (!get_conditionalOnSecureContext3(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44521 return false;
44522 }
44523 if (!JS_DefineProperty(cx, result, "conditionalOnSecureContext3", temp, JSPROP_ENUMERATE)) {
44524 return false;
44525 }
44526 }
44527 // This is unfortunately a linear scan through sAttributes, but we
44528 // only do it for things which _might_ be disabled, which should
44529 // help keep the performance problems down.
44530 if (IsGetterEnabled(cx, unwrappedObj, (JSJitGetterOp)get_conditionalOnSecureContext4, sAttributes)) {
44531 JS::Rooted<JS::Value> temp(cx);
44532 if (!get_conditionalOnSecureContext4(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44533 return false;
44534 }
44535 if (!JS_DefineProperty(cx, result, "conditionalOnSecureContext4", temp, JSPROP_ENUMERATE)) {
44536 return false;
44537 }
44538 }
44539 { // scope for "temp"
44540 JS::Rooted<JS::Value> temp(cx);
44541 if (!get_attrWithLenientThis(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44542 return false;
44543 }
44544 if (!JS_DefineProperty(cx, result, "attrWithLenientThis", temp, JSPROP_ENUMERATE)) {
44545 return false;
44546 }
44547 }
44548 { // scope for "temp"
44549 JS::Rooted<JS::Value> temp(cx);
44550 if (!get_putForwardsAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44551 return false;
44552 }
44553 if (!JS_DefineProperty(cx, result, "putForwardsAttr", temp, JSPROP_ENUMERATE)) {
44554 return false;
44555 }
44556 }
44557 { // scope for "temp"
44558 JS::Rooted<JS::Value> temp(cx);
44559 if (!get_putForwardsAttr2(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44560 return false;
44561 }
44562 if (!JS_DefineProperty(cx, result, "putForwardsAttr2", temp, JSPROP_ENUMERATE)) {
44563 return false;
44564 }
44565 }
44566 { // scope for "temp"
44567 JS::Rooted<JS::Value> temp(cx);
44568 if (!get_putForwardsAttr3(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44569 return false;
44570 }
44571 if (!JS_DefineProperty(cx, result, "putForwardsAttr3", temp, JSPROP_ENUMERATE)) {
44572 return false;
44573 }
44574 }
44575 { // scope for "temp"
44576 JS::Rooted<JS::Value> temp(cx);
44577 if (!get_throwingAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44578 return false;
44579 }
44580 if (!JS_DefineProperty(cx, result, "throwingAttr", temp, JSPROP_ENUMERATE)) {
44581 return false;
44582 }
44583 }
44584 { // scope for "temp"
44585 JS::Rooted<JS::Value> temp(cx);
44586 if (!get_throwingGetterAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44587 return false;
44588 }
44589 if (!JS_DefineProperty(cx, result, "throwingGetterAttr", temp, JSPROP_ENUMERATE)) {
44590 return false;
44591 }
44592 }
44593 { // scope for "temp"
44594 JS::Rooted<JS::Value> temp(cx);
44595 if (!get_throwingSetterAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44596 return false;
44597 }
44598 if (!JS_DefineProperty(cx, result, "throwingSetterAttr", temp, JSPROP_ENUMERATE)) {
44599 return false;
44600 }
44601 }
44602 { // scope for "temp"
44603 JS::Rooted<JS::Value> temp(cx);
44604 if (!get_canOOMAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44605 return false;
44606 }
44607 if (!JS_DefineProperty(cx, result, "canOOMAttr", temp, JSPROP_ENUMERATE)) {
44608 return false;
44609 }
44610 }
44611 { // scope for "temp"
44612 JS::Rooted<JS::Value> temp(cx);
44613 if (!get_canOOMGetterAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44614 return false;
44615 }
44616 if (!JS_DefineProperty(cx, result, "canOOMGetterAttr", temp, JSPROP_ENUMERATE)) {
44617 return false;
44618 }
44619 }
44620 { // scope for "temp"
44621 JS::Rooted<JS::Value> temp(cx);
44622 if (!get_canOOMSetterAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44623 return false;
44624 }
44625 if (!JS_DefineProperty(cx, result, "canOOMSetterAttr", temp, JSPROP_ENUMERATE)) {
44626 return false;
44627 }
44628 }
44629 { // scope for "temp"
44630 JS::Rooted<JS::Value> temp(cx);
44631 if (!get_ceReactionsAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44632 return false;
44633 }
44634 if (!JS_DefineProperty(cx, result, "ceReactionsAttr", temp, JSPROP_ENUMERATE)) {
44635 return false;
44636 }
44637 }
44638 { // scope for "temp"
44639 JS::Rooted<JS::Value> temp(cx);
44640 if (!get_dashed_attribute(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44641 return false;
44642 }
44643 if (!JS_DefineProperty(cx, result, "dashed_attribute", temp, JSPROP_ENUMERATE)) {
44644 return false;
44645 }
44646 }
44647 { // scope for "temp"
44648 JS::Rooted<JS::Value> temp(cx);
44649 if (!get_nonEnumerableAttr(cx, obj, self, JSJitGetterCallArgs(&temp))) {
44650 return false;
44651 }
44652 if (!JS_DefineProperty(cx, result, "nonEnumerableAttr", temp, JSPROP_ENUMERATE)) {
44653 return false;
44654 }
44655 }
44656 return true;
44657}
44658
44659bool sNativePropertiesInited = false;
44660const NativePropertyHooks sNativePropertyHooks = {
44661 nullptr,
44662 { sNativeProperties.Upcast(), sChromeOnlyNativeProperties.Upcast(), &sNativePropertiesInited },
44663 prototypes::id::TestJSImplInterface,
44664 constructors::id::TestJSImplInterface,
44665 &DefaultXrayExpandoObjectClass
44666};
44667
44668static bool
44669_constructor(JSContext* cx_, unsigned argc, JS::Value* vp)
44670{
44671 BindingCallContext cx(cx_, "TestJSImplInterface constructor");
44672 AUTO_PROFILER_LABEL_DYNAMIC_FAST(mozilla::AutoProfilerLabelHot raiiObject44674( cx, "TestJSImplInterface"
, "constructor", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
44673 "TestJSImplInterface", "constructor", DOM, cx,mozilla::AutoProfilerLabelHot raiiObject44674( cx, "TestJSImplInterface"
, "constructor", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
44674 uint32_t(js::ProfilingStackFrame::Flags::RELEVANT_FOR_JS))mozilla::AutoProfilerLabelHot raiiObject44674( cx, "TestJSImplInterface"
, "constructor", JS::ProfilingCategoryPair::DOM, uint32_t(js::
ProfilingStackFrame::Flags::RELEVANT_FOR_JS))
;
44675
44676 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
44677 JS::Rooted<JSObject*> obj(cx, &args.callee());
44678 if (!args.isConstructing()) {
44679 return ThrowConstructorWithoutNew(cx, "TestJSImplInterface");
44680 }
44681
44682 JS::Rooted<JSObject*> desiredProto(cx);
44683 if (!GetDesiredProto(cx, args,
44684 prototypes::id::TestJSImplInterface,
44685 CreateInterfaceObjects,
44686 &desiredProto)) {
44687 return false;
44688 }
44689
44690 if (!args.requireAtLeast(cx, "TestJSImplInterface constructor", 15)) {
44691 return false;
44692 }
44693 GlobalObject global(cx, obj);
44694 if (global.Failed()) {
44695 return false;
44696 }
44697
44698 bool objIsXray = xpc::WrapperFactory::IsXrayWrapper(obj);
44699 binding_detail::FakeString<char16_t> arg0;
44700 if (!ConvertJSValueToString(cx, args[0], eStringify, eStringify, arg0)) {
44701 return false;
44702 }
44703 uint32_t arg1;
44704 if (!ValueToPrimitive<uint32_t, eDefault>(cx, args[1], "Argument 2", &arg1)) {
44705 return false;
44706 }
44707 Nullable<bool> arg2;
44708 if (args[2].isNullOrUndefined()) {
44709 arg2.SetNull();
44710 } else if (!ValueToPrimitive<bool, eDefault>(cx, args[2], "Argument 3", &arg2.SetValue())) {
44711 return false;
44712 }
44713 mozilla::dom::TestInterface* arg3;
44714 if (args[3].isObject()) {
44715 {
44716 // Our JSContext should be in the right global to do unwrapping in.
44717 nsresult rv = UnwrapObject<prototypes::id::TestInterface, mozilla::dom::TestInterface>(args[3], arg3, cx);
44718 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
44719 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 4", "TestInterface");
44720 return false;
44721 }
44722 }
44723 } else if (args[3].isNullOrUndefined()) {
44724 arg3 = nullptr;
44725 } else {
44726 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 4");
44727 return false;
44728 }
44729 int32_t arg4;
44730 if (!ValueToPrimitive<int32_t, eDefault>(cx, args[4], "Argument 5", &arg4)) {
44731 return false;
44732 }
44733 RootedDictionary<binding_detail::FastDictForConstructor> arg5(cx);
44734 if (!arg5.Init(cx, args[5], "Argument 6", true)) {
44735 return false;
44736 }
44737 JS::Rooted<JS::Value> arg6(cx);
44738#ifdef __clang__1
44739#pragma clang diagnostic push
44740#pragma clang diagnostic ignored "-Wunreachable-code"
44741#pragma clang diagnostic ignored "-Wunreachable-code-return"
44742#endif // __clang__
44743 if ((true) && !CallerSubsumes(args[6])) {
44744 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 7");
44745 return false;
44746 }
44747#ifdef __clang__1
44748#pragma clang diagnostic pop
44749#endif // __clang__
44750 arg6 = args[6];
44751 JS::Rooted<JSObject*> arg7(cx);
44752 if (args[7].isObject()) {
44753#ifdef __clang__1
44754#pragma clang diagnostic push
44755#pragma clang diagnostic ignored "-Wunreachable-code"
44756#pragma clang diagnostic ignored "-Wunreachable-code-return"
44757#endif // __clang__
44758 if ((true) && !CallerSubsumes(args[7])) {
44759 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 8");
44760 return false;
44761 }
44762#ifdef __clang__1
44763#pragma clang diagnostic pop
44764#endif // __clang__
44765 arg7 = &args[7].toObject();
44766 } else {
44767 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 8");
44768 return false;
44769 }
44770 JS::Rooted<JSObject*> arg8(cx);
44771 if (args[8].isObject()) {
44772#ifdef __clang__1
44773#pragma clang diagnostic push
44774#pragma clang diagnostic ignored "-Wunreachable-code"
44775#pragma clang diagnostic ignored "-Wunreachable-code-return"
44776#endif // __clang__
44777 if ((true) && !CallerSubsumes(args[8])) {
44778 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 9");
44779 return false;
44780 }
44781#ifdef __clang__1
44782#pragma clang diagnostic pop
44783#endif // __clang__
44784 arg8 = &args[8].toObject();
44785 } else if (args[8].isNullOrUndefined()) {
44786 arg8 = nullptr;
44787 } else {
44788 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 9");
44789 return false;
44790 }
44791 binding_detail::AutoSequence<Dict> arg9;
44792 SequenceRooter<Dict> arg9_holder(cx, &arg9);
44793 if (args[9].isObject()) {
44794 JS::ForOfIterator iter(cx);
44795 if (!iter.init(args[9], JS::ForOfIterator::AllowNonIterable)) {
44796 return false;
44797 }
44798 if (!iter.valueIsIterable()) {
44799 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 10", "sequence");
44800 return false;
44801 }
44802 binding_detail::AutoSequence<Dict> &arr = arg9;
44803 JS::Rooted<JS::Value> temp(cx);
44804 while (true) {
44805 bool done;
44806 if (!iter.next(&temp, &done)) {
44807 return false;
44808 }
44809 if (done) {
44810 break;
44811 }
44812 Dict* slotPtr = arr.AppendElement(mozilla::fallible);
44813 if (!slotPtr) {
44814 JS_ReportOutOfMemory(cx);
44815 return false;
44816 }
44817 Dict& slot = *slotPtr;
44818 if (!slot.Init(cx, temp, "Element of argument 10", true)) {
44819 return false;
44820 }
44821 }
44822 } else {
44823 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Argument 10", "sequence");
44824 return false;
44825 }
44826 JS::Rooted<JS::Value> arg10(cx);
44827 if (args.hasDefined(10)) {
44828#ifdef __clang__1
44829#pragma clang diagnostic push
44830#pragma clang diagnostic ignored "-Wunreachable-code"
44831#pragma clang diagnostic ignored "-Wunreachable-code-return"
44832#endif // __clang__
44833 if ((true) && !CallerSubsumes(args[10])) {
44834 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 11");
44835 return false;
44836 }
44837#ifdef __clang__1
44838#pragma clang diagnostic pop
44839#endif // __clang__
44840 arg10 = args[10];
44841 } else {
44842 arg10 = JS::UndefinedValue();
44843 }
44844 Optional<JS::Handle<JSObject*>> arg11;
44845 if (args.hasDefined(11)) {
44846 arg11.Construct(cx);
44847 if (args[11].isObject()) {
44848#ifdef __clang__1
44849#pragma clang diagnostic push
44850#pragma clang diagnostic ignored "-Wunreachable-code"
44851#pragma clang diagnostic ignored "-Wunreachable-code-return"
44852#endif // __clang__
44853 if ((true) && !CallerSubsumes(args[11])) {
44854 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 12");
44855 return false;
44856 }
44857#ifdef __clang__1
44858#pragma clang diagnostic pop
44859#endif // __clang__
44860 arg11.Value() = &args[11].toObject();
44861 } else {
44862 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 12");
44863 return false;
44864 }
44865 }
44866 Optional<JS::Handle<JSObject*>> arg12;
44867 if (args.hasDefined(12)) {
44868 arg12.Construct(cx);
44869 if (args[12].isObject()) {
44870#ifdef __clang__1
44871#pragma clang diagnostic push
44872#pragma clang diagnostic ignored "-Wunreachable-code"
44873#pragma clang diagnostic ignored "-Wunreachable-code-return"
44874#endif // __clang__
44875 if ((true) && !CallerSubsumes(args[12])) {
44876 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("argument 13");
44877 return false;
44878 }
44879#ifdef __clang__1
44880#pragma clang diagnostic pop
44881#endif // __clang__
44882 arg12.Value() = &args[12].toObject();
44883 } else if (args[12].isNullOrUndefined()) {
44884 arg12.Value() = nullptr;
44885 } else {
44886 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 13");
44887 return false;
44888 }
44889 }
44890 RootedSpiderMonkeyInterface<Uint8Array> arg13(cx);
44891 if (args[13].isObject()) {
44892 if (!arg13.Init(&args[13].toObject())) {
44893 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 14", "Uint8Array");
44894 return false;
44895 }
44896 if (JS::IsArrayBufferViewShared(arg13.Obj())) {
44897 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 14");
44898 return false;
44899 }
44900 if (JS::IsLargeArrayBufferView(arg13.Obj())) {
44901 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 14");
44902 return false;
44903 }
44904 if (JS::IsResizableArrayBufferView(arg13.Obj())) {
44905 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 14");
44906 return false;
44907 }
44908 } else {
44909 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 14");
44910 return false;
44911 }
44912 RootedSpiderMonkeyInterface<ArrayBuffer> arg14(cx);
44913 if (args[14].isObject()) {
44914 if (!arg14.Init(&args[14].toObject())) {
44915 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Argument 15", "ArrayBuffer");
44916 return false;
44917 }
44918 if (JS::IsSharedArrayBufferObject(arg14.Obj())) {
44919 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Argument 15");
44920 return false;
44921 }
44922 if (JS::IsLargeArrayBufferMaybeShared(arg14.Obj())) {
44923 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Argument 15");
44924 return false;
44925 }
44926 if (JS::IsResizableArrayBufferMaybeShared(arg14.Obj())) {
44927 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Argument 15");
44928 return false;
44929 }
44930 } else {
44931 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 15");
44932 return false;
44933 }
44934 Maybe<JSAutoRealm> ar;
44935 if (objIsXray) {
44936 // Since our object is an Xray, we can just CheckedUnwrapStatic:
44937 // we know Xrays have no dynamic unwrap behavior.
44938 obj = js::CheckedUnwrapStatic(obj);
44939 if (!obj) {
44940 return false;
44941 }
44942 ar.emplace(cx, obj);
44943 if (!JS_WrapObject(cx, &desiredProto)) {
44944 return false;
44945 }
44946 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mAny1))) {
44947 return false;
44948 }
44949 if (arg5.mDict.WasPassed()) {
44950 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict.Value().mAnotherAny))) {
44951 return false;
44952 }
44953 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict.Value().mAnotherObj))) {
44954 return false;
44955 }
44956 if (arg5.mDict.Value().mArrayBuffer.WasPassed()) {
44957 if (!arg5.mDict.Value().mArrayBuffer.Value().WrapIntoNewCompartment(cx)) {
44958 return false;
44959 }
44960 }
44961 if (arg5.mDict.Value().mCustomEventInit.WasPassed()) {
44962 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict.Value().mCustomEventInit.Value().mDetail))) {
44963 return false;
44964 }
44965 }
44966 if (arg5.mDict.Value().mDictionaryTypedef.WasPassed()) {
44967 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict.Value().mDictionaryTypedef.Value().mDetail))) {
44968 return false;
44969 }
44970 }
44971 if (arg5.mDict.Value().mEventInitOrLong2.WasPassed()) {
44972 if (arg5.mDict.Value().mEventInitOrLong2.Value().IsCustomEventInit()) {
44973 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict.Value().mEventInitOrLong2.Value().GetAsCustomEventInit().mDetail))) {
44974 return false;
44975 }
44976 }
44977 }
44978 if (arg5.mDict.Value().mEventInitOrLongWithDefaultValue2.IsCustomEventInit()) {
44979 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict.Value().mEventInitOrLongWithDefaultValue2.GetAsCustomEventInit().mDetail))) {
44980 return false;
44981 }
44982 }
44983 if (arg5.mDict.Value().mEventInitOrLongWithDefaultValue4.IsCustomEventInit()) {
44984 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict.Value().mEventInitOrLongWithDefaultValue4.GetAsCustomEventInit().mDetail))) {
44985 return false;
44986 }
44987 }
44988 if (!arg5.mDict.Value().mFloat64Array.IsNull()) {
44989 if (!arg5.mDict.Value().mFloat64Array.Value().WrapIntoNewCompartment(cx)) {
44990 return false;
44991 }
44992 }
44993 if (arg5.mDict.Value().mNullableArrayBuffer.WasPassed()) {
44994 if (!arg5.mDict.Value().mNullableArrayBuffer.Value().IsNull()) {
44995 if (!arg5.mDict.Value().mNullableArrayBuffer.Value().Value().WrapIntoNewCompartment(cx)) {
44996 return false;
44997 }
44998 }
44999 }
45000 if (arg5.mDict.Value().mNullableEventInitOrLong2.WasPassed()) {
45001 if (!arg5.mDict.Value().mNullableEventInitOrLong2.Value().IsNull()) {
45002 if (arg5.mDict.Value().mNullableEventInitOrLong2.Value().Value().IsCustomEventInit()) {
45003 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict.Value().mNullableEventInitOrLong2.Value().Value().GetAsCustomEventInit().mDetail))) {
45004 return false;
45005 }
45006 }
45007 }
45008 }
45009 if (!arg5.mDict.Value().mNullableEventInitOrLongWithDefaultValue2.IsNull()) {
45010 if (arg5.mDict.Value().mNullableEventInitOrLongWithDefaultValue2.Value().IsCustomEventInit()) {
45011 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict.Value().mNullableEventInitOrLongWithDefaultValue2.Value().GetAsCustomEventInit().mDetail))) {
45012 return false;
45013 }
45014 }
45015 }
45016 if (!arg5.mDict.Value().mNullableEventInitOrLongWithDefaultValue4.IsNull()) {
45017 if (arg5.mDict.Value().mNullableEventInitOrLongWithDefaultValue4.Value().IsCustomEventInit()) {
45018 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict.Value().mNullableEventInitOrLongWithDefaultValue4.Value().GetAsCustomEventInit().mDetail))) {
45019 return false;
45020 }
45021 }
45022 }
45023 if (arg5.mDict.Value().mNullableObjectSequenceOrLong.WasPassed()) {
45024 if (!arg5.mDict.Value().mNullableObjectSequenceOrLong.Value().IsNull()) {
45025 if (arg5.mDict.Value().mNullableObjectSequenceOrLong.Value().Value().IsObjectSequence()) {
45026 for (uint32_t indexName0 = 0; indexName0 < arg5.mDict.Value().mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence().Length(); ++indexName0) {
45027 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict.Value().mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence()[indexName0]))) {
45028 return false;
45029 }
45030 }
45031 }
45032 }
45033 }
45034 if (!arg5.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.IsNull()) {
45035 if (arg5.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.Value().IsObjectSequence()) {
45036 for (uint32_t indexName0 = 0; indexName0 < arg5.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence().Length(); ++indexName0) {
45037 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence()[indexName0]))) {
45038 return false;
45039 }
45040 }
45041 }
45042 }
45043 if (!arg5.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.IsNull()) {
45044 if (arg5.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.Value().IsObjectSequence()) {
45045 for (uint32_t indexName0 = 0; indexName0 < arg5.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence().Length(); ++indexName0) {
45046 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence()[indexName0]))) {
45047 return false;
45048 }
45049 }
45050 }
45051 }
45052 if (arg5.mDict.Value().mObjectOrLong.WasPassed()) {
45053 if (arg5.mDict.Value().mObjectOrLong.Value().IsObject()) {
45054 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict.Value().mObjectOrLong.Value().GetAsObject()))) {
45055 return false;
45056 }
45057 }
45058 }
45059 if (arg5.mDict.Value().mObjectSequenceOrLong.WasPassed()) {
45060 if (arg5.mDict.Value().mObjectSequenceOrLong.Value().IsObjectSequence()) {
45061 for (uint32_t indexName0 = 0; indexName0 < arg5.mDict.Value().mObjectSequenceOrLong.Value().GetAsObjectSequence().Length(); ++indexName0) {
45062 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict.Value().mObjectSequenceOrLong.Value().GetAsObjectSequence()[indexName0]))) {
45063 return false;
45064 }
45065 }
45066 }
45067 }
45068 if (arg5.mDict.Value().mObjectSequenceOrLongWithDefaultValue1.IsObjectSequence()) {
45069 for (uint32_t indexName0 = 0; indexName0 < arg5.mDict.Value().mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence().Length(); ++indexName0) {
45070 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict.Value().mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence()[indexName0]))) {
45071 return false;
45072 }
45073 }
45074 }
45075 if (arg5.mDict.Value().mObjectSequenceOrLongWithDefaultValue2.IsObjectSequence()) {
45076 for (uint32_t indexName0 = 0; indexName0 < arg5.mDict.Value().mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence().Length(); ++indexName0) {
45077 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict.Value().mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence()[indexName0]))) {
45078 return false;
45079 }
45080 }
45081 }
45082 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict.Value().mRequiredObject))) {
45083 return false;
45084 }
45085 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict.Value().mSomeAny))) {
45086 return false;
45087 }
45088 if (arg5.mDict.Value().mSomeObj.WasPassed()) {
45089 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict.Value().mSomeObj.Value()))) {
45090 return false;
45091 }
45092 }
45093 if (arg5.mDict.Value().mUint8Array.WasPassed()) {
45094 if (!arg5.mDict.Value().mUint8Array.Value().WrapIntoNewCompartment(cx)) {
45095 return false;
45096 }
45097 }
45098 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict.Value().mParentAny))) {
45099 return false;
45100 }
45101 }
45102 if (arg5.mDict2.WasPassed()) {
45103 if (arg5.mDict2.Value().mMemberDict.WasPassed()) {
45104 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mAnotherAny))) {
45105 return false;
45106 }
45107 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mAnotherObj))) {
45108 return false;
45109 }
45110 if (arg5.mDict2.Value().mMemberDict.Value().mArrayBuffer.WasPassed()) {
45111 if (!arg5.mDict2.Value().mMemberDict.Value().mArrayBuffer.Value().WrapIntoNewCompartment(cx)) {
45112 return false;
45113 }
45114 }
45115 if (arg5.mDict2.Value().mMemberDict.Value().mCustomEventInit.WasPassed()) {
45116 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mCustomEventInit.Value().mDetail))) {
45117 return false;
45118 }
45119 }
45120 if (arg5.mDict2.Value().mMemberDict.Value().mDictionaryTypedef.WasPassed()) {
45121 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mDictionaryTypedef.Value().mDetail))) {
45122 return false;
45123 }
45124 }
45125 if (arg5.mDict2.Value().mMemberDict.Value().mEventInitOrLong2.WasPassed()) {
45126 if (arg5.mDict2.Value().mMemberDict.Value().mEventInitOrLong2.Value().IsCustomEventInit()) {
45127 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mEventInitOrLong2.Value().GetAsCustomEventInit().mDetail))) {
45128 return false;
45129 }
45130 }
45131 }
45132 if (arg5.mDict2.Value().mMemberDict.Value().mEventInitOrLongWithDefaultValue2.IsCustomEventInit()) {
45133 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mEventInitOrLongWithDefaultValue2.GetAsCustomEventInit().mDetail))) {
45134 return false;
45135 }
45136 }
45137 if (arg5.mDict2.Value().mMemberDict.Value().mEventInitOrLongWithDefaultValue4.IsCustomEventInit()) {
45138 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mEventInitOrLongWithDefaultValue4.GetAsCustomEventInit().mDetail))) {
45139 return false;
45140 }
45141 }
45142 if (!arg5.mDict2.Value().mMemberDict.Value().mFloat64Array.IsNull()) {
45143 if (!arg5.mDict2.Value().mMemberDict.Value().mFloat64Array.Value().WrapIntoNewCompartment(cx)) {
45144 return false;
45145 }
45146 }
45147 if (arg5.mDict2.Value().mMemberDict.Value().mNullableArrayBuffer.WasPassed()) {
45148 if (!arg5.mDict2.Value().mMemberDict.Value().mNullableArrayBuffer.Value().IsNull()) {
45149 if (!arg5.mDict2.Value().mMemberDict.Value().mNullableArrayBuffer.Value().Value().WrapIntoNewCompartment(cx)) {
45150 return false;
45151 }
45152 }
45153 }
45154 if (arg5.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLong2.WasPassed()) {
45155 if (!arg5.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLong2.Value().IsNull()) {
45156 if (arg5.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLong2.Value().Value().IsCustomEventInit()) {
45157 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLong2.Value().Value().GetAsCustomEventInit().mDetail))) {
45158 return false;
45159 }
45160 }
45161 }
45162 }
45163 if (!arg5.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLongWithDefaultValue2.IsNull()) {
45164 if (arg5.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLongWithDefaultValue2.Value().IsCustomEventInit()) {
45165 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLongWithDefaultValue2.Value().GetAsCustomEventInit().mDetail))) {
45166 return false;
45167 }
45168 }
45169 }
45170 if (!arg5.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLongWithDefaultValue4.IsNull()) {
45171 if (arg5.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLongWithDefaultValue4.Value().IsCustomEventInit()) {
45172 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mNullableEventInitOrLongWithDefaultValue4.Value().GetAsCustomEventInit().mDetail))) {
45173 return false;
45174 }
45175 }
45176 }
45177 if (arg5.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLong.WasPassed()) {
45178 if (!arg5.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLong.Value().IsNull()) {
45179 if (arg5.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLong.Value().Value().IsObjectSequence()) {
45180 for (uint32_t indexName0 = 0; indexName0 < arg5.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence().Length(); ++indexName0) {
45181 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence()[indexName0]))) {
45182 return false;
45183 }
45184 }
45185 }
45186 }
45187 }
45188 if (!arg5.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.IsNull()) {
45189 if (arg5.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.Value().IsObjectSequence()) {
45190 for (uint32_t indexName0 = 0; indexName0 < arg5.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence().Length(); ++indexName0) {
45191 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence()[indexName0]))) {
45192 return false;
45193 }
45194 }
45195 }
45196 }
45197 if (!arg5.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.IsNull()) {
45198 if (arg5.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.Value().IsObjectSequence()) {
45199 for (uint32_t indexName0 = 0; indexName0 < arg5.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence().Length(); ++indexName0) {
45200 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence()[indexName0]))) {
45201 return false;
45202 }
45203 }
45204 }
45205 }
45206 if (arg5.mDict2.Value().mMemberDict.Value().mObjectOrLong.WasPassed()) {
45207 if (arg5.mDict2.Value().mMemberDict.Value().mObjectOrLong.Value().IsObject()) {
45208 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mObjectOrLong.Value().GetAsObject()))) {
45209 return false;
45210 }
45211 }
45212 }
45213 if (arg5.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLong.WasPassed()) {
45214 if (arg5.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLong.Value().IsObjectSequence()) {
45215 for (uint32_t indexName0 = 0; indexName0 < arg5.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLong.Value().GetAsObjectSequence().Length(); ++indexName0) {
45216 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLong.Value().GetAsObjectSequence()[indexName0]))) {
45217 return false;
45218 }
45219 }
45220 }
45221 }
45222 if (arg5.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLongWithDefaultValue1.IsObjectSequence()) {
45223 for (uint32_t indexName0 = 0; indexName0 < arg5.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence().Length(); ++indexName0) {
45224 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence()[indexName0]))) {
45225 return false;
45226 }
45227 }
45228 }
45229 if (arg5.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLongWithDefaultValue2.IsObjectSequence()) {
45230 for (uint32_t indexName0 = 0; indexName0 < arg5.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence().Length(); ++indexName0) {
45231 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence()[indexName0]))) {
45232 return false;
45233 }
45234 }
45235 }
45236 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mRequiredObject))) {
45237 return false;
45238 }
45239 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mSomeAny))) {
45240 return false;
45241 }
45242 if (arg5.mDict2.Value().mMemberDict.Value().mSomeObj.WasPassed()) {
45243 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mSomeObj.Value()))) {
45244 return false;
45245 }
45246 }
45247 if (arg5.mDict2.Value().mMemberDict.Value().mUint8Array.WasPassed()) {
45248 if (!arg5.mDict2.Value().mMemberDict.Value().mUint8Array.Value().WrapIntoNewCompartment(cx)) {
45249 return false;
45250 }
45251 }
45252 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mDict2.Value().mMemberDict.Value().mParentAny))) {
45253 return false;
45254 }
45255 }
45256 }
45257 if (arg5.mObj1.WasPassed()) {
45258 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mObj1.Value()))) {
45259 return false;
45260 }
45261 }
45262 if (arg5.mObj2.WasPassed()) {
45263 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mObj2.Value()))) {
45264 return false;
45265 }
45266 }
45267 if (arg5.mSeq1.WasPassed()) {
45268 for (uint32_t indexName0 = 0; indexName0 < arg5.mSeq1.Value().Length(); ++indexName0) {
45269 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mAnotherAny))) {
45270 return false;
45271 }
45272 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mAnotherObj))) {
45273 return false;
45274 }
45275 if (arg5.mSeq1.Value()[indexName0].mArrayBuffer.WasPassed()) {
45276 if (!arg5.mSeq1.Value()[indexName0].mArrayBuffer.Value().WrapIntoNewCompartment(cx)) {
45277 return false;
45278 }
45279 }
45280 if (arg5.mSeq1.Value()[indexName0].mCustomEventInit.WasPassed()) {
45281 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mCustomEventInit.Value().mDetail))) {
45282 return false;
45283 }
45284 }
45285 if (arg5.mSeq1.Value()[indexName0].mDictionaryTypedef.WasPassed()) {
45286 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mDictionaryTypedef.Value().mDetail))) {
45287 return false;
45288 }
45289 }
45290 if (arg5.mSeq1.Value()[indexName0].mEventInitOrLong2.WasPassed()) {
45291 if (arg5.mSeq1.Value()[indexName0].mEventInitOrLong2.Value().IsCustomEventInit()) {
45292 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mEventInitOrLong2.Value().GetAsCustomEventInit().mDetail))) {
45293 return false;
45294 }
45295 }
45296 }
45297 if (arg5.mSeq1.Value()[indexName0].mEventInitOrLongWithDefaultValue2.IsCustomEventInit()) {
45298 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mEventInitOrLongWithDefaultValue2.GetAsCustomEventInit().mDetail))) {
45299 return false;
45300 }
45301 }
45302 if (arg5.mSeq1.Value()[indexName0].mEventInitOrLongWithDefaultValue4.IsCustomEventInit()) {
45303 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mEventInitOrLongWithDefaultValue4.GetAsCustomEventInit().mDetail))) {
45304 return false;
45305 }
45306 }
45307 if (!arg5.mSeq1.Value()[indexName0].mFloat64Array.IsNull()) {
45308 if (!arg5.mSeq1.Value()[indexName0].mFloat64Array.Value().WrapIntoNewCompartment(cx)) {
45309 return false;
45310 }
45311 }
45312 if (arg5.mSeq1.Value()[indexName0].mNullableArrayBuffer.WasPassed()) {
45313 if (!arg5.mSeq1.Value()[indexName0].mNullableArrayBuffer.Value().IsNull()) {
45314 if (!arg5.mSeq1.Value()[indexName0].mNullableArrayBuffer.Value().Value().WrapIntoNewCompartment(cx)) {
45315 return false;
45316 }
45317 }
45318 }
45319 if (arg5.mSeq1.Value()[indexName0].mNullableEventInitOrLong2.WasPassed()) {
45320 if (!arg5.mSeq1.Value()[indexName0].mNullableEventInitOrLong2.Value().IsNull()) {
45321 if (arg5.mSeq1.Value()[indexName0].mNullableEventInitOrLong2.Value().Value().IsCustomEventInit()) {
45322 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mNullableEventInitOrLong2.Value().Value().GetAsCustomEventInit().mDetail))) {
45323 return false;
45324 }
45325 }
45326 }
45327 }
45328 if (!arg5.mSeq1.Value()[indexName0].mNullableEventInitOrLongWithDefaultValue2.IsNull()) {
45329 if (arg5.mSeq1.Value()[indexName0].mNullableEventInitOrLongWithDefaultValue2.Value().IsCustomEventInit()) {
45330 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mNullableEventInitOrLongWithDefaultValue2.Value().GetAsCustomEventInit().mDetail))) {
45331 return false;
45332 }
45333 }
45334 }
45335 if (!arg5.mSeq1.Value()[indexName0].mNullableEventInitOrLongWithDefaultValue4.IsNull()) {
45336 if (arg5.mSeq1.Value()[indexName0].mNullableEventInitOrLongWithDefaultValue4.Value().IsCustomEventInit()) {
45337 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mNullableEventInitOrLongWithDefaultValue4.Value().GetAsCustomEventInit().mDetail))) {
45338 return false;
45339 }
45340 }
45341 }
45342 if (arg5.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLong.WasPassed()) {
45343 if (!arg5.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLong.Value().IsNull()) {
45344 if (arg5.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLong.Value().Value().IsObjectSequence()) {
45345 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence().Length(); ++indexName1) {
45346 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence()[indexName1]))) {
45347 return false;
45348 }
45349 }
45350 }
45351 }
45352 }
45353 if (!arg5.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.IsNull()) {
45354 if (arg5.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.Value().IsObjectSequence()) {
45355 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence().Length(); ++indexName1) {
45356 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence()[indexName1]))) {
45357 return false;
45358 }
45359 }
45360 }
45361 }
45362 if (!arg5.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.IsNull()) {
45363 if (arg5.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.Value().IsObjectSequence()) {
45364 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence().Length(); ++indexName1) {
45365 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence()[indexName1]))) {
45366 return false;
45367 }
45368 }
45369 }
45370 }
45371 if (arg5.mSeq1.Value()[indexName0].mObjectOrLong.WasPassed()) {
45372 if (arg5.mSeq1.Value()[indexName0].mObjectOrLong.Value().IsObject()) {
45373 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mObjectOrLong.Value().GetAsObject()))) {
45374 return false;
45375 }
45376 }
45377 }
45378 if (arg5.mSeq1.Value()[indexName0].mObjectSequenceOrLong.WasPassed()) {
45379 if (arg5.mSeq1.Value()[indexName0].mObjectSequenceOrLong.Value().IsObjectSequence()) {
45380 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq1.Value()[indexName0].mObjectSequenceOrLong.Value().GetAsObjectSequence().Length(); ++indexName1) {
45381 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mObjectSequenceOrLong.Value().GetAsObjectSequence()[indexName1]))) {
45382 return false;
45383 }
45384 }
45385 }
45386 }
45387 if (arg5.mSeq1.Value()[indexName0].mObjectSequenceOrLongWithDefaultValue1.IsObjectSequence()) {
45388 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq1.Value()[indexName0].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence().Length(); ++indexName1) {
45389 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence()[indexName1]))) {
45390 return false;
45391 }
45392 }
45393 }
45394 if (arg5.mSeq1.Value()[indexName0].mObjectSequenceOrLongWithDefaultValue2.IsObjectSequence()) {
45395 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq1.Value()[indexName0].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence().Length(); ++indexName1) {
45396 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence()[indexName1]))) {
45397 return false;
45398 }
45399 }
45400 }
45401 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mRequiredObject))) {
45402 return false;
45403 }
45404 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mSomeAny))) {
45405 return false;
45406 }
45407 if (arg5.mSeq1.Value()[indexName0].mSomeObj.WasPassed()) {
45408 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mSomeObj.Value()))) {
45409 return false;
45410 }
45411 }
45412 if (arg5.mSeq1.Value()[indexName0].mUint8Array.WasPassed()) {
45413 if (!arg5.mSeq1.Value()[indexName0].mUint8Array.Value().WrapIntoNewCompartment(cx)) {
45414 return false;
45415 }
45416 }
45417 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq1.Value()[indexName0].mParentAny))) {
45418 return false;
45419 }
45420 }
45421 }
45422 if (arg5.mSeq2.WasPassed()) {
45423 if (!arg5.mSeq2.Value().IsNull()) {
45424 for (uint32_t indexName0 = 0; indexName0 < arg5.mSeq2.Value().Value().Length(); ++indexName0) {
45425 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq2.Value().Value()[indexName0].Length(); ++indexName1) {
45426 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mAnotherAny))) {
45427 return false;
45428 }
45429 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mAnotherObj))) {
45430 return false;
45431 }
45432 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mArrayBuffer.WasPassed()) {
45433 if (!arg5.mSeq2.Value().Value()[indexName0][indexName1].mArrayBuffer.Value().WrapIntoNewCompartment(cx)) {
45434 return false;
45435 }
45436 }
45437 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mCustomEventInit.WasPassed()) {
45438 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mCustomEventInit.Value().mDetail))) {
45439 return false;
45440 }
45441 }
45442 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mDictionaryTypedef.WasPassed()) {
45443 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mDictionaryTypedef.Value().mDetail))) {
45444 return false;
45445 }
45446 }
45447 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mEventInitOrLong2.WasPassed()) {
45448 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mEventInitOrLong2.Value().IsCustomEventInit()) {
45449 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mEventInitOrLong2.Value().GetAsCustomEventInit().mDetail))) {
45450 return false;
45451 }
45452 }
45453 }
45454 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mEventInitOrLongWithDefaultValue2.IsCustomEventInit()) {
45455 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mEventInitOrLongWithDefaultValue2.GetAsCustomEventInit().mDetail))) {
45456 return false;
45457 }
45458 }
45459 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mEventInitOrLongWithDefaultValue4.IsCustomEventInit()) {
45460 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mEventInitOrLongWithDefaultValue4.GetAsCustomEventInit().mDetail))) {
45461 return false;
45462 }
45463 }
45464 if (!arg5.mSeq2.Value().Value()[indexName0][indexName1].mFloat64Array.IsNull()) {
45465 if (!arg5.mSeq2.Value().Value()[indexName0][indexName1].mFloat64Array.Value().WrapIntoNewCompartment(cx)) {
45466 return false;
45467 }
45468 }
45469 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableArrayBuffer.WasPassed()) {
45470 if (!arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableArrayBuffer.Value().IsNull()) {
45471 if (!arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableArrayBuffer.Value().Value().WrapIntoNewCompartment(cx)) {
45472 return false;
45473 }
45474 }
45475 }
45476 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLong2.WasPassed()) {
45477 if (!arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLong2.Value().IsNull()) {
45478 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLong2.Value().Value().IsCustomEventInit()) {
45479 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLong2.Value().Value().GetAsCustomEventInit().mDetail))) {
45480 return false;
45481 }
45482 }
45483 }
45484 }
45485 if (!arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLongWithDefaultValue2.IsNull()) {
45486 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLongWithDefaultValue2.Value().IsCustomEventInit()) {
45487 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLongWithDefaultValue2.Value().GetAsCustomEventInit().mDetail))) {
45488 return false;
45489 }
45490 }
45491 }
45492 if (!arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLongWithDefaultValue4.IsNull()) {
45493 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLongWithDefaultValue4.Value().IsCustomEventInit()) {
45494 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableEventInitOrLongWithDefaultValue4.Value().GetAsCustomEventInit().mDetail))) {
45495 return false;
45496 }
45497 }
45498 }
45499 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLong.WasPassed()) {
45500 if (!arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLong.Value().IsNull()) {
45501 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLong.Value().Value().IsObjectSequence()) {
45502 for (uint32_t indexName2 = 0; indexName2 < arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence().Length(); ++indexName2) {
45503 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence()[indexName2]))) {
45504 return false;
45505 }
45506 }
45507 }
45508 }
45509 }
45510 if (!arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.IsNull()) {
45511 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.Value().IsObjectSequence()) {
45512 for (uint32_t indexName2 = 0; indexName2 < arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence().Length(); ++indexName2) {
45513 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence()[indexName2]))) {
45514 return false;
45515 }
45516 }
45517 }
45518 }
45519 if (!arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.IsNull()) {
45520 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.Value().IsObjectSequence()) {
45521 for (uint32_t indexName2 = 0; indexName2 < arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence().Length(); ++indexName2) {
45522 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence()[indexName2]))) {
45523 return false;
45524 }
45525 }
45526 }
45527 }
45528 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mObjectOrLong.WasPassed()) {
45529 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mObjectOrLong.Value().IsObject()) {
45530 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mObjectOrLong.Value().GetAsObject()))) {
45531 return false;
45532 }
45533 }
45534 }
45535 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLong.WasPassed()) {
45536 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLong.Value().IsObjectSequence()) {
45537 for (uint32_t indexName2 = 0; indexName2 < arg5.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLong.Value().GetAsObjectSequence().Length(); ++indexName2) {
45538 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLong.Value().GetAsObjectSequence()[indexName2]))) {
45539 return false;
45540 }
45541 }
45542 }
45543 }
45544 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLongWithDefaultValue1.IsObjectSequence()) {
45545 for (uint32_t indexName2 = 0; indexName2 < arg5.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence().Length(); ++indexName2) {
45546 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence()[indexName2]))) {
45547 return false;
45548 }
45549 }
45550 }
45551 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLongWithDefaultValue2.IsObjectSequence()) {
45552 for (uint32_t indexName2 = 0; indexName2 < arg5.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence().Length(); ++indexName2) {
45553 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence()[indexName2]))) {
45554 return false;
45555 }
45556 }
45557 }
45558 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mRequiredObject))) {
45559 return false;
45560 }
45561 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mSomeAny))) {
45562 return false;
45563 }
45564 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mSomeObj.WasPassed()) {
45565 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mSomeObj.Value()))) {
45566 return false;
45567 }
45568 }
45569 if (arg5.mSeq2.Value().Value()[indexName0][indexName1].mUint8Array.WasPassed()) {
45570 if (!arg5.mSeq2.Value().Value()[indexName0][indexName1].mUint8Array.Value().WrapIntoNewCompartment(cx)) {
45571 return false;
45572 }
45573 }
45574 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq2.Value().Value()[indexName0][indexName1].mParentAny))) {
45575 return false;
45576 }
45577 }
45578 }
45579 }
45580 }
45581 if (arg5.mSeq3.WasPassed()) {
45582 for (uint32_t indexName0 = 0; indexName0 < arg5.mSeq3.Value().Length(); ++indexName0) {
45583 if (!arg5.mSeq3.Value()[indexName0].IsNull()) {
45584 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq3.Value()[indexName0].Value().Length(); ++indexName1) {
45585 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mAnotherAny))) {
45586 return false;
45587 }
45588 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mAnotherObj))) {
45589 return false;
45590 }
45591 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mArrayBuffer.WasPassed()) {
45592 if (!arg5.mSeq3.Value()[indexName0].Value()[indexName1].mArrayBuffer.Value().WrapIntoNewCompartment(cx)) {
45593 return false;
45594 }
45595 }
45596 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mCustomEventInit.WasPassed()) {
45597 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mCustomEventInit.Value().mDetail))) {
45598 return false;
45599 }
45600 }
45601 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mDictionaryTypedef.WasPassed()) {
45602 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mDictionaryTypedef.Value().mDetail))) {
45603 return false;
45604 }
45605 }
45606 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mEventInitOrLong2.WasPassed()) {
45607 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mEventInitOrLong2.Value().IsCustomEventInit()) {
45608 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mEventInitOrLong2.Value().GetAsCustomEventInit().mDetail))) {
45609 return false;
45610 }
45611 }
45612 }
45613 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mEventInitOrLongWithDefaultValue2.IsCustomEventInit()) {
45614 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mEventInitOrLongWithDefaultValue2.GetAsCustomEventInit().mDetail))) {
45615 return false;
45616 }
45617 }
45618 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mEventInitOrLongWithDefaultValue4.IsCustomEventInit()) {
45619 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mEventInitOrLongWithDefaultValue4.GetAsCustomEventInit().mDetail))) {
45620 return false;
45621 }
45622 }
45623 if (!arg5.mSeq3.Value()[indexName0].Value()[indexName1].mFloat64Array.IsNull()) {
45624 if (!arg5.mSeq3.Value()[indexName0].Value()[indexName1].mFloat64Array.Value().WrapIntoNewCompartment(cx)) {
45625 return false;
45626 }
45627 }
45628 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableArrayBuffer.WasPassed()) {
45629 if (!arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableArrayBuffer.Value().IsNull()) {
45630 if (!arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableArrayBuffer.Value().Value().WrapIntoNewCompartment(cx)) {
45631 return false;
45632 }
45633 }
45634 }
45635 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLong2.WasPassed()) {
45636 if (!arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLong2.Value().IsNull()) {
45637 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLong2.Value().Value().IsCustomEventInit()) {
45638 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLong2.Value().Value().GetAsCustomEventInit().mDetail))) {
45639 return false;
45640 }
45641 }
45642 }
45643 }
45644 if (!arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLongWithDefaultValue2.IsNull()) {
45645 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLongWithDefaultValue2.Value().IsCustomEventInit()) {
45646 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLongWithDefaultValue2.Value().GetAsCustomEventInit().mDetail))) {
45647 return false;
45648 }
45649 }
45650 }
45651 if (!arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLongWithDefaultValue4.IsNull()) {
45652 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLongWithDefaultValue4.Value().IsCustomEventInit()) {
45653 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableEventInitOrLongWithDefaultValue4.Value().GetAsCustomEventInit().mDetail))) {
45654 return false;
45655 }
45656 }
45657 }
45658 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLong.WasPassed()) {
45659 if (!arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLong.Value().IsNull()) {
45660 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLong.Value().Value().IsObjectSequence()) {
45661 for (uint32_t indexName2 = 0; indexName2 < arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence().Length(); ++indexName2) {
45662 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence()[indexName2]))) {
45663 return false;
45664 }
45665 }
45666 }
45667 }
45668 }
45669 if (!arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.IsNull()) {
45670 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.Value().IsObjectSequence()) {
45671 for (uint32_t indexName2 = 0; indexName2 < arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence().Length(); ++indexName2) {
45672 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence()[indexName2]))) {
45673 return false;
45674 }
45675 }
45676 }
45677 }
45678 if (!arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.IsNull()) {
45679 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.Value().IsObjectSequence()) {
45680 for (uint32_t indexName2 = 0; indexName2 < arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence().Length(); ++indexName2) {
45681 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence()[indexName2]))) {
45682 return false;
45683 }
45684 }
45685 }
45686 }
45687 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mObjectOrLong.WasPassed()) {
45688 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mObjectOrLong.Value().IsObject()) {
45689 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mObjectOrLong.Value().GetAsObject()))) {
45690 return false;
45691 }
45692 }
45693 }
45694 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLong.WasPassed()) {
45695 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLong.Value().IsObjectSequence()) {
45696 for (uint32_t indexName2 = 0; indexName2 < arg5.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLong.Value().GetAsObjectSequence().Length(); ++indexName2) {
45697 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLong.Value().GetAsObjectSequence()[indexName2]))) {
45698 return false;
45699 }
45700 }
45701 }
45702 }
45703 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLongWithDefaultValue1.IsObjectSequence()) {
45704 for (uint32_t indexName2 = 0; indexName2 < arg5.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence().Length(); ++indexName2) {
45705 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence()[indexName2]))) {
45706 return false;
45707 }
45708 }
45709 }
45710 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLongWithDefaultValue2.IsObjectSequence()) {
45711 for (uint32_t indexName2 = 0; indexName2 < arg5.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence().Length(); ++indexName2) {
45712 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence()[indexName2]))) {
45713 return false;
45714 }
45715 }
45716 }
45717 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mRequiredObject))) {
45718 return false;
45719 }
45720 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mSomeAny))) {
45721 return false;
45722 }
45723 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mSomeObj.WasPassed()) {
45724 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mSomeObj.Value()))) {
45725 return false;
45726 }
45727 }
45728 if (arg5.mSeq3.Value()[indexName0].Value()[indexName1].mUint8Array.WasPassed()) {
45729 if (!arg5.mSeq3.Value()[indexName0].Value()[indexName1].mUint8Array.Value().WrapIntoNewCompartment(cx)) {
45730 return false;
45731 }
45732 }
45733 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq3.Value()[indexName0].Value()[indexName1].mParentAny))) {
45734 return false;
45735 }
45736 }
45737 }
45738 }
45739 }
45740 if (arg5.mSeq4.WasPassed()) {
45741 for (uint32_t indexName0 = 0; indexName0 < arg5.mSeq4.Value().Length(); ++indexName0) {
45742 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq4.Value()[indexName0]))) {
45743 return false;
45744 }
45745 }
45746 }
45747 if (arg5.mSeq5.WasPassed()) {
45748 for (uint32_t indexName0 = 0; indexName0 < arg5.mSeq5.Value().Length(); ++indexName0) {
45749 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq5.Value()[indexName0]))) {
45750 return false;
45751 }
45752 }
45753 }
45754 if (arg5.mSeq6.WasPassed()) {
45755 for (uint32_t indexName0 = 0; indexName0 < arg5.mSeq6.Value().Length(); ++indexName0) {
45756 if (arg5.mSeq6.Value()[indexName0].mOurSequence3.WasPassed()) {
45757 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq6.Value()[indexName0].mOurSequence3.Value().Length(); ++indexName1) {
45758 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg5.mSeq6.Value()[indexName0].mOurSequence3.Value()[indexName1]))) {
45759 return false;
45760 }
45761 }
45762 }
45763 if (arg5.mSeq6.Value()[indexName0].mOurSequence4.WasPassed()) {
45764 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq6.Value()[indexName0].mOurSequence4.Value().Length(); ++indexName1) {
45765 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq6.Value()[indexName0].mOurSequence4.Value()[indexName1]))) {
45766 return false;
45767 }
45768 }
45769 }
45770 if (arg5.mSeq6.Value()[indexName0].mOurSequence5.WasPassed()) {
45771 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq6.Value()[indexName0].mOurSequence5.Value().Length(); ++indexName1) {
45772 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq6.Value()[indexName0].mOurSequence5.Value()[indexName1]))) {
45773 return false;
45774 }
45775 }
45776 }
45777 if (arg5.mSeq6.Value()[indexName0].mOurSequence6.WasPassed()) {
45778 if (!arg5.mSeq6.Value()[indexName0].mOurSequence6.Value().IsNull()) {
45779 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq6.Value()[indexName0].mOurSequence6.Value().Value().Length(); ++indexName1) {
45780 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq6.Value()[indexName0].mOurSequence6.Value().Value()[indexName1]))) {
45781 return false;
45782 }
45783 }
45784 }
45785 }
45786 if (arg5.mSeq6.Value()[indexName0].mOurSequence7.WasPassed()) {
45787 if (!arg5.mSeq6.Value()[indexName0].mOurSequence7.Value().IsNull()) {
45788 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq6.Value()[indexName0].mOurSequence7.Value().Value().Length(); ++indexName1) {
45789 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq6.Value()[indexName0].mOurSequence7.Value().Value()[indexName1]))) {
45790 return false;
45791 }
45792 }
45793 }
45794 }
45795 if (!arg5.mSeq6.Value()[indexName0].mOurSequence8.IsNull()) {
45796 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq6.Value()[indexName0].mOurSequence8.Value().Length(); ++indexName1) {
45797 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq6.Value()[indexName0].mOurSequence8.Value()[indexName1]))) {
45798 return false;
45799 }
45800 }
45801 }
45802 if (!arg5.mSeq6.Value()[indexName0].mOurSequence9.IsNull()) {
45803 for (uint32_t indexName1 = 0; indexName1 < arg5.mSeq6.Value()[indexName0].mOurSequence9.Value().Length(); ++indexName1) {
45804 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg5.mSeq6.Value()[indexName0].mOurSequence9.Value()[indexName1]))) {
45805 return false;
45806 }
45807 }
45808 }
45809 }
45810 }
45811 if (!JS_WrapValue(cx, &arg6)) {
45812 return false;
45813 }
45814 if (!JS_WrapObject(cx, &arg7)) {
45815 return false;
45816 }
45817 if (!JS_WrapObject(cx, &arg8)) {
45818 return false;
45819 }
45820 for (uint32_t indexName0 = 0; indexName0 < arg9.Length(); ++indexName0) {
45821 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg9[indexName0].mAnotherAny))) {
45822 return false;
45823 }
45824 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg9[indexName0].mAnotherObj))) {
45825 return false;
45826 }
45827 if (arg9[indexName0].mArrayBuffer.WasPassed()) {
45828 if (!arg9[indexName0].mArrayBuffer.Value().WrapIntoNewCompartment(cx)) {
45829 return false;
45830 }
45831 }
45832 if (arg9[indexName0].mCustomEventInit.WasPassed()) {
45833 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg9[indexName0].mCustomEventInit.Value().mDetail))) {
45834 return false;
45835 }
45836 }
45837 if (arg9[indexName0].mDictionaryTypedef.WasPassed()) {
45838 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg9[indexName0].mDictionaryTypedef.Value().mDetail))) {
45839 return false;
45840 }
45841 }
45842 if (arg9[indexName0].mEventInitOrLong2.WasPassed()) {
45843 if (arg9[indexName0].mEventInitOrLong2.Value().IsCustomEventInit()) {
45844 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg9[indexName0].mEventInitOrLong2.Value().GetAsCustomEventInit().mDetail))) {
45845 return false;
45846 }
45847 }
45848 }
45849 if (arg9[indexName0].mEventInitOrLongWithDefaultValue2.IsCustomEventInit()) {
45850 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg9[indexName0].mEventInitOrLongWithDefaultValue2.GetAsCustomEventInit().mDetail))) {
45851 return false;
45852 }
45853 }
45854 if (arg9[indexName0].mEventInitOrLongWithDefaultValue4.IsCustomEventInit()) {
45855 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg9[indexName0].mEventInitOrLongWithDefaultValue4.GetAsCustomEventInit().mDetail))) {
45856 return false;
45857 }
45858 }
45859 if (!arg9[indexName0].mFloat64Array.IsNull()) {
45860 if (!arg9[indexName0].mFloat64Array.Value().WrapIntoNewCompartment(cx)) {
45861 return false;
45862 }
45863 }
45864 if (arg9[indexName0].mNullableArrayBuffer.WasPassed()) {
45865 if (!arg9[indexName0].mNullableArrayBuffer.Value().IsNull()) {
45866 if (!arg9[indexName0].mNullableArrayBuffer.Value().Value().WrapIntoNewCompartment(cx)) {
45867 return false;
45868 }
45869 }
45870 }
45871 if (arg9[indexName0].mNullableEventInitOrLong2.WasPassed()) {
45872 if (!arg9[indexName0].mNullableEventInitOrLong2.Value().IsNull()) {
45873 if (arg9[indexName0].mNullableEventInitOrLong2.Value().Value().IsCustomEventInit()) {
45874 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg9[indexName0].mNullableEventInitOrLong2.Value().Value().GetAsCustomEventInit().mDetail))) {
45875 return false;
45876 }
45877 }
45878 }
45879 }
45880 if (!arg9[indexName0].mNullableEventInitOrLongWithDefaultValue2.IsNull()) {
45881 if (arg9[indexName0].mNullableEventInitOrLongWithDefaultValue2.Value().IsCustomEventInit()) {
45882 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg9[indexName0].mNullableEventInitOrLongWithDefaultValue2.Value().GetAsCustomEventInit().mDetail))) {
45883 return false;
45884 }
45885 }
45886 }
45887 if (!arg9[indexName0].mNullableEventInitOrLongWithDefaultValue4.IsNull()) {
45888 if (arg9[indexName0].mNullableEventInitOrLongWithDefaultValue4.Value().IsCustomEventInit()) {
45889 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg9[indexName0].mNullableEventInitOrLongWithDefaultValue4.Value().GetAsCustomEventInit().mDetail))) {
45890 return false;
45891 }
45892 }
45893 }
45894 if (arg9[indexName0].mNullableObjectSequenceOrLong.WasPassed()) {
45895 if (!arg9[indexName0].mNullableObjectSequenceOrLong.Value().IsNull()) {
45896 if (arg9[indexName0].mNullableObjectSequenceOrLong.Value().Value().IsObjectSequence()) {
45897 for (uint32_t indexName1 = 0; indexName1 < arg9[indexName0].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence().Length(); ++indexName1) {
45898 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg9[indexName0].mNullableObjectSequenceOrLong.Value().Value().GetAsObjectSequence()[indexName1]))) {
45899 return false;
45900 }
45901 }
45902 }
45903 }
45904 }
45905 if (!arg9[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.IsNull()) {
45906 if (arg9[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.Value().IsObjectSequence()) {
45907 for (uint32_t indexName1 = 0; indexName1 < arg9[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence().Length(); ++indexName1) {
45908 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg9[indexName0].mNullableObjectSequenceOrLongWithDefaultValue1.Value().GetAsObjectSequence()[indexName1]))) {
45909 return false;
45910 }
45911 }
45912 }
45913 }
45914 if (!arg9[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.IsNull()) {
45915 if (arg9[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.Value().IsObjectSequence()) {
45916 for (uint32_t indexName1 = 0; indexName1 < arg9[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence().Length(); ++indexName1) {
45917 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg9[indexName0].mNullableObjectSequenceOrLongWithDefaultValue2.Value().GetAsObjectSequence()[indexName1]))) {
45918 return false;
45919 }
45920 }
45921 }
45922 }
45923 if (arg9[indexName0].mObjectOrLong.WasPassed()) {
45924 if (arg9[indexName0].mObjectOrLong.Value().IsObject()) {
45925 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg9[indexName0].mObjectOrLong.Value().GetAsObject()))) {
45926 return false;
45927 }
45928 }
45929 }
45930 if (arg9[indexName0].mObjectSequenceOrLong.WasPassed()) {
45931 if (arg9[indexName0].mObjectSequenceOrLong.Value().IsObjectSequence()) {
45932 for (uint32_t indexName1 = 0; indexName1 < arg9[indexName0].mObjectSequenceOrLong.Value().GetAsObjectSequence().Length(); ++indexName1) {
45933 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg9[indexName0].mObjectSequenceOrLong.Value().GetAsObjectSequence()[indexName1]))) {
45934 return false;
45935 }
45936 }
45937 }
45938 }
45939 if (arg9[indexName0].mObjectSequenceOrLongWithDefaultValue1.IsObjectSequence()) {
45940 for (uint32_t indexName1 = 0; indexName1 < arg9[indexName0].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence().Length(); ++indexName1) {
45941 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg9[indexName0].mObjectSequenceOrLongWithDefaultValue1.GetAsObjectSequence()[indexName1]))) {
45942 return false;
45943 }
45944 }
45945 }
45946 if (arg9[indexName0].mObjectSequenceOrLongWithDefaultValue2.IsObjectSequence()) {
45947 for (uint32_t indexName1 = 0; indexName1 < arg9[indexName0].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence().Length(); ++indexName1) {
45948 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg9[indexName0].mObjectSequenceOrLongWithDefaultValue2.GetAsObjectSequence()[indexName1]))) {
45949 return false;
45950 }
45951 }
45952 }
45953 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg9[indexName0].mRequiredObject))) {
45954 return false;
45955 }
45956 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg9[indexName0].mSomeAny))) {
45957 return false;
45958 }
45959 if (arg9[indexName0].mSomeObj.WasPassed()) {
45960 if (!JS_WrapObject(cx, JS::MutableHandle<JSObject*>::fromMarkedLocation(&arg9[indexName0].mSomeObj.Value()))) {
45961 return false;
45962 }
45963 }
45964 if (arg9[indexName0].mUint8Array.WasPassed()) {
45965 if (!arg9[indexName0].mUint8Array.Value().WrapIntoNewCompartment(cx)) {
45966 return false;
45967 }
45968 }
45969 if (!JS_WrapValue(cx, JS::MutableHandle<JS::Value>::fromMarkedLocation(&arg9[indexName0].mParentAny))) {
45970 return false;
45971 }
45972 }
45973 if (!JS_WrapValue(cx, &arg10)) {
45974 return false;
45975 }
45976 if (arg11.WasPassed()) {
45977 if (!JS_WrapObject(cx, &arg11.Value())) {
45978 return false;
45979 }
45980 }
45981 if (arg12.WasPassed()) {
45982 if (!JS_WrapObject(cx, &arg12.Value())) {
45983 return false;
45984 }
45985 }
45986 if (!arg13.WrapIntoNewCompartment(cx)) {
45987 return false;
45988 }
45989 if (!arg14.WrapIntoNewCompartment(cx)) {
45990 return false;
45991 }
45992 }
45993 FastErrorResult rv;
45994 auto result(StrongOrRawPtr<mozilla::dom::TestJSImplInterface>(mozilla::dom::TestJSImplInterface::Constructor(global, cx, NonNullHelper(Constify(arg0)), arg1, Constify(arg2), MOZ_KnownLive(Constify(arg3))(Constify(arg3)), arg4, Constify(arg5), arg6, arg7, arg8, Constify(arg9), arg10, Constify(arg11), Constify(arg12), Constify(arg13), Constify(arg14), rv, desiredProto)));
45995 if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx, "TestJSImplInterface constructor"))(__builtin_expect(!!(rv.MaybeSetPendingException(cx, "TestJSImplInterface constructor"
)), 0))
) {
45996 return false;
45997 }
45998 MOZ_ASSERT(!JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!JS_IsExceptionPending(cx)))
), 0))) { do { } while (false); MOZ_ReportAssertionFailure("!JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 45998); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!JS_IsExceptionPending(cx)" ")"); do { *((
volatile int*)__null) = 45998; __attribute__((nomerge)) ::abort
(); } while (false); } } while (false)
;
45999 static_assert(!std::is_pointer_v<decltype(result)>,
46000 "NewObject implies that we need to keep the object alive with a strong reference.");
46001 if (!GetOrCreateDOMReflector(cx, result, args.rval(), desiredProto)) {
46002 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 46002); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 46002; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46003 return false;
46004 }
46005 return true;
46006}
46007
46008static const DOMInterfaceInfo sInterfaceObjectInfo = {
46009 { _constructor, &sNativePropertyHooks },
46010 JS::GetRealmFunctionPrototype,
46011 prototypes::id::TestJSImplInterface,
46012 PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth,
46013 true,
46014};
46015
46016static const DOMIfaceAndProtoJSClass sPrototypeClass = {
46017 {
46018 "TestJSImplInterfacePrototype",
46019 JSCLASS_IS_DOMIFACEANDPROTOJSCLASSJSCLASS_USERBIT2 | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE0),
46020 JS_NULL_CLASS_OPS,
46021 JS_NULL_CLASS_SPEC,
46022 JS_NULL_CLASS_EXT,
46023 JS_NULL_OBJECT_OPS
46024 },
46025 eInterfacePrototype,
46026 prototypes::id::TestJSImplInterface,
46027 PrototypeTraits<prototypes::id::TestJSImplInterface>::Depth,
46028 &sNativePropertyHooks,
46029 JS::GetRealmObjectPrototype
46030};
46031
46032static const JSClassOps sClassOps = {
46033 _addProperty, /* addProperty */
46034 nullptr, /* delProperty */
46035 nullptr, /* enumerate */
46036 nullptr, /* newEnumerate */
46037 nullptr, /* resolve */
46038 nullptr, /* mayResolve */
46039 _finalize, /* finalize */
46040 nullptr, /* call */
46041 nullptr, /* construct */
46042 nullptr, /* trace */
46043};
46044
46045static const js::ClassExtension sClassExtension = {
46046 _objectMoved /* objectMovedOp */
46047};
46048
46049static const DOMJSClass sClass = {
46050 { "TestJSImplInterface",
46051 JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
46052 &sClassOps,
46053 JS_NULL_CLASS_SPEC,
46054 &sClassExtension,
46055 JS_NULL_OBJECT_OPS
46056 },
46057 { prototypes::id::TestJSImplInterface, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
46058 std::is_base_of_v<nsISupports, mozilla::dom::TestJSImplInterface>,
46059 &sNativePropertyHooks,
46060 FindAssociatedGlobalForNative<mozilla::dom::TestJSImplInterface>::Get,
46061 GetProtoObjectHandle,
46062 GetCCParticipant<mozilla::dom::TestJSImplInterface>::Get(),
46063 nullptr,
46064 _getWrapperCache
46065};
46066static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS1,
46067 "Must have the right minimal number of reserved slots.");
46068static_assert(1 >= 1,
46069 "Must have enough reserved slots.");
46070
46071bool
46072Wrap(JSContext* aCx, mozilla::dom::TestJSImplInterface* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
46073{
46074 static_assert(!std::is_base_of_v<NonRefcountedDOMObject, mozilla::dom::TestJSImplInterface>,
46075 "Shouldn't have wrappercached things that are not refcounted.");
46076 static_assert(std::is_same_v<decltype(aObject), mozilla::dom::TestJSImplInterface*>);
46077 MOZ_ASSERT(ToSupportsIsCorrect(aObject))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(ToSupportsIsCorrect(aObject))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(ToSupportsIsCorrect(aObject)
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"ToSupportsIsCorrect(aObject)", "../TestJSImplGenBinding.cpp"
, 46077); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsCorrect(aObject)"
")"); do { *((volatile int*)__null) = 46077; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
46078 MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx))do { if (aGivenProto) { do { static_assert( mozilla::detail::
AssertionConditionType<decltype(js::IsObjectInContextCompartment
(aGivenProto, aCx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(js::IsObjectInContextCompartment
(aGivenProto, aCx)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("js::IsObjectInContextCompartment(aGivenProto, aCx)", "../TestJSImplGenBinding.cpp"
, 46078); AnnotateMozCrashReason("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(aGivenProto, aCx)"
")"); do { *((volatile int*)__null) = 46078; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); } } while
(false)
;
46079 MOZ_ASSERT(!aCache->GetWrapper(),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!aCache->GetWrapper())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!aCache->GetWrapper()))),
0))) { do { } while (false); MOZ_ReportAssertionFailure("!aCache->GetWrapper()"
" (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")", "../TestJSImplGenBinding.cpp"
, 46081); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 46081; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
46080 "You should probably not be using Wrap() directly; use "do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!aCache->GetWrapper())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!aCache->GetWrapper()))),
0))) { do { } while (false); MOZ_ReportAssertionFailure("!aCache->GetWrapper()"
" (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")", "../TestJSImplGenBinding.cpp"
, 46081); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 46081; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
46081 "GetOrCreateDOMReflector instead")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!aCache->GetWrapper())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!aCache->GetWrapper()))),
0))) { do { } while (false); MOZ_ReportAssertionFailure("!aCache->GetWrapper()"
" (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")", "../TestJSImplGenBinding.cpp"
, 46081); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 46081; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46082
46083 MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache
))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)" " ("
"nsISupports must be on our primary inheritance chain" ")", "../TestJSImplGenBinding.cpp"
, 46084); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)"
") (" "nsISupports must be on our primary inheritance chain"
")"); do { *((volatile int*)__null) = 46084; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
46084 "nsISupports must be on our primary inheritance chain")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache
))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)" " ("
"nsISupports must be on our primary inheritance chain" ")", "../TestJSImplGenBinding.cpp"
, 46084); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)"
") (" "nsISupports must be on our primary inheritance chain"
")"); do { *((volatile int*)__null) = 46084; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
46085
46086 // If the wrapper cache contains a dead reflector then finalize that
46087 // now, ensuring that the finalizer for the old reflector always
46088 // runs before the new reflector is created and attached. This
46089 // avoids the awkward situation where there are multiple reflector
46090 // objects that contain pointers to the same native.
46091
46092 if (JSObject* oldReflector = aCache->GetWrapperMaybeDead()) {
46093 _finalize(nullptr /* unused */, oldReflector);
46094 MOZ_ASSERT(!aCache->GetWrapperMaybeDead())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!aCache->GetWrapperMaybeDead())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!aCache->GetWrapperMaybeDead
()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!aCache->GetWrapperMaybeDead()", "../TestJSImplGenBinding.cpp"
, 46094); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapperMaybeDead()"
")"); do { *((volatile int*)__null) = 46094; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
46095 }
46096
46097 JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
46098 if (!global) {
46099 return false;
46100 }
46101 MOZ_ASSERT(JS_IsGlobalObject(global))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsGlobalObject(global))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsGlobalObject(global))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsGlobalObject(global)"
, "../TestJSImplGenBinding.cpp", 46101); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsGlobalObject(global)" ")"); do { *((volatile
int*)__null) = 46101; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46102 JS::AssertObjectIsNotGray(global);
46103
46104 // That might have ended up wrapping us already, due to the wonders
46105 // of XBL. Check for that, and bail out as needed.
46106 aReflector.set(aCache->GetWrapper());
46107 if (aReflector) {
46108#ifdef DEBUG1
46109 AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
46110#endif // DEBUG
46111 return true;
46112 }
46113
46114 JSAutoRealm ar(aCx, global);
46115 JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
46116 if (!canonicalProto) {
46117 return false;
46118 }
46119 JS::Rooted<JSObject*> proto(aCx);
46120 if (aGivenProto) {
46121 proto = aGivenProto;
46122 // Unfortunately, while aGivenProto was in the compartment of aCx
46123 // coming in, we changed compartments to that of "parent" so may need
46124 // to wrap the proto here.
46125 if (js::GetContextCompartment(aCx) != JS::GetCompartment(proto)) {
46126 if (!JS_WrapObject(aCx, &proto)) {
46127 return false;
46128 }
46129 }
46130 } else {
46131 proto = canonicalProto;
46132 }
46133
46134 BindingJSObjectCreator<mozilla::dom::TestJSImplInterface> creator(aCx);
46135 creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
46136 if (!aReflector) {
46137 return false;
46138 }
46139
46140 aCache->SetWrapper(aReflector);
46141 creator.InitializationSucceeded();
46142
46143 MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&do { static_assert( mozilla::detail::AssertionConditionType<
decltype(aCache->GetWrapperPreserveColor() && aCache
->GetWrapperPreserveColor() == aReflector)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(aCache->GetWrapperPreserveColor
() && aCache->GetWrapperPreserveColor() == aReflector
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
, "../TestJSImplGenBinding.cpp", 46144); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
")"); do { *((volatile int*)__null) = 46144; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
46144 aCache->GetWrapperPreserveColor() == aReflector)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(aCache->GetWrapperPreserveColor() && aCache
->GetWrapperPreserveColor() == aReflector)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(aCache->GetWrapperPreserveColor
() && aCache->GetWrapperPreserveColor() == aReflector
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
, "../TestJSImplGenBinding.cpp", 46144); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
")"); do { *((volatile int*)__null) = 46144; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
46145 // If proto != canonicalProto, we have to preserve our wrapper;
46146 // otherwise we won't be able to properly recreate it later, since
46147 // we won't know what proto to use. Note that we don't check
46148 // aGivenProto here, since it's entirely possible (and even
46149 // somewhat common) to have a non-null aGivenProto which is the
46150 // same as canonicalProto.
46151 if (proto != canonicalProto) {
46152 PreserveWrapper(aObject);
46153 }
46154
46155 return true;
46156}
46157
46158void
46159CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
46160{
46161 JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::TestJSImplInterface);
46162 JS::Heap<JSObject*>* interfaceCache = &aProtoAndIfaceCache.EntrySlotOrCreate(constructors::id::TestJSImplInterface);
46163
46164 JS::Rooted<JSObject*> parentProto(aCx, JS::GetRealmObjectPrototype(aCx));
46165 if (!parentProto) {
46166 return;
46167 }
46168
46169 JS::Rooted<JSObject*> constructorProto(aCx, JS::GetRealmFunctionPrototype(aCx));
46170 if (!constructorProto) {
46171 return;
46172 }
46173
46174 dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
46175 &sPrototypeClass, protoCache,
46176 constructorProto, &sInterfaceObjectInfo, 15, false, Span<const LegacyFactoryFunction, 0>{},
46177 interfaceCache,
46178 sNativeProperties.Upcast(),
46179 sChromeOnlyNativeProperties.Upcast(),
46180 "TestJSImplInterface", aDefineOnGlobal,
46181 nullptr,
46182 false,
46183 nullptr);
46184}
46185
46186JSObject*
46187GetProtoObject(JSContext* aCx)
46188{
46189 return GetProtoObjectHandle(aCx);
46190}
46191
46192JSObject*
46193GetConstructorObject(JSContext* aCx)
46194{
46195 return GetConstructorObjectHandle(aCx);
46196}
46197
46198} // namespace TestJSImplInterface_Binding
46199
46200
46201
46202namespace TestJSImplNoInterfaceObject_Binding {
46203
46204static bool
46205_addProperty(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id, JS::Handle<JS::Value> val)
46206{
46207 mozilla::dom::TestJSImplNoInterfaceObject* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestJSImplNoInterfaceObject>(obj);
46208 // We don't want to preserve if we don't have a wrapper, and we
46209 // obviously can't preserve if we're not initialized.
46210 if (self && self->GetWrapperPreserveColor()) {
46211 PreserveWrapper(self);
46212 }
46213 return true;
46214}
46215
46216static void
46217_finalize(JS::GCContext* gcx, JSObject* obj)
46218{
46219 mozilla::dom::TestJSImplNoInterfaceObject* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestJSImplNoInterfaceObject>(obj);
46220 if (self) {
46221 JS::SetReservedSlot(obj, DOM_OBJECT_SLOT0, JS::UndefinedValue());
46222 ClearWrapper(self, self, obj);
46223 if (size_t mallocBytes = BindingJSObjectMallocBytes(self)) {
46224 JS::RemoveAssociatedMemory(obj, mallocBytes,
46225 JS::MemoryUse::DOMBinding);
46226 }
46227 AddForDeferredFinalization<mozilla::dom::TestJSImplNoInterfaceObject>(self);
46228 }
46229}
46230
46231static nsWrapperCache*
46232_getWrapperCache(JS::Handle<JSObject*> obj)
46233{
46234 mozilla::dom::TestJSImplNoInterfaceObject* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestJSImplNoInterfaceObject>(obj);
46235 return self;
46236}
46237
46238static size_t
46239_objectMoved(JSObject* obj, JSObject* old)
46240{
46241 mozilla::dom::TestJSImplNoInterfaceObject* self = UnwrapPossiblyNotInitializedDOMObject<mozilla::dom::TestJSImplNoInterfaceObject>(obj);
46242 if (self) {
46243 UpdateWrapper(self, self, obj, old);
46244 }
46245
46246 return 0;
46247}
46248
46249bool sNativePropertiesInited = false;
46250const NativePropertyHooks sNativePropertyHooks = {
46251 nullptr,
46252 { nullptr, nullptr, &sNativePropertiesInited },
46253 prototypes::id::TestJSImplNoInterfaceObject,
46254 constructors::id::_ID_Count,
46255 &DefaultXrayExpandoObjectClass
46256};
46257
46258static const DOMIfaceAndProtoJSClass sPrototypeClass = {
46259 {
46260 "TestJSImplNoInterfaceObjectPrototype",
46261 JSCLASS_IS_DOMIFACEANDPROTOJSCLASSJSCLASS_USERBIT2 | JSCLASS_HAS_RESERVED_SLOTS(DOM_INTERFACE_PROTO_SLOTS_BASE0),
46262 JS_NULL_CLASS_OPS,
46263 JS_NULL_CLASS_SPEC,
46264 JS_NULL_CLASS_EXT,
46265 JS_NULL_OBJECT_OPS
46266 },
46267 eInterfacePrototype,
46268 prototypes::id::TestJSImplNoInterfaceObject,
46269 PrototypeTraits<prototypes::id::TestJSImplNoInterfaceObject>::Depth,
46270 &sNativePropertyHooks,
46271 JS::GetRealmObjectPrototype
46272};
46273
46274static const JSClassOps sClassOps = {
46275 _addProperty, /* addProperty */
46276 nullptr, /* delProperty */
46277 nullptr, /* enumerate */
46278 nullptr, /* newEnumerate */
46279 nullptr, /* resolve */
46280 nullptr, /* mayResolve */
46281 _finalize, /* finalize */
46282 nullptr, /* call */
46283 nullptr, /* construct */
46284 nullptr, /* trace */
46285};
46286
46287static const js::ClassExtension sClassExtension = {
46288 _objectMoved /* objectMovedOp */
46289};
46290
46291static const DOMJSClass sClass = {
46292 { "TestJSImplNoInterfaceObject",
46293 JSCLASS_IS_DOMJSCLASS | JSCLASS_FOREGROUND_FINALIZE | JSCLASS_HAS_RESERVED_SLOTS(1),
46294 &sClassOps,
46295 JS_NULL_CLASS_SPEC,
46296 &sClassExtension,
46297 JS_NULL_OBJECT_OPS
46298 },
46299 { prototypes::id::TestJSImplNoInterfaceObject, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count, prototypes::id::_ID_Count },
46300 std::is_base_of_v<nsISupports, mozilla::dom::TestJSImplNoInterfaceObject>,
46301 &sNativePropertyHooks,
46302 FindAssociatedGlobalForNative<mozilla::dom::TestJSImplNoInterfaceObject>::Get,
46303 GetProtoObjectHandle,
46304 GetCCParticipant<mozilla::dom::TestJSImplNoInterfaceObject>::Get(),
46305 nullptr,
46306 _getWrapperCache
46307};
46308static_assert(1 == DOM_INSTANCE_RESERVED_SLOTS1,
46309 "Must have the right minimal number of reserved slots.");
46310static_assert(1 >= 1,
46311 "Must have enough reserved slots.");
46312
46313bool
46314Wrap(JSContext* aCx, mozilla::dom::TestJSImplNoInterfaceObject* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector)
46315{
46316 static_assert(!std::is_base_of_v<NonRefcountedDOMObject, mozilla::dom::TestJSImplNoInterfaceObject>,
46317 "Shouldn't have wrappercached things that are not refcounted.");
46318 static_assert(std::is_same_v<decltype(aObject), mozilla::dom::TestJSImplNoInterfaceObject*>);
46319 MOZ_ASSERT(ToSupportsIsCorrect(aObject))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(ToSupportsIsCorrect(aObject))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(ToSupportsIsCorrect(aObject)
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"ToSupportsIsCorrect(aObject)", "../TestJSImplGenBinding.cpp"
, 46319); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsCorrect(aObject)"
")"); do { *((volatile int*)__null) = 46319; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
46320 MOZ_ASSERT_IF(aGivenProto, js::IsObjectInContextCompartment(aGivenProto, aCx))do { if (aGivenProto) { do { static_assert( mozilla::detail::
AssertionConditionType<decltype(js::IsObjectInContextCompartment
(aGivenProto, aCx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(js::IsObjectInContextCompartment
(aGivenProto, aCx)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("js::IsObjectInContextCompartment(aGivenProto, aCx)", "../TestJSImplGenBinding.cpp"
, 46320); AnnotateMozCrashReason("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(aGivenProto, aCx)"
")"); do { *((volatile int*)__null) = 46320; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); } } while
(false)
;
46321 MOZ_ASSERT(!aCache->GetWrapper(),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!aCache->GetWrapper())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!aCache->GetWrapper()))),
0))) { do { } while (false); MOZ_ReportAssertionFailure("!aCache->GetWrapper()"
" (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")", "../TestJSImplGenBinding.cpp"
, 46323); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 46323; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
46322 "You should probably not be using Wrap() directly; use "do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!aCache->GetWrapper())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!aCache->GetWrapper()))),
0))) { do { } while (false); MOZ_ReportAssertionFailure("!aCache->GetWrapper()"
" (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")", "../TestJSImplGenBinding.cpp"
, 46323); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 46323; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
46323 "GetOrCreateDOMReflector instead")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!aCache->GetWrapper())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!aCache->GetWrapper()))),
0))) { do { } while (false); MOZ_ReportAssertionFailure("!aCache->GetWrapper()"
" (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")", "../TestJSImplGenBinding.cpp"
, 46323); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapper()"
") (" "You should probably not be using Wrap() directly; use "
"GetOrCreateDOMReflector instead" ")"); do { *((volatile int
*)__null) = 46323; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46324
46325 MOZ_ASSERT(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache
))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)" " ("
"nsISupports must be on our primary inheritance chain" ")", "../TestJSImplGenBinding.cpp"
, 46326); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)"
") (" "nsISupports must be on our primary inheritance chain"
")"); do { *((volatile int*)__null) = 46326; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
46326 "nsISupports must be on our primary inheritance chain")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache
))>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)" " ("
"nsISupports must be on our primary inheritance chain" ")", "../TestJSImplGenBinding.cpp"
, 46326); AnnotateMozCrashReason("MOZ_ASSERT" "(" "ToSupportsIsOnPrimaryInheritanceChain(aObject, aCache)"
") (" "nsISupports must be on our primary inheritance chain"
")"); do { *((volatile int*)__null) = 46326; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
46327
46328 // If the wrapper cache contains a dead reflector then finalize that
46329 // now, ensuring that the finalizer for the old reflector always
46330 // runs before the new reflector is created and attached. This
46331 // avoids the awkward situation where there are multiple reflector
46332 // objects that contain pointers to the same native.
46333
46334 if (JSObject* oldReflector = aCache->GetWrapperMaybeDead()) {
46335 _finalize(nullptr /* unused */, oldReflector);
46336 MOZ_ASSERT(!aCache->GetWrapperMaybeDead())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!aCache->GetWrapperMaybeDead())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!aCache->GetWrapperMaybeDead
()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!aCache->GetWrapperMaybeDead()", "../TestJSImplGenBinding.cpp"
, 46336); AnnotateMozCrashReason("MOZ_ASSERT" "(" "!aCache->GetWrapperMaybeDead()"
")"); do { *((volatile int*)__null) = 46336; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
46337 }
46338
46339 JS::Rooted<JSObject*> global(aCx, FindAssociatedGlobal(aCx, aObject->GetParentObject()));
46340 if (!global) {
46341 return false;
46342 }
46343 MOZ_ASSERT(JS_IsGlobalObject(global))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsGlobalObject(global))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsGlobalObject(global))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsGlobalObject(global)"
, "../TestJSImplGenBinding.cpp", 46343); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsGlobalObject(global)" ")"); do { *((volatile
int*)__null) = 46343; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46344 JS::AssertObjectIsNotGray(global);
46345
46346 // That might have ended up wrapping us already, due to the wonders
46347 // of XBL. Check for that, and bail out as needed.
46348 aReflector.set(aCache->GetWrapper());
46349 if (aReflector) {
46350#ifdef DEBUG1
46351 AssertReflectorHasGivenProto(aCx, aReflector, aGivenProto);
46352#endif // DEBUG
46353 return true;
46354 }
46355
46356 JSAutoRealm ar(aCx, global);
46357 JS::Handle<JSObject*> canonicalProto = GetProtoObjectHandle(aCx);
46358 if (!canonicalProto) {
46359 return false;
46360 }
46361 JS::Rooted<JSObject*> proto(aCx);
46362 if (aGivenProto) {
46363 proto = aGivenProto;
46364 // Unfortunately, while aGivenProto was in the compartment of aCx
46365 // coming in, we changed compartments to that of "parent" so may need
46366 // to wrap the proto here.
46367 if (js::GetContextCompartment(aCx) != JS::GetCompartment(proto)) {
46368 if (!JS_WrapObject(aCx, &proto)) {
46369 return false;
46370 }
46371 }
46372 } else {
46373 proto = canonicalProto;
46374 }
46375
46376 BindingJSObjectCreator<mozilla::dom::TestJSImplNoInterfaceObject> creator(aCx);
46377 creator.CreateObject(aCx, sClass.ToJSClass(), proto, aObject, aReflector);
46378 if (!aReflector) {
46379 return false;
46380 }
46381
46382 aCache->SetWrapper(aReflector);
46383 creator.InitializationSucceeded();
46384
46385 MOZ_ASSERT(aCache->GetWrapperPreserveColor() &&do { static_assert( mozilla::detail::AssertionConditionType<
decltype(aCache->GetWrapperPreserveColor() && aCache
->GetWrapperPreserveColor() == aReflector)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(aCache->GetWrapperPreserveColor
() && aCache->GetWrapperPreserveColor() == aReflector
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
, "../TestJSImplGenBinding.cpp", 46386); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
")"); do { *((volatile int*)__null) = 46386; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
46386 aCache->GetWrapperPreserveColor() == aReflector)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(aCache->GetWrapperPreserveColor() && aCache
->GetWrapperPreserveColor() == aReflector)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(aCache->GetWrapperPreserveColor
() && aCache->GetWrapperPreserveColor() == aReflector
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
, "../TestJSImplGenBinding.cpp", 46386); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "aCache->GetWrapperPreserveColor() && aCache->GetWrapperPreserveColor() == aReflector"
")"); do { *((volatile int*)__null) = 46386; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
46387 // If proto != canonicalProto, we have to preserve our wrapper;
46388 // otherwise we won't be able to properly recreate it later, since
46389 // we won't know what proto to use. Note that we don't check
46390 // aGivenProto here, since it's entirely possible (and even
46391 // somewhat common) to have a non-null aGivenProto which is the
46392 // same as canonicalProto.
46393 if (proto != canonicalProto) {
46394 PreserveWrapper(aObject);
46395 }
46396
46397 return true;
46398}
46399
46400void
46401CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal)
46402{
46403 JS::Heap<JSObject*>* protoCache = &aProtoAndIfaceCache.EntrySlotOrCreate(prototypes::id::TestJSImplNoInterfaceObject);
46404 JS::Heap<JSObject*>* interfaceCache = nullptr;
46405
46406 JS::Rooted<JSObject*> parentProto(aCx, JS::GetRealmObjectPrototype(aCx));
46407 if (!parentProto) {
46408 return;
46409 }
46410
46411 dom::CreateInterfaceObjects(aCx, aGlobal, parentProto,
46412 &sPrototypeClass, protoCache,
46413 nullptr, nullptr, 0, false, Span<const LegacyFactoryFunction, 0>{},
46414 interfaceCache,
46415 nullptr,
46416 nullptr,
46417 "TestJSImplNoInterfaceObject", aDefineOnGlobal,
46418 nullptr,
46419 false,
46420 nullptr);
46421}
46422
46423} // namespace TestJSImplNoInterfaceObject_Binding
46424
46425
46426
46427void
46428TestJSImplInterfaceJSImpl::PassByte(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
46429{
46430 CallSetup s(this, aRv, "TestJSImplInterface.passByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
46431 if (aRv.Failed()) {
46432 return;
46433 }
46434 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 46434); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 46434; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46435 BindingCallContext& cx = s.GetCallContext();
46436
46437 JS::Rooted<JS::Value> rval(cx);
46438 JS::RootedVector<JS::Value> argv(cx);
46439 if (!argv.resize(1)) {
46440 // That threw an exception on the JSContext, and our CallSetup will do
46441 // the right thing with that.
46442 return;
46443 }
46444 unsigned argc = 1;
46445
46446 do {
46447 argv[0].setInt32(int32_t(arg));
46448 break;
46449 } while (false);
46450
46451 JS::Rooted<JS::Value> callable(cx);
46452 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
46453 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
46454 !InitIds(cx, atomsCache)) ||
46455 !GetCallableProperty(cx, atomsCache->passByte_id, &callable)) {
46456 aRv.Throw(NS_ERROR_UNEXPECTED);
46457 return;
46458 }
46459 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
46460 if (!JS::Call(cx, thisValue, callable,
46461 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
46462 aRv.NoteJSContextException(cx);
46463 return;
46464 }
46465}
46466
46467int8_t
46468TestJSImplInterfaceJSImpl::ReceiveByte(ErrorResult& aRv, JS::Realm* aRealm)
46469{
46470 CallSetup s(this, aRv, "TestJSImplInterface.receiveByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
46471 if (aRv.Failed()) {
46472 return int8_t(0);
46473 }
46474 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 46474); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 46474; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46475 BindingCallContext& cx = s.GetCallContext();
46476
46477 JS::Rooted<JS::Value> rval(cx);
46478
46479 JS::Rooted<JS::Value> callable(cx);
46480 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
46481 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
46482 !InitIds(cx, atomsCache)) ||
46483 !GetCallableProperty(cx, atomsCache->receiveByte_id, &callable)) {
46484 aRv.Throw(NS_ERROR_UNEXPECTED);
46485 return int8_t(0);
46486 }
46487 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
46488 if (!JS::Call(cx, thisValue, callable,
46489 JS::HandleValueArray::empty(), &rval)) {
46490 aRv.NoteJSContextException(cx);
46491 return int8_t(0);
46492 }
46493 int8_t rvalDecl;
46494 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.receiveByte", &rvalDecl)) {
46495 aRv.Throw(NS_ERROR_UNEXPECTED);
46496 return int8_t(0);
46497 }
46498 return rvalDecl;
46499}
46500
46501void
46502TestJSImplInterfaceJSImpl::PassOptionalByte(const Optional<int8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
46503{
46504 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
46505 if (aRv.Failed()) {
46506 return;
46507 }
46508 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 46508); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 46508; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46509 BindingCallContext& cx = s.GetCallContext();
46510
46511 JS::Rooted<JS::Value> rval(cx);
46512 JS::RootedVector<JS::Value> argv(cx);
46513 if (!argv.resize(1)) {
46514 // That threw an exception on the JSContext, and our CallSetup will do
46515 // the right thing with that.
46516 return;
46517 }
46518 unsigned argc = 1;
46519
46520 do {
46521 if (arg.WasPassed()) {
46522 argv[0].setInt32(int32_t(arg.Value()));
46523 break;
46524 } else if (argc == 1) {
46525 // This is our current trailing argument; reduce argc
46526 --argc;
46527 } else {
46528 argv[0].setUndefined();
46529 }
46530 } while (false);
46531
46532 JS::Rooted<JS::Value> callable(cx);
46533 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
46534 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
46535 !InitIds(cx, atomsCache)) ||
46536 !GetCallableProperty(cx, atomsCache->passOptionalByte_id, &callable)) {
46537 aRv.Throw(NS_ERROR_UNEXPECTED);
46538 return;
46539 }
46540 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
46541 if (!JS::Call(cx, thisValue, callable,
46542 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
46543 aRv.NoteJSContextException(cx);
46544 return;
46545 }
46546}
46547
46548void
46549TestJSImplInterfaceJSImpl::PassOptionalByteBeforeRequired(const Optional<int8_t>& arg1, int8_t arg2, ErrorResult& aRv, JS::Realm* aRealm)
46550{
46551 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalByteBeforeRequired", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
46552 if (aRv.Failed()) {
46553 return;
46554 }
46555 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 46555); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 46555; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46556 BindingCallContext& cx = s.GetCallContext();
46557
46558 JS::Rooted<JS::Value> rval(cx);
46559 JS::RootedVector<JS::Value> argv(cx);
46560 if (!argv.resize(2)) {
46561 // That threw an exception on the JSContext, and our CallSetup will do
46562 // the right thing with that.
46563 return;
46564 }
46565 unsigned argc = 2;
46566
46567 do {
46568 argv[1].setInt32(int32_t(arg2));
46569 break;
46570 } while (false);
46571
46572 do {
46573 if (arg1.WasPassed()) {
46574 argv[0].setInt32(int32_t(arg1.Value()));
46575 break;
46576 } else if (argc == 1) {
46577 // This is our current trailing argument; reduce argc
46578 --argc;
46579 } else {
46580 argv[0].setUndefined();
46581 }
46582 } while (false);
46583
46584 JS::Rooted<JS::Value> callable(cx);
46585 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
46586 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
46587 !InitIds(cx, atomsCache)) ||
46588 !GetCallableProperty(cx, atomsCache->passOptionalByteBeforeRequired_id, &callable)) {
46589 aRv.Throw(NS_ERROR_UNEXPECTED);
46590 return;
46591 }
46592 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
46593 if (!JS::Call(cx, thisValue, callable,
46594 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
46595 aRv.NoteJSContextException(cx);
46596 return;
46597 }
46598}
46599
46600void
46601TestJSImplInterfaceJSImpl::PassOptionalByteWithDefault(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
46602{
46603 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalByteWithDefault", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
46604 if (aRv.Failed()) {
46605 return;
46606 }
46607 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 46607); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 46607; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46608 BindingCallContext& cx = s.GetCallContext();
46609
46610 JS::Rooted<JS::Value> rval(cx);
46611 JS::RootedVector<JS::Value> argv(cx);
46612 if (!argv.resize(1)) {
46613 // That threw an exception on the JSContext, and our CallSetup will do
46614 // the right thing with that.
46615 return;
46616 }
46617 unsigned argc = 1;
46618
46619 do {
46620 argv[0].setInt32(int32_t(arg));
46621 break;
46622 } while (false);
46623
46624 JS::Rooted<JS::Value> callable(cx);
46625 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
46626 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
46627 !InitIds(cx, atomsCache)) ||
46628 !GetCallableProperty(cx, atomsCache->passOptionalByteWithDefault_id, &callable)) {
46629 aRv.Throw(NS_ERROR_UNEXPECTED);
46630 return;
46631 }
46632 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
46633 if (!JS::Call(cx, thisValue, callable,
46634 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
46635 aRv.NoteJSContextException(cx);
46636 return;
46637 }
46638}
46639
46640void
46641TestJSImplInterfaceJSImpl::PassOptionalByteWithDefaultBeforeRequired(int8_t arg1, int8_t arg2, ErrorResult& aRv, JS::Realm* aRealm)
46642{
46643 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalByteWithDefaultBeforeRequired", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
46644 if (aRv.Failed()) {
46645 return;
46646 }
46647 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 46647); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 46647; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46648 BindingCallContext& cx = s.GetCallContext();
46649
46650 JS::Rooted<JS::Value> rval(cx);
46651 JS::RootedVector<JS::Value> argv(cx);
46652 if (!argv.resize(2)) {
46653 // That threw an exception on the JSContext, and our CallSetup will do
46654 // the right thing with that.
46655 return;
46656 }
46657 unsigned argc = 2;
46658
46659 do {
46660 argv[1].setInt32(int32_t(arg2));
46661 break;
46662 } while (false);
46663
46664 do {
46665 argv[0].setInt32(int32_t(arg1));
46666 break;
46667 } while (false);
46668
46669 JS::Rooted<JS::Value> callable(cx);
46670 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
46671 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
46672 !InitIds(cx, atomsCache)) ||
46673 !GetCallableProperty(cx, atomsCache->passOptionalByteWithDefaultBeforeRequired_id, &callable)) {
46674 aRv.Throw(NS_ERROR_UNEXPECTED);
46675 return;
46676 }
46677 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
46678 if (!JS::Call(cx, thisValue, callable,
46679 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
46680 aRv.NoteJSContextException(cx);
46681 return;
46682 }
46683}
46684
46685void
46686TestJSImplInterfaceJSImpl::PassNullableByte(const Nullable<int8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
46687{
46688 CallSetup s(this, aRv, "TestJSImplInterface.passNullableByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
46689 if (aRv.Failed()) {
46690 return;
46691 }
46692 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 46692); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 46692; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46693 BindingCallContext& cx = s.GetCallContext();
46694
46695 JS::Rooted<JS::Value> rval(cx);
46696 JS::RootedVector<JS::Value> argv(cx);
46697 if (!argv.resize(1)) {
46698 // That threw an exception on the JSContext, and our CallSetup will do
46699 // the right thing with that.
46700 return;
46701 }
46702 unsigned argc = 1;
46703
46704 do {
46705 if (arg.IsNull()) {
46706 argv[0].setNull();
46707 break;
46708 }
46709 argv[0].setInt32(int32_t(arg.Value()));
46710 break;
46711 } while (false);
46712
46713 JS::Rooted<JS::Value> callable(cx);
46714 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
46715 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
46716 !InitIds(cx, atomsCache)) ||
46717 !GetCallableProperty(cx, atomsCache->passNullableByte_id, &callable)) {
46718 aRv.Throw(NS_ERROR_UNEXPECTED);
46719 return;
46720 }
46721 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
46722 if (!JS::Call(cx, thisValue, callable,
46723 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
46724 aRv.NoteJSContextException(cx);
46725 return;
46726 }
46727}
46728
46729void
46730TestJSImplInterfaceJSImpl::PassOptionalNullableByte(const Optional<Nullable<int8_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
46731{
46732 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
46733 if (aRv.Failed()) {
46734 return;
46735 }
46736 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 46736); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 46736; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46737 BindingCallContext& cx = s.GetCallContext();
46738
46739 JS::Rooted<JS::Value> rval(cx);
46740 JS::RootedVector<JS::Value> argv(cx);
46741 if (!argv.resize(1)) {
46742 // That threw an exception on the JSContext, and our CallSetup will do
46743 // the right thing with that.
46744 return;
46745 }
46746 unsigned argc = 1;
46747
46748 do {
46749 if (arg.WasPassed()) {
46750 if (arg.Value().IsNull()) {
46751 argv[0].setNull();
46752 break;
46753 }
46754 argv[0].setInt32(int32_t(arg.Value().Value()));
46755 break;
46756 } else if (argc == 1) {
46757 // This is our current trailing argument; reduce argc
46758 --argc;
46759 } else {
46760 argv[0].setUndefined();
46761 }
46762 } while (false);
46763
46764 JS::Rooted<JS::Value> callable(cx);
46765 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
46766 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
46767 !InitIds(cx, atomsCache)) ||
46768 !GetCallableProperty(cx, atomsCache->passOptionalNullableByte_id, &callable)) {
46769 aRv.Throw(NS_ERROR_UNEXPECTED);
46770 return;
46771 }
46772 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
46773 if (!JS::Call(cx, thisValue, callable,
46774 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
46775 aRv.NoteJSContextException(cx);
46776 return;
46777 }
46778}
46779
46780void
46781TestJSImplInterfaceJSImpl::PassVariadicByte(const nsTArray<int8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
46782{
46783 CallSetup s(this, aRv, "TestJSImplInterface.passVariadicByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
46784 if (aRv.Failed()) {
46785 return;
46786 }
46787 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 46787); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 46787; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46788 BindingCallContext& cx = s.GetCallContext();
46789
46790 JS::Rooted<JS::Value> rval(cx);
46791 JS::RootedVector<JS::Value> argv(cx);
46792 if (!argv.resize((1 - 1) + arg.Length())) {
46793 // That threw an exception on the JSContext, and our CallSetup will do
46794 // the right thing with that.
46795 return;
46796 }
46797 unsigned argc = (1 - 1) + arg.Length();
46798
46799 do {
46800 for (uint32_t idx = 0; idx < arg.Length(); ++idx) {
46801 argv[0 + idx].setInt32(int32_t(arg[idx]));
46802 continue;
46803 }
46804 break;
46805 } while (false);
46806
46807 JS::Rooted<JS::Value> callable(cx);
46808 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
46809 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
46810 !InitIds(cx, atomsCache)) ||
46811 !GetCallableProperty(cx, atomsCache->passVariadicByte_id, &callable)) {
46812 aRv.Throw(NS_ERROR_UNEXPECTED);
46813 return;
46814 }
46815 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
46816 if (!JS::Call(cx, thisValue, callable,
46817 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
46818 aRv.NoteJSContextException(cx);
46819 return;
46820 }
46821}
46822
46823int8_t
46824TestJSImplInterfaceJSImpl::ReturnByteSideEffectFree(ErrorResult& aRv, JS::Realm* aRealm)
46825{
46826 CallSetup s(this, aRv, "TestJSImplInterface.returnByteSideEffectFree", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
46827 if (aRv.Failed()) {
46828 return int8_t(0);
46829 }
46830 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 46830); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 46830; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46831 BindingCallContext& cx = s.GetCallContext();
46832
46833 JS::Rooted<JS::Value> rval(cx);
46834
46835 JS::Rooted<JS::Value> callable(cx);
46836 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
46837 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
46838 !InitIds(cx, atomsCache)) ||
46839 !GetCallableProperty(cx, atomsCache->returnByteSideEffectFree_id, &callable)) {
46840 aRv.Throw(NS_ERROR_UNEXPECTED);
46841 return int8_t(0);
46842 }
46843 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
46844 if (!JS::Call(cx, thisValue, callable,
46845 JS::HandleValueArray::empty(), &rval)) {
46846 aRv.NoteJSContextException(cx);
46847 return int8_t(0);
46848 }
46849 int8_t rvalDecl;
46850 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.returnByteSideEffectFree", &rvalDecl)) {
46851 aRv.Throw(NS_ERROR_UNEXPECTED);
46852 return int8_t(0);
46853 }
46854 return rvalDecl;
46855}
46856
46857int8_t
46858TestJSImplInterfaceJSImpl::ReturnDOMDependentByte(ErrorResult& aRv, JS::Realm* aRealm)
46859{
46860 CallSetup s(this, aRv, "TestJSImplInterface.returnDOMDependentByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
46861 if (aRv.Failed()) {
46862 return int8_t(0);
46863 }
46864 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 46864); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 46864; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46865 BindingCallContext& cx = s.GetCallContext();
46866
46867 JS::Rooted<JS::Value> rval(cx);
46868
46869 JS::Rooted<JS::Value> callable(cx);
46870 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
46871 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
46872 !InitIds(cx, atomsCache)) ||
46873 !GetCallableProperty(cx, atomsCache->returnDOMDependentByte_id, &callable)) {
46874 aRv.Throw(NS_ERROR_UNEXPECTED);
46875 return int8_t(0);
46876 }
46877 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
46878 if (!JS::Call(cx, thisValue, callable,
46879 JS::HandleValueArray::empty(), &rval)) {
46880 aRv.NoteJSContextException(cx);
46881 return int8_t(0);
46882 }
46883 int8_t rvalDecl;
46884 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.returnDOMDependentByte", &rvalDecl)) {
46885 aRv.Throw(NS_ERROR_UNEXPECTED);
46886 return int8_t(0);
46887 }
46888 return rvalDecl;
46889}
46890
46891int8_t
46892TestJSImplInterfaceJSImpl::ReturnConstantByte(ErrorResult& aRv, JS::Realm* aRealm)
46893{
46894 CallSetup s(this, aRv, "TestJSImplInterface.returnConstantByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
46895 if (aRv.Failed()) {
46896 return int8_t(0);
46897 }
46898 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 46898); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 46898; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46899 BindingCallContext& cx = s.GetCallContext();
46900
46901 JS::Rooted<JS::Value> rval(cx);
46902
46903 JS::Rooted<JS::Value> callable(cx);
46904 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
46905 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
46906 !InitIds(cx, atomsCache)) ||
46907 !GetCallableProperty(cx, atomsCache->returnConstantByte_id, &callable)) {
46908 aRv.Throw(NS_ERROR_UNEXPECTED);
46909 return int8_t(0);
46910 }
46911 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
46912 if (!JS::Call(cx, thisValue, callable,
46913 JS::HandleValueArray::empty(), &rval)) {
46914 aRv.NoteJSContextException(cx);
46915 return int8_t(0);
46916 }
46917 int8_t rvalDecl;
46918 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.returnConstantByte", &rvalDecl)) {
46919 aRv.Throw(NS_ERROR_UNEXPECTED);
46920 return int8_t(0);
46921 }
46922 return rvalDecl;
46923}
46924
46925int8_t
46926TestJSImplInterfaceJSImpl::ReturnDeviceStateDependentByte(ErrorResult& aRv, JS::Realm* aRealm)
46927{
46928 CallSetup s(this, aRv, "TestJSImplInterface.returnDeviceStateDependentByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
46929 if (aRv.Failed()) {
46930 return int8_t(0);
46931 }
46932 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 46932); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 46932; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46933 BindingCallContext& cx = s.GetCallContext();
46934
46935 JS::Rooted<JS::Value> rval(cx);
46936
46937 JS::Rooted<JS::Value> callable(cx);
46938 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
46939 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
46940 !InitIds(cx, atomsCache)) ||
46941 !GetCallableProperty(cx, atomsCache->returnDeviceStateDependentByte_id, &callable)) {
46942 aRv.Throw(NS_ERROR_UNEXPECTED);
46943 return int8_t(0);
46944 }
46945 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
46946 if (!JS::Call(cx, thisValue, callable,
46947 JS::HandleValueArray::empty(), &rval)) {
46948 aRv.NoteJSContextException(cx);
46949 return int8_t(0);
46950 }
46951 int8_t rvalDecl;
46952 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.returnDeviceStateDependentByte", &rvalDecl)) {
46953 aRv.Throw(NS_ERROR_UNEXPECTED);
46954 return int8_t(0);
46955 }
46956 return rvalDecl;
46957}
46958
46959void
46960TestJSImplInterfaceJSImpl::PassShort(int16_t arg, ErrorResult& aRv, JS::Realm* aRealm)
46961{
46962 CallSetup s(this, aRv, "TestJSImplInterface.passShort", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
46963 if (aRv.Failed()) {
46964 return;
46965 }
46966 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 46966); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 46966; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
46967 BindingCallContext& cx = s.GetCallContext();
46968
46969 JS::Rooted<JS::Value> rval(cx);
46970 JS::RootedVector<JS::Value> argv(cx);
46971 if (!argv.resize(1)) {
46972 // That threw an exception on the JSContext, and our CallSetup will do
46973 // the right thing with that.
46974 return;
46975 }
46976 unsigned argc = 1;
46977
46978 do {
46979 argv[0].setInt32(int32_t(arg));
46980 break;
46981 } while (false);
46982
46983 JS::Rooted<JS::Value> callable(cx);
46984 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
46985 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
46986 !InitIds(cx, atomsCache)) ||
46987 !GetCallableProperty(cx, atomsCache->passShort_id, &callable)) {
46988 aRv.Throw(NS_ERROR_UNEXPECTED);
46989 return;
46990 }
46991 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
46992 if (!JS::Call(cx, thisValue, callable,
46993 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
46994 aRv.NoteJSContextException(cx);
46995 return;
46996 }
46997}
46998
46999int16_t
47000TestJSImplInterfaceJSImpl::ReceiveShort(ErrorResult& aRv, JS::Realm* aRealm)
47001{
47002 CallSetup s(this, aRv, "TestJSImplInterface.receiveShort", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47003 if (aRv.Failed()) {
47004 return int16_t(0);
47005 }
47006 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47006); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47006; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47007 BindingCallContext& cx = s.GetCallContext();
47008
47009 JS::Rooted<JS::Value> rval(cx);
47010
47011 JS::Rooted<JS::Value> callable(cx);
47012 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47013 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47014 !InitIds(cx, atomsCache)) ||
47015 !GetCallableProperty(cx, atomsCache->receiveShort_id, &callable)) {
47016 aRv.Throw(NS_ERROR_UNEXPECTED);
47017 return int16_t(0);
47018 }
47019 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47020 if (!JS::Call(cx, thisValue, callable,
47021 JS::HandleValueArray::empty(), &rval)) {
47022 aRv.NoteJSContextException(cx);
47023 return int16_t(0);
47024 }
47025 int16_t rvalDecl;
47026 if (!ValueToPrimitive<int16_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.receiveShort", &rvalDecl)) {
47027 aRv.Throw(NS_ERROR_UNEXPECTED);
47028 return int16_t(0);
47029 }
47030 return rvalDecl;
47031}
47032
47033void
47034TestJSImplInterfaceJSImpl::PassOptionalShort(const Optional<int16_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
47035{
47036 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalShort", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47037 if (aRv.Failed()) {
47038 return;
47039 }
47040 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47040); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47040; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47041 BindingCallContext& cx = s.GetCallContext();
47042
47043 JS::Rooted<JS::Value> rval(cx);
47044 JS::RootedVector<JS::Value> argv(cx);
47045 if (!argv.resize(1)) {
47046 // That threw an exception on the JSContext, and our CallSetup will do
47047 // the right thing with that.
47048 return;
47049 }
47050 unsigned argc = 1;
47051
47052 do {
47053 if (arg.WasPassed()) {
47054 argv[0].setInt32(int32_t(arg.Value()));
47055 break;
47056 } else if (argc == 1) {
47057 // This is our current trailing argument; reduce argc
47058 --argc;
47059 } else {
47060 argv[0].setUndefined();
47061 }
47062 } while (false);
47063
47064 JS::Rooted<JS::Value> callable(cx);
47065 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47066 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47067 !InitIds(cx, atomsCache)) ||
47068 !GetCallableProperty(cx, atomsCache->passOptionalShort_id, &callable)) {
47069 aRv.Throw(NS_ERROR_UNEXPECTED);
47070 return;
47071 }
47072 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47073 if (!JS::Call(cx, thisValue, callable,
47074 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47075 aRv.NoteJSContextException(cx);
47076 return;
47077 }
47078}
47079
47080void
47081TestJSImplInterfaceJSImpl::PassOptionalShortWithDefault(int16_t arg, ErrorResult& aRv, JS::Realm* aRealm)
47082{
47083 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalShortWithDefault", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47084 if (aRv.Failed()) {
47085 return;
47086 }
47087 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47087); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47087; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47088 BindingCallContext& cx = s.GetCallContext();
47089
47090 JS::Rooted<JS::Value> rval(cx);
47091 JS::RootedVector<JS::Value> argv(cx);
47092 if (!argv.resize(1)) {
47093 // That threw an exception on the JSContext, and our CallSetup will do
47094 // the right thing with that.
47095 return;
47096 }
47097 unsigned argc = 1;
47098
47099 do {
47100 argv[0].setInt32(int32_t(arg));
47101 break;
47102 } while (false);
47103
47104 JS::Rooted<JS::Value> callable(cx);
47105 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47106 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47107 !InitIds(cx, atomsCache)) ||
47108 !GetCallableProperty(cx, atomsCache->passOptionalShortWithDefault_id, &callable)) {
47109 aRv.Throw(NS_ERROR_UNEXPECTED);
47110 return;
47111 }
47112 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47113 if (!JS::Call(cx, thisValue, callable,
47114 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47115 aRv.NoteJSContextException(cx);
47116 return;
47117 }
47118}
47119
47120void
47121TestJSImplInterfaceJSImpl::PassLong(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
47122{
47123 CallSetup s(this, aRv, "TestJSImplInterface.passLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47124 if (aRv.Failed()) {
47125 return;
47126 }
47127 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47127); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47127; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47128 BindingCallContext& cx = s.GetCallContext();
47129
47130 JS::Rooted<JS::Value> rval(cx);
47131 JS::RootedVector<JS::Value> argv(cx);
47132 if (!argv.resize(1)) {
47133 // That threw an exception on the JSContext, and our CallSetup will do
47134 // the right thing with that.
47135 return;
47136 }
47137 unsigned argc = 1;
47138
47139 do {
47140 argv[0].setInt32(int32_t(arg));
47141 break;
47142 } while (false);
47143
47144 JS::Rooted<JS::Value> callable(cx);
47145 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47146 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47147 !InitIds(cx, atomsCache)) ||
47148 !GetCallableProperty(cx, atomsCache->passLong_id, &callable)) {
47149 aRv.Throw(NS_ERROR_UNEXPECTED);
47150 return;
47151 }
47152 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47153 if (!JS::Call(cx, thisValue, callable,
47154 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47155 aRv.NoteJSContextException(cx);
47156 return;
47157 }
47158}
47159
47160int32_t
47161TestJSImplInterfaceJSImpl::ReceiveLong(ErrorResult& aRv, JS::Realm* aRealm)
47162{
47163 CallSetup s(this, aRv, "TestJSImplInterface.receiveLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47164 if (aRv.Failed()) {
47165 return int32_t(0);
47166 }
47167 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47167); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47167; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47168 BindingCallContext& cx = s.GetCallContext();
47169
47170 JS::Rooted<JS::Value> rval(cx);
47171
47172 JS::Rooted<JS::Value> callable(cx);
47173 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47174 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47175 !InitIds(cx, atomsCache)) ||
47176 !GetCallableProperty(cx, atomsCache->receiveLong_id, &callable)) {
47177 aRv.Throw(NS_ERROR_UNEXPECTED);
47178 return int32_t(0);
47179 }
47180 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47181 if (!JS::Call(cx, thisValue, callable,
47182 JS::HandleValueArray::empty(), &rval)) {
47183 aRv.NoteJSContextException(cx);
47184 return int32_t(0);
47185 }
47186 int32_t rvalDecl;
47187 if (!ValueToPrimitive<int32_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.receiveLong", &rvalDecl)) {
47188 aRv.Throw(NS_ERROR_UNEXPECTED);
47189 return int32_t(0);
47190 }
47191 return rvalDecl;
47192}
47193
47194void
47195TestJSImplInterfaceJSImpl::PassOptionalLong(const Optional<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
47196{
47197 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47198 if (aRv.Failed()) {
47199 return;
47200 }
47201 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47201); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47201; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47202 BindingCallContext& cx = s.GetCallContext();
47203
47204 JS::Rooted<JS::Value> rval(cx);
47205 JS::RootedVector<JS::Value> argv(cx);
47206 if (!argv.resize(1)) {
47207 // That threw an exception on the JSContext, and our CallSetup will do
47208 // the right thing with that.
47209 return;
47210 }
47211 unsigned argc = 1;
47212
47213 do {
47214 if (arg.WasPassed()) {
47215 argv[0].setInt32(int32_t(arg.Value()));
47216 break;
47217 } else if (argc == 1) {
47218 // This is our current trailing argument; reduce argc
47219 --argc;
47220 } else {
47221 argv[0].setUndefined();
47222 }
47223 } while (false);
47224
47225 JS::Rooted<JS::Value> callable(cx);
47226 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47227 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47228 !InitIds(cx, atomsCache)) ||
47229 !GetCallableProperty(cx, atomsCache->passOptionalLong_id, &callable)) {
47230 aRv.Throw(NS_ERROR_UNEXPECTED);
47231 return;
47232 }
47233 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47234 if (!JS::Call(cx, thisValue, callable,
47235 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47236 aRv.NoteJSContextException(cx);
47237 return;
47238 }
47239}
47240
47241void
47242TestJSImplInterfaceJSImpl::PassOptionalLongWithDefault(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
47243{
47244 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalLongWithDefault", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47245 if (aRv.Failed()) {
47246 return;
47247 }
47248 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47248); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47248; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47249 BindingCallContext& cx = s.GetCallContext();
47250
47251 JS::Rooted<JS::Value> rval(cx);
47252 JS::RootedVector<JS::Value> argv(cx);
47253 if (!argv.resize(1)) {
47254 // That threw an exception on the JSContext, and our CallSetup will do
47255 // the right thing with that.
47256 return;
47257 }
47258 unsigned argc = 1;
47259
47260 do {
47261 argv[0].setInt32(int32_t(arg));
47262 break;
47263 } while (false);
47264
47265 JS::Rooted<JS::Value> callable(cx);
47266 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47267 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47268 !InitIds(cx, atomsCache)) ||
47269 !GetCallableProperty(cx, atomsCache->passOptionalLongWithDefault_id, &callable)) {
47270 aRv.Throw(NS_ERROR_UNEXPECTED);
47271 return;
47272 }
47273 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47274 if (!JS::Call(cx, thisValue, callable,
47275 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47276 aRv.NoteJSContextException(cx);
47277 return;
47278 }
47279}
47280
47281void
47282TestJSImplInterfaceJSImpl::PassLongLong(int64_t arg, ErrorResult& aRv, JS::Realm* aRealm)
47283{
47284 CallSetup s(this, aRv, "TestJSImplInterface.passLongLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47285 if (aRv.Failed()) {
47286 return;
47287 }
47288 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47288); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47288; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47289 BindingCallContext& cx = s.GetCallContext();
47290
47291 JS::Rooted<JS::Value> rval(cx);
47292 JS::RootedVector<JS::Value> argv(cx);
47293 if (!argv.resize(1)) {
47294 // That threw an exception on the JSContext, and our CallSetup will do
47295 // the right thing with that.
47296 return;
47297 }
47298 unsigned argc = 1;
47299
47300 do {
47301 argv[0].set(JS_NumberValue(double(arg)));
47302 break;
47303 } while (false);
47304
47305 JS::Rooted<JS::Value> callable(cx);
47306 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47307 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47308 !InitIds(cx, atomsCache)) ||
47309 !GetCallableProperty(cx, atomsCache->passLongLong_id, &callable)) {
47310 aRv.Throw(NS_ERROR_UNEXPECTED);
47311 return;
47312 }
47313 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47314 if (!JS::Call(cx, thisValue, callable,
47315 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47316 aRv.NoteJSContextException(cx);
47317 return;
47318 }
47319}
47320
47321int64_t
47322TestJSImplInterfaceJSImpl::ReceiveLongLong(ErrorResult& aRv, JS::Realm* aRealm)
47323{
47324 CallSetup s(this, aRv, "TestJSImplInterface.receiveLongLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47325 if (aRv.Failed()) {
47326 return int64_t(0);
47327 }
47328 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47328); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47328; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47329 BindingCallContext& cx = s.GetCallContext();
47330
47331 JS::Rooted<JS::Value> rval(cx);
47332
47333 JS::Rooted<JS::Value> callable(cx);
47334 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47335 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47336 !InitIds(cx, atomsCache)) ||
47337 !GetCallableProperty(cx, atomsCache->receiveLongLong_id, &callable)) {
47338 aRv.Throw(NS_ERROR_UNEXPECTED);
47339 return int64_t(0);
47340 }
47341 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47342 if (!JS::Call(cx, thisValue, callable,
47343 JS::HandleValueArray::empty(), &rval)) {
47344 aRv.NoteJSContextException(cx);
47345 return int64_t(0);
47346 }
47347 int64_t rvalDecl;
47348 if (!ValueToPrimitive<int64_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.receiveLongLong", &rvalDecl)) {
47349 aRv.Throw(NS_ERROR_UNEXPECTED);
47350 return int64_t(0);
47351 }
47352 return rvalDecl;
47353}
47354
47355void
47356TestJSImplInterfaceJSImpl::PassOptionalLongLong(const Optional<int64_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
47357{
47358 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalLongLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47359 if (aRv.Failed()) {
47360 return;
47361 }
47362 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47362); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47362; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47363 BindingCallContext& cx = s.GetCallContext();
47364
47365 JS::Rooted<JS::Value> rval(cx);
47366 JS::RootedVector<JS::Value> argv(cx);
47367 if (!argv.resize(1)) {
47368 // That threw an exception on the JSContext, and our CallSetup will do
47369 // the right thing with that.
47370 return;
47371 }
47372 unsigned argc = 1;
47373
47374 do {
47375 if (arg.WasPassed()) {
47376 argv[0].set(JS_NumberValue(double(arg.Value())));
47377 break;
47378 } else if (argc == 1) {
47379 // This is our current trailing argument; reduce argc
47380 --argc;
47381 } else {
47382 argv[0].setUndefined();
47383 }
47384 } while (false);
47385
47386 JS::Rooted<JS::Value> callable(cx);
47387 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47388 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47389 !InitIds(cx, atomsCache)) ||
47390 !GetCallableProperty(cx, atomsCache->passOptionalLongLong_id, &callable)) {
47391 aRv.Throw(NS_ERROR_UNEXPECTED);
47392 return;
47393 }
47394 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47395 if (!JS::Call(cx, thisValue, callable,
47396 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47397 aRv.NoteJSContextException(cx);
47398 return;
47399 }
47400}
47401
47402void
47403TestJSImplInterfaceJSImpl::PassOptionalLongLongWithDefault(int64_t arg, ErrorResult& aRv, JS::Realm* aRealm)
47404{
47405 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalLongLongWithDefault", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47406 if (aRv.Failed()) {
47407 return;
47408 }
47409 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47409); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47409; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47410 BindingCallContext& cx = s.GetCallContext();
47411
47412 JS::Rooted<JS::Value> rval(cx);
47413 JS::RootedVector<JS::Value> argv(cx);
47414 if (!argv.resize(1)) {
47415 // That threw an exception on the JSContext, and our CallSetup will do
47416 // the right thing with that.
47417 return;
47418 }
47419 unsigned argc = 1;
47420
47421 do {
47422 argv[0].set(JS_NumberValue(double(arg)));
47423 break;
47424 } while (false);
47425
47426 JS::Rooted<JS::Value> callable(cx);
47427 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47428 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47429 !InitIds(cx, atomsCache)) ||
47430 !GetCallableProperty(cx, atomsCache->passOptionalLongLongWithDefault_id, &callable)) {
47431 aRv.Throw(NS_ERROR_UNEXPECTED);
47432 return;
47433 }
47434 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47435 if (!JS::Call(cx, thisValue, callable,
47436 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47437 aRv.NoteJSContextException(cx);
47438 return;
47439 }
47440}
47441
47442void
47443TestJSImplInterfaceJSImpl::PassOctet(uint8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
47444{
47445 CallSetup s(this, aRv, "TestJSImplInterface.passOctet", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47446 if (aRv.Failed()) {
47447 return;
47448 }
47449 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47449); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47449; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47450 BindingCallContext& cx = s.GetCallContext();
47451
47452 JS::Rooted<JS::Value> rval(cx);
47453 JS::RootedVector<JS::Value> argv(cx);
47454 if (!argv.resize(1)) {
47455 // That threw an exception on the JSContext, and our CallSetup will do
47456 // the right thing with that.
47457 return;
47458 }
47459 unsigned argc = 1;
47460
47461 do {
47462 argv[0].setInt32(int32_t(arg));
47463 break;
47464 } while (false);
47465
47466 JS::Rooted<JS::Value> callable(cx);
47467 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47468 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47469 !InitIds(cx, atomsCache)) ||
47470 !GetCallableProperty(cx, atomsCache->passOctet_id, &callable)) {
47471 aRv.Throw(NS_ERROR_UNEXPECTED);
47472 return;
47473 }
47474 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47475 if (!JS::Call(cx, thisValue, callable,
47476 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47477 aRv.NoteJSContextException(cx);
47478 return;
47479 }
47480}
47481
47482uint8_t
47483TestJSImplInterfaceJSImpl::ReceiveOctet(ErrorResult& aRv, JS::Realm* aRealm)
47484{
47485 CallSetup s(this, aRv, "TestJSImplInterface.receiveOctet", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47486 if (aRv.Failed()) {
47487 return uint8_t(0);
47488 }
47489 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47489); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47489; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47490 BindingCallContext& cx = s.GetCallContext();
47491
47492 JS::Rooted<JS::Value> rval(cx);
47493
47494 JS::Rooted<JS::Value> callable(cx);
47495 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47496 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47497 !InitIds(cx, atomsCache)) ||
47498 !GetCallableProperty(cx, atomsCache->receiveOctet_id, &callable)) {
47499 aRv.Throw(NS_ERROR_UNEXPECTED);
47500 return uint8_t(0);
47501 }
47502 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47503 if (!JS::Call(cx, thisValue, callable,
47504 JS::HandleValueArray::empty(), &rval)) {
47505 aRv.NoteJSContextException(cx);
47506 return uint8_t(0);
47507 }
47508 uint8_t rvalDecl;
47509 if (!ValueToPrimitive<uint8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.receiveOctet", &rvalDecl)) {
47510 aRv.Throw(NS_ERROR_UNEXPECTED);
47511 return uint8_t(0);
47512 }
47513 return rvalDecl;
47514}
47515
47516void
47517TestJSImplInterfaceJSImpl::PassOptionalOctet(const Optional<uint8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
47518{
47519 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalOctet", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47520 if (aRv.Failed()) {
47521 return;
47522 }
47523 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47523); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47523; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47524 BindingCallContext& cx = s.GetCallContext();
47525
47526 JS::Rooted<JS::Value> rval(cx);
47527 JS::RootedVector<JS::Value> argv(cx);
47528 if (!argv.resize(1)) {
47529 // That threw an exception on the JSContext, and our CallSetup will do
47530 // the right thing with that.
47531 return;
47532 }
47533 unsigned argc = 1;
47534
47535 do {
47536 if (arg.WasPassed()) {
47537 argv[0].setInt32(int32_t(arg.Value()));
47538 break;
47539 } else if (argc == 1) {
47540 // This is our current trailing argument; reduce argc
47541 --argc;
47542 } else {
47543 argv[0].setUndefined();
47544 }
47545 } while (false);
47546
47547 JS::Rooted<JS::Value> callable(cx);
47548 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47549 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47550 !InitIds(cx, atomsCache)) ||
47551 !GetCallableProperty(cx, atomsCache->passOptionalOctet_id, &callable)) {
47552 aRv.Throw(NS_ERROR_UNEXPECTED);
47553 return;
47554 }
47555 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47556 if (!JS::Call(cx, thisValue, callable,
47557 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47558 aRv.NoteJSContextException(cx);
47559 return;
47560 }
47561}
47562
47563void
47564TestJSImplInterfaceJSImpl::PassOptionalOctetWithDefault(uint8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
47565{
47566 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalOctetWithDefault", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47567 if (aRv.Failed()) {
47568 return;
47569 }
47570 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47570); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47570; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47571 BindingCallContext& cx = s.GetCallContext();
47572
47573 JS::Rooted<JS::Value> rval(cx);
47574 JS::RootedVector<JS::Value> argv(cx);
47575 if (!argv.resize(1)) {
47576 // That threw an exception on the JSContext, and our CallSetup will do
47577 // the right thing with that.
47578 return;
47579 }
47580 unsigned argc = 1;
47581
47582 do {
47583 argv[0].setInt32(int32_t(arg));
47584 break;
47585 } while (false);
47586
47587 JS::Rooted<JS::Value> callable(cx);
47588 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47589 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47590 !InitIds(cx, atomsCache)) ||
47591 !GetCallableProperty(cx, atomsCache->passOptionalOctetWithDefault_id, &callable)) {
47592 aRv.Throw(NS_ERROR_UNEXPECTED);
47593 return;
47594 }
47595 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47596 if (!JS::Call(cx, thisValue, callable,
47597 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47598 aRv.NoteJSContextException(cx);
47599 return;
47600 }
47601}
47602
47603void
47604TestJSImplInterfaceJSImpl::PassUnsignedShort(uint16_t arg, ErrorResult& aRv, JS::Realm* aRealm)
47605{
47606 CallSetup s(this, aRv, "TestJSImplInterface.passUnsignedShort", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47607 if (aRv.Failed()) {
47608 return;
47609 }
47610 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47610); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47610; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47611 BindingCallContext& cx = s.GetCallContext();
47612
47613 JS::Rooted<JS::Value> rval(cx);
47614 JS::RootedVector<JS::Value> argv(cx);
47615 if (!argv.resize(1)) {
47616 // That threw an exception on the JSContext, and our CallSetup will do
47617 // the right thing with that.
47618 return;
47619 }
47620 unsigned argc = 1;
47621
47622 do {
47623 argv[0].setInt32(int32_t(arg));
47624 break;
47625 } while (false);
47626
47627 JS::Rooted<JS::Value> callable(cx);
47628 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47629 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47630 !InitIds(cx, atomsCache)) ||
47631 !GetCallableProperty(cx, atomsCache->passUnsignedShort_id, &callable)) {
47632 aRv.Throw(NS_ERROR_UNEXPECTED);
47633 return;
47634 }
47635 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47636 if (!JS::Call(cx, thisValue, callable,
47637 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47638 aRv.NoteJSContextException(cx);
47639 return;
47640 }
47641}
47642
47643uint16_t
47644TestJSImplInterfaceJSImpl::ReceiveUnsignedShort(ErrorResult& aRv, JS::Realm* aRealm)
47645{
47646 CallSetup s(this, aRv, "TestJSImplInterface.receiveUnsignedShort", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47647 if (aRv.Failed()) {
47648 return uint16_t(0);
47649 }
47650 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47650); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47650; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47651 BindingCallContext& cx = s.GetCallContext();
47652
47653 JS::Rooted<JS::Value> rval(cx);
47654
47655 JS::Rooted<JS::Value> callable(cx);
47656 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47657 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47658 !InitIds(cx, atomsCache)) ||
47659 !GetCallableProperty(cx, atomsCache->receiveUnsignedShort_id, &callable)) {
47660 aRv.Throw(NS_ERROR_UNEXPECTED);
47661 return uint16_t(0);
47662 }
47663 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47664 if (!JS::Call(cx, thisValue, callable,
47665 JS::HandleValueArray::empty(), &rval)) {
47666 aRv.NoteJSContextException(cx);
47667 return uint16_t(0);
47668 }
47669 uint16_t rvalDecl;
47670 if (!ValueToPrimitive<uint16_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.receiveUnsignedShort", &rvalDecl)) {
47671 aRv.Throw(NS_ERROR_UNEXPECTED);
47672 return uint16_t(0);
47673 }
47674 return rvalDecl;
47675}
47676
47677void
47678TestJSImplInterfaceJSImpl::PassOptionalUnsignedShort(const Optional<uint16_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
47679{
47680 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalUnsignedShort", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47681 if (aRv.Failed()) {
47682 return;
47683 }
47684 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47684); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47684; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47685 BindingCallContext& cx = s.GetCallContext();
47686
47687 JS::Rooted<JS::Value> rval(cx);
47688 JS::RootedVector<JS::Value> argv(cx);
47689 if (!argv.resize(1)) {
47690 // That threw an exception on the JSContext, and our CallSetup will do
47691 // the right thing with that.
47692 return;
47693 }
47694 unsigned argc = 1;
47695
47696 do {
47697 if (arg.WasPassed()) {
47698 argv[0].setInt32(int32_t(arg.Value()));
47699 break;
47700 } else if (argc == 1) {
47701 // This is our current trailing argument; reduce argc
47702 --argc;
47703 } else {
47704 argv[0].setUndefined();
47705 }
47706 } while (false);
47707
47708 JS::Rooted<JS::Value> callable(cx);
47709 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47710 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47711 !InitIds(cx, atomsCache)) ||
47712 !GetCallableProperty(cx, atomsCache->passOptionalUnsignedShort_id, &callable)) {
47713 aRv.Throw(NS_ERROR_UNEXPECTED);
47714 return;
47715 }
47716 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47717 if (!JS::Call(cx, thisValue, callable,
47718 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47719 aRv.NoteJSContextException(cx);
47720 return;
47721 }
47722}
47723
47724void
47725TestJSImplInterfaceJSImpl::PassOptionalUnsignedShortWithDefault(uint16_t arg, ErrorResult& aRv, JS::Realm* aRealm)
47726{
47727 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalUnsignedShortWithDefault", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47728 if (aRv.Failed()) {
47729 return;
47730 }
47731 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47731); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47731; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47732 BindingCallContext& cx = s.GetCallContext();
47733
47734 JS::Rooted<JS::Value> rval(cx);
47735 JS::RootedVector<JS::Value> argv(cx);
47736 if (!argv.resize(1)) {
47737 // That threw an exception on the JSContext, and our CallSetup will do
47738 // the right thing with that.
47739 return;
47740 }
47741 unsigned argc = 1;
47742
47743 do {
47744 argv[0].setInt32(int32_t(arg));
47745 break;
47746 } while (false);
47747
47748 JS::Rooted<JS::Value> callable(cx);
47749 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47750 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47751 !InitIds(cx, atomsCache)) ||
47752 !GetCallableProperty(cx, atomsCache->passOptionalUnsignedShortWithDefault_id, &callable)) {
47753 aRv.Throw(NS_ERROR_UNEXPECTED);
47754 return;
47755 }
47756 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47757 if (!JS::Call(cx, thisValue, callable,
47758 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47759 aRv.NoteJSContextException(cx);
47760 return;
47761 }
47762}
47763
47764void
47765TestJSImplInterfaceJSImpl::PassUnsignedLong(uint32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
47766{
47767 CallSetup s(this, aRv, "TestJSImplInterface.passUnsignedLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47768 if (aRv.Failed()) {
47769 return;
47770 }
47771 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47771); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47771; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47772 BindingCallContext& cx = s.GetCallContext();
47773
47774 JS::Rooted<JS::Value> rval(cx);
47775 JS::RootedVector<JS::Value> argv(cx);
47776 if (!argv.resize(1)) {
47777 // That threw an exception on the JSContext, and our CallSetup will do
47778 // the right thing with that.
47779 return;
47780 }
47781 unsigned argc = 1;
47782
47783 do {
47784 argv[0].setNumber(arg);
47785 break;
47786 } while (false);
47787
47788 JS::Rooted<JS::Value> callable(cx);
47789 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47790 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47791 !InitIds(cx, atomsCache)) ||
47792 !GetCallableProperty(cx, atomsCache->passUnsignedLong_id, &callable)) {
47793 aRv.Throw(NS_ERROR_UNEXPECTED);
47794 return;
47795 }
47796 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47797 if (!JS::Call(cx, thisValue, callable,
47798 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47799 aRv.NoteJSContextException(cx);
47800 return;
47801 }
47802}
47803
47804uint32_t
47805TestJSImplInterfaceJSImpl::ReceiveUnsignedLong(ErrorResult& aRv, JS::Realm* aRealm)
47806{
47807 CallSetup s(this, aRv, "TestJSImplInterface.receiveUnsignedLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47808 if (aRv.Failed()) {
47809 return uint32_t(0);
47810 }
47811 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47811); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47811; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47812 BindingCallContext& cx = s.GetCallContext();
47813
47814 JS::Rooted<JS::Value> rval(cx);
47815
47816 JS::Rooted<JS::Value> callable(cx);
47817 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47818 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47819 !InitIds(cx, atomsCache)) ||
47820 !GetCallableProperty(cx, atomsCache->receiveUnsignedLong_id, &callable)) {
47821 aRv.Throw(NS_ERROR_UNEXPECTED);
47822 return uint32_t(0);
47823 }
47824 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47825 if (!JS::Call(cx, thisValue, callable,
47826 JS::HandleValueArray::empty(), &rval)) {
47827 aRv.NoteJSContextException(cx);
47828 return uint32_t(0);
47829 }
47830 uint32_t rvalDecl;
47831 if (!ValueToPrimitive<uint32_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.receiveUnsignedLong", &rvalDecl)) {
47832 aRv.Throw(NS_ERROR_UNEXPECTED);
47833 return uint32_t(0);
47834 }
47835 return rvalDecl;
47836}
47837
47838void
47839TestJSImplInterfaceJSImpl::PassOptionalUnsignedLong(const Optional<uint32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
47840{
47841 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalUnsignedLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47842 if (aRv.Failed()) {
47843 return;
47844 }
47845 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47845); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47845; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47846 BindingCallContext& cx = s.GetCallContext();
47847
47848 JS::Rooted<JS::Value> rval(cx);
47849 JS::RootedVector<JS::Value> argv(cx);
47850 if (!argv.resize(1)) {
47851 // That threw an exception on the JSContext, and our CallSetup will do
47852 // the right thing with that.
47853 return;
47854 }
47855 unsigned argc = 1;
47856
47857 do {
47858 if (arg.WasPassed()) {
47859 argv[0].setNumber(arg.Value());
47860 break;
47861 } else if (argc == 1) {
47862 // This is our current trailing argument; reduce argc
47863 --argc;
47864 } else {
47865 argv[0].setUndefined();
47866 }
47867 } while (false);
47868
47869 JS::Rooted<JS::Value> callable(cx);
47870 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47871 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47872 !InitIds(cx, atomsCache)) ||
47873 !GetCallableProperty(cx, atomsCache->passOptionalUnsignedLong_id, &callable)) {
47874 aRv.Throw(NS_ERROR_UNEXPECTED);
47875 return;
47876 }
47877 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47878 if (!JS::Call(cx, thisValue, callable,
47879 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47880 aRv.NoteJSContextException(cx);
47881 return;
47882 }
47883}
47884
47885void
47886TestJSImplInterfaceJSImpl::PassOptionalUnsignedLongWithDefault(uint32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
47887{
47888 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalUnsignedLongWithDefault", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47889 if (aRv.Failed()) {
47890 return;
47891 }
47892 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47892); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47892; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47893 BindingCallContext& cx = s.GetCallContext();
47894
47895 JS::Rooted<JS::Value> rval(cx);
47896 JS::RootedVector<JS::Value> argv(cx);
47897 if (!argv.resize(1)) {
47898 // That threw an exception on the JSContext, and our CallSetup will do
47899 // the right thing with that.
47900 return;
47901 }
47902 unsigned argc = 1;
47903
47904 do {
47905 argv[0].setNumber(arg);
47906 break;
47907 } while (false);
47908
47909 JS::Rooted<JS::Value> callable(cx);
47910 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47911 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47912 !InitIds(cx, atomsCache)) ||
47913 !GetCallableProperty(cx, atomsCache->passOptionalUnsignedLongWithDefault_id, &callable)) {
47914 aRv.Throw(NS_ERROR_UNEXPECTED);
47915 return;
47916 }
47917 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47918 if (!JS::Call(cx, thisValue, callable,
47919 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47920 aRv.NoteJSContextException(cx);
47921 return;
47922 }
47923}
47924
47925void
47926TestJSImplInterfaceJSImpl::PassUnsignedLongLong(uint64_t arg, ErrorResult& aRv, JS::Realm* aRealm)
47927{
47928 CallSetup s(this, aRv, "TestJSImplInterface.passUnsignedLongLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47929 if (aRv.Failed()) {
47930 return;
47931 }
47932 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47932); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47932; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47933 BindingCallContext& cx = s.GetCallContext();
47934
47935 JS::Rooted<JS::Value> rval(cx);
47936 JS::RootedVector<JS::Value> argv(cx);
47937 if (!argv.resize(1)) {
47938 // That threw an exception on the JSContext, and our CallSetup will do
47939 // the right thing with that.
47940 return;
47941 }
47942 unsigned argc = 1;
47943
47944 do {
47945 argv[0].set(JS_NumberValue(double(arg)));
47946 break;
47947 } while (false);
47948
47949 JS::Rooted<JS::Value> callable(cx);
47950 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47951 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47952 !InitIds(cx, atomsCache)) ||
47953 !GetCallableProperty(cx, atomsCache->passUnsignedLongLong_id, &callable)) {
47954 aRv.Throw(NS_ERROR_UNEXPECTED);
47955 return;
47956 }
47957 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47958 if (!JS::Call(cx, thisValue, callable,
47959 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
47960 aRv.NoteJSContextException(cx);
47961 return;
47962 }
47963}
47964
47965uint64_t
47966TestJSImplInterfaceJSImpl::ReceiveUnsignedLongLong(ErrorResult& aRv, JS::Realm* aRealm)
47967{
47968 CallSetup s(this, aRv, "TestJSImplInterface.receiveUnsignedLongLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
47969 if (aRv.Failed()) {
47970 return uint64_t(0);
47971 }
47972 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 47972); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 47972; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
47973 BindingCallContext& cx = s.GetCallContext();
47974
47975 JS::Rooted<JS::Value> rval(cx);
47976
47977 JS::Rooted<JS::Value> callable(cx);
47978 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
47979 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
47980 !InitIds(cx, atomsCache)) ||
47981 !GetCallableProperty(cx, atomsCache->receiveUnsignedLongLong_id, &callable)) {
47982 aRv.Throw(NS_ERROR_UNEXPECTED);
47983 return uint64_t(0);
47984 }
47985 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
47986 if (!JS::Call(cx, thisValue, callable,
47987 JS::HandleValueArray::empty(), &rval)) {
47988 aRv.NoteJSContextException(cx);
47989 return uint64_t(0);
47990 }
47991 uint64_t rvalDecl;
47992 if (!ValueToPrimitive<uint64_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.receiveUnsignedLongLong", &rvalDecl)) {
47993 aRv.Throw(NS_ERROR_UNEXPECTED);
47994 return uint64_t(0);
47995 }
47996 return rvalDecl;
47997}
47998
47999void
48000TestJSImplInterfaceJSImpl::PassOptionalUnsignedLongLong(const Optional<uint64_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
48001{
48002 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalUnsignedLongLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
48003 if (aRv.Failed()) {
48004 return;
48005 }
48006 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 48006); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 48006; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
48007 BindingCallContext& cx = s.GetCallContext();
48008
48009 JS::Rooted<JS::Value> rval(cx);
48010 JS::RootedVector<JS::Value> argv(cx);
48011 if (!argv.resize(1)) {
48012 // That threw an exception on the JSContext, and our CallSetup will do
48013 // the right thing with that.
48014 return;
48015 }
48016 unsigned argc = 1;
48017
48018 do {
48019 if (arg.WasPassed()) {
48020 argv[0].set(JS_NumberValue(double(arg.Value())));
48021 break;
48022 } else if (argc == 1) {
48023 // This is our current trailing argument; reduce argc
48024 --argc;
48025 } else {
48026 argv[0].setUndefined();
48027 }
48028 } while (false);
48029
48030 JS::Rooted<JS::Value> callable(cx);
48031 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
48032 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
48033 !InitIds(cx, atomsCache)) ||
48034 !GetCallableProperty(cx, atomsCache->passOptionalUnsignedLongLong_id, &callable)) {
48035 aRv.Throw(NS_ERROR_UNEXPECTED);
48036 return;
48037 }
48038 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
48039 if (!JS::Call(cx, thisValue, callable,
48040 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
48041 aRv.NoteJSContextException(cx);
48042 return;
48043 }
48044}
48045
48046void
48047TestJSImplInterfaceJSImpl::PassOptionalUnsignedLongLongWithDefault(uint64_t arg, ErrorResult& aRv, JS::Realm* aRealm)
48048{
48049 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalUnsignedLongLongWithDefault", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
48050 if (aRv.Failed()) {
48051 return;
48052 }
48053 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 48053); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 48053; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
48054 BindingCallContext& cx = s.GetCallContext();
48055
48056 JS::Rooted<JS::Value> rval(cx);
48057 JS::RootedVector<JS::Value> argv(cx);
48058 if (!argv.resize(1)) {
48059 // That threw an exception on the JSContext, and our CallSetup will do
48060 // the right thing with that.
48061 return;
48062 }
48063 unsigned argc = 1;
48064
48065 do {
48066 argv[0].set(JS_NumberValue(double(arg)));
48067 break;
48068 } while (false);
48069
48070 JS::Rooted<JS::Value> callable(cx);
48071 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
48072 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
48073 !InitIds(cx, atomsCache)) ||
48074 !GetCallableProperty(cx, atomsCache->passOptionalUnsignedLongLongWithDefault_id, &callable)) {
48075 aRv.Throw(NS_ERROR_UNEXPECTED);
48076 return;
48077 }
48078 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
48079 if (!JS::Call(cx, thisValue, callable,
48080 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
48081 aRv.NoteJSContextException(cx);
48082 return;
48083 }
48084}
48085
48086void
48087TestJSImplInterfaceJSImpl::PassFloat(float arg1, float arg2, const Nullable<float>& arg3, const Nullable<float>& arg4, double arg5, double arg6, const Nullable<double>& arg7, const Nullable<double>& arg8, const Sequence<float>& arg9, const Sequence<float>& arg10, const Sequence<Nullable<float>>& arg11, const Sequence<Nullable<float>>& arg12, const Sequence<double>& arg13, const Sequence<double>& arg14, const Sequence<Nullable<double>>& arg15, const Sequence<Nullable<double>>& arg16, ErrorResult& aRv, JS::Realm* aRealm)
48088{
48089 CallSetup s(this, aRv, "TestJSImplInterface.passFloat", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
48090 if (aRv.Failed()) {
48091 return;
48092 }
48093 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 48093); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 48093; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
48094 BindingCallContext& cx = s.GetCallContext();
48095
48096 JS::Rooted<JS::Value> rval(cx);
48097 JS::RootedVector<JS::Value> argv(cx);
48098 if (!argv.resize(16)) {
48099 // That threw an exception on the JSContext, and our CallSetup will do
48100 // the right thing with that.
48101 return;
48102 }
48103 unsigned argc = 16;
48104
48105 do {
48106
48107 uint32_t length = arg16.Length();
48108 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48109 if (!returnArray) {
48110 aRv.Throw(NS_ERROR_UNEXPECTED);
48111 return;
48112 }
48113 // Scope for 'tmp'
48114 {
48115 JS::Rooted<JS::Value> tmp(cx);
48116 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48117 // Control block to let us common up the JS_DefineElement calls when there
48118 // are different ways to succeed at wrapping the object.
48119 do {
48120 if (arg16[sequenceIdx0].IsNull()) {
48121 tmp.setNull();
48122 break;
48123 }
48124 tmp.set(JS_NumberValue(double(arg16[sequenceIdx0].Value())));
48125 break;
48126 } while (false);
48127 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48128 JSPROP_ENUMERATE)) {
48129 aRv.Throw(NS_ERROR_UNEXPECTED);
48130 return;
48131 }
48132 }
48133 }
48134 argv[15].setObject(*returnArray);
48135 break;
48136 } while (false);
48137
48138 do {
48139
48140 uint32_t length = arg15.Length();
48141 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48142 if (!returnArray) {
48143 aRv.Throw(NS_ERROR_UNEXPECTED);
48144 return;
48145 }
48146 // Scope for 'tmp'
48147 {
48148 JS::Rooted<JS::Value> tmp(cx);
48149 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48150 // Control block to let us common up the JS_DefineElement calls when there
48151 // are different ways to succeed at wrapping the object.
48152 do {
48153 if (arg15[sequenceIdx0].IsNull()) {
48154 tmp.setNull();
48155 break;
48156 }
48157 tmp.set(JS_NumberValue(double(arg15[sequenceIdx0].Value())));
48158 break;
48159 } while (false);
48160 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48161 JSPROP_ENUMERATE)) {
48162 aRv.Throw(NS_ERROR_UNEXPECTED);
48163 return;
48164 }
48165 }
48166 }
48167 argv[14].setObject(*returnArray);
48168 break;
48169 } while (false);
48170
48171 do {
48172
48173 uint32_t length = arg14.Length();
48174 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48175 if (!returnArray) {
48176 aRv.Throw(NS_ERROR_UNEXPECTED);
48177 return;
48178 }
48179 // Scope for 'tmp'
48180 {
48181 JS::Rooted<JS::Value> tmp(cx);
48182 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48183 // Control block to let us common up the JS_DefineElement calls when there
48184 // are different ways to succeed at wrapping the object.
48185 do {
48186 tmp.set(JS_NumberValue(double(arg14[sequenceIdx0])));
48187 break;
48188 } while (false);
48189 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48190 JSPROP_ENUMERATE)) {
48191 aRv.Throw(NS_ERROR_UNEXPECTED);
48192 return;
48193 }
48194 }
48195 }
48196 argv[13].setObject(*returnArray);
48197 break;
48198 } while (false);
48199
48200 do {
48201
48202 uint32_t length = arg13.Length();
48203 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48204 if (!returnArray) {
48205 aRv.Throw(NS_ERROR_UNEXPECTED);
48206 return;
48207 }
48208 // Scope for 'tmp'
48209 {
48210 JS::Rooted<JS::Value> tmp(cx);
48211 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48212 // Control block to let us common up the JS_DefineElement calls when there
48213 // are different ways to succeed at wrapping the object.
48214 do {
48215 tmp.set(JS_NumberValue(double(arg13[sequenceIdx0])));
48216 break;
48217 } while (false);
48218 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48219 JSPROP_ENUMERATE)) {
48220 aRv.Throw(NS_ERROR_UNEXPECTED);
48221 return;
48222 }
48223 }
48224 }
48225 argv[12].setObject(*returnArray);
48226 break;
48227 } while (false);
48228
48229 do {
48230
48231 uint32_t length = arg12.Length();
48232 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48233 if (!returnArray) {
48234 aRv.Throw(NS_ERROR_UNEXPECTED);
48235 return;
48236 }
48237 // Scope for 'tmp'
48238 {
48239 JS::Rooted<JS::Value> tmp(cx);
48240 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48241 // Control block to let us common up the JS_DefineElement calls when there
48242 // are different ways to succeed at wrapping the object.
48243 do {
48244 if (arg12[sequenceIdx0].IsNull()) {
48245 tmp.setNull();
48246 break;
48247 }
48248 tmp.set(JS_NumberValue(double(arg12[sequenceIdx0].Value())));
48249 break;
48250 } while (false);
48251 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48252 JSPROP_ENUMERATE)) {
48253 aRv.Throw(NS_ERROR_UNEXPECTED);
48254 return;
48255 }
48256 }
48257 }
48258 argv[11].setObject(*returnArray);
48259 break;
48260 } while (false);
48261
48262 do {
48263
48264 uint32_t length = arg11.Length();
48265 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48266 if (!returnArray) {
48267 aRv.Throw(NS_ERROR_UNEXPECTED);
48268 return;
48269 }
48270 // Scope for 'tmp'
48271 {
48272 JS::Rooted<JS::Value> tmp(cx);
48273 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48274 // Control block to let us common up the JS_DefineElement calls when there
48275 // are different ways to succeed at wrapping the object.
48276 do {
48277 if (arg11[sequenceIdx0].IsNull()) {
48278 tmp.setNull();
48279 break;
48280 }
48281 tmp.set(JS_NumberValue(double(arg11[sequenceIdx0].Value())));
48282 break;
48283 } while (false);
48284 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48285 JSPROP_ENUMERATE)) {
48286 aRv.Throw(NS_ERROR_UNEXPECTED);
48287 return;
48288 }
48289 }
48290 }
48291 argv[10].setObject(*returnArray);
48292 break;
48293 } while (false);
48294
48295 do {
48296
48297 uint32_t length = arg10.Length();
48298 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48299 if (!returnArray) {
48300 aRv.Throw(NS_ERROR_UNEXPECTED);
48301 return;
48302 }
48303 // Scope for 'tmp'
48304 {
48305 JS::Rooted<JS::Value> tmp(cx);
48306 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48307 // Control block to let us common up the JS_DefineElement calls when there
48308 // are different ways to succeed at wrapping the object.
48309 do {
48310 tmp.set(JS_NumberValue(double(arg10[sequenceIdx0])));
48311 break;
48312 } while (false);
48313 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48314 JSPROP_ENUMERATE)) {
48315 aRv.Throw(NS_ERROR_UNEXPECTED);
48316 return;
48317 }
48318 }
48319 }
48320 argv[9].setObject(*returnArray);
48321 break;
48322 } while (false);
48323
48324 do {
48325
48326 uint32_t length = arg9.Length();
48327 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48328 if (!returnArray) {
48329 aRv.Throw(NS_ERROR_UNEXPECTED);
48330 return;
48331 }
48332 // Scope for 'tmp'
48333 {
48334 JS::Rooted<JS::Value> tmp(cx);
48335 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48336 // Control block to let us common up the JS_DefineElement calls when there
48337 // are different ways to succeed at wrapping the object.
48338 do {
48339 tmp.set(JS_NumberValue(double(arg9[sequenceIdx0])));
48340 break;
48341 } while (false);
48342 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48343 JSPROP_ENUMERATE)) {
48344 aRv.Throw(NS_ERROR_UNEXPECTED);
48345 return;
48346 }
48347 }
48348 }
48349 argv[8].setObject(*returnArray);
48350 break;
48351 } while (false);
48352
48353 do {
48354 if (arg8.IsNull()) {
48355 argv[7].setNull();
48356 break;
48357 }
48358 argv[7].set(JS_NumberValue(double(arg8.Value())));
48359 break;
48360 } while (false);
48361
48362 do {
48363 if (arg7.IsNull()) {
48364 argv[6].setNull();
48365 break;
48366 }
48367 argv[6].set(JS_NumberValue(double(arg7.Value())));
48368 break;
48369 } while (false);
48370
48371 do {
48372 argv[5].set(JS_NumberValue(double(arg6)));
48373 break;
48374 } while (false);
48375
48376 do {
48377 argv[4].set(JS_NumberValue(double(arg5)));
48378 break;
48379 } while (false);
48380
48381 do {
48382 if (arg4.IsNull()) {
48383 argv[3].setNull();
48384 break;
48385 }
48386 argv[3].set(JS_NumberValue(double(arg4.Value())));
48387 break;
48388 } while (false);
48389
48390 do {
48391 if (arg3.IsNull()) {
48392 argv[2].setNull();
48393 break;
48394 }
48395 argv[2].set(JS_NumberValue(double(arg3.Value())));
48396 break;
48397 } while (false);
48398
48399 do {
48400 argv[1].set(JS_NumberValue(double(arg2)));
48401 break;
48402 } while (false);
48403
48404 do {
48405 argv[0].set(JS_NumberValue(double(arg1)));
48406 break;
48407 } while (false);
48408
48409 JS::Rooted<JS::Value> callable(cx);
48410 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
48411 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
48412 !InitIds(cx, atomsCache)) ||
48413 !GetCallableProperty(cx, atomsCache->passFloat_id, &callable)) {
48414 aRv.Throw(NS_ERROR_UNEXPECTED);
48415 return;
48416 }
48417 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
48418 if (!JS::Call(cx, thisValue, callable,
48419 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
48420 aRv.NoteJSContextException(cx);
48421 return;
48422 }
48423}
48424
48425void
48426TestJSImplInterfaceJSImpl::PassLenientFloat(float arg1, float arg2, const Nullable<float>& arg3, const Nullable<float>& arg4, double arg5, double arg6, const Nullable<double>& arg7, const Nullable<double>& arg8, const Sequence<float>& arg9, const Sequence<float>& arg10, const Sequence<Nullable<float>>& arg11, const Sequence<Nullable<float>>& arg12, const Sequence<double>& arg13, const Sequence<double>& arg14, const Sequence<Nullable<double>>& arg15, const Sequence<Nullable<double>>& arg16, ErrorResult& aRv, JS::Realm* aRealm)
48427{
48428 CallSetup s(this, aRv, "TestJSImplInterface.passLenientFloat", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
48429 if (aRv.Failed()) {
48430 return;
48431 }
48432 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 48432); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 48432; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
48433 BindingCallContext& cx = s.GetCallContext();
48434
48435 JS::Rooted<JS::Value> rval(cx);
48436 JS::RootedVector<JS::Value> argv(cx);
48437 if (!argv.resize(16)) {
48438 // That threw an exception on the JSContext, and our CallSetup will do
48439 // the right thing with that.
48440 return;
48441 }
48442 unsigned argc = 16;
48443
48444 do {
48445
48446 uint32_t length = arg16.Length();
48447 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48448 if (!returnArray) {
48449 aRv.Throw(NS_ERROR_UNEXPECTED);
48450 return;
48451 }
48452 // Scope for 'tmp'
48453 {
48454 JS::Rooted<JS::Value> tmp(cx);
48455 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48456 // Control block to let us common up the JS_DefineElement calls when there
48457 // are different ways to succeed at wrapping the object.
48458 do {
48459 if (arg16[sequenceIdx0].IsNull()) {
48460 tmp.setNull();
48461 break;
48462 }
48463 tmp.set(JS_NumberValue(double(arg16[sequenceIdx0].Value())));
48464 break;
48465 } while (false);
48466 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48467 JSPROP_ENUMERATE)) {
48468 aRv.Throw(NS_ERROR_UNEXPECTED);
48469 return;
48470 }
48471 }
48472 }
48473 argv[15].setObject(*returnArray);
48474 break;
48475 } while (false);
48476
48477 do {
48478
48479 uint32_t length = arg15.Length();
48480 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48481 if (!returnArray) {
48482 aRv.Throw(NS_ERROR_UNEXPECTED);
48483 return;
48484 }
48485 // Scope for 'tmp'
48486 {
48487 JS::Rooted<JS::Value> tmp(cx);
48488 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48489 // Control block to let us common up the JS_DefineElement calls when there
48490 // are different ways to succeed at wrapping the object.
48491 do {
48492 if (arg15[sequenceIdx0].IsNull()) {
48493 tmp.setNull();
48494 break;
48495 }
48496 tmp.set(JS_NumberValue(double(arg15[sequenceIdx0].Value())));
48497 break;
48498 } while (false);
48499 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48500 JSPROP_ENUMERATE)) {
48501 aRv.Throw(NS_ERROR_UNEXPECTED);
48502 return;
48503 }
48504 }
48505 }
48506 argv[14].setObject(*returnArray);
48507 break;
48508 } while (false);
48509
48510 do {
48511
48512 uint32_t length = arg14.Length();
48513 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48514 if (!returnArray) {
48515 aRv.Throw(NS_ERROR_UNEXPECTED);
48516 return;
48517 }
48518 // Scope for 'tmp'
48519 {
48520 JS::Rooted<JS::Value> tmp(cx);
48521 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48522 // Control block to let us common up the JS_DefineElement calls when there
48523 // are different ways to succeed at wrapping the object.
48524 do {
48525 tmp.set(JS_NumberValue(double(arg14[sequenceIdx0])));
48526 break;
48527 } while (false);
48528 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48529 JSPROP_ENUMERATE)) {
48530 aRv.Throw(NS_ERROR_UNEXPECTED);
48531 return;
48532 }
48533 }
48534 }
48535 argv[13].setObject(*returnArray);
48536 break;
48537 } while (false);
48538
48539 do {
48540
48541 uint32_t length = arg13.Length();
48542 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48543 if (!returnArray) {
48544 aRv.Throw(NS_ERROR_UNEXPECTED);
48545 return;
48546 }
48547 // Scope for 'tmp'
48548 {
48549 JS::Rooted<JS::Value> tmp(cx);
48550 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48551 // Control block to let us common up the JS_DefineElement calls when there
48552 // are different ways to succeed at wrapping the object.
48553 do {
48554 tmp.set(JS_NumberValue(double(arg13[sequenceIdx0])));
48555 break;
48556 } while (false);
48557 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48558 JSPROP_ENUMERATE)) {
48559 aRv.Throw(NS_ERROR_UNEXPECTED);
48560 return;
48561 }
48562 }
48563 }
48564 argv[12].setObject(*returnArray);
48565 break;
48566 } while (false);
48567
48568 do {
48569
48570 uint32_t length = arg12.Length();
48571 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48572 if (!returnArray) {
48573 aRv.Throw(NS_ERROR_UNEXPECTED);
48574 return;
48575 }
48576 // Scope for 'tmp'
48577 {
48578 JS::Rooted<JS::Value> tmp(cx);
48579 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48580 // Control block to let us common up the JS_DefineElement calls when there
48581 // are different ways to succeed at wrapping the object.
48582 do {
48583 if (arg12[sequenceIdx0].IsNull()) {
48584 tmp.setNull();
48585 break;
48586 }
48587 tmp.set(JS_NumberValue(double(arg12[sequenceIdx0].Value())));
48588 break;
48589 } while (false);
48590 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48591 JSPROP_ENUMERATE)) {
48592 aRv.Throw(NS_ERROR_UNEXPECTED);
48593 return;
48594 }
48595 }
48596 }
48597 argv[11].setObject(*returnArray);
48598 break;
48599 } while (false);
48600
48601 do {
48602
48603 uint32_t length = arg11.Length();
48604 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48605 if (!returnArray) {
48606 aRv.Throw(NS_ERROR_UNEXPECTED);
48607 return;
48608 }
48609 // Scope for 'tmp'
48610 {
48611 JS::Rooted<JS::Value> tmp(cx);
48612 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48613 // Control block to let us common up the JS_DefineElement calls when there
48614 // are different ways to succeed at wrapping the object.
48615 do {
48616 if (arg11[sequenceIdx0].IsNull()) {
48617 tmp.setNull();
48618 break;
48619 }
48620 tmp.set(JS_NumberValue(double(arg11[sequenceIdx0].Value())));
48621 break;
48622 } while (false);
48623 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48624 JSPROP_ENUMERATE)) {
48625 aRv.Throw(NS_ERROR_UNEXPECTED);
48626 return;
48627 }
48628 }
48629 }
48630 argv[10].setObject(*returnArray);
48631 break;
48632 } while (false);
48633
48634 do {
48635
48636 uint32_t length = arg10.Length();
48637 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48638 if (!returnArray) {
48639 aRv.Throw(NS_ERROR_UNEXPECTED);
48640 return;
48641 }
48642 // Scope for 'tmp'
48643 {
48644 JS::Rooted<JS::Value> tmp(cx);
48645 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48646 // Control block to let us common up the JS_DefineElement calls when there
48647 // are different ways to succeed at wrapping the object.
48648 do {
48649 tmp.set(JS_NumberValue(double(arg10[sequenceIdx0])));
48650 break;
48651 } while (false);
48652 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48653 JSPROP_ENUMERATE)) {
48654 aRv.Throw(NS_ERROR_UNEXPECTED);
48655 return;
48656 }
48657 }
48658 }
48659 argv[9].setObject(*returnArray);
48660 break;
48661 } while (false);
48662
48663 do {
48664
48665 uint32_t length = arg9.Length();
48666 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
48667 if (!returnArray) {
48668 aRv.Throw(NS_ERROR_UNEXPECTED);
48669 return;
48670 }
48671 // Scope for 'tmp'
48672 {
48673 JS::Rooted<JS::Value> tmp(cx);
48674 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
48675 // Control block to let us common up the JS_DefineElement calls when there
48676 // are different ways to succeed at wrapping the object.
48677 do {
48678 tmp.set(JS_NumberValue(double(arg9[sequenceIdx0])));
48679 break;
48680 } while (false);
48681 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
48682 JSPROP_ENUMERATE)) {
48683 aRv.Throw(NS_ERROR_UNEXPECTED);
48684 return;
48685 }
48686 }
48687 }
48688 argv[8].setObject(*returnArray);
48689 break;
48690 } while (false);
48691
48692 do {
48693 if (arg8.IsNull()) {
48694 argv[7].setNull();
48695 break;
48696 }
48697 argv[7].set(JS_NumberValue(double(arg8.Value())));
48698 break;
48699 } while (false);
48700
48701 do {
48702 if (arg7.IsNull()) {
48703 argv[6].setNull();
48704 break;
48705 }
48706 argv[6].set(JS_NumberValue(double(arg7.Value())));
48707 break;
48708 } while (false);
48709
48710 do {
48711 argv[5].set(JS_NumberValue(double(arg6)));
48712 break;
48713 } while (false);
48714
48715 do {
48716 argv[4].set(JS_NumberValue(double(arg5)));
48717 break;
48718 } while (false);
48719
48720 do {
48721 if (arg4.IsNull()) {
48722 argv[3].setNull();
48723 break;
48724 }
48725 argv[3].set(JS_NumberValue(double(arg4.Value())));
48726 break;
48727 } while (false);
48728
48729 do {
48730 if (arg3.IsNull()) {
48731 argv[2].setNull();
48732 break;
48733 }
48734 argv[2].set(JS_NumberValue(double(arg3.Value())));
48735 break;
48736 } while (false);
48737
48738 do {
48739 argv[1].set(JS_NumberValue(double(arg2)));
48740 break;
48741 } while (false);
48742
48743 do {
48744 argv[0].set(JS_NumberValue(double(arg1)));
48745 break;
48746 } while (false);
48747
48748 JS::Rooted<JS::Value> callable(cx);
48749 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
48750 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
48751 !InitIds(cx, atomsCache)) ||
48752 !GetCallableProperty(cx, atomsCache->passLenientFloat_id, &callable)) {
48753 aRv.Throw(NS_ERROR_UNEXPECTED);
48754 return;
48755 }
48756 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
48757 if (!JS::Call(cx, thisValue, callable,
48758 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
48759 aRv.NoteJSContextException(cx);
48760 return;
48761 }
48762}
48763
48764already_AddRefed<TestJSImplInterface>
48765TestJSImplInterfaceJSImpl::ReceiveSelf(ErrorResult& aRv, JS::Realm* aRealm)
48766{
48767 CallSetup s(this, aRv, "TestJSImplInterface.receiveSelf", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
48768 if (aRv.Failed()) {
48769 return nullptr;
48770 }
48771 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 48771); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 48771; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
48772 BindingCallContext& cx = s.GetCallContext();
48773
48774 JS::Rooted<JS::Value> rval(cx);
48775
48776 JS::Rooted<JS::Value> callable(cx);
48777 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
48778 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
48779 !InitIds(cx, atomsCache)) ||
48780 !GetCallableProperty(cx, atomsCache->receiveSelf_id, &callable)) {
48781 aRv.Throw(NS_ERROR_UNEXPECTED);
48782 return nullptr;
48783 }
48784 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
48785 if (!JS::Call(cx, thisValue, callable,
48786 JS::HandleValueArray::empty(), &rval)) {
48787 aRv.NoteJSContextException(cx);
48788 return nullptr;
48789 }
48790 RefPtr<mozilla::dom::TestJSImplInterface> rvalDecl;
48791 if (rval.isObject()) {
48792 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
48793 {
48794 // Our JSContext should be in the right global to do unwrapping in.
48795 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(rval, rvalDecl, cx);
48796 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
48797 // Be careful to not wrap random DOM objects here, even if
48798 // they're wrapped in opaque security wrappers for some reason.
48799 // XXXbz Wish we could check for a JS-implemented object
48800 // that already has a content reflection...
48801 if (!IsDOMObject(js::UncheckedUnwrap(&rval.toObject()))) {
48802 nsCOMPtr<nsIGlobalObject> contentGlobal;
48803 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
48804 if (!callback ||
48805 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
48806 aRv.Throw(NS_ERROR_UNEXPECTED);
48807 return nullptr;
48808 }
48809 JS::Rooted<JSObject*> jsImplSourceObj(cx, &rval.toObject());
48810 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 48811); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 48811; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
48811 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 48811); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 48811; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
48812 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
48813 rvalDecl = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
48814 } else {
48815 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.receiveSelf", "TestJSImplInterface");
48816 aRv.Throw(NS_ERROR_UNEXPECTED);
48817 return nullptr;
48818 }
48819 }
48820 }
48821 } else {
48822 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveSelf");
48823 aRv.Throw(NS_ERROR_UNEXPECTED);
48824 return nullptr;
48825 }
48826 return rvalDecl.forget();
48827}
48828
48829already_AddRefed<TestJSImplInterface>
48830TestJSImplInterfaceJSImpl::ReceiveNullableSelf(ErrorResult& aRv, JS::Realm* aRealm)
48831{
48832 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableSelf", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
48833 if (aRv.Failed()) {
48834 return nullptr;
48835 }
48836 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 48836); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 48836; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
48837 BindingCallContext& cx = s.GetCallContext();
48838
48839 JS::Rooted<JS::Value> rval(cx);
48840
48841 JS::Rooted<JS::Value> callable(cx);
48842 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
48843 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
48844 !InitIds(cx, atomsCache)) ||
48845 !GetCallableProperty(cx, atomsCache->receiveNullableSelf_id, &callable)) {
48846 aRv.Throw(NS_ERROR_UNEXPECTED);
48847 return nullptr;
48848 }
48849 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
48850 if (!JS::Call(cx, thisValue, callable,
48851 JS::HandleValueArray::empty(), &rval)) {
48852 aRv.NoteJSContextException(cx);
48853 return nullptr;
48854 }
48855 RefPtr<mozilla::dom::TestJSImplInterface> rvalDecl;
48856 if (rval.isObject()) {
48857 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
48858 {
48859 // Our JSContext should be in the right global to do unwrapping in.
48860 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(rval, rvalDecl, cx);
48861 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
48862 // Be careful to not wrap random DOM objects here, even if
48863 // they're wrapped in opaque security wrappers for some reason.
48864 // XXXbz Wish we could check for a JS-implemented object
48865 // that already has a content reflection...
48866 if (!IsDOMObject(js::UncheckedUnwrap(&rval.toObject()))) {
48867 nsCOMPtr<nsIGlobalObject> contentGlobal;
48868 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
48869 if (!callback ||
48870 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
48871 aRv.Throw(NS_ERROR_UNEXPECTED);
48872 return nullptr;
48873 }
48874 JS::Rooted<JSObject*> jsImplSourceObj(cx, &rval.toObject());
48875 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 48876); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 48876; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
48876 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 48876); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 48876; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
48877 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
48878 rvalDecl = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
48879 } else {
48880 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.receiveNullableSelf", "TestJSImplInterface");
48881 aRv.Throw(NS_ERROR_UNEXPECTED);
48882 return nullptr;
48883 }
48884 }
48885 }
48886 } else if (rval.isNullOrUndefined()) {
48887 rvalDecl = nullptr;
48888 } else {
48889 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveNullableSelf");
48890 aRv.Throw(NS_ERROR_UNEXPECTED);
48891 return nullptr;
48892 }
48893 return rvalDecl.forget();
48894}
48895
48896already_AddRefed<TestJSImplInterface>
48897TestJSImplInterfaceJSImpl::ReceiveWeakSelf(ErrorResult& aRv, JS::Realm* aRealm)
48898{
48899 CallSetup s(this, aRv, "TestJSImplInterface.receiveWeakSelf", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
48900 if (aRv.Failed()) {
48901 return nullptr;
48902 }
48903 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 48903); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 48903; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
48904 BindingCallContext& cx = s.GetCallContext();
48905
48906 JS::Rooted<JS::Value> rval(cx);
48907
48908 JS::Rooted<JS::Value> callable(cx);
48909 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
48910 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
48911 !InitIds(cx, atomsCache)) ||
48912 !GetCallableProperty(cx, atomsCache->receiveWeakSelf_id, &callable)) {
48913 aRv.Throw(NS_ERROR_UNEXPECTED);
48914 return nullptr;
48915 }
48916 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
48917 if (!JS::Call(cx, thisValue, callable,
48918 JS::HandleValueArray::empty(), &rval)) {
48919 aRv.NoteJSContextException(cx);
48920 return nullptr;
48921 }
48922 RefPtr<mozilla::dom::TestJSImplInterface> rvalDecl;
48923 if (rval.isObject()) {
48924 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
48925 {
48926 // Our JSContext should be in the right global to do unwrapping in.
48927 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(rval, rvalDecl, cx);
48928 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
48929 // Be careful to not wrap random DOM objects here, even if
48930 // they're wrapped in opaque security wrappers for some reason.
48931 // XXXbz Wish we could check for a JS-implemented object
48932 // that already has a content reflection...
48933 if (!IsDOMObject(js::UncheckedUnwrap(&rval.toObject()))) {
48934 nsCOMPtr<nsIGlobalObject> contentGlobal;
48935 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
48936 if (!callback ||
48937 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
48938 aRv.Throw(NS_ERROR_UNEXPECTED);
48939 return nullptr;
48940 }
48941 JS::Rooted<JSObject*> jsImplSourceObj(cx, &rval.toObject());
48942 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 48943); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 48943; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
48943 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 48943); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 48943; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
48944 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
48945 rvalDecl = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
48946 } else {
48947 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.receiveWeakSelf", "TestJSImplInterface");
48948 aRv.Throw(NS_ERROR_UNEXPECTED);
48949 return nullptr;
48950 }
48951 }
48952 }
48953 } else {
48954 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveWeakSelf");
48955 aRv.Throw(NS_ERROR_UNEXPECTED);
48956 return nullptr;
48957 }
48958 return rvalDecl.forget();
48959}
48960
48961already_AddRefed<TestJSImplInterface>
48962TestJSImplInterfaceJSImpl::ReceiveWeakNullableSelf(ErrorResult& aRv, JS::Realm* aRealm)
48963{
48964 CallSetup s(this, aRv, "TestJSImplInterface.receiveWeakNullableSelf", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
48965 if (aRv.Failed()) {
48966 return nullptr;
48967 }
48968 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 48968); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 48968; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
48969 BindingCallContext& cx = s.GetCallContext();
48970
48971 JS::Rooted<JS::Value> rval(cx);
48972
48973 JS::Rooted<JS::Value> callable(cx);
48974 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
48975 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
48976 !InitIds(cx, atomsCache)) ||
48977 !GetCallableProperty(cx, atomsCache->receiveWeakNullableSelf_id, &callable)) {
48978 aRv.Throw(NS_ERROR_UNEXPECTED);
48979 return nullptr;
48980 }
48981 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
48982 if (!JS::Call(cx, thisValue, callable,
48983 JS::HandleValueArray::empty(), &rval)) {
48984 aRv.NoteJSContextException(cx);
48985 return nullptr;
48986 }
48987 RefPtr<mozilla::dom::TestJSImplInterface> rvalDecl;
48988 if (rval.isObject()) {
48989 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
48990 {
48991 // Our JSContext should be in the right global to do unwrapping in.
48992 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(rval, rvalDecl, cx);
48993 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
48994 // Be careful to not wrap random DOM objects here, even if
48995 // they're wrapped in opaque security wrappers for some reason.
48996 // XXXbz Wish we could check for a JS-implemented object
48997 // that already has a content reflection...
48998 if (!IsDOMObject(js::UncheckedUnwrap(&rval.toObject()))) {
48999 nsCOMPtr<nsIGlobalObject> contentGlobal;
49000 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
49001 if (!callback ||
49002 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
49003 aRv.Throw(NS_ERROR_UNEXPECTED);
49004 return nullptr;
49005 }
49006 JS::Rooted<JSObject*> jsImplSourceObj(cx, &rval.toObject());
49007 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 49008); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 49008; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
49008 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 49008); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 49008; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
49009 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
49010 rvalDecl = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
49011 } else {
49012 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.receiveWeakNullableSelf", "TestJSImplInterface");
49013 aRv.Throw(NS_ERROR_UNEXPECTED);
49014 return nullptr;
49015 }
49016 }
49017 }
49018 } else if (rval.isNullOrUndefined()) {
49019 rvalDecl = nullptr;
49020 } else {
49021 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveWeakNullableSelf");
49022 aRv.Throw(NS_ERROR_UNEXPECTED);
49023 return nullptr;
49024 }
49025 return rvalDecl.forget();
49026}
49027
49028void
49029TestJSImplInterfaceJSImpl::PassSelf(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
49030{
49031 CallSetup s(this, aRv, "TestJSImplInterface.passSelf", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49032 if (aRv.Failed()) {
49033 return;
49034 }
49035 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49035); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49035; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49036 BindingCallContext& cx = s.GetCallContext();
49037
49038 JS::Rooted<JS::Value> rval(cx);
49039 JS::RootedVector<JS::Value> argv(cx);
49040 if (!argv.resize(1)) {
49041 // That threw an exception on the JSContext, and our CallSetup will do
49042 // the right thing with that.
49043 return;
49044 }
49045 unsigned argc = 1;
49046
49047 do {
49048 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
49049 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 49049); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 49049; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49050 aRv.Throw(NS_ERROR_UNEXPECTED);
49051 return;
49052 }
49053 break;
49054 } while (false);
49055
49056 JS::Rooted<JS::Value> callable(cx);
49057 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49058 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49059 !InitIds(cx, atomsCache)) ||
49060 !GetCallableProperty(cx, atomsCache->passSelf_id, &callable)) {
49061 aRv.Throw(NS_ERROR_UNEXPECTED);
49062 return;
49063 }
49064 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49065 if (!JS::Call(cx, thisValue, callable,
49066 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
49067 aRv.NoteJSContextException(cx);
49068 return;
49069 }
49070}
49071
49072void
49073TestJSImplInterfaceJSImpl::PassNullableSelf(TestJSImplInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
49074{
49075 CallSetup s(this, aRv, "TestJSImplInterface.passNullableSelf", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49076 if (aRv.Failed()) {
49077 return;
49078 }
49079 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49079); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49079; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49080 BindingCallContext& cx = s.GetCallContext();
49081
49082 JS::Rooted<JS::Value> rval(cx);
49083 JS::RootedVector<JS::Value> argv(cx);
49084 if (!argv.resize(1)) {
49085 // That threw an exception on the JSContext, and our CallSetup will do
49086 // the right thing with that.
49087 return;
49088 }
49089 unsigned argc = 1;
49090
49091 do {
49092 if (!arg) {
49093 argv[0].setNull();
49094 break;
49095 }
49096 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
49097 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 49097); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 49097; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49098 aRv.Throw(NS_ERROR_UNEXPECTED);
49099 return;
49100 }
49101 break;
49102 } while (false);
49103
49104 JS::Rooted<JS::Value> callable(cx);
49105 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49106 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49107 !InitIds(cx, atomsCache)) ||
49108 !GetCallableProperty(cx, atomsCache->passNullableSelf_id, &callable)) {
49109 aRv.Throw(NS_ERROR_UNEXPECTED);
49110 return;
49111 }
49112 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49113 if (!JS::Call(cx, thisValue, callable,
49114 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
49115 aRv.NoteJSContextException(cx);
49116 return;
49117 }
49118}
49119
49120void
49121TestJSImplInterfaceJSImpl::PassOptionalSelf(const Optional<TestJSImplInterface*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
49122{
49123 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalSelf", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49124 if (aRv.Failed()) {
49125 return;
49126 }
49127 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49127); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49127; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49128 BindingCallContext& cx = s.GetCallContext();
49129
49130 JS::Rooted<JS::Value> rval(cx);
49131 JS::RootedVector<JS::Value> argv(cx);
49132 if (!argv.resize(1)) {
49133 // That threw an exception on the JSContext, and our CallSetup will do
49134 // the right thing with that.
49135 return;
49136 }
49137 unsigned argc = 1;
49138
49139 do {
49140 if (arg.WasPassed()) {
49141 if (!arg.Value()) {
49142 argv[0].setNull();
49143 break;
49144 }
49145 if (!GetOrCreateDOMReflector(cx, arg.Value(), argv[0])) {
49146 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 49146); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 49146; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49147 aRv.Throw(NS_ERROR_UNEXPECTED);
49148 return;
49149 }
49150 break;
49151 } else if (argc == 1) {
49152 // This is our current trailing argument; reduce argc
49153 --argc;
49154 } else {
49155 argv[0].setUndefined();
49156 }
49157 } while (false);
49158
49159 JS::Rooted<JS::Value> callable(cx);
49160 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49161 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49162 !InitIds(cx, atomsCache)) ||
49163 !GetCallableProperty(cx, atomsCache->passOptionalSelf_id, &callable)) {
49164 aRv.Throw(NS_ERROR_UNEXPECTED);
49165 return;
49166 }
49167 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49168 if (!JS::Call(cx, thisValue, callable,
49169 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
49170 aRv.NoteJSContextException(cx);
49171 return;
49172 }
49173}
49174
49175void
49176TestJSImplInterfaceJSImpl::PassOptionalNonNullSelf(const Optional<NonNull<TestJSImplInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
49177{
49178 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNonNullSelf", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49179 if (aRv.Failed()) {
49180 return;
49181 }
49182 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49182); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49182; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49183 BindingCallContext& cx = s.GetCallContext();
49184
49185 JS::Rooted<JS::Value> rval(cx);
49186 JS::RootedVector<JS::Value> argv(cx);
49187 if (!argv.resize(1)) {
49188 // That threw an exception on the JSContext, and our CallSetup will do
49189 // the right thing with that.
49190 return;
49191 }
49192 unsigned argc = 1;
49193
49194 do {
49195 if (arg.WasPassed()) {
49196 if (!GetOrCreateDOMReflector(cx, arg.Value(), argv[0])) {
49197 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 49197); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 49197; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49198 aRv.Throw(NS_ERROR_UNEXPECTED);
49199 return;
49200 }
49201 break;
49202 } else if (argc == 1) {
49203 // This is our current trailing argument; reduce argc
49204 --argc;
49205 } else {
49206 argv[0].setUndefined();
49207 }
49208 } while (false);
49209
49210 JS::Rooted<JS::Value> callable(cx);
49211 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49212 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49213 !InitIds(cx, atomsCache)) ||
49214 !GetCallableProperty(cx, atomsCache->passOptionalNonNullSelf_id, &callable)) {
49215 aRv.Throw(NS_ERROR_UNEXPECTED);
49216 return;
49217 }
49218 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49219 if (!JS::Call(cx, thisValue, callable,
49220 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
49221 aRv.NoteJSContextException(cx);
49222 return;
49223 }
49224}
49225
49226void
49227TestJSImplInterfaceJSImpl::PassOptionalSelfWithDefault(TestJSImplInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
49228{
49229 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalSelfWithDefault", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49230 if (aRv.Failed()) {
49231 return;
49232 }
49233 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49233); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49233; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49234 BindingCallContext& cx = s.GetCallContext();
49235
49236 JS::Rooted<JS::Value> rval(cx);
49237 JS::RootedVector<JS::Value> argv(cx);
49238 if (!argv.resize(1)) {
49239 // That threw an exception on the JSContext, and our CallSetup will do
49240 // the right thing with that.
49241 return;
49242 }
49243 unsigned argc = 1;
49244
49245 do {
49246 if (!arg) {
49247 argv[0].setNull();
49248 break;
49249 }
49250 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
49251 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 49251); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 49251; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49252 aRv.Throw(NS_ERROR_UNEXPECTED);
49253 return;
49254 }
49255 break;
49256 } while (false);
49257
49258 JS::Rooted<JS::Value> callable(cx);
49259 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49260 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49261 !InitIds(cx, atomsCache)) ||
49262 !GetCallableProperty(cx, atomsCache->passOptionalSelfWithDefault_id, &callable)) {
49263 aRv.Throw(NS_ERROR_UNEXPECTED);
49264 return;
49265 }
49266 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49267 if (!JS::Call(cx, thisValue, callable,
49268 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
49269 aRv.NoteJSContextException(cx);
49270 return;
49271 }
49272}
49273
49274already_AddRefed<TestNonWrapperCacheInterface>
49275TestJSImplInterfaceJSImpl::ReceiveNonWrapperCacheInterface(ErrorResult& aRv, JS::Realm* aRealm)
49276{
49277 CallSetup s(this, aRv, "TestJSImplInterface.receiveNonWrapperCacheInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49278 if (aRv.Failed()) {
49279 return nullptr;
49280 }
49281 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49281); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49281; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49282 BindingCallContext& cx = s.GetCallContext();
49283
49284 JS::Rooted<JS::Value> rval(cx);
49285
49286 JS::Rooted<JS::Value> callable(cx);
49287 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49288 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49289 !InitIds(cx, atomsCache)) ||
49290 !GetCallableProperty(cx, atomsCache->receiveNonWrapperCacheInterface_id, &callable)) {
49291 aRv.Throw(NS_ERROR_UNEXPECTED);
49292 return nullptr;
49293 }
49294 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49295 if (!JS::Call(cx, thisValue, callable,
49296 JS::HandleValueArray::empty(), &rval)) {
49297 aRv.NoteJSContextException(cx);
49298 return nullptr;
49299 }
49300 RefPtr<mozilla::dom::TestNonWrapperCacheInterface> rvalDecl;
49301 if (rval.isObject()) {
49302 static_assert(IsRefcounted<mozilla::dom::TestNonWrapperCacheInterface>::value, "We can only store refcounted classes.");
49303 {
49304 // Our JSContext should be in the right global to do unwrapping in.
49305 nsresult rv = UnwrapObject<prototypes::id::TestNonWrapperCacheInterface, mozilla::dom::TestNonWrapperCacheInterface>(rval, rvalDecl, cx);
49306 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
49307 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.receiveNonWrapperCacheInterface", "TestNonWrapperCacheInterface");
49308 aRv.Throw(NS_ERROR_UNEXPECTED);
49309 return nullptr;
49310 }
49311 }
49312 } else {
49313 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveNonWrapperCacheInterface");
49314 aRv.Throw(NS_ERROR_UNEXPECTED);
49315 return nullptr;
49316 }
49317 return rvalDecl.forget();
49318}
49319
49320already_AddRefed<TestNonWrapperCacheInterface>
49321TestJSImplInterfaceJSImpl::ReceiveNullableNonWrapperCacheInterface(ErrorResult& aRv, JS::Realm* aRealm)
49322{
49323 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableNonWrapperCacheInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49324 if (aRv.Failed()) {
49325 return nullptr;
49326 }
49327 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49327); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49327; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49328 BindingCallContext& cx = s.GetCallContext();
49329
49330 JS::Rooted<JS::Value> rval(cx);
49331
49332 JS::Rooted<JS::Value> callable(cx);
49333 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49334 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49335 !InitIds(cx, atomsCache)) ||
49336 !GetCallableProperty(cx, atomsCache->receiveNullableNonWrapperCacheInterface_id, &callable)) {
49337 aRv.Throw(NS_ERROR_UNEXPECTED);
49338 return nullptr;
49339 }
49340 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49341 if (!JS::Call(cx, thisValue, callable,
49342 JS::HandleValueArray::empty(), &rval)) {
49343 aRv.NoteJSContextException(cx);
49344 return nullptr;
49345 }
49346 RefPtr<mozilla::dom::TestNonWrapperCacheInterface> rvalDecl;
49347 if (rval.isObject()) {
49348 static_assert(IsRefcounted<mozilla::dom::TestNonWrapperCacheInterface>::value, "We can only store refcounted classes.");
49349 {
49350 // Our JSContext should be in the right global to do unwrapping in.
49351 nsresult rv = UnwrapObject<prototypes::id::TestNonWrapperCacheInterface, mozilla::dom::TestNonWrapperCacheInterface>(rval, rvalDecl, cx);
49352 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
49353 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.receiveNullableNonWrapperCacheInterface", "TestNonWrapperCacheInterface");
49354 aRv.Throw(NS_ERROR_UNEXPECTED);
49355 return nullptr;
49356 }
49357 }
49358 } else if (rval.isNullOrUndefined()) {
49359 rvalDecl = nullptr;
49360 } else {
49361 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveNullableNonWrapperCacheInterface");
49362 aRv.Throw(NS_ERROR_UNEXPECTED);
49363 return nullptr;
49364 }
49365 return rvalDecl.forget();
49366}
49367
49368void
49369TestJSImplInterfaceJSImpl::ReceiveNonWrapperCacheInterfaceSequence(nsTArray<RefPtr<TestNonWrapperCacheInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
49370{
49371 CallSetup s(this, aRv, "TestJSImplInterface.receiveNonWrapperCacheInterfaceSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49372 if (aRv.Failed()) {
49373 return;
49374 }
49375 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49375); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49375; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49376 BindingCallContext& cx = s.GetCallContext();
49377
49378 JS::Rooted<JS::Value> rval(cx);
49379
49380 JS::Rooted<JS::Value> callable(cx);
49381 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49382 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49383 !InitIds(cx, atomsCache)) ||
49384 !GetCallableProperty(cx, atomsCache->receiveNonWrapperCacheInterfaceSequence_id, &callable)) {
49385 aRv.Throw(NS_ERROR_UNEXPECTED);
49386 return;
49387 }
49388 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49389 if (!JS::Call(cx, thisValue, callable,
49390 JS::HandleValueArray::empty(), &rval)) {
49391 aRv.NoteJSContextException(cx);
49392 return;
49393 }
49394 Sequence<RefPtr<mozilla::dom::TestNonWrapperCacheInterface>> rvalDecl;
49395 if (rval.isObject()) {
49396 JS::ForOfIterator iter(cx);
49397 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
49398 aRv.Throw(NS_ERROR_UNEXPECTED);
49399 return;
49400 }
49401 if (!iter.valueIsIterable()) {
49402 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNonWrapperCacheInterfaceSequence", "sequence");
49403 aRv.Throw(NS_ERROR_UNEXPECTED);
49404 return;
49405 }
49406 Sequence<RefPtr<mozilla::dom::TestNonWrapperCacheInterface>> &arr = rvalDecl;
49407 JS::Rooted<JS::Value> temp(cx);
49408 while (true) {
49409 bool done;
49410 if (!iter.next(&temp, &done)) {
49411 aRv.Throw(NS_ERROR_UNEXPECTED);
49412 return;
49413 }
49414 if (done) {
49415 break;
49416 }
49417 RefPtr<mozilla::dom::TestNonWrapperCacheInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
49418 if (!slotPtr) {
49419 JS_ReportOutOfMemory(cx);
49420 aRv.Throw(NS_ERROR_UNEXPECTED);
49421 return;
49422 }
49423 RefPtr<mozilla::dom::TestNonWrapperCacheInterface>& slot = *slotPtr;
49424 if (temp.isObject()) {
49425 static_assert(IsRefcounted<mozilla::dom::TestNonWrapperCacheInterface>::value, "We can only store refcounted classes.");
49426 {
49427 // Our JSContext should be in the right global to do unwrapping in.
49428 nsresult rv = UnwrapObject<prototypes::id::TestNonWrapperCacheInterface, mozilla::dom::TestNonWrapperCacheInterface>(&temp, slot, cx);
49429 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
49430 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of return value of TestJSImplInterface.receiveNonWrapperCacheInterfaceSequence", "TestNonWrapperCacheInterface");
49431 aRv.Throw(NS_ERROR_UNEXPECTED);
49432 return;
49433 }
49434 }
49435 } else {
49436 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveNonWrapperCacheInterfaceSequence");
49437 aRv.Throw(NS_ERROR_UNEXPECTED);
49438 return;
49439 }
49440 }
49441 } else {
49442 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNonWrapperCacheInterfaceSequence", "sequence");
49443 aRv.Throw(NS_ERROR_UNEXPECTED);
49444 return;
49445 }
49446 aRetVal = std::move(rvalDecl);
49447}
49448
49449void
49450TestJSImplInterfaceJSImpl::ReceiveNullableNonWrapperCacheInterfaceSequence(nsTArray<RefPtr<TestNonWrapperCacheInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
49451{
49452 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableNonWrapperCacheInterfaceSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49453 if (aRv.Failed()) {
49454 return;
49455 }
49456 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49456); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49456; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49457 BindingCallContext& cx = s.GetCallContext();
49458
49459 JS::Rooted<JS::Value> rval(cx);
49460
49461 JS::Rooted<JS::Value> callable(cx);
49462 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49463 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49464 !InitIds(cx, atomsCache)) ||
49465 !GetCallableProperty(cx, atomsCache->receiveNullableNonWrapperCacheInterfaceSequence_id, &callable)) {
49466 aRv.Throw(NS_ERROR_UNEXPECTED);
49467 return;
49468 }
49469 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49470 if (!JS::Call(cx, thisValue, callable,
49471 JS::HandleValueArray::empty(), &rval)) {
49472 aRv.NoteJSContextException(cx);
49473 return;
49474 }
49475 Sequence<RefPtr<mozilla::dom::TestNonWrapperCacheInterface>> rvalDecl;
49476 if (rval.isObject()) {
49477 JS::ForOfIterator iter(cx);
49478 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
49479 aRv.Throw(NS_ERROR_UNEXPECTED);
49480 return;
49481 }
49482 if (!iter.valueIsIterable()) {
49483 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableNonWrapperCacheInterfaceSequence", "sequence");
49484 aRv.Throw(NS_ERROR_UNEXPECTED);
49485 return;
49486 }
49487 Sequence<RefPtr<mozilla::dom::TestNonWrapperCacheInterface>> &arr = rvalDecl;
49488 JS::Rooted<JS::Value> temp(cx);
49489 while (true) {
49490 bool done;
49491 if (!iter.next(&temp, &done)) {
49492 aRv.Throw(NS_ERROR_UNEXPECTED);
49493 return;
49494 }
49495 if (done) {
49496 break;
49497 }
49498 RefPtr<mozilla::dom::TestNonWrapperCacheInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
49499 if (!slotPtr) {
49500 JS_ReportOutOfMemory(cx);
49501 aRv.Throw(NS_ERROR_UNEXPECTED);
49502 return;
49503 }
49504 RefPtr<mozilla::dom::TestNonWrapperCacheInterface>& slot = *slotPtr;
49505 if (temp.isObject()) {
49506 static_assert(IsRefcounted<mozilla::dom::TestNonWrapperCacheInterface>::value, "We can only store refcounted classes.");
49507 {
49508 // Our JSContext should be in the right global to do unwrapping in.
49509 nsresult rv = UnwrapObject<prototypes::id::TestNonWrapperCacheInterface, mozilla::dom::TestNonWrapperCacheInterface>(&temp, slot, cx);
49510 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
49511 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of return value of TestJSImplInterface.receiveNullableNonWrapperCacheInterfaceSequence", "TestNonWrapperCacheInterface");
49512 aRv.Throw(NS_ERROR_UNEXPECTED);
49513 return;
49514 }
49515 }
49516 } else if (temp.isNullOrUndefined()) {
49517 slot = nullptr;
49518 } else {
49519 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveNullableNonWrapperCacheInterfaceSequence");
49520 aRv.Throw(NS_ERROR_UNEXPECTED);
49521 return;
49522 }
49523 }
49524 } else {
49525 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableNonWrapperCacheInterfaceSequence", "sequence");
49526 aRv.Throw(NS_ERROR_UNEXPECTED);
49527 return;
49528 }
49529 aRetVal = std::move(rvalDecl);
49530}
49531
49532void
49533TestJSImplInterfaceJSImpl::ReceiveNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<RefPtr<TestNonWrapperCacheInterface>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
49534{
49535 CallSetup s(this, aRv, "TestJSImplInterface.receiveNonWrapperCacheInterfaceNullableSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49536 if (aRv.Failed()) {
49537 return;
49538 }
49539 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49539); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49539; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49540 BindingCallContext& cx = s.GetCallContext();
49541
49542 JS::Rooted<JS::Value> rval(cx);
49543
49544 JS::Rooted<JS::Value> callable(cx);
49545 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49546 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49547 !InitIds(cx, atomsCache)) ||
49548 !GetCallableProperty(cx, atomsCache->receiveNonWrapperCacheInterfaceNullableSequence_id, &callable)) {
49549 aRv.Throw(NS_ERROR_UNEXPECTED);
49550 return;
49551 }
49552 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49553 if (!JS::Call(cx, thisValue, callable,
49554 JS::HandleValueArray::empty(), &rval)) {
49555 aRv.NoteJSContextException(cx);
49556 return;
49557 }
49558 Nullable<Sequence<RefPtr<mozilla::dom::TestNonWrapperCacheInterface>>> rvalDecl;
49559 if (rval.isObject()) {
49560 JS::ForOfIterator iter(cx);
49561 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
49562 aRv.Throw(NS_ERROR_UNEXPECTED);
49563 return;
49564 }
49565 if (!iter.valueIsIterable()) {
49566 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNonWrapperCacheInterfaceNullableSequence", "sequence");
49567 aRv.Throw(NS_ERROR_UNEXPECTED);
49568 return;
49569 }
49570 Sequence<RefPtr<mozilla::dom::TestNonWrapperCacheInterface>> &arr = rvalDecl.SetValue();
49571 JS::Rooted<JS::Value> temp(cx);
49572 while (true) {
49573 bool done;
49574 if (!iter.next(&temp, &done)) {
49575 aRv.Throw(NS_ERROR_UNEXPECTED);
49576 return;
49577 }
49578 if (done) {
49579 break;
49580 }
49581 RefPtr<mozilla::dom::TestNonWrapperCacheInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
49582 if (!slotPtr) {
49583 JS_ReportOutOfMemory(cx);
49584 aRv.Throw(NS_ERROR_UNEXPECTED);
49585 return;
49586 }
49587 RefPtr<mozilla::dom::TestNonWrapperCacheInterface>& slot = *slotPtr;
49588 if (temp.isObject()) {
49589 static_assert(IsRefcounted<mozilla::dom::TestNonWrapperCacheInterface>::value, "We can only store refcounted classes.");
49590 {
49591 // Our JSContext should be in the right global to do unwrapping in.
49592 nsresult rv = UnwrapObject<prototypes::id::TestNonWrapperCacheInterface, mozilla::dom::TestNonWrapperCacheInterface>(&temp, slot, cx);
49593 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
49594 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of return value of TestJSImplInterface.receiveNonWrapperCacheInterfaceNullableSequence", "TestNonWrapperCacheInterface");
49595 aRv.Throw(NS_ERROR_UNEXPECTED);
49596 return;
49597 }
49598 }
49599 } else {
49600 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveNonWrapperCacheInterfaceNullableSequence");
49601 aRv.Throw(NS_ERROR_UNEXPECTED);
49602 return;
49603 }
49604 }
49605 } else if (rval.isNullOrUndefined()) {
49606 rvalDecl.SetNull();
49607 } else {
49608 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNonWrapperCacheInterfaceNullableSequence", "sequence");
49609 aRv.Throw(NS_ERROR_UNEXPECTED);
49610 return;
49611 }
49612 if (rvalDecl.IsNull()) {
49613 aRetVal.SetNull();
49614 } else {
49615 aRetVal.SetValue() = std::move(rvalDecl.Value());
49616 }
49617}
49618
49619void
49620TestJSImplInterfaceJSImpl::ReceiveNullableNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<RefPtr<TestNonWrapperCacheInterface>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
49621{
49622 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableNonWrapperCacheInterfaceNullableSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49623 if (aRv.Failed()) {
49624 return;
49625 }
49626 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49626); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49626; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49627 BindingCallContext& cx = s.GetCallContext();
49628
49629 JS::Rooted<JS::Value> rval(cx);
49630
49631 JS::Rooted<JS::Value> callable(cx);
49632 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49633 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49634 !InitIds(cx, atomsCache)) ||
49635 !GetCallableProperty(cx, atomsCache->receiveNullableNonWrapperCacheInterfaceNullableSequence_id, &callable)) {
49636 aRv.Throw(NS_ERROR_UNEXPECTED);
49637 return;
49638 }
49639 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49640 if (!JS::Call(cx, thisValue, callable,
49641 JS::HandleValueArray::empty(), &rval)) {
49642 aRv.NoteJSContextException(cx);
49643 return;
49644 }
49645 Nullable<Sequence<RefPtr<mozilla::dom::TestNonWrapperCacheInterface>>> rvalDecl;
49646 if (rval.isObject()) {
49647 JS::ForOfIterator iter(cx);
49648 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
49649 aRv.Throw(NS_ERROR_UNEXPECTED);
49650 return;
49651 }
49652 if (!iter.valueIsIterable()) {
49653 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableNonWrapperCacheInterfaceNullableSequence", "sequence");
49654 aRv.Throw(NS_ERROR_UNEXPECTED);
49655 return;
49656 }
49657 Sequence<RefPtr<mozilla::dom::TestNonWrapperCacheInterface>> &arr = rvalDecl.SetValue();
49658 JS::Rooted<JS::Value> temp(cx);
49659 while (true) {
49660 bool done;
49661 if (!iter.next(&temp, &done)) {
49662 aRv.Throw(NS_ERROR_UNEXPECTED);
49663 return;
49664 }
49665 if (done) {
49666 break;
49667 }
49668 RefPtr<mozilla::dom::TestNonWrapperCacheInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
49669 if (!slotPtr) {
49670 JS_ReportOutOfMemory(cx);
49671 aRv.Throw(NS_ERROR_UNEXPECTED);
49672 return;
49673 }
49674 RefPtr<mozilla::dom::TestNonWrapperCacheInterface>& slot = *slotPtr;
49675 if (temp.isObject()) {
49676 static_assert(IsRefcounted<mozilla::dom::TestNonWrapperCacheInterface>::value, "We can only store refcounted classes.");
49677 {
49678 // Our JSContext should be in the right global to do unwrapping in.
49679 nsresult rv = UnwrapObject<prototypes::id::TestNonWrapperCacheInterface, mozilla::dom::TestNonWrapperCacheInterface>(&temp, slot, cx);
49680 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
49681 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of return value of TestJSImplInterface.receiveNullableNonWrapperCacheInterfaceNullableSequence", "TestNonWrapperCacheInterface");
49682 aRv.Throw(NS_ERROR_UNEXPECTED);
49683 return;
49684 }
49685 }
49686 } else if (temp.isNullOrUndefined()) {
49687 slot = nullptr;
49688 } else {
49689 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveNullableNonWrapperCacheInterfaceNullableSequence");
49690 aRv.Throw(NS_ERROR_UNEXPECTED);
49691 return;
49692 }
49693 }
49694 } else if (rval.isNullOrUndefined()) {
49695 rvalDecl.SetNull();
49696 } else {
49697 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableNonWrapperCacheInterfaceNullableSequence", "sequence");
49698 aRv.Throw(NS_ERROR_UNEXPECTED);
49699 return;
49700 }
49701 if (rvalDecl.IsNull()) {
49702 aRetVal.SetNull();
49703 } else {
49704 aRetVal.SetValue() = std::move(rvalDecl.Value());
49705 }
49706}
49707
49708already_AddRefed<TestExternalInterface>
49709TestJSImplInterfaceJSImpl::ReceiveExternal(ErrorResult& aRv, JS::Realm* aRealm)
49710{
49711 CallSetup s(this, aRv, "TestJSImplInterface.receiveExternal", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49712 if (aRv.Failed()) {
49713 return nullptr;
49714 }
49715 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49715); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49715; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49716 BindingCallContext& cx = s.GetCallContext();
49717
49718 JS::Rooted<JS::Value> rval(cx);
49719
49720 JS::Rooted<JS::Value> callable(cx);
49721 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49722 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49723 !InitIds(cx, atomsCache)) ||
49724 !GetCallableProperty(cx, atomsCache->receiveExternal_id, &callable)) {
49725 aRv.Throw(NS_ERROR_UNEXPECTED);
49726 return nullptr;
49727 }
49728 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49729 if (!JS::Call(cx, thisValue, callable,
49730 JS::HandleValueArray::empty(), &rval)) {
49731 aRv.NoteJSContextException(cx);
49732 return nullptr;
49733 }
49734 RefPtr<mozilla::dom::TestExternalInterface> rvalDecl;
49735 if (rval.isObject()) {
49736 static_assert(IsRefcounted<mozilla::dom::TestExternalInterface>::value, "We can only store refcounted classes.");
49737 RefPtr<mozilla::dom::TestExternalInterface> rvalHolder;
49738 JS::Rooted<JSObject*> source(cx, &rval.toObject());
49739 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(rvalHolder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(rvalHolder
)))), 0)))
) {
49740 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.receiveExternal", "TestExternalInterface");
49741 aRv.Throw(NS_ERROR_UNEXPECTED);
49742 return nullptr;
49743 }
49744 MOZ_ASSERT(rvalHolder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(rvalHolder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(rvalHolder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("rvalHolder", "../TestJSImplGenBinding.cpp"
, 49744); AnnotateMozCrashReason("MOZ_ASSERT" "(" "rvalHolder"
")"); do { *((volatile int*)__null) = 49744; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
49745 rvalDecl = rvalHolder;
49746 } else {
49747 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveExternal");
49748 aRv.Throw(NS_ERROR_UNEXPECTED);
49749 return nullptr;
49750 }
49751 return rvalDecl.forget();
49752}
49753
49754already_AddRefed<TestExternalInterface>
49755TestJSImplInterfaceJSImpl::ReceiveNullableExternal(ErrorResult& aRv, JS::Realm* aRealm)
49756{
49757 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableExternal", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49758 if (aRv.Failed()) {
49759 return nullptr;
49760 }
49761 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49761); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49761; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49762 BindingCallContext& cx = s.GetCallContext();
49763
49764 JS::Rooted<JS::Value> rval(cx);
49765
49766 JS::Rooted<JS::Value> callable(cx);
49767 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49768 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49769 !InitIds(cx, atomsCache)) ||
49770 !GetCallableProperty(cx, atomsCache->receiveNullableExternal_id, &callable)) {
49771 aRv.Throw(NS_ERROR_UNEXPECTED);
49772 return nullptr;
49773 }
49774 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49775 if (!JS::Call(cx, thisValue, callable,
49776 JS::HandleValueArray::empty(), &rval)) {
49777 aRv.NoteJSContextException(cx);
49778 return nullptr;
49779 }
49780 RefPtr<mozilla::dom::TestExternalInterface> rvalDecl;
49781 if (rval.isObject()) {
49782 static_assert(IsRefcounted<mozilla::dom::TestExternalInterface>::value, "We can only store refcounted classes.");
49783 RefPtr<mozilla::dom::TestExternalInterface> rvalHolder;
49784 JS::Rooted<JSObject*> source(cx, &rval.toObject());
49785 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(rvalHolder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(rvalHolder
)))), 0)))
) {
49786 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.receiveNullableExternal", "TestExternalInterface");
49787 aRv.Throw(NS_ERROR_UNEXPECTED);
49788 return nullptr;
49789 }
49790 MOZ_ASSERT(rvalHolder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(rvalHolder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(rvalHolder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("rvalHolder", "../TestJSImplGenBinding.cpp"
, 49790); AnnotateMozCrashReason("MOZ_ASSERT" "(" "rvalHolder"
")"); do { *((volatile int*)__null) = 49790; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
49791 rvalDecl = rvalHolder;
49792 } else if (rval.isNullOrUndefined()) {
49793 rvalDecl = nullptr;
49794 } else {
49795 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveNullableExternal");
49796 aRv.Throw(NS_ERROR_UNEXPECTED);
49797 return nullptr;
49798 }
49799 return rvalDecl.forget();
49800}
49801
49802already_AddRefed<TestExternalInterface>
49803TestJSImplInterfaceJSImpl::ReceiveWeakExternal(ErrorResult& aRv, JS::Realm* aRealm)
49804{
49805 CallSetup s(this, aRv, "TestJSImplInterface.receiveWeakExternal", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49806 if (aRv.Failed()) {
49807 return nullptr;
49808 }
49809 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49809); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49809; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49810 BindingCallContext& cx = s.GetCallContext();
49811
49812 JS::Rooted<JS::Value> rval(cx);
49813
49814 JS::Rooted<JS::Value> callable(cx);
49815 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49816 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49817 !InitIds(cx, atomsCache)) ||
49818 !GetCallableProperty(cx, atomsCache->receiveWeakExternal_id, &callable)) {
49819 aRv.Throw(NS_ERROR_UNEXPECTED);
49820 return nullptr;
49821 }
49822 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49823 if (!JS::Call(cx, thisValue, callable,
49824 JS::HandleValueArray::empty(), &rval)) {
49825 aRv.NoteJSContextException(cx);
49826 return nullptr;
49827 }
49828 RefPtr<mozilla::dom::TestExternalInterface> rvalDecl;
49829 if (rval.isObject()) {
49830 static_assert(IsRefcounted<mozilla::dom::TestExternalInterface>::value, "We can only store refcounted classes.");
49831 RefPtr<mozilla::dom::TestExternalInterface> rvalHolder;
49832 JS::Rooted<JSObject*> source(cx, &rval.toObject());
49833 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(rvalHolder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(rvalHolder
)))), 0)))
) {
49834 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.receiveWeakExternal", "TestExternalInterface");
49835 aRv.Throw(NS_ERROR_UNEXPECTED);
49836 return nullptr;
49837 }
49838 MOZ_ASSERT(rvalHolder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(rvalHolder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(rvalHolder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("rvalHolder", "../TestJSImplGenBinding.cpp"
, 49838); AnnotateMozCrashReason("MOZ_ASSERT" "(" "rvalHolder"
")"); do { *((volatile int*)__null) = 49838; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
49839 rvalDecl = rvalHolder;
49840 } else {
49841 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveWeakExternal");
49842 aRv.Throw(NS_ERROR_UNEXPECTED);
49843 return nullptr;
49844 }
49845 return rvalDecl.forget();
49846}
49847
49848already_AddRefed<TestExternalInterface>
49849TestJSImplInterfaceJSImpl::ReceiveWeakNullableExternal(ErrorResult& aRv, JS::Realm* aRealm)
49850{
49851 CallSetup s(this, aRv, "TestJSImplInterface.receiveWeakNullableExternal", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49852 if (aRv.Failed()) {
49853 return nullptr;
49854 }
49855 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49855); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49855; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49856 BindingCallContext& cx = s.GetCallContext();
49857
49858 JS::Rooted<JS::Value> rval(cx);
49859
49860 JS::Rooted<JS::Value> callable(cx);
49861 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49862 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49863 !InitIds(cx, atomsCache)) ||
49864 !GetCallableProperty(cx, atomsCache->receiveWeakNullableExternal_id, &callable)) {
49865 aRv.Throw(NS_ERROR_UNEXPECTED);
49866 return nullptr;
49867 }
49868 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49869 if (!JS::Call(cx, thisValue, callable,
49870 JS::HandleValueArray::empty(), &rval)) {
49871 aRv.NoteJSContextException(cx);
49872 return nullptr;
49873 }
49874 RefPtr<mozilla::dom::TestExternalInterface> rvalDecl;
49875 if (rval.isObject()) {
49876 static_assert(IsRefcounted<mozilla::dom::TestExternalInterface>::value, "We can only store refcounted classes.");
49877 RefPtr<mozilla::dom::TestExternalInterface> rvalHolder;
49878 JS::Rooted<JSObject*> source(cx, &rval.toObject());
49879 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(rvalHolder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(rvalHolder
)))), 0)))
) {
49880 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.receiveWeakNullableExternal", "TestExternalInterface");
49881 aRv.Throw(NS_ERROR_UNEXPECTED);
49882 return nullptr;
49883 }
49884 MOZ_ASSERT(rvalHolder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(rvalHolder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(rvalHolder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("rvalHolder", "../TestJSImplGenBinding.cpp"
, 49884); AnnotateMozCrashReason("MOZ_ASSERT" "(" "rvalHolder"
")"); do { *((volatile int*)__null) = 49884; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
49885 rvalDecl = rvalHolder;
49886 } else if (rval.isNullOrUndefined()) {
49887 rvalDecl = nullptr;
49888 } else {
49889 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveWeakNullableExternal");
49890 aRv.Throw(NS_ERROR_UNEXPECTED);
49891 return nullptr;
49892 }
49893 return rvalDecl.forget();
49894}
49895
49896void
49897TestJSImplInterfaceJSImpl::PassExternal(TestExternalInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
49898{
49899 CallSetup s(this, aRv, "TestJSImplInterface.passExternal", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49900 if (aRv.Failed()) {
49901 return;
49902 }
49903 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49903); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49903; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49904 BindingCallContext& cx = s.GetCallContext();
49905
49906 JS::Rooted<JS::Value> rval(cx);
49907 JS::RootedVector<JS::Value> argv(cx);
49908 if (!argv.resize(1)) {
49909 // That threw an exception on the JSContext, and our CallSetup will do
49910 // the right thing with that.
49911 return;
49912 }
49913 unsigned argc = 1;
49914
49915 do {
49916 if (!WrapObject(cx, arg, argv[0])) {
49917 aRv.Throw(NS_ERROR_UNEXPECTED);
49918 return;
49919 }
49920 break;
49921 } while (false);
49922
49923 JS::Rooted<JS::Value> callable(cx);
49924 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49925 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49926 !InitIds(cx, atomsCache)) ||
49927 !GetCallableProperty(cx, atomsCache->passExternal_id, &callable)) {
49928 aRv.Throw(NS_ERROR_UNEXPECTED);
49929 return;
49930 }
49931 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49932 if (!JS::Call(cx, thisValue, callable,
49933 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
49934 aRv.NoteJSContextException(cx);
49935 return;
49936 }
49937}
49938
49939void
49940TestJSImplInterfaceJSImpl::PassNullableExternal(TestExternalInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
49941{
49942 CallSetup s(this, aRv, "TestJSImplInterface.passNullableExternal", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49943 if (aRv.Failed()) {
49944 return;
49945 }
49946 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49946); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49946; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49947 BindingCallContext& cx = s.GetCallContext();
49948
49949 JS::Rooted<JS::Value> rval(cx);
49950 JS::RootedVector<JS::Value> argv(cx);
49951 if (!argv.resize(1)) {
49952 // That threw an exception on the JSContext, and our CallSetup will do
49953 // the right thing with that.
49954 return;
49955 }
49956 unsigned argc = 1;
49957
49958 do {
49959 if (!arg) {
49960 argv[0].setNull();
49961 break;
49962 }
49963 if (!WrapObject(cx, arg, argv[0])) {
49964 aRv.Throw(NS_ERROR_UNEXPECTED);
49965 return;
49966 }
49967 break;
49968 } while (false);
49969
49970 JS::Rooted<JS::Value> callable(cx);
49971 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
49972 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
49973 !InitIds(cx, atomsCache)) ||
49974 !GetCallableProperty(cx, atomsCache->passNullableExternal_id, &callable)) {
49975 aRv.Throw(NS_ERROR_UNEXPECTED);
49976 return;
49977 }
49978 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
49979 if (!JS::Call(cx, thisValue, callable,
49980 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
49981 aRv.NoteJSContextException(cx);
49982 return;
49983 }
49984}
49985
49986void
49987TestJSImplInterfaceJSImpl::PassOptionalExternal(const Optional<TestExternalInterface*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
49988{
49989 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalExternal", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
49990 if (aRv.Failed()) {
49991 return;
49992 }
49993 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 49993); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 49993; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
49994 BindingCallContext& cx = s.GetCallContext();
49995
49996 JS::Rooted<JS::Value> rval(cx);
49997 JS::RootedVector<JS::Value> argv(cx);
49998 if (!argv.resize(1)) {
49999 // That threw an exception on the JSContext, and our CallSetup will do
50000 // the right thing with that.
50001 return;
50002 }
50003 unsigned argc = 1;
50004
50005 do {
50006 if (arg.WasPassed()) {
50007 if (!arg.Value()) {
50008 argv[0].setNull();
50009 break;
50010 }
50011 if (!WrapObject(cx, arg.Value(), argv[0])) {
50012 aRv.Throw(NS_ERROR_UNEXPECTED);
50013 return;
50014 }
50015 break;
50016 } else if (argc == 1) {
50017 // This is our current trailing argument; reduce argc
50018 --argc;
50019 } else {
50020 argv[0].setUndefined();
50021 }
50022 } while (false);
50023
50024 JS::Rooted<JS::Value> callable(cx);
50025 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50026 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50027 !InitIds(cx, atomsCache)) ||
50028 !GetCallableProperty(cx, atomsCache->passOptionalExternal_id, &callable)) {
50029 aRv.Throw(NS_ERROR_UNEXPECTED);
50030 return;
50031 }
50032 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50033 if (!JS::Call(cx, thisValue, callable,
50034 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
50035 aRv.NoteJSContextException(cx);
50036 return;
50037 }
50038}
50039
50040void
50041TestJSImplInterfaceJSImpl::PassOptionalNonNullExternal(const Optional<TestExternalInterface*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
50042{
50043 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNonNullExternal", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50044 if (aRv.Failed()) {
50045 return;
50046 }
50047 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50047); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50047; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50048 BindingCallContext& cx = s.GetCallContext();
50049
50050 JS::Rooted<JS::Value> rval(cx);
50051 JS::RootedVector<JS::Value> argv(cx);
50052 if (!argv.resize(1)) {
50053 // That threw an exception on the JSContext, and our CallSetup will do
50054 // the right thing with that.
50055 return;
50056 }
50057 unsigned argc = 1;
50058
50059 do {
50060 if (arg.WasPassed()) {
50061 if (!WrapObject(cx, arg.Value(), argv[0])) {
50062 aRv.Throw(NS_ERROR_UNEXPECTED);
50063 return;
50064 }
50065 break;
50066 } else if (argc == 1) {
50067 // This is our current trailing argument; reduce argc
50068 --argc;
50069 } else {
50070 argv[0].setUndefined();
50071 }
50072 } while (false);
50073
50074 JS::Rooted<JS::Value> callable(cx);
50075 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50076 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50077 !InitIds(cx, atomsCache)) ||
50078 !GetCallableProperty(cx, atomsCache->passOptionalNonNullExternal_id, &callable)) {
50079 aRv.Throw(NS_ERROR_UNEXPECTED);
50080 return;
50081 }
50082 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50083 if (!JS::Call(cx, thisValue, callable,
50084 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
50085 aRv.NoteJSContextException(cx);
50086 return;
50087 }
50088}
50089
50090void
50091TestJSImplInterfaceJSImpl::PassOptionalExternalWithDefault(TestExternalInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
50092{
50093 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalExternalWithDefault", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50094 if (aRv.Failed()) {
50095 return;
50096 }
50097 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50097); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50097; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50098 BindingCallContext& cx = s.GetCallContext();
50099
50100 JS::Rooted<JS::Value> rval(cx);
50101 JS::RootedVector<JS::Value> argv(cx);
50102 if (!argv.resize(1)) {
50103 // That threw an exception on the JSContext, and our CallSetup will do
50104 // the right thing with that.
50105 return;
50106 }
50107 unsigned argc = 1;
50108
50109 do {
50110 if (!arg) {
50111 argv[0].setNull();
50112 break;
50113 }
50114 if (!WrapObject(cx, arg, argv[0])) {
50115 aRv.Throw(NS_ERROR_UNEXPECTED);
50116 return;
50117 }
50118 break;
50119 } while (false);
50120
50121 JS::Rooted<JS::Value> callable(cx);
50122 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50123 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50124 !InitIds(cx, atomsCache)) ||
50125 !GetCallableProperty(cx, atomsCache->passOptionalExternalWithDefault_id, &callable)) {
50126 aRv.Throw(NS_ERROR_UNEXPECTED);
50127 return;
50128 }
50129 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50130 if (!JS::Call(cx, thisValue, callable,
50131 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
50132 aRv.NoteJSContextException(cx);
50133 return;
50134 }
50135}
50136
50137already_AddRefed<TestCallbackInterface>
50138TestJSImplInterfaceJSImpl::ReceiveCallbackInterface(ErrorResult& aRv, JS::Realm* aRealm)
50139{
50140 CallSetup s(this, aRv, "TestJSImplInterface.receiveCallbackInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50141 if (aRv.Failed()) {
50142 return nullptr;
50143 }
50144 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50144); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50144; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50145 BindingCallContext& cx = s.GetCallContext();
50146
50147 JS::Rooted<JS::Value> rval(cx);
50148
50149 JS::Rooted<JS::Value> callable(cx);
50150 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50151 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50152 !InitIds(cx, atomsCache)) ||
50153 !GetCallableProperty(cx, atomsCache->receiveCallbackInterface_id, &callable)) {
50154 aRv.Throw(NS_ERROR_UNEXPECTED);
50155 return nullptr;
50156 }
50157 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50158 if (!JS::Call(cx, thisValue, callable,
50159 JS::HandleValueArray::empty(), &rval)) {
50160 aRv.NoteJSContextException(cx);
50161 return nullptr;
50162 }
50163 RefPtr<TestCallbackInterface> rvalDecl;
50164 if (rval.isObject()) {
50165 { // scope for tempRoot and tempGlobalRoot if needed
50166 JS::Rooted<JSObject*> tempRoot(cx, &rval.toObject());
50167 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
50168 rvalDecl = new TestCallbackInterface(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
50169 }
50170 } else {
50171 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveCallbackInterface");
50172 aRv.Throw(NS_ERROR_UNEXPECTED);
50173 return nullptr;
50174 }
50175 return rvalDecl.forget();
50176}
50177
50178already_AddRefed<TestCallbackInterface>
50179TestJSImplInterfaceJSImpl::ReceiveNullableCallbackInterface(ErrorResult& aRv, JS::Realm* aRealm)
50180{
50181 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableCallbackInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50182 if (aRv.Failed()) {
50183 return nullptr;
50184 }
50185 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50185); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50185; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50186 BindingCallContext& cx = s.GetCallContext();
50187
50188 JS::Rooted<JS::Value> rval(cx);
50189
50190 JS::Rooted<JS::Value> callable(cx);
50191 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50192 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50193 !InitIds(cx, atomsCache)) ||
50194 !GetCallableProperty(cx, atomsCache->receiveNullableCallbackInterface_id, &callable)) {
50195 aRv.Throw(NS_ERROR_UNEXPECTED);
50196 return nullptr;
50197 }
50198 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50199 if (!JS::Call(cx, thisValue, callable,
50200 JS::HandleValueArray::empty(), &rval)) {
50201 aRv.NoteJSContextException(cx);
50202 return nullptr;
50203 }
50204 RefPtr<TestCallbackInterface> rvalDecl;
50205 if (rval.isObject()) {
50206 { // scope for tempRoot and tempGlobalRoot if needed
50207 JS::Rooted<JSObject*> tempRoot(cx, &rval.toObject());
50208 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
50209 rvalDecl = new TestCallbackInterface(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
50210 }
50211 } else if (rval.isNullOrUndefined()) {
50212 rvalDecl = nullptr;
50213 } else {
50214 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveNullableCallbackInterface");
50215 aRv.Throw(NS_ERROR_UNEXPECTED);
50216 return nullptr;
50217 }
50218 return rvalDecl.forget();
50219}
50220
50221already_AddRefed<TestCallbackInterface>
50222TestJSImplInterfaceJSImpl::ReceiveWeakCallbackInterface(ErrorResult& aRv, JS::Realm* aRealm)
50223{
50224 CallSetup s(this, aRv, "TestJSImplInterface.receiveWeakCallbackInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50225 if (aRv.Failed()) {
50226 return nullptr;
50227 }
50228 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50228); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50228; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50229 BindingCallContext& cx = s.GetCallContext();
50230
50231 JS::Rooted<JS::Value> rval(cx);
50232
50233 JS::Rooted<JS::Value> callable(cx);
50234 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50235 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50236 !InitIds(cx, atomsCache)) ||
50237 !GetCallableProperty(cx, atomsCache->receiveWeakCallbackInterface_id, &callable)) {
50238 aRv.Throw(NS_ERROR_UNEXPECTED);
50239 return nullptr;
50240 }
50241 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50242 if (!JS::Call(cx, thisValue, callable,
50243 JS::HandleValueArray::empty(), &rval)) {
50244 aRv.NoteJSContextException(cx);
50245 return nullptr;
50246 }
50247 RefPtr<TestCallbackInterface> rvalDecl;
50248 if (rval.isObject()) {
50249 { // scope for tempRoot and tempGlobalRoot if needed
50250 JS::Rooted<JSObject*> tempRoot(cx, &rval.toObject());
50251 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
50252 rvalDecl = new TestCallbackInterface(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
50253 }
50254 } else {
50255 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveWeakCallbackInterface");
50256 aRv.Throw(NS_ERROR_UNEXPECTED);
50257 return nullptr;
50258 }
50259 return rvalDecl.forget();
50260}
50261
50262already_AddRefed<TestCallbackInterface>
50263TestJSImplInterfaceJSImpl::ReceiveWeakNullableCallbackInterface(ErrorResult& aRv, JS::Realm* aRealm)
50264{
50265 CallSetup s(this, aRv, "TestJSImplInterface.receiveWeakNullableCallbackInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50266 if (aRv.Failed()) {
50267 return nullptr;
50268 }
50269 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50269); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50269; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50270 BindingCallContext& cx = s.GetCallContext();
50271
50272 JS::Rooted<JS::Value> rval(cx);
50273
50274 JS::Rooted<JS::Value> callable(cx);
50275 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50276 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50277 !InitIds(cx, atomsCache)) ||
50278 !GetCallableProperty(cx, atomsCache->receiveWeakNullableCallbackInterface_id, &callable)) {
50279 aRv.Throw(NS_ERROR_UNEXPECTED);
50280 return nullptr;
50281 }
50282 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50283 if (!JS::Call(cx, thisValue, callable,
50284 JS::HandleValueArray::empty(), &rval)) {
50285 aRv.NoteJSContextException(cx);
50286 return nullptr;
50287 }
50288 RefPtr<TestCallbackInterface> rvalDecl;
50289 if (rval.isObject()) {
50290 { // scope for tempRoot and tempGlobalRoot if needed
50291 JS::Rooted<JSObject*> tempRoot(cx, &rval.toObject());
50292 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
50293 rvalDecl = new TestCallbackInterface(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
50294 }
50295 } else if (rval.isNullOrUndefined()) {
50296 rvalDecl = nullptr;
50297 } else {
50298 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveWeakNullableCallbackInterface");
50299 aRv.Throw(NS_ERROR_UNEXPECTED);
50300 return nullptr;
50301 }
50302 return rvalDecl.forget();
50303}
50304
50305void
50306TestJSImplInterfaceJSImpl::PassCallbackInterface(TestCallbackInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
50307{
50308 CallSetup s(this, aRv, "TestJSImplInterface.passCallbackInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50309 if (aRv.Failed()) {
50310 return;
50311 }
50312 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50312); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50312; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50313 BindingCallContext& cx = s.GetCallContext();
50314
50315 JS::Rooted<JS::Value> rval(cx);
50316 JS::RootedVector<JS::Value> argv(cx);
50317 if (!argv.resize(1)) {
50318 // That threw an exception on the JSContext, and our CallSetup will do
50319 // the right thing with that.
50320 return;
50321 }
50322 unsigned argc = 1;
50323
50324 do {
50325 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg));
50326 if (!MaybeWrapObjectValue(cx, argv[0])) {
50327 aRv.Throw(NS_ERROR_UNEXPECTED);
50328 return;
50329 }
50330 break;
50331 } while (false);
50332
50333 JS::Rooted<JS::Value> callable(cx);
50334 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50335 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50336 !InitIds(cx, atomsCache)) ||
50337 !GetCallableProperty(cx, atomsCache->passCallbackInterface_id, &callable)) {
50338 aRv.Throw(NS_ERROR_UNEXPECTED);
50339 return;
50340 }
50341 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50342 if (!JS::Call(cx, thisValue, callable,
50343 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
50344 aRv.NoteJSContextException(cx);
50345 return;
50346 }
50347}
50348
50349void
50350TestJSImplInterfaceJSImpl::PassNullableCallbackInterface(TestCallbackInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
50351{
50352 CallSetup s(this, aRv, "TestJSImplInterface.passNullableCallbackInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50353 if (aRv.Failed()) {
50354 return;
50355 }
50356 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50356); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50356; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50357 BindingCallContext& cx = s.GetCallContext();
50358
50359 JS::Rooted<JS::Value> rval(cx);
50360 JS::RootedVector<JS::Value> argv(cx);
50361 if (!argv.resize(1)) {
50362 // That threw an exception on the JSContext, and our CallSetup will do
50363 // the right thing with that.
50364 return;
50365 }
50366 unsigned argc = 1;
50367
50368 do {
50369 if (arg) {
50370 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg));
50371 if (!MaybeWrapObjectOrNullValue(cx, argv[0])) {
50372 aRv.Throw(NS_ERROR_UNEXPECTED);
50373 return;
50374 }
50375 break;
50376 } else {
50377 argv[0].setNull();
50378 break;
50379 }
50380 } while (false);
50381
50382 JS::Rooted<JS::Value> callable(cx);
50383 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50384 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50385 !InitIds(cx, atomsCache)) ||
50386 !GetCallableProperty(cx, atomsCache->passNullableCallbackInterface_id, &callable)) {
50387 aRv.Throw(NS_ERROR_UNEXPECTED);
50388 return;
50389 }
50390 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50391 if (!JS::Call(cx, thisValue, callable,
50392 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
50393 aRv.NoteJSContextException(cx);
50394 return;
50395 }
50396}
50397
50398void
50399TestJSImplInterfaceJSImpl::PassOptionalCallbackInterface(const Optional<RefPtr<TestCallbackInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
50400{
50401 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalCallbackInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50402 if (aRv.Failed()) {
50403 return;
50404 }
50405 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50405); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50405; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50406 BindingCallContext& cx = s.GetCallContext();
50407
50408 JS::Rooted<JS::Value> rval(cx);
50409 JS::RootedVector<JS::Value> argv(cx);
50410 if (!argv.resize(1)) {
50411 // That threw an exception on the JSContext, and our CallSetup will do
50412 // the right thing with that.
50413 return;
50414 }
50415 unsigned argc = 1;
50416
50417 do {
50418 if (arg.WasPassed()) {
50419 if (arg.Value()) {
50420 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg.Value()));
50421 if (!MaybeWrapObjectOrNullValue(cx, argv[0])) {
50422 aRv.Throw(NS_ERROR_UNEXPECTED);
50423 return;
50424 }
50425 break;
50426 } else {
50427 argv[0].setNull();
50428 break;
50429 }
50430 } else if (argc == 1) {
50431 // This is our current trailing argument; reduce argc
50432 --argc;
50433 } else {
50434 argv[0].setUndefined();
50435 }
50436 } while (false);
50437
50438 JS::Rooted<JS::Value> callable(cx);
50439 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50440 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50441 !InitIds(cx, atomsCache)) ||
50442 !GetCallableProperty(cx, atomsCache->passOptionalCallbackInterface_id, &callable)) {
50443 aRv.Throw(NS_ERROR_UNEXPECTED);
50444 return;
50445 }
50446 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50447 if (!JS::Call(cx, thisValue, callable,
50448 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
50449 aRv.NoteJSContextException(cx);
50450 return;
50451 }
50452}
50453
50454void
50455TestJSImplInterfaceJSImpl::PassOptionalNonNullCallbackInterface(const Optional<OwningNonNull<TestCallbackInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
50456{
50457 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNonNullCallbackInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50458 if (aRv.Failed()) {
50459 return;
50460 }
50461 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50461); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50461; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50462 BindingCallContext& cx = s.GetCallContext();
50463
50464 JS::Rooted<JS::Value> rval(cx);
50465 JS::RootedVector<JS::Value> argv(cx);
50466 if (!argv.resize(1)) {
50467 // That threw an exception on the JSContext, and our CallSetup will do
50468 // the right thing with that.
50469 return;
50470 }
50471 unsigned argc = 1;
50472
50473 do {
50474 if (arg.WasPassed()) {
50475 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg.Value()));
50476 if (!MaybeWrapObjectValue(cx, argv[0])) {
50477 aRv.Throw(NS_ERROR_UNEXPECTED);
50478 return;
50479 }
50480 break;
50481 } else if (argc == 1) {
50482 // This is our current trailing argument; reduce argc
50483 --argc;
50484 } else {
50485 argv[0].setUndefined();
50486 }
50487 } while (false);
50488
50489 JS::Rooted<JS::Value> callable(cx);
50490 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50491 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50492 !InitIds(cx, atomsCache)) ||
50493 !GetCallableProperty(cx, atomsCache->passOptionalNonNullCallbackInterface_id, &callable)) {
50494 aRv.Throw(NS_ERROR_UNEXPECTED);
50495 return;
50496 }
50497 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50498 if (!JS::Call(cx, thisValue, callable,
50499 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
50500 aRv.NoteJSContextException(cx);
50501 return;
50502 }
50503}
50504
50505void
50506TestJSImplInterfaceJSImpl::PassOptionalCallbackInterfaceWithDefault(TestCallbackInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
50507{
50508 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalCallbackInterfaceWithDefault", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50509 if (aRv.Failed()) {
50510 return;
50511 }
50512 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50512); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50512; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50513 BindingCallContext& cx = s.GetCallContext();
50514
50515 JS::Rooted<JS::Value> rval(cx);
50516 JS::RootedVector<JS::Value> argv(cx);
50517 if (!argv.resize(1)) {
50518 // That threw an exception on the JSContext, and our CallSetup will do
50519 // the right thing with that.
50520 return;
50521 }
50522 unsigned argc = 1;
50523
50524 do {
50525 if (arg) {
50526 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg));
50527 if (!MaybeWrapObjectOrNullValue(cx, argv[0])) {
50528 aRv.Throw(NS_ERROR_UNEXPECTED);
50529 return;
50530 }
50531 break;
50532 } else {
50533 argv[0].setNull();
50534 break;
50535 }
50536 } while (false);
50537
50538 JS::Rooted<JS::Value> callable(cx);
50539 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50540 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50541 !InitIds(cx, atomsCache)) ||
50542 !GetCallableProperty(cx, atomsCache->passOptionalCallbackInterfaceWithDefault_id, &callable)) {
50543 aRv.Throw(NS_ERROR_UNEXPECTED);
50544 return;
50545 }
50546 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50547 if (!JS::Call(cx, thisValue, callable,
50548 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
50549 aRv.NoteJSContextException(cx);
50550 return;
50551 }
50552}
50553
50554void
50555TestJSImplInterfaceJSImpl::ReceiveSequence(nsTArray<int32_t>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
50556{
50557 CallSetup s(this, aRv, "TestJSImplInterface.receiveSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50558 if (aRv.Failed()) {
50559 return;
50560 }
50561 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50561); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50561; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50562 BindingCallContext& cx = s.GetCallContext();
50563
50564 JS::Rooted<JS::Value> rval(cx);
50565
50566 JS::Rooted<JS::Value> callable(cx);
50567 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50568 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50569 !InitIds(cx, atomsCache)) ||
50570 !GetCallableProperty(cx, atomsCache->receiveSequence_id, &callable)) {
50571 aRv.Throw(NS_ERROR_UNEXPECTED);
50572 return;
50573 }
50574 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50575 if (!JS::Call(cx, thisValue, callable,
50576 JS::HandleValueArray::empty(), &rval)) {
50577 aRv.NoteJSContextException(cx);
50578 return;
50579 }
50580 Sequence<int32_t> rvalDecl;
50581 if (rval.isObject()) {
50582 JS::ForOfIterator iter(cx);
50583 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
50584 aRv.Throw(NS_ERROR_UNEXPECTED);
50585 return;
50586 }
50587 if (!iter.valueIsIterable()) {
50588 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveSequence", "sequence");
50589 aRv.Throw(NS_ERROR_UNEXPECTED);
50590 return;
50591 }
50592 Sequence<int32_t> &arr = rvalDecl;
50593 JS::Rooted<JS::Value> temp(cx);
50594 while (true) {
50595 bool done;
50596 if (!iter.next(&temp, &done)) {
50597 aRv.Throw(NS_ERROR_UNEXPECTED);
50598 return;
50599 }
50600 if (done) {
50601 break;
50602 }
50603 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
50604 if (!slotPtr) {
50605 JS_ReportOutOfMemory(cx);
50606 aRv.Throw(NS_ERROR_UNEXPECTED);
50607 return;
50608 }
50609 int32_t& slot = *slotPtr;
50610 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of return value of TestJSImplInterface.receiveSequence", &slot)) {
50611 aRv.Throw(NS_ERROR_UNEXPECTED);
50612 return;
50613 }
50614 }
50615 } else {
50616 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveSequence", "sequence");
50617 aRv.Throw(NS_ERROR_UNEXPECTED);
50618 return;
50619 }
50620 aRetVal = std::move(rvalDecl);
50621}
50622
50623void
50624TestJSImplInterfaceJSImpl::ReceiveNullableSequence(Nullable<nsTArray<int32_t>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
50625{
50626 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50627 if (aRv.Failed()) {
50628 return;
50629 }
50630 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50630); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50630; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50631 BindingCallContext& cx = s.GetCallContext();
50632
50633 JS::Rooted<JS::Value> rval(cx);
50634
50635 JS::Rooted<JS::Value> callable(cx);
50636 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50637 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50638 !InitIds(cx, atomsCache)) ||
50639 !GetCallableProperty(cx, atomsCache->receiveNullableSequence_id, &callable)) {
50640 aRv.Throw(NS_ERROR_UNEXPECTED);
50641 return;
50642 }
50643 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50644 if (!JS::Call(cx, thisValue, callable,
50645 JS::HandleValueArray::empty(), &rval)) {
50646 aRv.NoteJSContextException(cx);
50647 return;
50648 }
50649 Nullable<Sequence<int32_t>> rvalDecl;
50650 if (rval.isObject()) {
50651 JS::ForOfIterator iter(cx);
50652 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
50653 aRv.Throw(NS_ERROR_UNEXPECTED);
50654 return;
50655 }
50656 if (!iter.valueIsIterable()) {
50657 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableSequence", "sequence");
50658 aRv.Throw(NS_ERROR_UNEXPECTED);
50659 return;
50660 }
50661 Sequence<int32_t> &arr = rvalDecl.SetValue();
50662 JS::Rooted<JS::Value> temp(cx);
50663 while (true) {
50664 bool done;
50665 if (!iter.next(&temp, &done)) {
50666 aRv.Throw(NS_ERROR_UNEXPECTED);
50667 return;
50668 }
50669 if (done) {
50670 break;
50671 }
50672 int32_t* slotPtr = arr.AppendElement(mozilla::fallible);
50673 if (!slotPtr) {
50674 JS_ReportOutOfMemory(cx);
50675 aRv.Throw(NS_ERROR_UNEXPECTED);
50676 return;
50677 }
50678 int32_t& slot = *slotPtr;
50679 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of return value of TestJSImplInterface.receiveNullableSequence", &slot)) {
50680 aRv.Throw(NS_ERROR_UNEXPECTED);
50681 return;
50682 }
50683 }
50684 } else if (rval.isNullOrUndefined()) {
50685 rvalDecl.SetNull();
50686 } else {
50687 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableSequence", "sequence");
50688 aRv.Throw(NS_ERROR_UNEXPECTED);
50689 return;
50690 }
50691 if (rvalDecl.IsNull()) {
50692 aRetVal.SetNull();
50693 } else {
50694 aRetVal.SetValue() = std::move(rvalDecl.Value());
50695 }
50696}
50697
50698void
50699TestJSImplInterfaceJSImpl::ReceiveSequenceOfNullableInts(nsTArray<Nullable<int32_t>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
50700{
50701 CallSetup s(this, aRv, "TestJSImplInterface.receiveSequenceOfNullableInts", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50702 if (aRv.Failed()) {
50703 return;
50704 }
50705 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50705); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50705; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50706 BindingCallContext& cx = s.GetCallContext();
50707
50708 JS::Rooted<JS::Value> rval(cx);
50709
50710 JS::Rooted<JS::Value> callable(cx);
50711 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50712 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50713 !InitIds(cx, atomsCache)) ||
50714 !GetCallableProperty(cx, atomsCache->receiveSequenceOfNullableInts_id, &callable)) {
50715 aRv.Throw(NS_ERROR_UNEXPECTED);
50716 return;
50717 }
50718 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50719 if (!JS::Call(cx, thisValue, callable,
50720 JS::HandleValueArray::empty(), &rval)) {
50721 aRv.NoteJSContextException(cx);
50722 return;
50723 }
50724 Sequence<Nullable<int32_t>> rvalDecl;
50725 if (rval.isObject()) {
50726 JS::ForOfIterator iter(cx);
50727 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
50728 aRv.Throw(NS_ERROR_UNEXPECTED);
50729 return;
50730 }
50731 if (!iter.valueIsIterable()) {
50732 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveSequenceOfNullableInts", "sequence");
50733 aRv.Throw(NS_ERROR_UNEXPECTED);
50734 return;
50735 }
50736 Sequence<Nullable<int32_t>> &arr = rvalDecl;
50737 JS::Rooted<JS::Value> temp(cx);
50738 while (true) {
50739 bool done;
50740 if (!iter.next(&temp, &done)) {
50741 aRv.Throw(NS_ERROR_UNEXPECTED);
50742 return;
50743 }
50744 if (done) {
50745 break;
50746 }
50747 Nullable<int32_t>* slotPtr = arr.AppendElement(mozilla::fallible);
50748 if (!slotPtr) {
50749 JS_ReportOutOfMemory(cx);
50750 aRv.Throw(NS_ERROR_UNEXPECTED);
50751 return;
50752 }
50753 Nullable<int32_t>& slot = *slotPtr;
50754 if (temp.isNullOrUndefined()) {
50755 slot.SetNull();
50756 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of return value of TestJSImplInterface.receiveSequenceOfNullableInts", &slot.SetValue())) {
50757 aRv.Throw(NS_ERROR_UNEXPECTED);
50758 return;
50759 }
50760 }
50761 } else {
50762 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveSequenceOfNullableInts", "sequence");
50763 aRv.Throw(NS_ERROR_UNEXPECTED);
50764 return;
50765 }
50766 aRetVal = std::move(rvalDecl);
50767}
50768
50769void
50770TestJSImplInterfaceJSImpl::ReceiveNullableSequenceOfNullableInts(Nullable<nsTArray<Nullable<int32_t>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
50771{
50772 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableSequenceOfNullableInts", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50773 if (aRv.Failed()) {
50774 return;
50775 }
50776 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50776); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50776; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50777 BindingCallContext& cx = s.GetCallContext();
50778
50779 JS::Rooted<JS::Value> rval(cx);
50780
50781 JS::Rooted<JS::Value> callable(cx);
50782 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50783 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50784 !InitIds(cx, atomsCache)) ||
50785 !GetCallableProperty(cx, atomsCache->receiveNullableSequenceOfNullableInts_id, &callable)) {
50786 aRv.Throw(NS_ERROR_UNEXPECTED);
50787 return;
50788 }
50789 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50790 if (!JS::Call(cx, thisValue, callable,
50791 JS::HandleValueArray::empty(), &rval)) {
50792 aRv.NoteJSContextException(cx);
50793 return;
50794 }
50795 Nullable<Sequence<Nullable<int32_t>>> rvalDecl;
50796 if (rval.isObject()) {
50797 JS::ForOfIterator iter(cx);
50798 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
50799 aRv.Throw(NS_ERROR_UNEXPECTED);
50800 return;
50801 }
50802 if (!iter.valueIsIterable()) {
50803 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableSequenceOfNullableInts", "sequence");
50804 aRv.Throw(NS_ERROR_UNEXPECTED);
50805 return;
50806 }
50807 Sequence<Nullable<int32_t>> &arr = rvalDecl.SetValue();
50808 JS::Rooted<JS::Value> temp(cx);
50809 while (true) {
50810 bool done;
50811 if (!iter.next(&temp, &done)) {
50812 aRv.Throw(NS_ERROR_UNEXPECTED);
50813 return;
50814 }
50815 if (done) {
50816 break;
50817 }
50818 Nullable<int32_t>* slotPtr = arr.AppendElement(mozilla::fallible);
50819 if (!slotPtr) {
50820 JS_ReportOutOfMemory(cx);
50821 aRv.Throw(NS_ERROR_UNEXPECTED);
50822 return;
50823 }
50824 Nullable<int32_t>& slot = *slotPtr;
50825 if (temp.isNullOrUndefined()) {
50826 slot.SetNull();
50827 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Element of return value of TestJSImplInterface.receiveNullableSequenceOfNullableInts", &slot.SetValue())) {
50828 aRv.Throw(NS_ERROR_UNEXPECTED);
50829 return;
50830 }
50831 }
50832 } else if (rval.isNullOrUndefined()) {
50833 rvalDecl.SetNull();
50834 } else {
50835 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableSequenceOfNullableInts", "sequence");
50836 aRv.Throw(NS_ERROR_UNEXPECTED);
50837 return;
50838 }
50839 if (rvalDecl.IsNull()) {
50840 aRetVal.SetNull();
50841 } else {
50842 aRetVal.SetValue() = std::move(rvalDecl.Value());
50843 }
50844}
50845
50846void
50847TestJSImplInterfaceJSImpl::PassSequence(const Sequence<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
50848{
50849 CallSetup s(this, aRv, "TestJSImplInterface.passSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50850 if (aRv.Failed()) {
50851 return;
50852 }
50853 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50853); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50853; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50854 BindingCallContext& cx = s.GetCallContext();
50855
50856 JS::Rooted<JS::Value> rval(cx);
50857 JS::RootedVector<JS::Value> argv(cx);
50858 if (!argv.resize(1)) {
50859 // That threw an exception on the JSContext, and our CallSetup will do
50860 // the right thing with that.
50861 return;
50862 }
50863 unsigned argc = 1;
50864
50865 do {
50866
50867 uint32_t length = arg.Length();
50868 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
50869 if (!returnArray) {
50870 aRv.Throw(NS_ERROR_UNEXPECTED);
50871 return;
50872 }
50873 // Scope for 'tmp'
50874 {
50875 JS::Rooted<JS::Value> tmp(cx);
50876 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
50877 // Control block to let us common up the JS_DefineElement calls when there
50878 // are different ways to succeed at wrapping the object.
50879 do {
50880 tmp.setInt32(int32_t(arg[sequenceIdx0]));
50881 break;
50882 } while (false);
50883 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
50884 JSPROP_ENUMERATE)) {
50885 aRv.Throw(NS_ERROR_UNEXPECTED);
50886 return;
50887 }
50888 }
50889 }
50890 argv[0].setObject(*returnArray);
50891 break;
50892 } while (false);
50893
50894 JS::Rooted<JS::Value> callable(cx);
50895 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50896 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50897 !InitIds(cx, atomsCache)) ||
50898 !GetCallableProperty(cx, atomsCache->passSequence_id, &callable)) {
50899 aRv.Throw(NS_ERROR_UNEXPECTED);
50900 return;
50901 }
50902 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50903 if (!JS::Call(cx, thisValue, callable,
50904 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
50905 aRv.NoteJSContextException(cx);
50906 return;
50907 }
50908}
50909
50910void
50911TestJSImplInterfaceJSImpl::PassNullableSequence(const Nullable<Sequence<int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
50912{
50913 CallSetup s(this, aRv, "TestJSImplInterface.passNullableSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50914 if (aRv.Failed()) {
50915 return;
50916 }
50917 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50917); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50917; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50918 BindingCallContext& cx = s.GetCallContext();
50919
50920 JS::Rooted<JS::Value> rval(cx);
50921 JS::RootedVector<JS::Value> argv(cx);
50922 if (!argv.resize(1)) {
50923 // That threw an exception on the JSContext, and our CallSetup will do
50924 // the right thing with that.
50925 return;
50926 }
50927 unsigned argc = 1;
50928
50929 do {
50930
50931 if (arg.IsNull()) {
50932 argv[0].setNull();
50933 break;
50934 }
50935
50936 uint32_t length = arg.Value().Length();
50937 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
50938 if (!returnArray) {
50939 aRv.Throw(NS_ERROR_UNEXPECTED);
50940 return;
50941 }
50942 // Scope for 'tmp'
50943 {
50944 JS::Rooted<JS::Value> tmp(cx);
50945 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
50946 // Control block to let us common up the JS_DefineElement calls when there
50947 // are different ways to succeed at wrapping the object.
50948 do {
50949 tmp.setInt32(int32_t(arg.Value()[sequenceIdx0]));
50950 break;
50951 } while (false);
50952 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
50953 JSPROP_ENUMERATE)) {
50954 aRv.Throw(NS_ERROR_UNEXPECTED);
50955 return;
50956 }
50957 }
50958 }
50959 argv[0].setObject(*returnArray);
50960 break;
50961 } while (false);
50962
50963 JS::Rooted<JS::Value> callable(cx);
50964 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
50965 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
50966 !InitIds(cx, atomsCache)) ||
50967 !GetCallableProperty(cx, atomsCache->passNullableSequence_id, &callable)) {
50968 aRv.Throw(NS_ERROR_UNEXPECTED);
50969 return;
50970 }
50971 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
50972 if (!JS::Call(cx, thisValue, callable,
50973 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
50974 aRv.NoteJSContextException(cx);
50975 return;
50976 }
50977}
50978
50979void
50980TestJSImplInterfaceJSImpl::PassSequenceOfNullableInts(const Sequence<Nullable<int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
50981{
50982 CallSetup s(this, aRv, "TestJSImplInterface.passSequenceOfNullableInts", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
50983 if (aRv.Failed()) {
50984 return;
50985 }
50986 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 50986); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 50986; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
50987 BindingCallContext& cx = s.GetCallContext();
50988
50989 JS::Rooted<JS::Value> rval(cx);
50990 JS::RootedVector<JS::Value> argv(cx);
50991 if (!argv.resize(1)) {
50992 // That threw an exception on the JSContext, and our CallSetup will do
50993 // the right thing with that.
50994 return;
50995 }
50996 unsigned argc = 1;
50997
50998 do {
50999
51000 uint32_t length = arg.Length();
51001 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
51002 if (!returnArray) {
51003 aRv.Throw(NS_ERROR_UNEXPECTED);
51004 return;
51005 }
51006 // Scope for 'tmp'
51007 {
51008 JS::Rooted<JS::Value> tmp(cx);
51009 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
51010 // Control block to let us common up the JS_DefineElement calls when there
51011 // are different ways to succeed at wrapping the object.
51012 do {
51013 if (arg[sequenceIdx0].IsNull()) {
51014 tmp.setNull();
51015 break;
51016 }
51017 tmp.setInt32(int32_t(arg[sequenceIdx0].Value()));
51018 break;
51019 } while (false);
51020 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
51021 JSPROP_ENUMERATE)) {
51022 aRv.Throw(NS_ERROR_UNEXPECTED);
51023 return;
51024 }
51025 }
51026 }
51027 argv[0].setObject(*returnArray);
51028 break;
51029 } while (false);
51030
51031 JS::Rooted<JS::Value> callable(cx);
51032 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
51033 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
51034 !InitIds(cx, atomsCache)) ||
51035 !GetCallableProperty(cx, atomsCache->passSequenceOfNullableInts_id, &callable)) {
51036 aRv.Throw(NS_ERROR_UNEXPECTED);
51037 return;
51038 }
51039 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
51040 if (!JS::Call(cx, thisValue, callable,
51041 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
51042 aRv.NoteJSContextException(cx);
51043 return;
51044 }
51045}
51046
51047void
51048TestJSImplInterfaceJSImpl::PassOptionalSequenceOfNullableInts(const Optional<Sequence<Nullable<int32_t>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
51049{
51050 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalSequenceOfNullableInts", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
51051 if (aRv.Failed()) {
51052 return;
51053 }
51054 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 51054); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 51054; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
51055 BindingCallContext& cx = s.GetCallContext();
51056
51057 JS::Rooted<JS::Value> rval(cx);
51058 JS::RootedVector<JS::Value> argv(cx);
51059 if (!argv.resize(1)) {
51060 // That threw an exception on the JSContext, and our CallSetup will do
51061 // the right thing with that.
51062 return;
51063 }
51064 unsigned argc = 1;
51065
51066 do {
51067 if (arg.WasPassed()) {
51068
51069 uint32_t length = arg.Value().Length();
51070 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
51071 if (!returnArray) {
51072 aRv.Throw(NS_ERROR_UNEXPECTED);
51073 return;
51074 }
51075 // Scope for 'tmp'
51076 {
51077 JS::Rooted<JS::Value> tmp(cx);
51078 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
51079 // Control block to let us common up the JS_DefineElement calls when there
51080 // are different ways to succeed at wrapping the object.
51081 do {
51082 if (arg.Value()[sequenceIdx0].IsNull()) {
51083 tmp.setNull();
51084 break;
51085 }
51086 tmp.setInt32(int32_t(arg.Value()[sequenceIdx0].Value()));
51087 break;
51088 } while (false);
51089 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
51090 JSPROP_ENUMERATE)) {
51091 aRv.Throw(NS_ERROR_UNEXPECTED);
51092 return;
51093 }
51094 }
51095 }
51096 argv[0].setObject(*returnArray);
51097 break;
51098 } else if (argc == 1) {
51099 // This is our current trailing argument; reduce argc
51100 --argc;
51101 } else {
51102 argv[0].setUndefined();
51103 }
51104 } while (false);
51105
51106 JS::Rooted<JS::Value> callable(cx);
51107 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
51108 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
51109 !InitIds(cx, atomsCache)) ||
51110 !GetCallableProperty(cx, atomsCache->passOptionalSequenceOfNullableInts_id, &callable)) {
51111 aRv.Throw(NS_ERROR_UNEXPECTED);
51112 return;
51113 }
51114 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
51115 if (!JS::Call(cx, thisValue, callable,
51116 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
51117 aRv.NoteJSContextException(cx);
51118 return;
51119 }
51120}
51121
51122void
51123TestJSImplInterfaceJSImpl::PassOptionalNullableSequenceOfNullableInts(const Optional<Nullable<Sequence<Nullable<int32_t>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
51124{
51125 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableSequenceOfNullableInts", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
51126 if (aRv.Failed()) {
51127 return;
51128 }
51129 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 51129); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 51129; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
51130 BindingCallContext& cx = s.GetCallContext();
51131
51132 JS::Rooted<JS::Value> rval(cx);
51133 JS::RootedVector<JS::Value> argv(cx);
51134 if (!argv.resize(1)) {
51135 // That threw an exception on the JSContext, and our CallSetup will do
51136 // the right thing with that.
51137 return;
51138 }
51139 unsigned argc = 1;
51140
51141 do {
51142 if (arg.WasPassed()) {
51143
51144 if (arg.Value().IsNull()) {
51145 argv[0].setNull();
51146 break;
51147 }
51148
51149 uint32_t length = arg.Value().Value().Length();
51150 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
51151 if (!returnArray) {
51152 aRv.Throw(NS_ERROR_UNEXPECTED);
51153 return;
51154 }
51155 // Scope for 'tmp'
51156 {
51157 JS::Rooted<JS::Value> tmp(cx);
51158 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
51159 // Control block to let us common up the JS_DefineElement calls when there
51160 // are different ways to succeed at wrapping the object.
51161 do {
51162 if (arg.Value().Value()[sequenceIdx0].IsNull()) {
51163 tmp.setNull();
51164 break;
51165 }
51166 tmp.setInt32(int32_t(arg.Value().Value()[sequenceIdx0].Value()));
51167 break;
51168 } while (false);
51169 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
51170 JSPROP_ENUMERATE)) {
51171 aRv.Throw(NS_ERROR_UNEXPECTED);
51172 return;
51173 }
51174 }
51175 }
51176 argv[0].setObject(*returnArray);
51177 break;
51178 } else if (argc == 1) {
51179 // This is our current trailing argument; reduce argc
51180 --argc;
51181 } else {
51182 argv[0].setUndefined();
51183 }
51184 } while (false);
51185
51186 JS::Rooted<JS::Value> callable(cx);
51187 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
51188 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
51189 !InitIds(cx, atomsCache)) ||
51190 !GetCallableProperty(cx, atomsCache->passOptionalNullableSequenceOfNullableInts_id, &callable)) {
51191 aRv.Throw(NS_ERROR_UNEXPECTED);
51192 return;
51193 }
51194 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
51195 if (!JS::Call(cx, thisValue, callable,
51196 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
51197 aRv.NoteJSContextException(cx);
51198 return;
51199 }
51200}
51201
51202void
51203TestJSImplInterfaceJSImpl::ReceiveCastableObjectSequence(nsTArray<RefPtr<TestJSImplInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
51204{
51205 CallSetup s(this, aRv, "TestJSImplInterface.receiveCastableObjectSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
51206 if (aRv.Failed()) {
51207 return;
51208 }
51209 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 51209); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 51209; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
51210 BindingCallContext& cx = s.GetCallContext();
51211
51212 JS::Rooted<JS::Value> rval(cx);
51213
51214 JS::Rooted<JS::Value> callable(cx);
51215 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
51216 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
51217 !InitIds(cx, atomsCache)) ||
51218 !GetCallableProperty(cx, atomsCache->receiveCastableObjectSequence_id, &callable)) {
51219 aRv.Throw(NS_ERROR_UNEXPECTED);
51220 return;
51221 }
51222 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
51223 if (!JS::Call(cx, thisValue, callable,
51224 JS::HandleValueArray::empty(), &rval)) {
51225 aRv.NoteJSContextException(cx);
51226 return;
51227 }
51228 Sequence<RefPtr<mozilla::dom::TestJSImplInterface>> rvalDecl;
51229 if (rval.isObject()) {
51230 JS::ForOfIterator iter(cx);
51231 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
51232 aRv.Throw(NS_ERROR_UNEXPECTED);
51233 return;
51234 }
51235 if (!iter.valueIsIterable()) {
51236 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveCastableObjectSequence", "sequence");
51237 aRv.Throw(NS_ERROR_UNEXPECTED);
51238 return;
51239 }
51240 Sequence<RefPtr<mozilla::dom::TestJSImplInterface>> &arr = rvalDecl;
51241 JS::Rooted<JS::Value> temp(cx);
51242 while (true) {
51243 bool done;
51244 if (!iter.next(&temp, &done)) {
51245 aRv.Throw(NS_ERROR_UNEXPECTED);
51246 return;
51247 }
51248 if (done) {
51249 break;
51250 }
51251 RefPtr<mozilla::dom::TestJSImplInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
51252 if (!slotPtr) {
51253 JS_ReportOutOfMemory(cx);
51254 aRv.Throw(NS_ERROR_UNEXPECTED);
51255 return;
51256 }
51257 RefPtr<mozilla::dom::TestJSImplInterface>& slot = *slotPtr;
51258 if (temp.isObject()) {
51259 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
51260 {
51261 // Our JSContext should be in the right global to do unwrapping in.
51262 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(&temp, slot, cx);
51263 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
51264 // Be careful to not wrap random DOM objects here, even if
51265 // they're wrapped in opaque security wrappers for some reason.
51266 // XXXbz Wish we could check for a JS-implemented object
51267 // that already has a content reflection...
51268 if (!IsDOMObject(js::UncheckedUnwrap(&temp.toObject()))) {
51269 nsCOMPtr<nsIGlobalObject> contentGlobal;
51270 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
51271 if (!callback ||
51272 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
51273 aRv.Throw(NS_ERROR_UNEXPECTED);
51274 return;
51275 }
51276 JS::Rooted<JSObject*> jsImplSourceObj(cx, &temp.toObject());
51277 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 51278); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 51278; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
51278 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 51278); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 51278; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
51279 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
51280 slot = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
51281 } else {
51282 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of return value of TestJSImplInterface.receiveCastableObjectSequence", "TestJSImplInterface");
51283 aRv.Throw(NS_ERROR_UNEXPECTED);
51284 return;
51285 }
51286 }
51287 }
51288 } else {
51289 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveCastableObjectSequence");
51290 aRv.Throw(NS_ERROR_UNEXPECTED);
51291 return;
51292 }
51293 }
51294 } else {
51295 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveCastableObjectSequence", "sequence");
51296 aRv.Throw(NS_ERROR_UNEXPECTED);
51297 return;
51298 }
51299 aRetVal = std::move(rvalDecl);
51300}
51301
51302void
51303TestJSImplInterfaceJSImpl::ReceiveCallbackObjectSequence(nsTArray<RefPtr<TestCallbackInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
51304{
51305 CallSetup s(this, aRv, "TestJSImplInterface.receiveCallbackObjectSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
51306 if (aRv.Failed()) {
51307 return;
51308 }
51309 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 51309); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 51309; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
51310 BindingCallContext& cx = s.GetCallContext();
51311
51312 JS::Rooted<JS::Value> rval(cx);
51313
51314 JS::Rooted<JS::Value> callable(cx);
51315 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
51316 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
51317 !InitIds(cx, atomsCache)) ||
51318 !GetCallableProperty(cx, atomsCache->receiveCallbackObjectSequence_id, &callable)) {
51319 aRv.Throw(NS_ERROR_UNEXPECTED);
51320 return;
51321 }
51322 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
51323 if (!JS::Call(cx, thisValue, callable,
51324 JS::HandleValueArray::empty(), &rval)) {
51325 aRv.NoteJSContextException(cx);
51326 return;
51327 }
51328 Sequence<RefPtr<TestCallbackInterface>> rvalDecl;
51329 if (rval.isObject()) {
51330 JS::ForOfIterator iter(cx);
51331 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
51332 aRv.Throw(NS_ERROR_UNEXPECTED);
51333 return;
51334 }
51335 if (!iter.valueIsIterable()) {
51336 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveCallbackObjectSequence", "sequence");
51337 aRv.Throw(NS_ERROR_UNEXPECTED);
51338 return;
51339 }
51340 Sequence<RefPtr<TestCallbackInterface>> &arr = rvalDecl;
51341 JS::Rooted<JS::Value> temp(cx);
51342 while (true) {
51343 bool done;
51344 if (!iter.next(&temp, &done)) {
51345 aRv.Throw(NS_ERROR_UNEXPECTED);
51346 return;
51347 }
51348 if (done) {
51349 break;
51350 }
51351 RefPtr<TestCallbackInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
51352 if (!slotPtr) {
51353 JS_ReportOutOfMemory(cx);
51354 aRv.Throw(NS_ERROR_UNEXPECTED);
51355 return;
51356 }
51357 RefPtr<TestCallbackInterface>& slot = *slotPtr;
51358 if (temp.isObject()) {
51359 { // scope for tempRoot and tempGlobalRoot if needed
51360 JS::Rooted<JSObject*> tempRoot(cx, &temp.toObject());
51361 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
51362 slot = new TestCallbackInterface(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
51363 }
51364 } else {
51365 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveCallbackObjectSequence");
51366 aRv.Throw(NS_ERROR_UNEXPECTED);
51367 return;
51368 }
51369 }
51370 } else {
51371 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveCallbackObjectSequence", "sequence");
51372 aRv.Throw(NS_ERROR_UNEXPECTED);
51373 return;
51374 }
51375 aRetVal = std::move(rvalDecl);
51376}
51377
51378void
51379TestJSImplInterfaceJSImpl::ReceiveNullableCastableObjectSequence(nsTArray<RefPtr<TestJSImplInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
51380{
51381 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableCastableObjectSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
51382 if (aRv.Failed()) {
51383 return;
51384 }
51385 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 51385); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 51385; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
51386 BindingCallContext& cx = s.GetCallContext();
51387
51388 JS::Rooted<JS::Value> rval(cx);
51389
51390 JS::Rooted<JS::Value> callable(cx);
51391 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
51392 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
51393 !InitIds(cx, atomsCache)) ||
51394 !GetCallableProperty(cx, atomsCache->receiveNullableCastableObjectSequence_id, &callable)) {
51395 aRv.Throw(NS_ERROR_UNEXPECTED);
51396 return;
51397 }
51398 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
51399 if (!JS::Call(cx, thisValue, callable,
51400 JS::HandleValueArray::empty(), &rval)) {
51401 aRv.NoteJSContextException(cx);
51402 return;
51403 }
51404 Sequence<RefPtr<mozilla::dom::TestJSImplInterface>> rvalDecl;
51405 if (rval.isObject()) {
51406 JS::ForOfIterator iter(cx);
51407 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
51408 aRv.Throw(NS_ERROR_UNEXPECTED);
51409 return;
51410 }
51411 if (!iter.valueIsIterable()) {
51412 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableCastableObjectSequence", "sequence");
51413 aRv.Throw(NS_ERROR_UNEXPECTED);
51414 return;
51415 }
51416 Sequence<RefPtr<mozilla::dom::TestJSImplInterface>> &arr = rvalDecl;
51417 JS::Rooted<JS::Value> temp(cx);
51418 while (true) {
51419 bool done;
51420 if (!iter.next(&temp, &done)) {
51421 aRv.Throw(NS_ERROR_UNEXPECTED);
51422 return;
51423 }
51424 if (done) {
51425 break;
51426 }
51427 RefPtr<mozilla::dom::TestJSImplInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
51428 if (!slotPtr) {
51429 JS_ReportOutOfMemory(cx);
51430 aRv.Throw(NS_ERROR_UNEXPECTED);
51431 return;
51432 }
51433 RefPtr<mozilla::dom::TestJSImplInterface>& slot = *slotPtr;
51434 if (temp.isObject()) {
51435 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
51436 {
51437 // Our JSContext should be in the right global to do unwrapping in.
51438 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(&temp, slot, cx);
51439 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
51440 // Be careful to not wrap random DOM objects here, even if
51441 // they're wrapped in opaque security wrappers for some reason.
51442 // XXXbz Wish we could check for a JS-implemented object
51443 // that already has a content reflection...
51444 if (!IsDOMObject(js::UncheckedUnwrap(&temp.toObject()))) {
51445 nsCOMPtr<nsIGlobalObject> contentGlobal;
51446 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
51447 if (!callback ||
51448 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
51449 aRv.Throw(NS_ERROR_UNEXPECTED);
51450 return;
51451 }
51452 JS::Rooted<JSObject*> jsImplSourceObj(cx, &temp.toObject());
51453 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 51454); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 51454; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
51454 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 51454); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 51454; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
51455 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
51456 slot = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
51457 } else {
51458 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of return value of TestJSImplInterface.receiveNullableCastableObjectSequence", "TestJSImplInterface");
51459 aRv.Throw(NS_ERROR_UNEXPECTED);
51460 return;
51461 }
51462 }
51463 }
51464 } else if (temp.isNullOrUndefined()) {
51465 slot = nullptr;
51466 } else {
51467 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveNullableCastableObjectSequence");
51468 aRv.Throw(NS_ERROR_UNEXPECTED);
51469 return;
51470 }
51471 }
51472 } else {
51473 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableCastableObjectSequence", "sequence");
51474 aRv.Throw(NS_ERROR_UNEXPECTED);
51475 return;
51476 }
51477 aRetVal = std::move(rvalDecl);
51478}
51479
51480void
51481TestJSImplInterfaceJSImpl::ReceiveNullableCallbackObjectSequence(nsTArray<RefPtr<TestCallbackInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
51482{
51483 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableCallbackObjectSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
51484 if (aRv.Failed()) {
51485 return;
51486 }
51487 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 51487); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 51487; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
51488 BindingCallContext& cx = s.GetCallContext();
51489
51490 JS::Rooted<JS::Value> rval(cx);
51491
51492 JS::Rooted<JS::Value> callable(cx);
51493 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
51494 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
51495 !InitIds(cx, atomsCache)) ||
51496 !GetCallableProperty(cx, atomsCache->receiveNullableCallbackObjectSequence_id, &callable)) {
51497 aRv.Throw(NS_ERROR_UNEXPECTED);
51498 return;
51499 }
51500 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
51501 if (!JS::Call(cx, thisValue, callable,
51502 JS::HandleValueArray::empty(), &rval)) {
51503 aRv.NoteJSContextException(cx);
51504 return;
51505 }
51506 Sequence<RefPtr<TestCallbackInterface>> rvalDecl;
51507 if (rval.isObject()) {
51508 JS::ForOfIterator iter(cx);
51509 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
51510 aRv.Throw(NS_ERROR_UNEXPECTED);
51511 return;
51512 }
51513 if (!iter.valueIsIterable()) {
51514 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableCallbackObjectSequence", "sequence");
51515 aRv.Throw(NS_ERROR_UNEXPECTED);
51516 return;
51517 }
51518 Sequence<RefPtr<TestCallbackInterface>> &arr = rvalDecl;
51519 JS::Rooted<JS::Value> temp(cx);
51520 while (true) {
51521 bool done;
51522 if (!iter.next(&temp, &done)) {
51523 aRv.Throw(NS_ERROR_UNEXPECTED);
51524 return;
51525 }
51526 if (done) {
51527 break;
51528 }
51529 RefPtr<TestCallbackInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
51530 if (!slotPtr) {
51531 JS_ReportOutOfMemory(cx);
51532 aRv.Throw(NS_ERROR_UNEXPECTED);
51533 return;
51534 }
51535 RefPtr<TestCallbackInterface>& slot = *slotPtr;
51536 if (temp.isObject()) {
51537 { // scope for tempRoot and tempGlobalRoot if needed
51538 JS::Rooted<JSObject*> tempRoot(cx, &temp.toObject());
51539 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
51540 slot = new TestCallbackInterface(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
51541 }
51542 } else if (temp.isNullOrUndefined()) {
51543 slot = nullptr;
51544 } else {
51545 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveNullableCallbackObjectSequence");
51546 aRv.Throw(NS_ERROR_UNEXPECTED);
51547 return;
51548 }
51549 }
51550 } else {
51551 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableCallbackObjectSequence", "sequence");
51552 aRv.Throw(NS_ERROR_UNEXPECTED);
51553 return;
51554 }
51555 aRetVal = std::move(rvalDecl);
51556}
51557
51558void
51559TestJSImplInterfaceJSImpl::ReceiveCastableObjectNullableSequence(Nullable<nsTArray<RefPtr<TestJSImplInterface>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
51560{
51561 CallSetup s(this, aRv, "TestJSImplInterface.receiveCastableObjectNullableSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
51562 if (aRv.Failed()) {
51563 return;
51564 }
51565 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 51565); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 51565; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
51566 BindingCallContext& cx = s.GetCallContext();
51567
51568 JS::Rooted<JS::Value> rval(cx);
51569
51570 JS::Rooted<JS::Value> callable(cx);
51571 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
51572 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
51573 !InitIds(cx, atomsCache)) ||
51574 !GetCallableProperty(cx, atomsCache->receiveCastableObjectNullableSequence_id, &callable)) {
51575 aRv.Throw(NS_ERROR_UNEXPECTED);
51576 return;
51577 }
51578 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
51579 if (!JS::Call(cx, thisValue, callable,
51580 JS::HandleValueArray::empty(), &rval)) {
51581 aRv.NoteJSContextException(cx);
51582 return;
51583 }
51584 Nullable<Sequence<RefPtr<mozilla::dom::TestJSImplInterface>>> rvalDecl;
51585 if (rval.isObject()) {
51586 JS::ForOfIterator iter(cx);
51587 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
51588 aRv.Throw(NS_ERROR_UNEXPECTED);
51589 return;
51590 }
51591 if (!iter.valueIsIterable()) {
51592 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveCastableObjectNullableSequence", "sequence");
51593 aRv.Throw(NS_ERROR_UNEXPECTED);
51594 return;
51595 }
51596 Sequence<RefPtr<mozilla::dom::TestJSImplInterface>> &arr = rvalDecl.SetValue();
51597 JS::Rooted<JS::Value> temp(cx);
51598 while (true) {
51599 bool done;
51600 if (!iter.next(&temp, &done)) {
51601 aRv.Throw(NS_ERROR_UNEXPECTED);
51602 return;
51603 }
51604 if (done) {
51605 break;
51606 }
51607 RefPtr<mozilla::dom::TestJSImplInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
51608 if (!slotPtr) {
51609 JS_ReportOutOfMemory(cx);
51610 aRv.Throw(NS_ERROR_UNEXPECTED);
51611 return;
51612 }
51613 RefPtr<mozilla::dom::TestJSImplInterface>& slot = *slotPtr;
51614 if (temp.isObject()) {
51615 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
51616 {
51617 // Our JSContext should be in the right global to do unwrapping in.
51618 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(&temp, slot, cx);
51619 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
51620 // Be careful to not wrap random DOM objects here, even if
51621 // they're wrapped in opaque security wrappers for some reason.
51622 // XXXbz Wish we could check for a JS-implemented object
51623 // that already has a content reflection...
51624 if (!IsDOMObject(js::UncheckedUnwrap(&temp.toObject()))) {
51625 nsCOMPtr<nsIGlobalObject> contentGlobal;
51626 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
51627 if (!callback ||
51628 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
51629 aRv.Throw(NS_ERROR_UNEXPECTED);
51630 return;
51631 }
51632 JS::Rooted<JSObject*> jsImplSourceObj(cx, &temp.toObject());
51633 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 51634); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 51634; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
51634 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 51634); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 51634; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
51635 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
51636 slot = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
51637 } else {
51638 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of return value of TestJSImplInterface.receiveCastableObjectNullableSequence", "TestJSImplInterface");
51639 aRv.Throw(NS_ERROR_UNEXPECTED);
51640 return;
51641 }
51642 }
51643 }
51644 } else {
51645 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveCastableObjectNullableSequence");
51646 aRv.Throw(NS_ERROR_UNEXPECTED);
51647 return;
51648 }
51649 }
51650 } else if (rval.isNullOrUndefined()) {
51651 rvalDecl.SetNull();
51652 } else {
51653 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveCastableObjectNullableSequence", "sequence");
51654 aRv.Throw(NS_ERROR_UNEXPECTED);
51655 return;
51656 }
51657 if (rvalDecl.IsNull()) {
51658 aRetVal.SetNull();
51659 } else {
51660 aRetVal.SetValue() = std::move(rvalDecl.Value());
51661 }
51662}
51663
51664void
51665TestJSImplInterfaceJSImpl::ReceiveNullableCastableObjectNullableSequence(Nullable<nsTArray<RefPtr<TestJSImplInterface>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
51666{
51667 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableCastableObjectNullableSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
51668 if (aRv.Failed()) {
51669 return;
51670 }
51671 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 51671); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 51671; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
51672 BindingCallContext& cx = s.GetCallContext();
51673
51674 JS::Rooted<JS::Value> rval(cx);
51675
51676 JS::Rooted<JS::Value> callable(cx);
51677 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
51678 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
51679 !InitIds(cx, atomsCache)) ||
51680 !GetCallableProperty(cx, atomsCache->receiveNullableCastableObjectNullableSequence_id, &callable)) {
51681 aRv.Throw(NS_ERROR_UNEXPECTED);
51682 return;
51683 }
51684 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
51685 if (!JS::Call(cx, thisValue, callable,
51686 JS::HandleValueArray::empty(), &rval)) {
51687 aRv.NoteJSContextException(cx);
51688 return;
51689 }
51690 Nullable<Sequence<RefPtr<mozilla::dom::TestJSImplInterface>>> rvalDecl;
51691 if (rval.isObject()) {
51692 JS::ForOfIterator iter(cx);
51693 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
51694 aRv.Throw(NS_ERROR_UNEXPECTED);
51695 return;
51696 }
51697 if (!iter.valueIsIterable()) {
51698 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableCastableObjectNullableSequence", "sequence");
51699 aRv.Throw(NS_ERROR_UNEXPECTED);
51700 return;
51701 }
51702 Sequence<RefPtr<mozilla::dom::TestJSImplInterface>> &arr = rvalDecl.SetValue();
51703 JS::Rooted<JS::Value> temp(cx);
51704 while (true) {
51705 bool done;
51706 if (!iter.next(&temp, &done)) {
51707 aRv.Throw(NS_ERROR_UNEXPECTED);
51708 return;
51709 }
51710 if (done) {
51711 break;
51712 }
51713 RefPtr<mozilla::dom::TestJSImplInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
51714 if (!slotPtr) {
51715 JS_ReportOutOfMemory(cx);
51716 aRv.Throw(NS_ERROR_UNEXPECTED);
51717 return;
51718 }
51719 RefPtr<mozilla::dom::TestJSImplInterface>& slot = *slotPtr;
51720 if (temp.isObject()) {
51721 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
51722 {
51723 // Our JSContext should be in the right global to do unwrapping in.
51724 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(&temp, slot, cx);
51725 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
51726 // Be careful to not wrap random DOM objects here, even if
51727 // they're wrapped in opaque security wrappers for some reason.
51728 // XXXbz Wish we could check for a JS-implemented object
51729 // that already has a content reflection...
51730 if (!IsDOMObject(js::UncheckedUnwrap(&temp.toObject()))) {
51731 nsCOMPtr<nsIGlobalObject> contentGlobal;
51732 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
51733 if (!callback ||
51734 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
51735 aRv.Throw(NS_ERROR_UNEXPECTED);
51736 return;
51737 }
51738 JS::Rooted<JSObject*> jsImplSourceObj(cx, &temp.toObject());
51739 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 51740); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 51740; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
51740 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 51740); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 51740; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
51741 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
51742 slot = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
51743 } else {
51744 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of return value of TestJSImplInterface.receiveNullableCastableObjectNullableSequence", "TestJSImplInterface");
51745 aRv.Throw(NS_ERROR_UNEXPECTED);
51746 return;
51747 }
51748 }
51749 }
51750 } else if (temp.isNullOrUndefined()) {
51751 slot = nullptr;
51752 } else {
51753 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveNullableCastableObjectNullableSequence");
51754 aRv.Throw(NS_ERROR_UNEXPECTED);
51755 return;
51756 }
51757 }
51758 } else if (rval.isNullOrUndefined()) {
51759 rvalDecl.SetNull();
51760 } else {
51761 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableCastableObjectNullableSequence", "sequence");
51762 aRv.Throw(NS_ERROR_UNEXPECTED);
51763 return;
51764 }
51765 if (rvalDecl.IsNull()) {
51766 aRetVal.SetNull();
51767 } else {
51768 aRetVal.SetValue() = std::move(rvalDecl.Value());
51769 }
51770}
51771
51772void
51773TestJSImplInterfaceJSImpl::ReceiveWeakCastableObjectSequence(nsTArray<RefPtr<TestJSImplInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
51774{
51775 CallSetup s(this, aRv, "TestJSImplInterface.receiveWeakCastableObjectSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
51776 if (aRv.Failed()) {
51777 return;
51778 }
51779 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 51779); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 51779; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
51780 BindingCallContext& cx = s.GetCallContext();
51781
51782 JS::Rooted<JS::Value> rval(cx);
51783
51784 JS::Rooted<JS::Value> callable(cx);
51785 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
51786 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
51787 !InitIds(cx, atomsCache)) ||
51788 !GetCallableProperty(cx, atomsCache->receiveWeakCastableObjectSequence_id, &callable)) {
51789 aRv.Throw(NS_ERROR_UNEXPECTED);
51790 return;
51791 }
51792 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
51793 if (!JS::Call(cx, thisValue, callable,
51794 JS::HandleValueArray::empty(), &rval)) {
51795 aRv.NoteJSContextException(cx);
51796 return;
51797 }
51798 Sequence<RefPtr<mozilla::dom::TestJSImplInterface>> rvalDecl;
51799 if (rval.isObject()) {
51800 JS::ForOfIterator iter(cx);
51801 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
51802 aRv.Throw(NS_ERROR_UNEXPECTED);
51803 return;
51804 }
51805 if (!iter.valueIsIterable()) {
51806 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveWeakCastableObjectSequence", "sequence");
51807 aRv.Throw(NS_ERROR_UNEXPECTED);
51808 return;
51809 }
51810 Sequence<RefPtr<mozilla::dom::TestJSImplInterface>> &arr = rvalDecl;
51811 JS::Rooted<JS::Value> temp(cx);
51812 while (true) {
51813 bool done;
51814 if (!iter.next(&temp, &done)) {
51815 aRv.Throw(NS_ERROR_UNEXPECTED);
51816 return;
51817 }
51818 if (done) {
51819 break;
51820 }
51821 RefPtr<mozilla::dom::TestJSImplInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
51822 if (!slotPtr) {
51823 JS_ReportOutOfMemory(cx);
51824 aRv.Throw(NS_ERROR_UNEXPECTED);
51825 return;
51826 }
51827 RefPtr<mozilla::dom::TestJSImplInterface>& slot = *slotPtr;
51828 if (temp.isObject()) {
51829 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
51830 {
51831 // Our JSContext should be in the right global to do unwrapping in.
51832 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(&temp, slot, cx);
51833 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
51834 // Be careful to not wrap random DOM objects here, even if
51835 // they're wrapped in opaque security wrappers for some reason.
51836 // XXXbz Wish we could check for a JS-implemented object
51837 // that already has a content reflection...
51838 if (!IsDOMObject(js::UncheckedUnwrap(&temp.toObject()))) {
51839 nsCOMPtr<nsIGlobalObject> contentGlobal;
51840 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
51841 if (!callback ||
51842 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
51843 aRv.Throw(NS_ERROR_UNEXPECTED);
51844 return;
51845 }
51846 JS::Rooted<JSObject*> jsImplSourceObj(cx, &temp.toObject());
51847 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 51848); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 51848; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
51848 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 51848); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 51848; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
51849 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
51850 slot = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
51851 } else {
51852 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of return value of TestJSImplInterface.receiveWeakCastableObjectSequence", "TestJSImplInterface");
51853 aRv.Throw(NS_ERROR_UNEXPECTED);
51854 return;
51855 }
51856 }
51857 }
51858 } else {
51859 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveWeakCastableObjectSequence");
51860 aRv.Throw(NS_ERROR_UNEXPECTED);
51861 return;
51862 }
51863 }
51864 } else {
51865 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveWeakCastableObjectSequence", "sequence");
51866 aRv.Throw(NS_ERROR_UNEXPECTED);
51867 return;
51868 }
51869 aRetVal = std::move(rvalDecl);
51870}
51871
51872void
51873TestJSImplInterfaceJSImpl::ReceiveWeakNullableCastableObjectSequence(nsTArray<RefPtr<TestJSImplInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
51874{
51875 CallSetup s(this, aRv, "TestJSImplInterface.receiveWeakNullableCastableObjectSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
51876 if (aRv.Failed()) {
51877 return;
51878 }
51879 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 51879); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 51879; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
51880 BindingCallContext& cx = s.GetCallContext();
51881
51882 JS::Rooted<JS::Value> rval(cx);
51883
51884 JS::Rooted<JS::Value> callable(cx);
51885 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
51886 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
51887 !InitIds(cx, atomsCache)) ||
51888 !GetCallableProperty(cx, atomsCache->receiveWeakNullableCastableObjectSequence_id, &callable)) {
51889 aRv.Throw(NS_ERROR_UNEXPECTED);
51890 return;
51891 }
51892 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
51893 if (!JS::Call(cx, thisValue, callable,
51894 JS::HandleValueArray::empty(), &rval)) {
51895 aRv.NoteJSContextException(cx);
51896 return;
51897 }
51898 Sequence<RefPtr<mozilla::dom::TestJSImplInterface>> rvalDecl;
51899 if (rval.isObject()) {
51900 JS::ForOfIterator iter(cx);
51901 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
51902 aRv.Throw(NS_ERROR_UNEXPECTED);
51903 return;
51904 }
51905 if (!iter.valueIsIterable()) {
51906 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveWeakNullableCastableObjectSequence", "sequence");
51907 aRv.Throw(NS_ERROR_UNEXPECTED);
51908 return;
51909 }
51910 Sequence<RefPtr<mozilla::dom::TestJSImplInterface>> &arr = rvalDecl;
51911 JS::Rooted<JS::Value> temp(cx);
51912 while (true) {
51913 bool done;
51914 if (!iter.next(&temp, &done)) {
51915 aRv.Throw(NS_ERROR_UNEXPECTED);
51916 return;
51917 }
51918 if (done) {
51919 break;
51920 }
51921 RefPtr<mozilla::dom::TestJSImplInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
51922 if (!slotPtr) {
51923 JS_ReportOutOfMemory(cx);
51924 aRv.Throw(NS_ERROR_UNEXPECTED);
51925 return;
51926 }
51927 RefPtr<mozilla::dom::TestJSImplInterface>& slot = *slotPtr;
51928 if (temp.isObject()) {
51929 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
51930 {
51931 // Our JSContext should be in the right global to do unwrapping in.
51932 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(&temp, slot, cx);
51933 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
51934 // Be careful to not wrap random DOM objects here, even if
51935 // they're wrapped in opaque security wrappers for some reason.
51936 // XXXbz Wish we could check for a JS-implemented object
51937 // that already has a content reflection...
51938 if (!IsDOMObject(js::UncheckedUnwrap(&temp.toObject()))) {
51939 nsCOMPtr<nsIGlobalObject> contentGlobal;
51940 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
51941 if (!callback ||
51942 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
51943 aRv.Throw(NS_ERROR_UNEXPECTED);
51944 return;
51945 }
51946 JS::Rooted<JSObject*> jsImplSourceObj(cx, &temp.toObject());
51947 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 51948); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 51948; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
51948 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 51948); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 51948; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
51949 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
51950 slot = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
51951 } else {
51952 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of return value of TestJSImplInterface.receiveWeakNullableCastableObjectSequence", "TestJSImplInterface");
51953 aRv.Throw(NS_ERROR_UNEXPECTED);
51954 return;
51955 }
51956 }
51957 }
51958 } else if (temp.isNullOrUndefined()) {
51959 slot = nullptr;
51960 } else {
51961 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveWeakNullableCastableObjectSequence");
51962 aRv.Throw(NS_ERROR_UNEXPECTED);
51963 return;
51964 }
51965 }
51966 } else {
51967 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveWeakNullableCastableObjectSequence", "sequence");
51968 aRv.Throw(NS_ERROR_UNEXPECTED);
51969 return;
51970 }
51971 aRetVal = std::move(rvalDecl);
51972}
51973
51974void
51975TestJSImplInterfaceJSImpl::ReceiveWeakCastableObjectNullableSequence(Nullable<nsTArray<RefPtr<TestJSImplInterface>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
51976{
51977 CallSetup s(this, aRv, "TestJSImplInterface.receiveWeakCastableObjectNullableSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
51978 if (aRv.Failed()) {
51979 return;
51980 }
51981 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 51981); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 51981; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
51982 BindingCallContext& cx = s.GetCallContext();
51983
51984 JS::Rooted<JS::Value> rval(cx);
51985
51986 JS::Rooted<JS::Value> callable(cx);
51987 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
51988 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
51989 !InitIds(cx, atomsCache)) ||
51990 !GetCallableProperty(cx, atomsCache->receiveWeakCastableObjectNullableSequence_id, &callable)) {
51991 aRv.Throw(NS_ERROR_UNEXPECTED);
51992 return;
51993 }
51994 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
51995 if (!JS::Call(cx, thisValue, callable,
51996 JS::HandleValueArray::empty(), &rval)) {
51997 aRv.NoteJSContextException(cx);
51998 return;
51999 }
52000 Nullable<Sequence<RefPtr<mozilla::dom::TestJSImplInterface>>> rvalDecl;
52001 if (rval.isObject()) {
52002 JS::ForOfIterator iter(cx);
52003 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
52004 aRv.Throw(NS_ERROR_UNEXPECTED);
52005 return;
52006 }
52007 if (!iter.valueIsIterable()) {
52008 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveWeakCastableObjectNullableSequence", "sequence");
52009 aRv.Throw(NS_ERROR_UNEXPECTED);
52010 return;
52011 }
52012 Sequence<RefPtr<mozilla::dom::TestJSImplInterface>> &arr = rvalDecl.SetValue();
52013 JS::Rooted<JS::Value> temp(cx);
52014 while (true) {
52015 bool done;
52016 if (!iter.next(&temp, &done)) {
52017 aRv.Throw(NS_ERROR_UNEXPECTED);
52018 return;
52019 }
52020 if (done) {
52021 break;
52022 }
52023 RefPtr<mozilla::dom::TestJSImplInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
52024 if (!slotPtr) {
52025 JS_ReportOutOfMemory(cx);
52026 aRv.Throw(NS_ERROR_UNEXPECTED);
52027 return;
52028 }
52029 RefPtr<mozilla::dom::TestJSImplInterface>& slot = *slotPtr;
52030 if (temp.isObject()) {
52031 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
52032 {
52033 // Our JSContext should be in the right global to do unwrapping in.
52034 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(&temp, slot, cx);
52035 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
52036 // Be careful to not wrap random DOM objects here, even if
52037 // they're wrapped in opaque security wrappers for some reason.
52038 // XXXbz Wish we could check for a JS-implemented object
52039 // that already has a content reflection...
52040 if (!IsDOMObject(js::UncheckedUnwrap(&temp.toObject()))) {
52041 nsCOMPtr<nsIGlobalObject> contentGlobal;
52042 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
52043 if (!callback ||
52044 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
52045 aRv.Throw(NS_ERROR_UNEXPECTED);
52046 return;
52047 }
52048 JS::Rooted<JSObject*> jsImplSourceObj(cx, &temp.toObject());
52049 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 52050); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 52050; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
52050 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 52050); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 52050; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
52051 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
52052 slot = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
52053 } else {
52054 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of return value of TestJSImplInterface.receiveWeakCastableObjectNullableSequence", "TestJSImplInterface");
52055 aRv.Throw(NS_ERROR_UNEXPECTED);
52056 return;
52057 }
52058 }
52059 }
52060 } else {
52061 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveWeakCastableObjectNullableSequence");
52062 aRv.Throw(NS_ERROR_UNEXPECTED);
52063 return;
52064 }
52065 }
52066 } else if (rval.isNullOrUndefined()) {
52067 rvalDecl.SetNull();
52068 } else {
52069 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveWeakCastableObjectNullableSequence", "sequence");
52070 aRv.Throw(NS_ERROR_UNEXPECTED);
52071 return;
52072 }
52073 if (rvalDecl.IsNull()) {
52074 aRetVal.SetNull();
52075 } else {
52076 aRetVal.SetValue() = std::move(rvalDecl.Value());
52077 }
52078}
52079
52080void
52081TestJSImplInterfaceJSImpl::ReceiveWeakNullableCastableObjectNullableSequence(Nullable<nsTArray<RefPtr<TestJSImplInterface>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
52082{
52083 CallSetup s(this, aRv, "TestJSImplInterface.receiveWeakNullableCastableObjectNullableSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
52084 if (aRv.Failed()) {
52085 return;
52086 }
52087 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 52087); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 52087; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52088 BindingCallContext& cx = s.GetCallContext();
52089
52090 JS::Rooted<JS::Value> rval(cx);
52091
52092 JS::Rooted<JS::Value> callable(cx);
52093 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
52094 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
52095 !InitIds(cx, atomsCache)) ||
52096 !GetCallableProperty(cx, atomsCache->receiveWeakNullableCastableObjectNullableSequence_id, &callable)) {
52097 aRv.Throw(NS_ERROR_UNEXPECTED);
52098 return;
52099 }
52100 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
52101 if (!JS::Call(cx, thisValue, callable,
52102 JS::HandleValueArray::empty(), &rval)) {
52103 aRv.NoteJSContextException(cx);
52104 return;
52105 }
52106 Nullable<Sequence<RefPtr<mozilla::dom::TestJSImplInterface>>> rvalDecl;
52107 if (rval.isObject()) {
52108 JS::ForOfIterator iter(cx);
52109 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
52110 aRv.Throw(NS_ERROR_UNEXPECTED);
52111 return;
52112 }
52113 if (!iter.valueIsIterable()) {
52114 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveWeakNullableCastableObjectNullableSequence", "sequence");
52115 aRv.Throw(NS_ERROR_UNEXPECTED);
52116 return;
52117 }
52118 Sequence<RefPtr<mozilla::dom::TestJSImplInterface>> &arr = rvalDecl.SetValue();
52119 JS::Rooted<JS::Value> temp(cx);
52120 while (true) {
52121 bool done;
52122 if (!iter.next(&temp, &done)) {
52123 aRv.Throw(NS_ERROR_UNEXPECTED);
52124 return;
52125 }
52126 if (done) {
52127 break;
52128 }
52129 RefPtr<mozilla::dom::TestJSImplInterface>* slotPtr = arr.AppendElement(mozilla::fallible);
52130 if (!slotPtr) {
52131 JS_ReportOutOfMemory(cx);
52132 aRv.Throw(NS_ERROR_UNEXPECTED);
52133 return;
52134 }
52135 RefPtr<mozilla::dom::TestJSImplInterface>& slot = *slotPtr;
52136 if (temp.isObject()) {
52137 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
52138 {
52139 // Our JSContext should be in the right global to do unwrapping in.
52140 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(&temp, slot, cx);
52141 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
52142 // Be careful to not wrap random DOM objects here, even if
52143 // they're wrapped in opaque security wrappers for some reason.
52144 // XXXbz Wish we could check for a JS-implemented object
52145 // that already has a content reflection...
52146 if (!IsDOMObject(js::UncheckedUnwrap(&temp.toObject()))) {
52147 nsCOMPtr<nsIGlobalObject> contentGlobal;
52148 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
52149 if (!callback ||
52150 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
52151 aRv.Throw(NS_ERROR_UNEXPECTED);
52152 return;
52153 }
52154 JS::Rooted<JSObject*> jsImplSourceObj(cx, &temp.toObject());
52155 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 52156); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 52156; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
52156 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 52156); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 52156; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
52157 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
52158 slot = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
52159 } else {
52160 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Element of return value of TestJSImplInterface.receiveWeakNullableCastableObjectNullableSequence", "TestJSImplInterface");
52161 aRv.Throw(NS_ERROR_UNEXPECTED);
52162 return;
52163 }
52164 }
52165 }
52166 } else if (temp.isNullOrUndefined()) {
52167 slot = nullptr;
52168 } else {
52169 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveWeakNullableCastableObjectNullableSequence");
52170 aRv.Throw(NS_ERROR_UNEXPECTED);
52171 return;
52172 }
52173 }
52174 } else if (rval.isNullOrUndefined()) {
52175 rvalDecl.SetNull();
52176 } else {
52177 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveWeakNullableCastableObjectNullableSequence", "sequence");
52178 aRv.Throw(NS_ERROR_UNEXPECTED);
52179 return;
52180 }
52181 if (rvalDecl.IsNull()) {
52182 aRetVal.SetNull();
52183 } else {
52184 aRetVal.SetValue() = std::move(rvalDecl.Value());
52185 }
52186}
52187
52188void
52189TestJSImplInterfaceJSImpl::PassCastableObjectSequence(const Sequence<OwningNonNull<TestJSImplInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
52190{
52191 CallSetup s(this, aRv, "TestJSImplInterface.passCastableObjectSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
52192 if (aRv.Failed()) {
52193 return;
52194 }
52195 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 52195); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 52195; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52196 BindingCallContext& cx = s.GetCallContext();
52197
52198 JS::Rooted<JS::Value> rval(cx);
52199 JS::RootedVector<JS::Value> argv(cx);
52200 if (!argv.resize(1)) {
52201 // That threw an exception on the JSContext, and our CallSetup will do
52202 // the right thing with that.
52203 return;
52204 }
52205 unsigned argc = 1;
52206
52207 do {
52208
52209 uint32_t length = arg.Length();
52210 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
52211 if (!returnArray) {
52212 aRv.Throw(NS_ERROR_UNEXPECTED);
52213 return;
52214 }
52215 // Scope for 'tmp'
52216 {
52217 JS::Rooted<JS::Value> tmp(cx);
52218 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
52219 // Control block to let us common up the JS_DefineElement calls when there
52220 // are different ways to succeed at wrapping the object.
52221 do {
52222 if (!GetOrCreateDOMReflector(cx, arg[sequenceIdx0], &tmp)) {
52223 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 52223); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 52223; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52224 aRv.Throw(NS_ERROR_UNEXPECTED);
52225 return;
52226 }
52227 break;
52228 } while (false);
52229 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
52230 JSPROP_ENUMERATE)) {
52231 aRv.Throw(NS_ERROR_UNEXPECTED);
52232 return;
52233 }
52234 }
52235 }
52236 argv[0].setObject(*returnArray);
52237 break;
52238 } while (false);
52239
52240 JS::Rooted<JS::Value> callable(cx);
52241 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
52242 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
52243 !InitIds(cx, atomsCache)) ||
52244 !GetCallableProperty(cx, atomsCache->passCastableObjectSequence_id, &callable)) {
52245 aRv.Throw(NS_ERROR_UNEXPECTED);
52246 return;
52247 }
52248 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
52249 if (!JS::Call(cx, thisValue, callable,
52250 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
52251 aRv.NoteJSContextException(cx);
52252 return;
52253 }
52254}
52255
52256void
52257TestJSImplInterfaceJSImpl::PassNullableCastableObjectSequence(const Sequence<RefPtr<TestJSImplInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
52258{
52259 CallSetup s(this, aRv, "TestJSImplInterface.passNullableCastableObjectSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
52260 if (aRv.Failed()) {
52261 return;
52262 }
52263 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 52263); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 52263; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52264 BindingCallContext& cx = s.GetCallContext();
52265
52266 JS::Rooted<JS::Value> rval(cx);
52267 JS::RootedVector<JS::Value> argv(cx);
52268 if (!argv.resize(1)) {
52269 // That threw an exception on the JSContext, and our CallSetup will do
52270 // the right thing with that.
52271 return;
52272 }
52273 unsigned argc = 1;
52274
52275 do {
52276
52277 uint32_t length = arg.Length();
52278 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
52279 if (!returnArray) {
52280 aRv.Throw(NS_ERROR_UNEXPECTED);
52281 return;
52282 }
52283 // Scope for 'tmp'
52284 {
52285 JS::Rooted<JS::Value> tmp(cx);
52286 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
52287 // Control block to let us common up the JS_DefineElement calls when there
52288 // are different ways to succeed at wrapping the object.
52289 do {
52290 if (!arg[sequenceIdx0]) {
52291 tmp.setNull();
52292 break;
52293 }
52294 if (!GetOrCreateDOMReflector(cx, arg[sequenceIdx0], &tmp)) {
52295 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 52295); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 52295; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52296 aRv.Throw(NS_ERROR_UNEXPECTED);
52297 return;
52298 }
52299 break;
52300 } while (false);
52301 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
52302 JSPROP_ENUMERATE)) {
52303 aRv.Throw(NS_ERROR_UNEXPECTED);
52304 return;
52305 }
52306 }
52307 }
52308 argv[0].setObject(*returnArray);
52309 break;
52310 } while (false);
52311
52312 JS::Rooted<JS::Value> callable(cx);
52313 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
52314 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
52315 !InitIds(cx, atomsCache)) ||
52316 !GetCallableProperty(cx, atomsCache->passNullableCastableObjectSequence_id, &callable)) {
52317 aRv.Throw(NS_ERROR_UNEXPECTED);
52318 return;
52319 }
52320 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
52321 if (!JS::Call(cx, thisValue, callable,
52322 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
52323 aRv.NoteJSContextException(cx);
52324 return;
52325 }
52326}
52327
52328void
52329TestJSImplInterfaceJSImpl::PassCastableObjectNullableSequence(const Nullable<Sequence<OwningNonNull<TestJSImplInterface>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
52330{
52331 CallSetup s(this, aRv, "TestJSImplInterface.passCastableObjectNullableSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
52332 if (aRv.Failed()) {
52333 return;
52334 }
52335 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 52335); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 52335; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52336 BindingCallContext& cx = s.GetCallContext();
52337
52338 JS::Rooted<JS::Value> rval(cx);
52339 JS::RootedVector<JS::Value> argv(cx);
52340 if (!argv.resize(1)) {
52341 // That threw an exception on the JSContext, and our CallSetup will do
52342 // the right thing with that.
52343 return;
52344 }
52345 unsigned argc = 1;
52346
52347 do {
52348
52349 if (arg.IsNull()) {
52350 argv[0].setNull();
52351 break;
52352 }
52353
52354 uint32_t length = arg.Value().Length();
52355 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
52356 if (!returnArray) {
52357 aRv.Throw(NS_ERROR_UNEXPECTED);
52358 return;
52359 }
52360 // Scope for 'tmp'
52361 {
52362 JS::Rooted<JS::Value> tmp(cx);
52363 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
52364 // Control block to let us common up the JS_DefineElement calls when there
52365 // are different ways to succeed at wrapping the object.
52366 do {
52367 if (!GetOrCreateDOMReflector(cx, arg.Value()[sequenceIdx0], &tmp)) {
52368 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 52368); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 52368; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52369 aRv.Throw(NS_ERROR_UNEXPECTED);
52370 return;
52371 }
52372 break;
52373 } while (false);
52374 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
52375 JSPROP_ENUMERATE)) {
52376 aRv.Throw(NS_ERROR_UNEXPECTED);
52377 return;
52378 }
52379 }
52380 }
52381 argv[0].setObject(*returnArray);
52382 break;
52383 } while (false);
52384
52385 JS::Rooted<JS::Value> callable(cx);
52386 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
52387 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
52388 !InitIds(cx, atomsCache)) ||
52389 !GetCallableProperty(cx, atomsCache->passCastableObjectNullableSequence_id, &callable)) {
52390 aRv.Throw(NS_ERROR_UNEXPECTED);
52391 return;
52392 }
52393 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
52394 if (!JS::Call(cx, thisValue, callable,
52395 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
52396 aRv.NoteJSContextException(cx);
52397 return;
52398 }
52399}
52400
52401void
52402TestJSImplInterfaceJSImpl::PassNullableCastableObjectNullableSequence(const Nullable<Sequence<RefPtr<TestJSImplInterface>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
52403{
52404 CallSetup s(this, aRv, "TestJSImplInterface.passNullableCastableObjectNullableSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
52405 if (aRv.Failed()) {
52406 return;
52407 }
52408 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 52408); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 52408; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52409 BindingCallContext& cx = s.GetCallContext();
52410
52411 JS::Rooted<JS::Value> rval(cx);
52412 JS::RootedVector<JS::Value> argv(cx);
52413 if (!argv.resize(1)) {
52414 // That threw an exception on the JSContext, and our CallSetup will do
52415 // the right thing with that.
52416 return;
52417 }
52418 unsigned argc = 1;
52419
52420 do {
52421
52422 if (arg.IsNull()) {
52423 argv[0].setNull();
52424 break;
52425 }
52426
52427 uint32_t length = arg.Value().Length();
52428 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
52429 if (!returnArray) {
52430 aRv.Throw(NS_ERROR_UNEXPECTED);
52431 return;
52432 }
52433 // Scope for 'tmp'
52434 {
52435 JS::Rooted<JS::Value> tmp(cx);
52436 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
52437 // Control block to let us common up the JS_DefineElement calls when there
52438 // are different ways to succeed at wrapping the object.
52439 do {
52440 if (!arg.Value()[sequenceIdx0]) {
52441 tmp.setNull();
52442 break;
52443 }
52444 if (!GetOrCreateDOMReflector(cx, arg.Value()[sequenceIdx0], &tmp)) {
52445 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 52445); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 52445; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52446 aRv.Throw(NS_ERROR_UNEXPECTED);
52447 return;
52448 }
52449 break;
52450 } while (false);
52451 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
52452 JSPROP_ENUMERATE)) {
52453 aRv.Throw(NS_ERROR_UNEXPECTED);
52454 return;
52455 }
52456 }
52457 }
52458 argv[0].setObject(*returnArray);
52459 break;
52460 } while (false);
52461
52462 JS::Rooted<JS::Value> callable(cx);
52463 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
52464 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
52465 !InitIds(cx, atomsCache)) ||
52466 !GetCallableProperty(cx, atomsCache->passNullableCastableObjectNullableSequence_id, &callable)) {
52467 aRv.Throw(NS_ERROR_UNEXPECTED);
52468 return;
52469 }
52470 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
52471 if (!JS::Call(cx, thisValue, callable,
52472 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
52473 aRv.NoteJSContextException(cx);
52474 return;
52475 }
52476}
52477
52478void
52479TestJSImplInterfaceJSImpl::PassOptionalSequence(const Optional<Sequence<int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
52480{
52481 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
52482 if (aRv.Failed()) {
52483 return;
52484 }
52485 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 52485); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 52485; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52486 BindingCallContext& cx = s.GetCallContext();
52487
52488 JS::Rooted<JS::Value> rval(cx);
52489 JS::RootedVector<JS::Value> argv(cx);
52490 if (!argv.resize(1)) {
52491 // That threw an exception on the JSContext, and our CallSetup will do
52492 // the right thing with that.
52493 return;
52494 }
52495 unsigned argc = 1;
52496
52497 do {
52498 if (arg.WasPassed()) {
52499
52500 uint32_t length = arg.Value().Length();
52501 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
52502 if (!returnArray) {
52503 aRv.Throw(NS_ERROR_UNEXPECTED);
52504 return;
52505 }
52506 // Scope for 'tmp'
52507 {
52508 JS::Rooted<JS::Value> tmp(cx);
52509 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
52510 // Control block to let us common up the JS_DefineElement calls when there
52511 // are different ways to succeed at wrapping the object.
52512 do {
52513 tmp.setInt32(int32_t(arg.Value()[sequenceIdx0]));
52514 break;
52515 } while (false);
52516 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
52517 JSPROP_ENUMERATE)) {
52518 aRv.Throw(NS_ERROR_UNEXPECTED);
52519 return;
52520 }
52521 }
52522 }
52523 argv[0].setObject(*returnArray);
52524 break;
52525 } else if (argc == 1) {
52526 // This is our current trailing argument; reduce argc
52527 --argc;
52528 } else {
52529 argv[0].setUndefined();
52530 }
52531 } while (false);
52532
52533 JS::Rooted<JS::Value> callable(cx);
52534 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
52535 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
52536 !InitIds(cx, atomsCache)) ||
52537 !GetCallableProperty(cx, atomsCache->passOptionalSequence_id, &callable)) {
52538 aRv.Throw(NS_ERROR_UNEXPECTED);
52539 return;
52540 }
52541 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
52542 if (!JS::Call(cx, thisValue, callable,
52543 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
52544 aRv.NoteJSContextException(cx);
52545 return;
52546 }
52547}
52548
52549void
52550TestJSImplInterfaceJSImpl::PassOptionalSequenceWithDefaultValue(const Sequence<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
52551{
52552 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalSequenceWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
52553 if (aRv.Failed()) {
52554 return;
52555 }
52556 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 52556); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 52556; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52557 BindingCallContext& cx = s.GetCallContext();
52558
52559 JS::Rooted<JS::Value> rval(cx);
52560 JS::RootedVector<JS::Value> argv(cx);
52561 if (!argv.resize(1)) {
52562 // That threw an exception on the JSContext, and our CallSetup will do
52563 // the right thing with that.
52564 return;
52565 }
52566 unsigned argc = 1;
52567
52568 do {
52569
52570 uint32_t length = arg.Length();
52571 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
52572 if (!returnArray) {
52573 aRv.Throw(NS_ERROR_UNEXPECTED);
52574 return;
52575 }
52576 // Scope for 'tmp'
52577 {
52578 JS::Rooted<JS::Value> tmp(cx);
52579 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
52580 // Control block to let us common up the JS_DefineElement calls when there
52581 // are different ways to succeed at wrapping the object.
52582 do {
52583 tmp.setInt32(int32_t(arg[sequenceIdx0]));
52584 break;
52585 } while (false);
52586 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
52587 JSPROP_ENUMERATE)) {
52588 aRv.Throw(NS_ERROR_UNEXPECTED);
52589 return;
52590 }
52591 }
52592 }
52593 argv[0].setObject(*returnArray);
52594 break;
52595 } while (false);
52596
52597 JS::Rooted<JS::Value> callable(cx);
52598 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
52599 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
52600 !InitIds(cx, atomsCache)) ||
52601 !GetCallableProperty(cx, atomsCache->passOptionalSequenceWithDefaultValue_id, &callable)) {
52602 aRv.Throw(NS_ERROR_UNEXPECTED);
52603 return;
52604 }
52605 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
52606 if (!JS::Call(cx, thisValue, callable,
52607 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
52608 aRv.NoteJSContextException(cx);
52609 return;
52610 }
52611}
52612
52613void
52614TestJSImplInterfaceJSImpl::PassOptionalNullableSequence(const Optional<Nullable<Sequence<int32_t>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
52615{
52616 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
52617 if (aRv.Failed()) {
52618 return;
52619 }
52620 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 52620); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 52620; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52621 BindingCallContext& cx = s.GetCallContext();
52622
52623 JS::Rooted<JS::Value> rval(cx);
52624 JS::RootedVector<JS::Value> argv(cx);
52625 if (!argv.resize(1)) {
52626 // That threw an exception on the JSContext, and our CallSetup will do
52627 // the right thing with that.
52628 return;
52629 }
52630 unsigned argc = 1;
52631
52632 do {
52633 if (arg.WasPassed()) {
52634
52635 if (arg.Value().IsNull()) {
52636 argv[0].setNull();
52637 break;
52638 }
52639
52640 uint32_t length = arg.Value().Value().Length();
52641 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
52642 if (!returnArray) {
52643 aRv.Throw(NS_ERROR_UNEXPECTED);
52644 return;
52645 }
52646 // Scope for 'tmp'
52647 {
52648 JS::Rooted<JS::Value> tmp(cx);
52649 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
52650 // Control block to let us common up the JS_DefineElement calls when there
52651 // are different ways to succeed at wrapping the object.
52652 do {
52653 tmp.setInt32(int32_t(arg.Value().Value()[sequenceIdx0]));
52654 break;
52655 } while (false);
52656 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
52657 JSPROP_ENUMERATE)) {
52658 aRv.Throw(NS_ERROR_UNEXPECTED);
52659 return;
52660 }
52661 }
52662 }
52663 argv[0].setObject(*returnArray);
52664 break;
52665 } else if (argc == 1) {
52666 // This is our current trailing argument; reduce argc
52667 --argc;
52668 } else {
52669 argv[0].setUndefined();
52670 }
52671 } while (false);
52672
52673 JS::Rooted<JS::Value> callable(cx);
52674 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
52675 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
52676 !InitIds(cx, atomsCache)) ||
52677 !GetCallableProperty(cx, atomsCache->passOptionalNullableSequence_id, &callable)) {
52678 aRv.Throw(NS_ERROR_UNEXPECTED);
52679 return;
52680 }
52681 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
52682 if (!JS::Call(cx, thisValue, callable,
52683 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
52684 aRv.NoteJSContextException(cx);
52685 return;
52686 }
52687}
52688
52689void
52690TestJSImplInterfaceJSImpl::PassOptionalNullableSequenceWithDefaultValue(const Nullable<Sequence<int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
52691{
52692 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableSequenceWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
52693 if (aRv.Failed()) {
52694 return;
52695 }
52696 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 52696); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 52696; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52697 BindingCallContext& cx = s.GetCallContext();
52698
52699 JS::Rooted<JS::Value> rval(cx);
52700 JS::RootedVector<JS::Value> argv(cx);
52701 if (!argv.resize(1)) {
52702 // That threw an exception on the JSContext, and our CallSetup will do
52703 // the right thing with that.
52704 return;
52705 }
52706 unsigned argc = 1;
52707
52708 do {
52709
52710 if (arg.IsNull()) {
52711 argv[0].setNull();
52712 break;
52713 }
52714
52715 uint32_t length = arg.Value().Length();
52716 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
52717 if (!returnArray) {
52718 aRv.Throw(NS_ERROR_UNEXPECTED);
52719 return;
52720 }
52721 // Scope for 'tmp'
52722 {
52723 JS::Rooted<JS::Value> tmp(cx);
52724 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
52725 // Control block to let us common up the JS_DefineElement calls when there
52726 // are different ways to succeed at wrapping the object.
52727 do {
52728 tmp.setInt32(int32_t(arg.Value()[sequenceIdx0]));
52729 break;
52730 } while (false);
52731 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
52732 JSPROP_ENUMERATE)) {
52733 aRv.Throw(NS_ERROR_UNEXPECTED);
52734 return;
52735 }
52736 }
52737 }
52738 argv[0].setObject(*returnArray);
52739 break;
52740 } while (false);
52741
52742 JS::Rooted<JS::Value> callable(cx);
52743 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
52744 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
52745 !InitIds(cx, atomsCache)) ||
52746 !GetCallableProperty(cx, atomsCache->passOptionalNullableSequenceWithDefaultValue_id, &callable)) {
52747 aRv.Throw(NS_ERROR_UNEXPECTED);
52748 return;
52749 }
52750 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
52751 if (!JS::Call(cx, thisValue, callable,
52752 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
52753 aRv.NoteJSContextException(cx);
52754 return;
52755 }
52756}
52757
52758void
52759TestJSImplInterfaceJSImpl::PassOptionalNullableSequenceWithDefaultValue2(const Nullable<Sequence<int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
52760{
52761 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableSequenceWithDefaultValue2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
52762 if (aRv.Failed()) {
52763 return;
52764 }
52765 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 52765); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 52765; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52766 BindingCallContext& cx = s.GetCallContext();
52767
52768 JS::Rooted<JS::Value> rval(cx);
52769 JS::RootedVector<JS::Value> argv(cx);
52770 if (!argv.resize(1)) {
52771 // That threw an exception on the JSContext, and our CallSetup will do
52772 // the right thing with that.
52773 return;
52774 }
52775 unsigned argc = 1;
52776
52777 do {
52778
52779 if (arg.IsNull()) {
52780 argv[0].setNull();
52781 break;
52782 }
52783
52784 uint32_t length = arg.Value().Length();
52785 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
52786 if (!returnArray) {
52787 aRv.Throw(NS_ERROR_UNEXPECTED);
52788 return;
52789 }
52790 // Scope for 'tmp'
52791 {
52792 JS::Rooted<JS::Value> tmp(cx);
52793 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
52794 // Control block to let us common up the JS_DefineElement calls when there
52795 // are different ways to succeed at wrapping the object.
52796 do {
52797 tmp.setInt32(int32_t(arg.Value()[sequenceIdx0]));
52798 break;
52799 } while (false);
52800 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
52801 JSPROP_ENUMERATE)) {
52802 aRv.Throw(NS_ERROR_UNEXPECTED);
52803 return;
52804 }
52805 }
52806 }
52807 argv[0].setObject(*returnArray);
52808 break;
52809 } while (false);
52810
52811 JS::Rooted<JS::Value> callable(cx);
52812 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
52813 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
52814 !InitIds(cx, atomsCache)) ||
52815 !GetCallableProperty(cx, atomsCache->passOptionalNullableSequenceWithDefaultValue2_id, &callable)) {
52816 aRv.Throw(NS_ERROR_UNEXPECTED);
52817 return;
52818 }
52819 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
52820 if (!JS::Call(cx, thisValue, callable,
52821 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
52822 aRv.NoteJSContextException(cx);
52823 return;
52824 }
52825}
52826
52827void
52828TestJSImplInterfaceJSImpl::PassOptionalObjectSequence(const Optional<Sequence<OwningNonNull<TestJSImplInterface>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
52829{
52830 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalObjectSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
52831 if (aRv.Failed()) {
52832 return;
52833 }
52834 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 52834); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 52834; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52835 BindingCallContext& cx = s.GetCallContext();
52836
52837 JS::Rooted<JS::Value> rval(cx);
52838 JS::RootedVector<JS::Value> argv(cx);
52839 if (!argv.resize(1)) {
52840 // That threw an exception on the JSContext, and our CallSetup will do
52841 // the right thing with that.
52842 return;
52843 }
52844 unsigned argc = 1;
52845
52846 do {
52847 if (arg.WasPassed()) {
52848
52849 uint32_t length = arg.Value().Length();
52850 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
52851 if (!returnArray) {
52852 aRv.Throw(NS_ERROR_UNEXPECTED);
52853 return;
52854 }
52855 // Scope for 'tmp'
52856 {
52857 JS::Rooted<JS::Value> tmp(cx);
52858 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
52859 // Control block to let us common up the JS_DefineElement calls when there
52860 // are different ways to succeed at wrapping the object.
52861 do {
52862 if (!GetOrCreateDOMReflector(cx, arg.Value()[sequenceIdx0], &tmp)) {
52863 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 52863); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 52863; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52864 aRv.Throw(NS_ERROR_UNEXPECTED);
52865 return;
52866 }
52867 break;
52868 } while (false);
52869 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
52870 JSPROP_ENUMERATE)) {
52871 aRv.Throw(NS_ERROR_UNEXPECTED);
52872 return;
52873 }
52874 }
52875 }
52876 argv[0].setObject(*returnArray);
52877 break;
52878 } else if (argc == 1) {
52879 // This is our current trailing argument; reduce argc
52880 --argc;
52881 } else {
52882 argv[0].setUndefined();
52883 }
52884 } while (false);
52885
52886 JS::Rooted<JS::Value> callable(cx);
52887 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
52888 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
52889 !InitIds(cx, atomsCache)) ||
52890 !GetCallableProperty(cx, atomsCache->passOptionalObjectSequence_id, &callable)) {
52891 aRv.Throw(NS_ERROR_UNEXPECTED);
52892 return;
52893 }
52894 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
52895 if (!JS::Call(cx, thisValue, callable,
52896 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
52897 aRv.NoteJSContextException(cx);
52898 return;
52899 }
52900}
52901
52902void
52903TestJSImplInterfaceJSImpl::PassExternalInterfaceSequence(const Sequence<RefPtr<TestExternalInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
52904{
52905 CallSetup s(this, aRv, "TestJSImplInterface.passExternalInterfaceSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
52906 if (aRv.Failed()) {
52907 return;
52908 }
52909 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 52909); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 52909; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52910 BindingCallContext& cx = s.GetCallContext();
52911
52912 JS::Rooted<JS::Value> rval(cx);
52913 JS::RootedVector<JS::Value> argv(cx);
52914 if (!argv.resize(1)) {
52915 // That threw an exception on the JSContext, and our CallSetup will do
52916 // the right thing with that.
52917 return;
52918 }
52919 unsigned argc = 1;
52920
52921 do {
52922
52923 uint32_t length = arg.Length();
52924 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
52925 if (!returnArray) {
52926 aRv.Throw(NS_ERROR_UNEXPECTED);
52927 return;
52928 }
52929 // Scope for 'tmp'
52930 {
52931 JS::Rooted<JS::Value> tmp(cx);
52932 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
52933 // Control block to let us common up the JS_DefineElement calls when there
52934 // are different ways to succeed at wrapping the object.
52935 do {
52936 if (!WrapObject(cx, arg[sequenceIdx0], &tmp)) {
52937 aRv.Throw(NS_ERROR_UNEXPECTED);
52938 return;
52939 }
52940 break;
52941 } while (false);
52942 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
52943 JSPROP_ENUMERATE)) {
52944 aRv.Throw(NS_ERROR_UNEXPECTED);
52945 return;
52946 }
52947 }
52948 }
52949 argv[0].setObject(*returnArray);
52950 break;
52951 } while (false);
52952
52953 JS::Rooted<JS::Value> callable(cx);
52954 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
52955 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
52956 !InitIds(cx, atomsCache)) ||
52957 !GetCallableProperty(cx, atomsCache->passExternalInterfaceSequence_id, &callable)) {
52958 aRv.Throw(NS_ERROR_UNEXPECTED);
52959 return;
52960 }
52961 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
52962 if (!JS::Call(cx, thisValue, callable,
52963 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
52964 aRv.NoteJSContextException(cx);
52965 return;
52966 }
52967}
52968
52969void
52970TestJSImplInterfaceJSImpl::PassNullableExternalInterfaceSequence(const Sequence<RefPtr<TestExternalInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
52971{
52972 CallSetup s(this, aRv, "TestJSImplInterface.passNullableExternalInterfaceSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
52973 if (aRv.Failed()) {
52974 return;
52975 }
52976 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 52976); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 52976; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
52977 BindingCallContext& cx = s.GetCallContext();
52978
52979 JS::Rooted<JS::Value> rval(cx);
52980 JS::RootedVector<JS::Value> argv(cx);
52981 if (!argv.resize(1)) {
52982 // That threw an exception on the JSContext, and our CallSetup will do
52983 // the right thing with that.
52984 return;
52985 }
52986 unsigned argc = 1;
52987
52988 do {
52989
52990 uint32_t length = arg.Length();
52991 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
52992 if (!returnArray) {
52993 aRv.Throw(NS_ERROR_UNEXPECTED);
52994 return;
52995 }
52996 // Scope for 'tmp'
52997 {
52998 JS::Rooted<JS::Value> tmp(cx);
52999 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
53000 // Control block to let us common up the JS_DefineElement calls when there
53001 // are different ways to succeed at wrapping the object.
53002 do {
53003 if (!arg[sequenceIdx0]) {
53004 tmp.setNull();
53005 break;
53006 }
53007 if (!WrapObject(cx, arg[sequenceIdx0], &tmp)) {
53008 aRv.Throw(NS_ERROR_UNEXPECTED);
53009 return;
53010 }
53011 break;
53012 } while (false);
53013 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
53014 JSPROP_ENUMERATE)) {
53015 aRv.Throw(NS_ERROR_UNEXPECTED);
53016 return;
53017 }
53018 }
53019 }
53020 argv[0].setObject(*returnArray);
53021 break;
53022 } while (false);
53023
53024 JS::Rooted<JS::Value> callable(cx);
53025 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
53026 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
53027 !InitIds(cx, atomsCache)) ||
53028 !GetCallableProperty(cx, atomsCache->passNullableExternalInterfaceSequence_id, &callable)) {
53029 aRv.Throw(NS_ERROR_UNEXPECTED);
53030 return;
53031 }
53032 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
53033 if (!JS::Call(cx, thisValue, callable,
53034 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
53035 aRv.NoteJSContextException(cx);
53036 return;
53037 }
53038}
53039
53040void
53041TestJSImplInterfaceJSImpl::ReceiveStringSequence(nsTArray<nsString>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
53042{
53043 CallSetup s(this, aRv, "TestJSImplInterface.receiveStringSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
53044 if (aRv.Failed()) {
53045 return;
53046 }
53047 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 53047); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 53047; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
53048 BindingCallContext& cx = s.GetCallContext();
53049
53050 JS::Rooted<JS::Value> rval(cx);
53051
53052 JS::Rooted<JS::Value> callable(cx);
53053 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
53054 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
53055 !InitIds(cx, atomsCache)) ||
53056 !GetCallableProperty(cx, atomsCache->receiveStringSequence_id, &callable)) {
53057 aRv.Throw(NS_ERROR_UNEXPECTED);
53058 return;
53059 }
53060 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
53061 if (!JS::Call(cx, thisValue, callable,
53062 JS::HandleValueArray::empty(), &rval)) {
53063 aRv.NoteJSContextException(cx);
53064 return;
53065 }
53066 Sequence<nsString> rvalDecl;
53067 if (rval.isObject()) {
53068 JS::ForOfIterator iter(cx);
53069 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
53070 aRv.Throw(NS_ERROR_UNEXPECTED);
53071 return;
53072 }
53073 if (!iter.valueIsIterable()) {
53074 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveStringSequence", "sequence");
53075 aRv.Throw(NS_ERROR_UNEXPECTED);
53076 return;
53077 }
53078 Sequence<nsString> &arr = rvalDecl;
53079 JS::Rooted<JS::Value> temp(cx);
53080 while (true) {
53081 bool done;
53082 if (!iter.next(&temp, &done)) {
53083 aRv.Throw(NS_ERROR_UNEXPECTED);
53084 return;
53085 }
53086 if (done) {
53087 break;
53088 }
53089 nsString* slotPtr = arr.AppendElement(mozilla::fallible);
53090 if (!slotPtr) {
53091 JS_ReportOutOfMemory(cx);
53092 aRv.Throw(NS_ERROR_UNEXPECTED);
53093 return;
53094 }
53095 nsString& slot = *slotPtr;
53096 if (!ConvertJSValueToString(cx, temp, eStringify, eStringify, slot)) {
53097 aRv.Throw(NS_ERROR_UNEXPECTED);
53098 return;
53099 }
53100 }
53101 } else {
53102 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveStringSequence", "sequence");
53103 aRv.Throw(NS_ERROR_UNEXPECTED);
53104 return;
53105 }
53106 aRetVal = std::move(rvalDecl);
53107}
53108
53109void
53110TestJSImplInterfaceJSImpl::ReceiveByteStringSequence(nsTArray<nsCString>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
53111{
53112 CallSetup s(this, aRv, "TestJSImplInterface.receiveByteStringSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
53113 if (aRv.Failed()) {
53114 return;
53115 }
53116 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 53116); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 53116; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
53117 BindingCallContext& cx = s.GetCallContext();
53118
53119 JS::Rooted<JS::Value> rval(cx);
53120
53121 JS::Rooted<JS::Value> callable(cx);
53122 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
53123 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
53124 !InitIds(cx, atomsCache)) ||
53125 !GetCallableProperty(cx, atomsCache->receiveByteStringSequence_id, &callable)) {
53126 aRv.Throw(NS_ERROR_UNEXPECTED);
53127 return;
53128 }
53129 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
53130 if (!JS::Call(cx, thisValue, callable,
53131 JS::HandleValueArray::empty(), &rval)) {
53132 aRv.NoteJSContextException(cx);
53133 return;
53134 }
53135 Sequence<nsCString> rvalDecl;
53136 if (rval.isObject()) {
53137 JS::ForOfIterator iter(cx);
53138 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
53139 aRv.Throw(NS_ERROR_UNEXPECTED);
53140 return;
53141 }
53142 if (!iter.valueIsIterable()) {
53143 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveByteStringSequence", "sequence");
53144 aRv.Throw(NS_ERROR_UNEXPECTED);
53145 return;
53146 }
53147 Sequence<nsCString> &arr = rvalDecl;
53148 JS::Rooted<JS::Value> temp(cx);
53149 while (true) {
53150 bool done;
53151 if (!iter.next(&temp, &done)) {
53152 aRv.Throw(NS_ERROR_UNEXPECTED);
53153 return;
53154 }
53155 if (done) {
53156 break;
53157 }
53158 nsCString* slotPtr = arr.AppendElement(mozilla::fallible);
53159 if (!slotPtr) {
53160 JS_ReportOutOfMemory(cx);
53161 aRv.Throw(NS_ERROR_UNEXPECTED);
53162 return;
53163 }
53164 nsCString& slot = *slotPtr;
53165 if (!ConvertJSValueToByteString(cx, temp, false, "element of return value of TestJSImplInterface.receiveByteStringSequence", slot)) {
53166 aRv.Throw(NS_ERROR_UNEXPECTED);
53167 return;
53168 }
53169 }
53170 } else {
53171 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveByteStringSequence", "sequence");
53172 aRv.Throw(NS_ERROR_UNEXPECTED);
53173 return;
53174 }
53175 aRetVal = std::move(rvalDecl);
53176}
53177
53178void
53179TestJSImplInterfaceJSImpl::ReceiveUTF8StringSequence(nsTArray<nsCString>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
53180{
53181 CallSetup s(this, aRv, "TestJSImplInterface.receiveUTF8StringSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
53182 if (aRv.Failed()) {
53183 return;
53184 }
53185 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 53185); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 53185; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
53186 BindingCallContext& cx = s.GetCallContext();
53187
53188 JS::Rooted<JS::Value> rval(cx);
53189
53190 JS::Rooted<JS::Value> callable(cx);
53191 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
53192 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
53193 !InitIds(cx, atomsCache)) ||
53194 !GetCallableProperty(cx, atomsCache->receiveUTF8StringSequence_id, &callable)) {
53195 aRv.Throw(NS_ERROR_UNEXPECTED);
53196 return;
53197 }
53198 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
53199 if (!JS::Call(cx, thisValue, callable,
53200 JS::HandleValueArray::empty(), &rval)) {
53201 aRv.NoteJSContextException(cx);
53202 return;
53203 }
53204 Sequence<nsCString> rvalDecl;
53205 if (rval.isObject()) {
53206 JS::ForOfIterator iter(cx);
53207 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
53208 aRv.Throw(NS_ERROR_UNEXPECTED);
53209 return;
53210 }
53211 if (!iter.valueIsIterable()) {
53212 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveUTF8StringSequence", "sequence");
53213 aRv.Throw(NS_ERROR_UNEXPECTED);
53214 return;
53215 }
53216 Sequence<nsCString> &arr = rvalDecl;
53217 JS::Rooted<JS::Value> temp(cx);
53218 while (true) {
53219 bool done;
53220 if (!iter.next(&temp, &done)) {
53221 aRv.Throw(NS_ERROR_UNEXPECTED);
53222 return;
53223 }
53224 if (done) {
53225 break;
53226 }
53227 nsCString* slotPtr = arr.AppendElement(mozilla::fallible);
53228 if (!slotPtr) {
53229 JS_ReportOutOfMemory(cx);
53230 aRv.Throw(NS_ERROR_UNEXPECTED);
53231 return;
53232 }
53233 nsCString& slot = *slotPtr;
53234 if (!ConvertJSValueToString(cx, temp, eStringify, eStringify, slot)) {
53235 aRv.Throw(NS_ERROR_UNEXPECTED);
53236 return;
53237 }
53238 }
53239 } else {
53240 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveUTF8StringSequence", "sequence");
53241 aRv.Throw(NS_ERROR_UNEXPECTED);
53242 return;
53243 }
53244 aRetVal = std::move(rvalDecl);
53245}
53246
53247void
53248TestJSImplInterfaceJSImpl::ReceiveAnySequence(nsTArray<JS::Value>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
53249{
53250 CallSetup s(this, aRv, "TestJSImplInterface.receiveAnySequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
53251 if (aRv.Failed()) {
53252 return;
53253 }
53254 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 53254); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 53254; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
53255 BindingCallContext& cx = s.GetCallContext();
53256
53257 JS::Rooted<JS::Value> rval(cx);
53258
53259 JS::Rooted<JS::Value> callable(cx);
53260 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
53261 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
53262 !InitIds(cx, atomsCache)) ||
53263 !GetCallableProperty(cx, atomsCache->receiveAnySequence_id, &callable)) {
53264 aRv.Throw(NS_ERROR_UNEXPECTED);
53265 return;
53266 }
53267 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
53268 if (!JS::Call(cx, thisValue, callable,
53269 JS::HandleValueArray::empty(), &rval)) {
53270 aRv.NoteJSContextException(cx);
53271 return;
53272 }
53273 Sequence<JS::Value> rvalDecl;
53274 SequenceRooter<JS::Value> rvalHolder(cx, &rvalDecl);
53275 if (rval.isObject()) {
53276 JS::ForOfIterator iter(cx);
53277 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
53278 aRv.Throw(NS_ERROR_UNEXPECTED);
53279 return;
53280 }
53281 if (!iter.valueIsIterable()) {
53282 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveAnySequence", "sequence");
53283 aRv.Throw(NS_ERROR_UNEXPECTED);
53284 return;
53285 }
53286 Sequence<JS::Value> &arr = rvalDecl;
53287 JS::Rooted<JS::Value> temp(cx);
53288 while (true) {
53289 bool done;
53290 if (!iter.next(&temp, &done)) {
53291 aRv.Throw(NS_ERROR_UNEXPECTED);
53292 return;
53293 }
53294 if (done) {
53295 break;
53296 }
53297 JS::Value* slotPtr = arr.AppendElement(mozilla::fallible);
53298 if (!slotPtr) {
53299 JS_ReportOutOfMemory(cx);
53300 aRv.Throw(NS_ERROR_UNEXPECTED);
53301 return;
53302 }
53303 JS::Value& slot = *slotPtr;
53304#ifdef __clang__1
53305#pragma clang diagnostic push
53306#pragma clang diagnostic ignored "-Wunreachable-code"
53307#pragma clang diagnostic ignored "-Wunreachable-code-return"
53308#endif // __clang__
53309 if ((false) && !CallerSubsumes(temp)) {
53310 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of return value of TestJSImplInterface.receiveAnySequence");
53311 aRv.Throw(NS_ERROR_UNEXPECTED);
53312 return;
53313 }
53314#ifdef __clang__1
53315#pragma clang diagnostic pop
53316#endif // __clang__
53317 slot = temp;
53318 }
53319 } else {
53320 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveAnySequence", "sequence");
53321 aRv.Throw(NS_ERROR_UNEXPECTED);
53322 return;
53323 }
53324 aRetVal = std::move(rvalDecl);
53325}
53326
53327void
53328TestJSImplInterfaceJSImpl::ReceiveNullableAnySequence(Nullable<nsTArray<JS::Value>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
53329{
53330 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableAnySequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
53331 if (aRv.Failed()) {
53332 return;
53333 }
53334 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 53334); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 53334; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
53335 BindingCallContext& cx = s.GetCallContext();
53336
53337 JS::Rooted<JS::Value> rval(cx);
53338
53339 JS::Rooted<JS::Value> callable(cx);
53340 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
53341 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
53342 !InitIds(cx, atomsCache)) ||
53343 !GetCallableProperty(cx, atomsCache->receiveNullableAnySequence_id, &callable)) {
53344 aRv.Throw(NS_ERROR_UNEXPECTED);
53345 return;
53346 }
53347 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
53348 if (!JS::Call(cx, thisValue, callable,
53349 JS::HandleValueArray::empty(), &rval)) {
53350 aRv.NoteJSContextException(cx);
53351 return;
53352 }
53353 Nullable<Sequence<JS::Value>> rvalDecl;
53354 SequenceRooter<JS::Value> rvalHolder(cx, &rvalDecl.SetValue());
53355 if (rval.isObject()) {
53356 JS::ForOfIterator iter(cx);
53357 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
53358 aRv.Throw(NS_ERROR_UNEXPECTED);
53359 return;
53360 }
53361 if (!iter.valueIsIterable()) {
53362 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableAnySequence", "sequence");
53363 aRv.Throw(NS_ERROR_UNEXPECTED);
53364 return;
53365 }
53366 Sequence<JS::Value> &arr = rvalDecl.SetValue();
53367 JS::Rooted<JS::Value> temp(cx);
53368 while (true) {
53369 bool done;
53370 if (!iter.next(&temp, &done)) {
53371 aRv.Throw(NS_ERROR_UNEXPECTED);
53372 return;
53373 }
53374 if (done) {
53375 break;
53376 }
53377 JS::Value* slotPtr = arr.AppendElement(mozilla::fallible);
53378 if (!slotPtr) {
53379 JS_ReportOutOfMemory(cx);
53380 aRv.Throw(NS_ERROR_UNEXPECTED);
53381 return;
53382 }
53383 JS::Value& slot = *slotPtr;
53384#ifdef __clang__1
53385#pragma clang diagnostic push
53386#pragma clang diagnostic ignored "-Wunreachable-code"
53387#pragma clang diagnostic ignored "-Wunreachable-code-return"
53388#endif // __clang__
53389 if ((false) && !CallerSubsumes(temp)) {
53390 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of return value of TestJSImplInterface.receiveNullableAnySequence");
53391 aRv.Throw(NS_ERROR_UNEXPECTED);
53392 return;
53393 }
53394#ifdef __clang__1
53395#pragma clang diagnostic pop
53396#endif // __clang__
53397 slot = temp;
53398 }
53399 } else if (rval.isNullOrUndefined()) {
53400 rvalDecl.SetNull();
53401 } else {
53402 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableAnySequence", "sequence");
53403 aRv.Throw(NS_ERROR_UNEXPECTED);
53404 return;
53405 }
53406 if (rvalDecl.IsNull()) {
53407 aRetVal.SetNull();
53408 } else {
53409 aRetVal.SetValue() = std::move(rvalDecl.Value());
53410 }
53411}
53412
53413void
53414TestJSImplInterfaceJSImpl::ReceiveObjectSequence(nsTArray<JSObject*>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
53415{
53416 CallSetup s(this, aRv, "TestJSImplInterface.receiveObjectSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
53417 if (aRv.Failed()) {
53418 return;
53419 }
53420 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 53420); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 53420; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
53421 BindingCallContext& cx = s.GetCallContext();
53422
53423 JS::Rooted<JS::Value> rval(cx);
53424
53425 JS::Rooted<JS::Value> callable(cx);
53426 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
53427 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
53428 !InitIds(cx, atomsCache)) ||
53429 !GetCallableProperty(cx, atomsCache->receiveObjectSequence_id, &callable)) {
53430 aRv.Throw(NS_ERROR_UNEXPECTED);
53431 return;
53432 }
53433 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
53434 if (!JS::Call(cx, thisValue, callable,
53435 JS::HandleValueArray::empty(), &rval)) {
53436 aRv.NoteJSContextException(cx);
53437 return;
53438 }
53439 Sequence<JSObject*> rvalDecl;
53440 SequenceRooter<JSObject*> rvalHolder(cx, &rvalDecl);
53441 if (rval.isObject()) {
53442 JS::ForOfIterator iter(cx);
53443 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
53444 aRv.Throw(NS_ERROR_UNEXPECTED);
53445 return;
53446 }
53447 if (!iter.valueIsIterable()) {
53448 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveObjectSequence", "sequence");
53449 aRv.Throw(NS_ERROR_UNEXPECTED);
53450 return;
53451 }
53452 Sequence<JSObject*> &arr = rvalDecl;
53453 JS::Rooted<JS::Value> temp(cx);
53454 while (true) {
53455 bool done;
53456 if (!iter.next(&temp, &done)) {
53457 aRv.Throw(NS_ERROR_UNEXPECTED);
53458 return;
53459 }
53460 if (done) {
53461 break;
53462 }
53463 JSObject** slotPtr = arr.AppendElement(nullptr, mozilla::fallible);
53464 if (!slotPtr) {
53465 JS_ReportOutOfMemory(cx);
53466 aRv.Throw(NS_ERROR_UNEXPECTED);
53467 return;
53468 }
53469 JSObject*& slot = *slotPtr;
53470 if (temp.isObject()) {
53471#ifdef __clang__1
53472#pragma clang diagnostic push
53473#pragma clang diagnostic ignored "-Wunreachable-code"
53474#pragma clang diagnostic ignored "-Wunreachable-code-return"
53475#endif // __clang__
53476 if ((false) && !CallerSubsumes(temp)) {
53477 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of return value of TestJSImplInterface.receiveObjectSequence");
53478 aRv.Throw(NS_ERROR_UNEXPECTED);
53479 return;
53480 }
53481#ifdef __clang__1
53482#pragma clang diagnostic pop
53483#endif // __clang__
53484 slot = &temp.toObject();
53485 } else {
53486 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveObjectSequence");
53487 aRv.Throw(NS_ERROR_UNEXPECTED);
53488 return;
53489 }
53490 }
53491 } else {
53492 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveObjectSequence", "sequence");
53493 aRv.Throw(NS_ERROR_UNEXPECTED);
53494 return;
53495 }
53496 aRetVal = std::move(rvalDecl);
53497}
53498
53499void
53500TestJSImplInterfaceJSImpl::ReceiveNullableObjectSequence(nsTArray<JSObject*>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
53501{
53502 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableObjectSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
53503 if (aRv.Failed()) {
53504 return;
53505 }
53506 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 53506); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 53506; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
53507 BindingCallContext& cx = s.GetCallContext();
53508
53509 JS::Rooted<JS::Value> rval(cx);
53510
53511 JS::Rooted<JS::Value> callable(cx);
53512 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
53513 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
53514 !InitIds(cx, atomsCache)) ||
53515 !GetCallableProperty(cx, atomsCache->receiveNullableObjectSequence_id, &callable)) {
53516 aRv.Throw(NS_ERROR_UNEXPECTED);
53517 return;
53518 }
53519 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
53520 if (!JS::Call(cx, thisValue, callable,
53521 JS::HandleValueArray::empty(), &rval)) {
53522 aRv.NoteJSContextException(cx);
53523 return;
53524 }
53525 Sequence<JSObject*> rvalDecl;
53526 SequenceRooter<JSObject*> rvalHolder(cx, &rvalDecl);
53527 if (rval.isObject()) {
53528 JS::ForOfIterator iter(cx);
53529 if (!iter.init(rval, JS::ForOfIterator::AllowNonIterable)) {
53530 aRv.Throw(NS_ERROR_UNEXPECTED);
53531 return;
53532 }
53533 if (!iter.valueIsIterable()) {
53534 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableObjectSequence", "sequence");
53535 aRv.Throw(NS_ERROR_UNEXPECTED);
53536 return;
53537 }
53538 Sequence<JSObject*> &arr = rvalDecl;
53539 JS::Rooted<JS::Value> temp(cx);
53540 while (true) {
53541 bool done;
53542 if (!iter.next(&temp, &done)) {
53543 aRv.Throw(NS_ERROR_UNEXPECTED);
53544 return;
53545 }
53546 if (done) {
53547 break;
53548 }
53549 JSObject** slotPtr = arr.AppendElement(nullptr, mozilla::fallible);
53550 if (!slotPtr) {
53551 JS_ReportOutOfMemory(cx);
53552 aRv.Throw(NS_ERROR_UNEXPECTED);
53553 return;
53554 }
53555 JSObject*& slot = *slotPtr;
53556 if (temp.isObject()) {
53557#ifdef __clang__1
53558#pragma clang diagnostic push
53559#pragma clang diagnostic ignored "-Wunreachable-code"
53560#pragma clang diagnostic ignored "-Wunreachable-code-return"
53561#endif // __clang__
53562 if ((false) && !CallerSubsumes(temp)) {
53563 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("element of return value of TestJSImplInterface.receiveNullableObjectSequence");
53564 aRv.Throw(NS_ERROR_UNEXPECTED);
53565 return;
53566 }
53567#ifdef __clang__1
53568#pragma clang diagnostic pop
53569#endif // __clang__
53570 slot = &temp.toObject();
53571 } else if (temp.isNullOrUndefined()) {
53572 slot = nullptr;
53573 } else {
53574 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Element of return value of TestJSImplInterface.receiveNullableObjectSequence");
53575 aRv.Throw(NS_ERROR_UNEXPECTED);
53576 return;
53577 }
53578 }
53579 } else {
53580 cx.ThrowErrorMessage<MSG_CONVERSION_ERROR>("Return value of TestJSImplInterface.receiveNullableObjectSequence", "sequence");
53581 aRv.Throw(NS_ERROR_UNEXPECTED);
53582 return;
53583 }
53584 aRetVal = std::move(rvalDecl);
53585}
53586
53587void
53588TestJSImplInterfaceJSImpl::PassSequenceOfSequences(const Sequence<Sequence<int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
53589{
53590 CallSetup s(this, aRv, "TestJSImplInterface.passSequenceOfSequences", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
53591 if (aRv.Failed()) {
53592 return;
53593 }
53594 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 53594); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 53594; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
53595 BindingCallContext& cx = s.GetCallContext();
53596
53597 JS::Rooted<JS::Value> rval(cx);
53598 JS::RootedVector<JS::Value> argv(cx);
53599 if (!argv.resize(1)) {
53600 // That threw an exception on the JSContext, and our CallSetup will do
53601 // the right thing with that.
53602 return;
53603 }
53604 unsigned argc = 1;
53605
53606 do {
53607
53608 uint32_t length = arg.Length();
53609 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
53610 if (!returnArray) {
53611 aRv.Throw(NS_ERROR_UNEXPECTED);
53612 return;
53613 }
53614 // Scope for 'tmp'
53615 {
53616 JS::Rooted<JS::Value> tmp(cx);
53617 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
53618 // Control block to let us common up the JS_DefineElement calls when there
53619 // are different ways to succeed at wrapping the object.
53620 do {
53621
53622 uint32_t length = arg[sequenceIdx0].Length();
53623 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
53624 if (!returnArray) {
53625 aRv.Throw(NS_ERROR_UNEXPECTED);
53626 return;
53627 }
53628 // Scope for 'tmp'
53629 {
53630 JS::Rooted<JS::Value> tmp(cx);
53631 for (uint32_t sequenceIdx1 = 0; sequenceIdx1 < length; ++sequenceIdx1) {
53632 // Control block to let us common up the JS_DefineElement calls when there
53633 // are different ways to succeed at wrapping the object.
53634 do {
53635 tmp.setInt32(int32_t(arg[sequenceIdx0][sequenceIdx1]));
53636 break;
53637 } while (false);
53638 if (!JS_DefineElement(cx, returnArray, sequenceIdx1, tmp,
53639 JSPROP_ENUMERATE)) {
53640 aRv.Throw(NS_ERROR_UNEXPECTED);
53641 return;
53642 }
53643 }
53644 }
53645 tmp.setObject(*returnArray);
53646 break;
53647 } while (false);
53648 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
53649 JSPROP_ENUMERATE)) {
53650 aRv.Throw(NS_ERROR_UNEXPECTED);
53651 return;
53652 }
53653 }
53654 }
53655 argv[0].setObject(*returnArray);
53656 break;
53657 } while (false);
53658
53659 JS::Rooted<JS::Value> callable(cx);
53660 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
53661 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
53662 !InitIds(cx, atomsCache)) ||
53663 !GetCallableProperty(cx, atomsCache->passSequenceOfSequences_id, &callable)) {
53664 aRv.Throw(NS_ERROR_UNEXPECTED);
53665 return;
53666 }
53667 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
53668 if (!JS::Call(cx, thisValue, callable,
53669 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
53670 aRv.NoteJSContextException(cx);
53671 return;
53672 }
53673}
53674
53675void
53676TestJSImplInterfaceJSImpl::PassSequenceOfSequencesOfSequences(const Sequence<Sequence<Sequence<int32_t>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
53677{
53678 CallSetup s(this, aRv, "TestJSImplInterface.passSequenceOfSequencesOfSequences", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
53679 if (aRv.Failed()) {
53680 return;
53681 }
53682 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 53682); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 53682; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
53683 BindingCallContext& cx = s.GetCallContext();
53684
53685 JS::Rooted<JS::Value> rval(cx);
53686 JS::RootedVector<JS::Value> argv(cx);
53687 if (!argv.resize(1)) {
53688 // That threw an exception on the JSContext, and our CallSetup will do
53689 // the right thing with that.
53690 return;
53691 }
53692 unsigned argc = 1;
53693
53694 do {
53695
53696 uint32_t length = arg.Length();
53697 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
53698 if (!returnArray) {
53699 aRv.Throw(NS_ERROR_UNEXPECTED);
53700 return;
53701 }
53702 // Scope for 'tmp'
53703 {
53704 JS::Rooted<JS::Value> tmp(cx);
53705 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
53706 // Control block to let us common up the JS_DefineElement calls when there
53707 // are different ways to succeed at wrapping the object.
53708 do {
53709
53710 uint32_t length = arg[sequenceIdx0].Length();
53711 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
53712 if (!returnArray) {
53713 aRv.Throw(NS_ERROR_UNEXPECTED);
53714 return;
53715 }
53716 // Scope for 'tmp'
53717 {
53718 JS::Rooted<JS::Value> tmp(cx);
53719 for (uint32_t sequenceIdx1 = 0; sequenceIdx1 < length; ++sequenceIdx1) {
53720 // Control block to let us common up the JS_DefineElement calls when there
53721 // are different ways to succeed at wrapping the object.
53722 do {
53723
53724 uint32_t length = arg[sequenceIdx0][sequenceIdx1].Length();
53725 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
53726 if (!returnArray) {
53727 aRv.Throw(NS_ERROR_UNEXPECTED);
53728 return;
53729 }
53730 // Scope for 'tmp'
53731 {
53732 JS::Rooted<JS::Value> tmp(cx);
53733 for (uint32_t sequenceIdx2 = 0; sequenceIdx2 < length; ++sequenceIdx2) {
53734 // Control block to let us common up the JS_DefineElement calls when there
53735 // are different ways to succeed at wrapping the object.
53736 do {
53737 tmp.setInt32(int32_t(arg[sequenceIdx0][sequenceIdx1][sequenceIdx2]));
53738 break;
53739 } while (false);
53740 if (!JS_DefineElement(cx, returnArray, sequenceIdx2, tmp,
53741 JSPROP_ENUMERATE)) {
53742 aRv.Throw(NS_ERROR_UNEXPECTED);
53743 return;
53744 }
53745 }
53746 }
53747 tmp.setObject(*returnArray);
53748 break;
53749 } while (false);
53750 if (!JS_DefineElement(cx, returnArray, sequenceIdx1, tmp,
53751 JSPROP_ENUMERATE)) {
53752 aRv.Throw(NS_ERROR_UNEXPECTED);
53753 return;
53754 }
53755 }
53756 }
53757 tmp.setObject(*returnArray);
53758 break;
53759 } while (false);
53760 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
53761 JSPROP_ENUMERATE)) {
53762 aRv.Throw(NS_ERROR_UNEXPECTED);
53763 return;
53764 }
53765 }
53766 }
53767 argv[0].setObject(*returnArray);
53768 break;
53769 } while (false);
53770
53771 JS::Rooted<JS::Value> callable(cx);
53772 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
53773 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
53774 !InitIds(cx, atomsCache)) ||
53775 !GetCallableProperty(cx, atomsCache->passSequenceOfSequencesOfSequences_id, &callable)) {
53776 aRv.Throw(NS_ERROR_UNEXPECTED);
53777 return;
53778 }
53779 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
53780 if (!JS::Call(cx, thisValue, callable,
53781 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
53782 aRv.NoteJSContextException(cx);
53783 return;
53784 }
53785}
53786
53787void
53788TestJSImplInterfaceJSImpl::PassRecord(const Record<nsString, int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
53789{
53790 CallSetup s(this, aRv, "TestJSImplInterface.passRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
53791 if (aRv.Failed()) {
53792 return;
53793 }
53794 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 53794); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 53794; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
53795 BindingCallContext& cx = s.GetCallContext();
53796
53797 JS::Rooted<JS::Value> rval(cx);
53798 JS::RootedVector<JS::Value> argv(cx);
53799 if (!argv.resize(1)) {
53800 // That threw an exception on the JSContext, and our CallSetup will do
53801 // the right thing with that.
53802 return;
53803 }
53804 unsigned argc = 1;
53805
53806 do {
53807
53808 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
53809 if (!returnObj) {
53810 aRv.Throw(NS_ERROR_UNEXPECTED);
53811 return;
53812 }
53813 // Scope for 'tmp'
53814 {
53815 JS::Rooted<JS::Value> tmp(cx);
53816 for (auto& entry : arg.Entries()) {
53817 auto& recordValue0 = entry.mValue;
53818 // Control block to let us common up the JS_DefineUCProperty calls when there
53819 // are different ways to succeed at wrapping the value.
53820 do {
53821 tmp.setInt32(int32_t(recordValue0));
53822 break;
53823 } while (false);
53824 if (!JS_DefineUCProperty(cx, returnObj,
53825 entry.mKey.BeginReading(),
53826 entry.mKey.Length(), tmp,
53827 JSPROP_ENUMERATE)) {
53828 aRv.Throw(NS_ERROR_UNEXPECTED);
53829 return;
53830 }
53831 }
53832 }
53833 argv[0].setObject(*returnObj);
53834 break;
53835 } while (false);
53836
53837 JS::Rooted<JS::Value> callable(cx);
53838 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
53839 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
53840 !InitIds(cx, atomsCache)) ||
53841 !GetCallableProperty(cx, atomsCache->passRecord_id, &callable)) {
53842 aRv.Throw(NS_ERROR_UNEXPECTED);
53843 return;
53844 }
53845 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
53846 if (!JS::Call(cx, thisValue, callable,
53847 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
53848 aRv.NoteJSContextException(cx);
53849 return;
53850 }
53851}
53852
53853void
53854TestJSImplInterfaceJSImpl::PassNullableRecord(const Nullable<Record<nsString, int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
53855{
53856 CallSetup s(this, aRv, "TestJSImplInterface.passNullableRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
53857 if (aRv.Failed()) {
53858 return;
53859 }
53860 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 53860); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 53860; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
53861 BindingCallContext& cx = s.GetCallContext();
53862
53863 JS::Rooted<JS::Value> rval(cx);
53864 JS::RootedVector<JS::Value> argv(cx);
53865 if (!argv.resize(1)) {
53866 // That threw an exception on the JSContext, and our CallSetup will do
53867 // the right thing with that.
53868 return;
53869 }
53870 unsigned argc = 1;
53871
53872 do {
53873
53874 if (arg.IsNull()) {
53875 argv[0].setNull();
53876 break;
53877 }
53878
53879 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
53880 if (!returnObj) {
53881 aRv.Throw(NS_ERROR_UNEXPECTED);
53882 return;
53883 }
53884 // Scope for 'tmp'
53885 {
53886 JS::Rooted<JS::Value> tmp(cx);
53887 for (auto& entry : arg.Value().Entries()) {
53888 auto& recordValue0 = entry.mValue;
53889 // Control block to let us common up the JS_DefineUCProperty calls when there
53890 // are different ways to succeed at wrapping the value.
53891 do {
53892 tmp.setInt32(int32_t(recordValue0));
53893 break;
53894 } while (false);
53895 if (!JS_DefineUCProperty(cx, returnObj,
53896 entry.mKey.BeginReading(),
53897 entry.mKey.Length(), tmp,
53898 JSPROP_ENUMERATE)) {
53899 aRv.Throw(NS_ERROR_UNEXPECTED);
53900 return;
53901 }
53902 }
53903 }
53904 argv[0].setObject(*returnObj);
53905 break;
53906 } while (false);
53907
53908 JS::Rooted<JS::Value> callable(cx);
53909 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
53910 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
53911 !InitIds(cx, atomsCache)) ||
53912 !GetCallableProperty(cx, atomsCache->passNullableRecord_id, &callable)) {
53913 aRv.Throw(NS_ERROR_UNEXPECTED);
53914 return;
53915 }
53916 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
53917 if (!JS::Call(cx, thisValue, callable,
53918 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
53919 aRv.NoteJSContextException(cx);
53920 return;
53921 }
53922}
53923
53924void
53925TestJSImplInterfaceJSImpl::PassRecordOfNullableInts(const Record<nsString, Nullable<int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
53926{
53927 CallSetup s(this, aRv, "TestJSImplInterface.passRecordOfNullableInts", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
53928 if (aRv.Failed()) {
53929 return;
53930 }
53931 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 53931); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 53931; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
53932 BindingCallContext& cx = s.GetCallContext();
53933
53934 JS::Rooted<JS::Value> rval(cx);
53935 JS::RootedVector<JS::Value> argv(cx);
53936 if (!argv.resize(1)) {
53937 // That threw an exception on the JSContext, and our CallSetup will do
53938 // the right thing with that.
53939 return;
53940 }
53941 unsigned argc = 1;
53942
53943 do {
53944
53945 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
53946 if (!returnObj) {
53947 aRv.Throw(NS_ERROR_UNEXPECTED);
53948 return;
53949 }
53950 // Scope for 'tmp'
53951 {
53952 JS::Rooted<JS::Value> tmp(cx);
53953 for (auto& entry : arg.Entries()) {
53954 auto& recordValue0 = entry.mValue;
53955 // Control block to let us common up the JS_DefineUCProperty calls when there
53956 // are different ways to succeed at wrapping the value.
53957 do {
53958 if (recordValue0.IsNull()) {
53959 tmp.setNull();
53960 break;
53961 }
53962 tmp.setInt32(int32_t(recordValue0.Value()));
53963 break;
53964 } while (false);
53965 if (!JS_DefineUCProperty(cx, returnObj,
53966 entry.mKey.BeginReading(),
53967 entry.mKey.Length(), tmp,
53968 JSPROP_ENUMERATE)) {
53969 aRv.Throw(NS_ERROR_UNEXPECTED);
53970 return;
53971 }
53972 }
53973 }
53974 argv[0].setObject(*returnObj);
53975 break;
53976 } while (false);
53977
53978 JS::Rooted<JS::Value> callable(cx);
53979 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
53980 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
53981 !InitIds(cx, atomsCache)) ||
53982 !GetCallableProperty(cx, atomsCache->passRecordOfNullableInts_id, &callable)) {
53983 aRv.Throw(NS_ERROR_UNEXPECTED);
53984 return;
53985 }
53986 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
53987 if (!JS::Call(cx, thisValue, callable,
53988 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
53989 aRv.NoteJSContextException(cx);
53990 return;
53991 }
53992}
53993
53994void
53995TestJSImplInterfaceJSImpl::PassOptionalRecordOfNullableInts(const Optional<Record<nsString, Nullable<int32_t>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
53996{
53997 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalRecordOfNullableInts", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
53998 if (aRv.Failed()) {
53999 return;
54000 }
54001 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 54001); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 54001; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54002 BindingCallContext& cx = s.GetCallContext();
54003
54004 JS::Rooted<JS::Value> rval(cx);
54005 JS::RootedVector<JS::Value> argv(cx);
54006 if (!argv.resize(1)) {
54007 // That threw an exception on the JSContext, and our CallSetup will do
54008 // the right thing with that.
54009 return;
54010 }
54011 unsigned argc = 1;
54012
54013 do {
54014 if (arg.WasPassed()) {
54015
54016 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
54017 if (!returnObj) {
54018 aRv.Throw(NS_ERROR_UNEXPECTED);
54019 return;
54020 }
54021 // Scope for 'tmp'
54022 {
54023 JS::Rooted<JS::Value> tmp(cx);
54024 for (auto& entry : arg.Value().Entries()) {
54025 auto& recordValue0 = entry.mValue;
54026 // Control block to let us common up the JS_DefineUCProperty calls when there
54027 // are different ways to succeed at wrapping the value.
54028 do {
54029 if (recordValue0.IsNull()) {
54030 tmp.setNull();
54031 break;
54032 }
54033 tmp.setInt32(int32_t(recordValue0.Value()));
54034 break;
54035 } while (false);
54036 if (!JS_DefineUCProperty(cx, returnObj,
54037 entry.mKey.BeginReading(),
54038 entry.mKey.Length(), tmp,
54039 JSPROP_ENUMERATE)) {
54040 aRv.Throw(NS_ERROR_UNEXPECTED);
54041 return;
54042 }
54043 }
54044 }
54045 argv[0].setObject(*returnObj);
54046 break;
54047 } else if (argc == 1) {
54048 // This is our current trailing argument; reduce argc
54049 --argc;
54050 } else {
54051 argv[0].setUndefined();
54052 }
54053 } while (false);
54054
54055 JS::Rooted<JS::Value> callable(cx);
54056 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
54057 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
54058 !InitIds(cx, atomsCache)) ||
54059 !GetCallableProperty(cx, atomsCache->passOptionalRecordOfNullableInts_id, &callable)) {
54060 aRv.Throw(NS_ERROR_UNEXPECTED);
54061 return;
54062 }
54063 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
54064 if (!JS::Call(cx, thisValue, callable,
54065 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
54066 aRv.NoteJSContextException(cx);
54067 return;
54068 }
54069}
54070
54071void
54072TestJSImplInterfaceJSImpl::PassOptionalNullableRecordOfNullableInts(const Optional<Nullable<Record<nsString, Nullable<int32_t>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
54073{
54074 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableRecordOfNullableInts", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
54075 if (aRv.Failed()) {
54076 return;
54077 }
54078 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 54078); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 54078; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54079 BindingCallContext& cx = s.GetCallContext();
54080
54081 JS::Rooted<JS::Value> rval(cx);
54082 JS::RootedVector<JS::Value> argv(cx);
54083 if (!argv.resize(1)) {
54084 // That threw an exception on the JSContext, and our CallSetup will do
54085 // the right thing with that.
54086 return;
54087 }
54088 unsigned argc = 1;
54089
54090 do {
54091 if (arg.WasPassed()) {
54092
54093 if (arg.Value().IsNull()) {
54094 argv[0].setNull();
54095 break;
54096 }
54097
54098 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
54099 if (!returnObj) {
54100 aRv.Throw(NS_ERROR_UNEXPECTED);
54101 return;
54102 }
54103 // Scope for 'tmp'
54104 {
54105 JS::Rooted<JS::Value> tmp(cx);
54106 for (auto& entry : arg.Value().Value().Entries()) {
54107 auto& recordValue0 = entry.mValue;
54108 // Control block to let us common up the JS_DefineUCProperty calls when there
54109 // are different ways to succeed at wrapping the value.
54110 do {
54111 if (recordValue0.IsNull()) {
54112 tmp.setNull();
54113 break;
54114 }
54115 tmp.setInt32(int32_t(recordValue0.Value()));
54116 break;
54117 } while (false);
54118 if (!JS_DefineUCProperty(cx, returnObj,
54119 entry.mKey.BeginReading(),
54120 entry.mKey.Length(), tmp,
54121 JSPROP_ENUMERATE)) {
54122 aRv.Throw(NS_ERROR_UNEXPECTED);
54123 return;
54124 }
54125 }
54126 }
54127 argv[0].setObject(*returnObj);
54128 break;
54129 } else if (argc == 1) {
54130 // This is our current trailing argument; reduce argc
54131 --argc;
54132 } else {
54133 argv[0].setUndefined();
54134 }
54135 } while (false);
54136
54137 JS::Rooted<JS::Value> callable(cx);
54138 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
54139 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
54140 !InitIds(cx, atomsCache)) ||
54141 !GetCallableProperty(cx, atomsCache->passOptionalNullableRecordOfNullableInts_id, &callable)) {
54142 aRv.Throw(NS_ERROR_UNEXPECTED);
54143 return;
54144 }
54145 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
54146 if (!JS::Call(cx, thisValue, callable,
54147 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
54148 aRv.NoteJSContextException(cx);
54149 return;
54150 }
54151}
54152
54153void
54154TestJSImplInterfaceJSImpl::PassCastableObjectRecord(const Record<nsString, OwningNonNull<TestInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
54155{
54156 CallSetup s(this, aRv, "TestJSImplInterface.passCastableObjectRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
54157 if (aRv.Failed()) {
54158 return;
54159 }
54160 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 54160); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 54160; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54161 BindingCallContext& cx = s.GetCallContext();
54162
54163 JS::Rooted<JS::Value> rval(cx);
54164 JS::RootedVector<JS::Value> argv(cx);
54165 if (!argv.resize(1)) {
54166 // That threw an exception on the JSContext, and our CallSetup will do
54167 // the right thing with that.
54168 return;
54169 }
54170 unsigned argc = 1;
54171
54172 do {
54173
54174 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
54175 if (!returnObj) {
54176 aRv.Throw(NS_ERROR_UNEXPECTED);
54177 return;
54178 }
54179 // Scope for 'tmp'
54180 {
54181 JS::Rooted<JS::Value> tmp(cx);
54182 for (auto& entry : arg.Entries()) {
54183 auto& recordValue0 = entry.mValue;
54184 // Control block to let us common up the JS_DefineUCProperty calls when there
54185 // are different ways to succeed at wrapping the value.
54186 do {
54187 if (!GetOrCreateDOMReflector(cx, recordValue0, &tmp)) {
54188 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 54188); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 54188; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54189 aRv.Throw(NS_ERROR_UNEXPECTED);
54190 return;
54191 }
54192 break;
54193 } while (false);
54194 if (!JS_DefineUCProperty(cx, returnObj,
54195 entry.mKey.BeginReading(),
54196 entry.mKey.Length(), tmp,
54197 JSPROP_ENUMERATE)) {
54198 aRv.Throw(NS_ERROR_UNEXPECTED);
54199 return;
54200 }
54201 }
54202 }
54203 argv[0].setObject(*returnObj);
54204 break;
54205 } while (false);
54206
54207 JS::Rooted<JS::Value> callable(cx);
54208 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
54209 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
54210 !InitIds(cx, atomsCache)) ||
54211 !GetCallableProperty(cx, atomsCache->passCastableObjectRecord_id, &callable)) {
54212 aRv.Throw(NS_ERROR_UNEXPECTED);
54213 return;
54214 }
54215 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
54216 if (!JS::Call(cx, thisValue, callable,
54217 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
54218 aRv.NoteJSContextException(cx);
54219 return;
54220 }
54221}
54222
54223void
54224TestJSImplInterfaceJSImpl::PassNullableCastableObjectRecord(const Record<nsString, RefPtr<TestInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
54225{
54226 CallSetup s(this, aRv, "TestJSImplInterface.passNullableCastableObjectRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
54227 if (aRv.Failed()) {
54228 return;
54229 }
54230 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 54230); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 54230; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54231 BindingCallContext& cx = s.GetCallContext();
54232
54233 JS::Rooted<JS::Value> rval(cx);
54234 JS::RootedVector<JS::Value> argv(cx);
54235 if (!argv.resize(1)) {
54236 // That threw an exception on the JSContext, and our CallSetup will do
54237 // the right thing with that.
54238 return;
54239 }
54240 unsigned argc = 1;
54241
54242 do {
54243
54244 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
54245 if (!returnObj) {
54246 aRv.Throw(NS_ERROR_UNEXPECTED);
54247 return;
54248 }
54249 // Scope for 'tmp'
54250 {
54251 JS::Rooted<JS::Value> tmp(cx);
54252 for (auto& entry : arg.Entries()) {
54253 auto& recordValue0 = entry.mValue;
54254 // Control block to let us common up the JS_DefineUCProperty calls when there
54255 // are different ways to succeed at wrapping the value.
54256 do {
54257 if (!recordValue0) {
54258 tmp.setNull();
54259 break;
54260 }
54261 if (!GetOrCreateDOMReflector(cx, recordValue0, &tmp)) {
54262 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 54262); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 54262; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54263 aRv.Throw(NS_ERROR_UNEXPECTED);
54264 return;
54265 }
54266 break;
54267 } while (false);
54268 if (!JS_DefineUCProperty(cx, returnObj,
54269 entry.mKey.BeginReading(),
54270 entry.mKey.Length(), tmp,
54271 JSPROP_ENUMERATE)) {
54272 aRv.Throw(NS_ERROR_UNEXPECTED);
54273 return;
54274 }
54275 }
54276 }
54277 argv[0].setObject(*returnObj);
54278 break;
54279 } while (false);
54280
54281 JS::Rooted<JS::Value> callable(cx);
54282 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
54283 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
54284 !InitIds(cx, atomsCache)) ||
54285 !GetCallableProperty(cx, atomsCache->passNullableCastableObjectRecord_id, &callable)) {
54286 aRv.Throw(NS_ERROR_UNEXPECTED);
54287 return;
54288 }
54289 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
54290 if (!JS::Call(cx, thisValue, callable,
54291 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
54292 aRv.NoteJSContextException(cx);
54293 return;
54294 }
54295}
54296
54297void
54298TestJSImplInterfaceJSImpl::PassCastableObjectNullableRecord(const Nullable<Record<nsString, OwningNonNull<TestInterface>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
54299{
54300 CallSetup s(this, aRv, "TestJSImplInterface.passCastableObjectNullableRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
54301 if (aRv.Failed()) {
54302 return;
54303 }
54304 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 54304); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 54304; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54305 BindingCallContext& cx = s.GetCallContext();
54306
54307 JS::Rooted<JS::Value> rval(cx);
54308 JS::RootedVector<JS::Value> argv(cx);
54309 if (!argv.resize(1)) {
54310 // That threw an exception on the JSContext, and our CallSetup will do
54311 // the right thing with that.
54312 return;
54313 }
54314 unsigned argc = 1;
54315
54316 do {
54317
54318 if (arg.IsNull()) {
54319 argv[0].setNull();
54320 break;
54321 }
54322
54323 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
54324 if (!returnObj) {
54325 aRv.Throw(NS_ERROR_UNEXPECTED);
54326 return;
54327 }
54328 // Scope for 'tmp'
54329 {
54330 JS::Rooted<JS::Value> tmp(cx);
54331 for (auto& entry : arg.Value().Entries()) {
54332 auto& recordValue0 = entry.mValue;
54333 // Control block to let us common up the JS_DefineUCProperty calls when there
54334 // are different ways to succeed at wrapping the value.
54335 do {
54336 if (!GetOrCreateDOMReflector(cx, recordValue0, &tmp)) {
54337 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 54337); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 54337; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54338 aRv.Throw(NS_ERROR_UNEXPECTED);
54339 return;
54340 }
54341 break;
54342 } while (false);
54343 if (!JS_DefineUCProperty(cx, returnObj,
54344 entry.mKey.BeginReading(),
54345 entry.mKey.Length(), tmp,
54346 JSPROP_ENUMERATE)) {
54347 aRv.Throw(NS_ERROR_UNEXPECTED);
54348 return;
54349 }
54350 }
54351 }
54352 argv[0].setObject(*returnObj);
54353 break;
54354 } while (false);
54355
54356 JS::Rooted<JS::Value> callable(cx);
54357 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
54358 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
54359 !InitIds(cx, atomsCache)) ||
54360 !GetCallableProperty(cx, atomsCache->passCastableObjectNullableRecord_id, &callable)) {
54361 aRv.Throw(NS_ERROR_UNEXPECTED);
54362 return;
54363 }
54364 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
54365 if (!JS::Call(cx, thisValue, callable,
54366 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
54367 aRv.NoteJSContextException(cx);
54368 return;
54369 }
54370}
54371
54372void
54373TestJSImplInterfaceJSImpl::PassNullableCastableObjectNullableRecord(const Nullable<Record<nsString, RefPtr<TestInterface>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
54374{
54375 CallSetup s(this, aRv, "TestJSImplInterface.passNullableCastableObjectNullableRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
54376 if (aRv.Failed()) {
54377 return;
54378 }
54379 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 54379); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 54379; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54380 BindingCallContext& cx = s.GetCallContext();
54381
54382 JS::Rooted<JS::Value> rval(cx);
54383 JS::RootedVector<JS::Value> argv(cx);
54384 if (!argv.resize(1)) {
54385 // That threw an exception on the JSContext, and our CallSetup will do
54386 // the right thing with that.
54387 return;
54388 }
54389 unsigned argc = 1;
54390
54391 do {
54392
54393 if (arg.IsNull()) {
54394 argv[0].setNull();
54395 break;
54396 }
54397
54398 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
54399 if (!returnObj) {
54400 aRv.Throw(NS_ERROR_UNEXPECTED);
54401 return;
54402 }
54403 // Scope for 'tmp'
54404 {
54405 JS::Rooted<JS::Value> tmp(cx);
54406 for (auto& entry : arg.Value().Entries()) {
54407 auto& recordValue0 = entry.mValue;
54408 // Control block to let us common up the JS_DefineUCProperty calls when there
54409 // are different ways to succeed at wrapping the value.
54410 do {
54411 if (!recordValue0) {
54412 tmp.setNull();
54413 break;
54414 }
54415 if (!GetOrCreateDOMReflector(cx, recordValue0, &tmp)) {
54416 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 54416); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 54416; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54417 aRv.Throw(NS_ERROR_UNEXPECTED);
54418 return;
54419 }
54420 break;
54421 } while (false);
54422 if (!JS_DefineUCProperty(cx, returnObj,
54423 entry.mKey.BeginReading(),
54424 entry.mKey.Length(), tmp,
54425 JSPROP_ENUMERATE)) {
54426 aRv.Throw(NS_ERROR_UNEXPECTED);
54427 return;
54428 }
54429 }
54430 }
54431 argv[0].setObject(*returnObj);
54432 break;
54433 } while (false);
54434
54435 JS::Rooted<JS::Value> callable(cx);
54436 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
54437 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
54438 !InitIds(cx, atomsCache)) ||
54439 !GetCallableProperty(cx, atomsCache->passNullableCastableObjectNullableRecord_id, &callable)) {
54440 aRv.Throw(NS_ERROR_UNEXPECTED);
54441 return;
54442 }
54443 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
54444 if (!JS::Call(cx, thisValue, callable,
54445 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
54446 aRv.NoteJSContextException(cx);
54447 return;
54448 }
54449}
54450
54451void
54452TestJSImplInterfaceJSImpl::PassOptionalRecord(const Optional<Record<nsString, int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
54453{
54454 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
54455 if (aRv.Failed()) {
54456 return;
54457 }
54458 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 54458); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 54458; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54459 BindingCallContext& cx = s.GetCallContext();
54460
54461 JS::Rooted<JS::Value> rval(cx);
54462 JS::RootedVector<JS::Value> argv(cx);
54463 if (!argv.resize(1)) {
54464 // That threw an exception on the JSContext, and our CallSetup will do
54465 // the right thing with that.
54466 return;
54467 }
54468 unsigned argc = 1;
54469
54470 do {
54471 if (arg.WasPassed()) {
54472
54473 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
54474 if (!returnObj) {
54475 aRv.Throw(NS_ERROR_UNEXPECTED);
54476 return;
54477 }
54478 // Scope for 'tmp'
54479 {
54480 JS::Rooted<JS::Value> tmp(cx);
54481 for (auto& entry : arg.Value().Entries()) {
54482 auto& recordValue0 = entry.mValue;
54483 // Control block to let us common up the JS_DefineUCProperty calls when there
54484 // are different ways to succeed at wrapping the value.
54485 do {
54486 tmp.setInt32(int32_t(recordValue0));
54487 break;
54488 } while (false);
54489 if (!JS_DefineUCProperty(cx, returnObj,
54490 entry.mKey.BeginReading(),
54491 entry.mKey.Length(), tmp,
54492 JSPROP_ENUMERATE)) {
54493 aRv.Throw(NS_ERROR_UNEXPECTED);
54494 return;
54495 }
54496 }
54497 }
54498 argv[0].setObject(*returnObj);
54499 break;
54500 } else if (argc == 1) {
54501 // This is our current trailing argument; reduce argc
54502 --argc;
54503 } else {
54504 argv[0].setUndefined();
54505 }
54506 } while (false);
54507
54508 JS::Rooted<JS::Value> callable(cx);
54509 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
54510 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
54511 !InitIds(cx, atomsCache)) ||
54512 !GetCallableProperty(cx, atomsCache->passOptionalRecord_id, &callable)) {
54513 aRv.Throw(NS_ERROR_UNEXPECTED);
54514 return;
54515 }
54516 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
54517 if (!JS::Call(cx, thisValue, callable,
54518 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
54519 aRv.NoteJSContextException(cx);
54520 return;
54521 }
54522}
54523
54524void
54525TestJSImplInterfaceJSImpl::PassOptionalNullableRecord(const Optional<Nullable<Record<nsString, int32_t>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
54526{
54527 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
54528 if (aRv.Failed()) {
54529 return;
54530 }
54531 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 54531); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 54531; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54532 BindingCallContext& cx = s.GetCallContext();
54533
54534 JS::Rooted<JS::Value> rval(cx);
54535 JS::RootedVector<JS::Value> argv(cx);
54536 if (!argv.resize(1)) {
54537 // That threw an exception on the JSContext, and our CallSetup will do
54538 // the right thing with that.
54539 return;
54540 }
54541 unsigned argc = 1;
54542
54543 do {
54544 if (arg.WasPassed()) {
54545
54546 if (arg.Value().IsNull()) {
54547 argv[0].setNull();
54548 break;
54549 }
54550
54551 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
54552 if (!returnObj) {
54553 aRv.Throw(NS_ERROR_UNEXPECTED);
54554 return;
54555 }
54556 // Scope for 'tmp'
54557 {
54558 JS::Rooted<JS::Value> tmp(cx);
54559 for (auto& entry : arg.Value().Value().Entries()) {
54560 auto& recordValue0 = entry.mValue;
54561 // Control block to let us common up the JS_DefineUCProperty calls when there
54562 // are different ways to succeed at wrapping the value.
54563 do {
54564 tmp.setInt32(int32_t(recordValue0));
54565 break;
54566 } while (false);
54567 if (!JS_DefineUCProperty(cx, returnObj,
54568 entry.mKey.BeginReading(),
54569 entry.mKey.Length(), tmp,
54570 JSPROP_ENUMERATE)) {
54571 aRv.Throw(NS_ERROR_UNEXPECTED);
54572 return;
54573 }
54574 }
54575 }
54576 argv[0].setObject(*returnObj);
54577 break;
54578 } else if (argc == 1) {
54579 // This is our current trailing argument; reduce argc
54580 --argc;
54581 } else {
54582 argv[0].setUndefined();
54583 }
54584 } while (false);
54585
54586 JS::Rooted<JS::Value> callable(cx);
54587 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
54588 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
54589 !InitIds(cx, atomsCache)) ||
54590 !GetCallableProperty(cx, atomsCache->passOptionalNullableRecord_id, &callable)) {
54591 aRv.Throw(NS_ERROR_UNEXPECTED);
54592 return;
54593 }
54594 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
54595 if (!JS::Call(cx, thisValue, callable,
54596 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
54597 aRv.NoteJSContextException(cx);
54598 return;
54599 }
54600}
54601
54602void
54603TestJSImplInterfaceJSImpl::PassOptionalNullableRecordWithDefaultValue(const Nullable<Record<nsString, int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
54604{
54605 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableRecordWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
54606 if (aRv.Failed()) {
54607 return;
54608 }
54609 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 54609); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 54609; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54610 BindingCallContext& cx = s.GetCallContext();
54611
54612 JS::Rooted<JS::Value> rval(cx);
54613 JS::RootedVector<JS::Value> argv(cx);
54614 if (!argv.resize(1)) {
54615 // That threw an exception on the JSContext, and our CallSetup will do
54616 // the right thing with that.
54617 return;
54618 }
54619 unsigned argc = 1;
54620
54621 do {
54622
54623 if (arg.IsNull()) {
54624 argv[0].setNull();
54625 break;
54626 }
54627
54628 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
54629 if (!returnObj) {
54630 aRv.Throw(NS_ERROR_UNEXPECTED);
54631 return;
54632 }
54633 // Scope for 'tmp'
54634 {
54635 JS::Rooted<JS::Value> tmp(cx);
54636 for (auto& entry : arg.Value().Entries()) {
54637 auto& recordValue0 = entry.mValue;
54638 // Control block to let us common up the JS_DefineUCProperty calls when there
54639 // are different ways to succeed at wrapping the value.
54640 do {
54641 tmp.setInt32(int32_t(recordValue0));
54642 break;
54643 } while (false);
54644 if (!JS_DefineUCProperty(cx, returnObj,
54645 entry.mKey.BeginReading(),
54646 entry.mKey.Length(), tmp,
54647 JSPROP_ENUMERATE)) {
54648 aRv.Throw(NS_ERROR_UNEXPECTED);
54649 return;
54650 }
54651 }
54652 }
54653 argv[0].setObject(*returnObj);
54654 break;
54655 } while (false);
54656
54657 JS::Rooted<JS::Value> callable(cx);
54658 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
54659 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
54660 !InitIds(cx, atomsCache)) ||
54661 !GetCallableProperty(cx, atomsCache->passOptionalNullableRecordWithDefaultValue_id, &callable)) {
54662 aRv.Throw(NS_ERROR_UNEXPECTED);
54663 return;
54664 }
54665 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
54666 if (!JS::Call(cx, thisValue, callable,
54667 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
54668 aRv.NoteJSContextException(cx);
54669 return;
54670 }
54671}
54672
54673void
54674TestJSImplInterfaceJSImpl::PassOptionalObjectRecord(const Optional<Record<nsString, OwningNonNull<TestInterface>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
54675{
54676 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalObjectRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
54677 if (aRv.Failed()) {
54678 return;
54679 }
54680 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 54680); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 54680; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54681 BindingCallContext& cx = s.GetCallContext();
54682
54683 JS::Rooted<JS::Value> rval(cx);
54684 JS::RootedVector<JS::Value> argv(cx);
54685 if (!argv.resize(1)) {
54686 // That threw an exception on the JSContext, and our CallSetup will do
54687 // the right thing with that.
54688 return;
54689 }
54690 unsigned argc = 1;
54691
54692 do {
54693 if (arg.WasPassed()) {
54694
54695 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
54696 if (!returnObj) {
54697 aRv.Throw(NS_ERROR_UNEXPECTED);
54698 return;
54699 }
54700 // Scope for 'tmp'
54701 {
54702 JS::Rooted<JS::Value> tmp(cx);
54703 for (auto& entry : arg.Value().Entries()) {
54704 auto& recordValue0 = entry.mValue;
54705 // Control block to let us common up the JS_DefineUCProperty calls when there
54706 // are different ways to succeed at wrapping the value.
54707 do {
54708 if (!GetOrCreateDOMReflector(cx, recordValue0, &tmp)) {
54709 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 54709); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 54709; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54710 aRv.Throw(NS_ERROR_UNEXPECTED);
54711 return;
54712 }
54713 break;
54714 } while (false);
54715 if (!JS_DefineUCProperty(cx, returnObj,
54716 entry.mKey.BeginReading(),
54717 entry.mKey.Length(), tmp,
54718 JSPROP_ENUMERATE)) {
54719 aRv.Throw(NS_ERROR_UNEXPECTED);
54720 return;
54721 }
54722 }
54723 }
54724 argv[0].setObject(*returnObj);
54725 break;
54726 } else if (argc == 1) {
54727 // This is our current trailing argument; reduce argc
54728 --argc;
54729 } else {
54730 argv[0].setUndefined();
54731 }
54732 } while (false);
54733
54734 JS::Rooted<JS::Value> callable(cx);
54735 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
54736 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
54737 !InitIds(cx, atomsCache)) ||
54738 !GetCallableProperty(cx, atomsCache->passOptionalObjectRecord_id, &callable)) {
54739 aRv.Throw(NS_ERROR_UNEXPECTED);
54740 return;
54741 }
54742 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
54743 if (!JS::Call(cx, thisValue, callable,
54744 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
54745 aRv.NoteJSContextException(cx);
54746 return;
54747 }
54748}
54749
54750void
54751TestJSImplInterfaceJSImpl::PassExternalInterfaceRecord(const Record<nsString, RefPtr<TestExternalInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
54752{
54753 CallSetup s(this, aRv, "TestJSImplInterface.passExternalInterfaceRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
54754 if (aRv.Failed()) {
54755 return;
54756 }
54757 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 54757); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 54757; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54758 BindingCallContext& cx = s.GetCallContext();
54759
54760 JS::Rooted<JS::Value> rval(cx);
54761 JS::RootedVector<JS::Value> argv(cx);
54762 if (!argv.resize(1)) {
54763 // That threw an exception on the JSContext, and our CallSetup will do
54764 // the right thing with that.
54765 return;
54766 }
54767 unsigned argc = 1;
54768
54769 do {
54770
54771 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
54772 if (!returnObj) {
54773 aRv.Throw(NS_ERROR_UNEXPECTED);
54774 return;
54775 }
54776 // Scope for 'tmp'
54777 {
54778 JS::Rooted<JS::Value> tmp(cx);
54779 for (auto& entry : arg.Entries()) {
54780 auto& recordValue0 = entry.mValue;
54781 // Control block to let us common up the JS_DefineUCProperty calls when there
54782 // are different ways to succeed at wrapping the value.
54783 do {
54784 if (!WrapObject(cx, recordValue0, &tmp)) {
54785 aRv.Throw(NS_ERROR_UNEXPECTED);
54786 return;
54787 }
54788 break;
54789 } while (false);
54790 if (!JS_DefineUCProperty(cx, returnObj,
54791 entry.mKey.BeginReading(),
54792 entry.mKey.Length(), tmp,
54793 JSPROP_ENUMERATE)) {
54794 aRv.Throw(NS_ERROR_UNEXPECTED);
54795 return;
54796 }
54797 }
54798 }
54799 argv[0].setObject(*returnObj);
54800 break;
54801 } while (false);
54802
54803 JS::Rooted<JS::Value> callable(cx);
54804 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
54805 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
54806 !InitIds(cx, atomsCache)) ||
54807 !GetCallableProperty(cx, atomsCache->passExternalInterfaceRecord_id, &callable)) {
54808 aRv.Throw(NS_ERROR_UNEXPECTED);
54809 return;
54810 }
54811 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
54812 if (!JS::Call(cx, thisValue, callable,
54813 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
54814 aRv.NoteJSContextException(cx);
54815 return;
54816 }
54817}
54818
54819void
54820TestJSImplInterfaceJSImpl::PassNullableExternalInterfaceRecord(const Record<nsString, RefPtr<TestExternalInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
54821{
54822 CallSetup s(this, aRv, "TestJSImplInterface.passNullableExternalInterfaceRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
54823 if (aRv.Failed()) {
54824 return;
54825 }
54826 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 54826); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 54826; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54827 BindingCallContext& cx = s.GetCallContext();
54828
54829 JS::Rooted<JS::Value> rval(cx);
54830 JS::RootedVector<JS::Value> argv(cx);
54831 if (!argv.resize(1)) {
54832 // That threw an exception on the JSContext, and our CallSetup will do
54833 // the right thing with that.
54834 return;
54835 }
54836 unsigned argc = 1;
54837
54838 do {
54839
54840 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
54841 if (!returnObj) {
54842 aRv.Throw(NS_ERROR_UNEXPECTED);
54843 return;
54844 }
54845 // Scope for 'tmp'
54846 {
54847 JS::Rooted<JS::Value> tmp(cx);
54848 for (auto& entry : arg.Entries()) {
54849 auto& recordValue0 = entry.mValue;
54850 // Control block to let us common up the JS_DefineUCProperty calls when there
54851 // are different ways to succeed at wrapping the value.
54852 do {
54853 if (!recordValue0) {
54854 tmp.setNull();
54855 break;
54856 }
54857 if (!WrapObject(cx, recordValue0, &tmp)) {
54858 aRv.Throw(NS_ERROR_UNEXPECTED);
54859 return;
54860 }
54861 break;
54862 } while (false);
54863 if (!JS_DefineUCProperty(cx, returnObj,
54864 entry.mKey.BeginReading(),
54865 entry.mKey.Length(), tmp,
54866 JSPROP_ENUMERATE)) {
54867 aRv.Throw(NS_ERROR_UNEXPECTED);
54868 return;
54869 }
54870 }
54871 }
54872 argv[0].setObject(*returnObj);
54873 break;
54874 } while (false);
54875
54876 JS::Rooted<JS::Value> callable(cx);
54877 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
54878 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
54879 !InitIds(cx, atomsCache)) ||
54880 !GetCallableProperty(cx, atomsCache->passNullableExternalInterfaceRecord_id, &callable)) {
54881 aRv.Throw(NS_ERROR_UNEXPECTED);
54882 return;
54883 }
54884 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
54885 if (!JS::Call(cx, thisValue, callable,
54886 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
54887 aRv.NoteJSContextException(cx);
54888 return;
54889 }
54890}
54891
54892void
54893TestJSImplInterfaceJSImpl::PassStringRecord(const Record<nsString, nsString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
54894{
54895 CallSetup s(this, aRv, "TestJSImplInterface.passStringRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
54896 if (aRv.Failed()) {
54897 return;
54898 }
54899 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 54899); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 54899; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54900 BindingCallContext& cx = s.GetCallContext();
54901
54902 JS::Rooted<JS::Value> rval(cx);
54903 JS::RootedVector<JS::Value> argv(cx);
54904 if (!argv.resize(1)) {
54905 // That threw an exception on the JSContext, and our CallSetup will do
54906 // the right thing with that.
54907 return;
54908 }
54909 unsigned argc = 1;
54910
54911 do {
54912
54913 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
54914 if (!returnObj) {
54915 aRv.Throw(NS_ERROR_UNEXPECTED);
54916 return;
54917 }
54918 // Scope for 'tmp'
54919 {
54920 JS::Rooted<JS::Value> tmp(cx);
54921 for (auto& entry : arg.Entries()) {
54922 auto& recordValue0 = entry.mValue;
54923 // Control block to let us common up the JS_DefineUCProperty calls when there
54924 // are different ways to succeed at wrapping the value.
54925 do {
54926 if (!xpc::NonVoidStringToJsval(cx, recordValue0, &tmp)) {
54927 aRv.Throw(NS_ERROR_UNEXPECTED);
54928 return;
54929 }
54930 break;
54931 } while (false);
54932 if (!JS_DefineUCProperty(cx, returnObj,
54933 entry.mKey.BeginReading(),
54934 entry.mKey.Length(), tmp,
54935 JSPROP_ENUMERATE)) {
54936 aRv.Throw(NS_ERROR_UNEXPECTED);
54937 return;
54938 }
54939 }
54940 }
54941 argv[0].setObject(*returnObj);
54942 break;
54943 } while (false);
54944
54945 JS::Rooted<JS::Value> callable(cx);
54946 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
54947 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
54948 !InitIds(cx, atomsCache)) ||
54949 !GetCallableProperty(cx, atomsCache->passStringRecord_id, &callable)) {
54950 aRv.Throw(NS_ERROR_UNEXPECTED);
54951 return;
54952 }
54953 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
54954 if (!JS::Call(cx, thisValue, callable,
54955 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
54956 aRv.NoteJSContextException(cx);
54957 return;
54958 }
54959}
54960
54961void
54962TestJSImplInterfaceJSImpl::PassByteStringRecord(const Record<nsString, nsCString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
54963{
54964 CallSetup s(this, aRv, "TestJSImplInterface.passByteStringRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
54965 if (aRv.Failed()) {
54966 return;
54967 }
54968 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 54968); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 54968; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
54969 BindingCallContext& cx = s.GetCallContext();
54970
54971 JS::Rooted<JS::Value> rval(cx);
54972 JS::RootedVector<JS::Value> argv(cx);
54973 if (!argv.resize(1)) {
54974 // That threw an exception on the JSContext, and our CallSetup will do
54975 // the right thing with that.
54976 return;
54977 }
54978 unsigned argc = 1;
54979
54980 do {
54981
54982 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
54983 if (!returnObj) {
54984 aRv.Throw(NS_ERROR_UNEXPECTED);
54985 return;
54986 }
54987 // Scope for 'tmp'
54988 {
54989 JS::Rooted<JS::Value> tmp(cx);
54990 for (auto& entry : arg.Entries()) {
54991 auto& recordValue0 = entry.mValue;
54992 // Control block to let us common up the JS_DefineUCProperty calls when there
54993 // are different ways to succeed at wrapping the value.
54994 do {
54995 if (!NonVoidByteStringToJsval(cx, recordValue0, &tmp)) {
54996 aRv.Throw(NS_ERROR_UNEXPECTED);
54997 return;
54998 }
54999 break;
55000 } while (false);
55001 if (!JS_DefineUCProperty(cx, returnObj,
55002 entry.mKey.BeginReading(),
55003 entry.mKey.Length(), tmp,
55004 JSPROP_ENUMERATE)) {
55005 aRv.Throw(NS_ERROR_UNEXPECTED);
55006 return;
55007 }
55008 }
55009 }
55010 argv[0].setObject(*returnObj);
55011 break;
55012 } while (false);
55013
55014 JS::Rooted<JS::Value> callable(cx);
55015 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
55016 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
55017 !InitIds(cx, atomsCache)) ||
55018 !GetCallableProperty(cx, atomsCache->passByteStringRecord_id, &callable)) {
55019 aRv.Throw(NS_ERROR_UNEXPECTED);
55020 return;
55021 }
55022 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
55023 if (!JS::Call(cx, thisValue, callable,
55024 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
55025 aRv.NoteJSContextException(cx);
55026 return;
55027 }
55028}
55029
55030void
55031TestJSImplInterfaceJSImpl::PassUTF8StringRecord(const Record<nsString, nsCString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
55032{
55033 CallSetup s(this, aRv, "TestJSImplInterface.passUTF8StringRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
55034 if (aRv.Failed()) {
55035 return;
55036 }
55037 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 55037); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 55037; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
55038 BindingCallContext& cx = s.GetCallContext();
55039
55040 JS::Rooted<JS::Value> rval(cx);
55041 JS::RootedVector<JS::Value> argv(cx);
55042 if (!argv.resize(1)) {
55043 // That threw an exception on the JSContext, and our CallSetup will do
55044 // the right thing with that.
55045 return;
55046 }
55047 unsigned argc = 1;
55048
55049 do {
55050
55051 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
55052 if (!returnObj) {
55053 aRv.Throw(NS_ERROR_UNEXPECTED);
55054 return;
55055 }
55056 // Scope for 'tmp'
55057 {
55058 JS::Rooted<JS::Value> tmp(cx);
55059 for (auto& entry : arg.Entries()) {
55060 auto& recordValue0 = entry.mValue;
55061 // Control block to let us common up the JS_DefineUCProperty calls when there
55062 // are different ways to succeed at wrapping the value.
55063 do {
55064 if (!NonVoidUTF8StringToJsval(cx, recordValue0, &tmp)) {
55065 aRv.Throw(NS_ERROR_UNEXPECTED);
55066 return;
55067 }
55068 break;
55069 } while (false);
55070 if (!JS_DefineUCProperty(cx, returnObj,
55071 entry.mKey.BeginReading(),
55072 entry.mKey.Length(), tmp,
55073 JSPROP_ENUMERATE)) {
55074 aRv.Throw(NS_ERROR_UNEXPECTED);
55075 return;
55076 }
55077 }
55078 }
55079 argv[0].setObject(*returnObj);
55080 break;
55081 } while (false);
55082
55083 JS::Rooted<JS::Value> callable(cx);
55084 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
55085 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
55086 !InitIds(cx, atomsCache)) ||
55087 !GetCallableProperty(cx, atomsCache->passUTF8StringRecord_id, &callable)) {
55088 aRv.Throw(NS_ERROR_UNEXPECTED);
55089 return;
55090 }
55091 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
55092 if (!JS::Call(cx, thisValue, callable,
55093 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
55094 aRv.NoteJSContextException(cx);
55095 return;
55096 }
55097}
55098
55099void
55100TestJSImplInterfaceJSImpl::PassRecordOfRecords(const Record<nsString, Record<nsString, int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
55101{
55102 CallSetup s(this, aRv, "TestJSImplInterface.passRecordOfRecords", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
55103 if (aRv.Failed()) {
55104 return;
55105 }
55106 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 55106); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 55106; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
55107 BindingCallContext& cx = s.GetCallContext();
55108
55109 JS::Rooted<JS::Value> rval(cx);
55110 JS::RootedVector<JS::Value> argv(cx);
55111 if (!argv.resize(1)) {
55112 // That threw an exception on the JSContext, and our CallSetup will do
55113 // the right thing with that.
55114 return;
55115 }
55116 unsigned argc = 1;
55117
55118 do {
55119
55120 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
55121 if (!returnObj) {
55122 aRv.Throw(NS_ERROR_UNEXPECTED);
55123 return;
55124 }
55125 // Scope for 'tmp'
55126 {
55127 JS::Rooted<JS::Value> tmp(cx);
55128 for (auto& entry : arg.Entries()) {
55129 auto& recordValue0 = entry.mValue;
55130 // Control block to let us common up the JS_DefineUCProperty calls when there
55131 // are different ways to succeed at wrapping the value.
55132 do {
55133
55134 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
55135 if (!returnObj) {
55136 aRv.Throw(NS_ERROR_UNEXPECTED);
55137 return;
55138 }
55139 // Scope for 'tmp'
55140 {
55141 JS::Rooted<JS::Value> tmp(cx);
55142 for (auto& entry : recordValue0.Entries()) {
55143 auto& recordValue1 = entry.mValue;
55144 // Control block to let us common up the JS_DefineUCProperty calls when there
55145 // are different ways to succeed at wrapping the value.
55146 do {
55147 tmp.setInt32(int32_t(recordValue1));
55148 break;
55149 } while (false);
55150 if (!JS_DefineUCProperty(cx, returnObj,
55151 entry.mKey.BeginReading(),
55152 entry.mKey.Length(), tmp,
55153 JSPROP_ENUMERATE)) {
55154 aRv.Throw(NS_ERROR_UNEXPECTED);
55155 return;
55156 }
55157 }
55158 }
55159 tmp.setObject(*returnObj);
55160 break;
55161 } while (false);
55162 if (!JS_DefineUCProperty(cx, returnObj,
55163 entry.mKey.BeginReading(),
55164 entry.mKey.Length(), tmp,
55165 JSPROP_ENUMERATE)) {
55166 aRv.Throw(NS_ERROR_UNEXPECTED);
55167 return;
55168 }
55169 }
55170 }
55171 argv[0].setObject(*returnObj);
55172 break;
55173 } while (false);
55174
55175 JS::Rooted<JS::Value> callable(cx);
55176 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
55177 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
55178 !InitIds(cx, atomsCache)) ||
55179 !GetCallableProperty(cx, atomsCache->passRecordOfRecords_id, &callable)) {
55180 aRv.Throw(NS_ERROR_UNEXPECTED);
55181 return;
55182 }
55183 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
55184 if (!JS::Call(cx, thisValue, callable,
55185 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
55186 aRv.NoteJSContextException(cx);
55187 return;
55188 }
55189}
55190
55191void
55192TestJSImplInterfaceJSImpl::ReceiveRecord(Record<nsString, int32_t>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
55193{
55194 CallSetup s(this, aRv, "TestJSImplInterface.receiveRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
55195 if (aRv.Failed()) {
55196 return;
55197 }
55198 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 55198); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 55198; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
55199 BindingCallContext& cx = s.GetCallContext();
55200
55201 JS::Rooted<JS::Value> rval(cx);
55202
55203 JS::Rooted<JS::Value> callable(cx);
55204 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
55205 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
55206 !InitIds(cx, atomsCache)) ||
55207 !GetCallableProperty(cx, atomsCache->receiveRecord_id, &callable)) {
55208 aRv.Throw(NS_ERROR_UNEXPECTED);
55209 return;
55210 }
55211 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
55212 if (!JS::Call(cx, thisValue, callable,
55213 JS::HandleValueArray::empty(), &rval)) {
55214 aRv.NoteJSContextException(cx);
55215 return;
55216 }
55217 Record<nsString, int32_t>& rvalDecl(aRetVal);
55218 if (rval.isObject()) {
55219 auto& recordEntries = rvalDecl.Entries();
55220
55221 JS::Rooted<JSObject*> recordObj(cx, &rval.toObject());
55222 JS::RootedVector<jsid> ids(cx);
55223 if (!js::GetPropertyKeys(cx, recordObj,
55224 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
55225 aRv.Throw(NS_ERROR_UNEXPECTED);
55226 return;
55227 }
55228 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
55229 JS_ReportOutOfMemory(cx);
55230 aRv.Throw(NS_ERROR_UNEXPECTED);
55231 return;
55232 }
55233 JS::Rooted<JS::Value> propNameValue(cx);
55234 JS::Rooted<JS::Value> temp(cx);
55235 JS::Rooted<jsid> curId(cx);
55236 JS::Rooted<JS::Value> idVal(cx);
55237 // Use a hashset to keep track of ids seen, to avoid
55238 // introducing nasty O(N^2) behavior scanning for them all the
55239 // time. Ideally we'd use a data structure with O(1) lookup
55240 // _and_ ordering for the MozMap, but we don't have one lying
55241 // around.
55242 nsTHashtable<nsStringHashKey> idsSeen;
55243 for (size_t i = 0; i < ids.length(); ++i) {
55244 curId = ids[i];
55245
55246 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
55247 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
55248 &desc)) {
55249 aRv.Throw(NS_ERROR_UNEXPECTED);
55250 return;
55251 }
55252
55253 if (desc.isNothing() || !desc->enumerable()) {
55254 continue;
55255 }
55256
55257 idVal = js::IdToValue(curId);
55258 nsString propName;
55259 // This will just throw if idVal is a Symbol, like the spec says
55260 // to do.
55261 if (!ConvertJSValueToString(cx, idVal, "key of return value of TestJSImplInterface.receiveRecord", propName)) {
55262 aRv.Throw(NS_ERROR_UNEXPECTED);
55263 return;
55264 }
55265
55266 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
55267 aRv.Throw(NS_ERROR_UNEXPECTED);
55268 return;
55269 }
55270
55271 Record<nsString, int32_t>::EntryType* entry;
55272 if (!idsSeen.EnsureInserted(propName)) {
55273 // Find the existing entry.
55274 auto idx = recordEntries.IndexOf(propName);
55275 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 55276); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 55276; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
55276 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 55276); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 55276; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
55277 // Now blow it away to make it look like it was just added
55278 // to the array, because it's not obvious that it's
55279 // safe to write to its already-initialized mValue via our
55280 // normal codegen conversions. For example, the value
55281 // could be a union and this would change its type, but
55282 // codegen assumes we won't do that.
55283 entry = recordEntries.ReconstructElementAt(idx);
55284 } else {
55285 // Safe to do an infallible append here, because we did a
55286 // SetCapacity above to the right capacity.
55287 entry = recordEntries.AppendElement();
55288 }
55289 entry->mKey = propName;
55290 int32_t& slot = entry->mValue;
55291 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in return value of TestJSImplInterface.receiveRecord", &slot)) {
55292 aRv.Throw(NS_ERROR_UNEXPECTED);
55293 return;
55294 }
55295 }
55296 } else {
55297 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveRecord");
55298 aRv.Throw(NS_ERROR_UNEXPECTED);
55299 return;
55300 }
55301}
55302
55303void
55304TestJSImplInterfaceJSImpl::ReceiveNullableRecord(Nullable<Record<nsString, int32_t>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
55305{
55306 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
55307 if (aRv.Failed()) {
55308 return;
55309 }
55310 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 55310); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 55310; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
55311 BindingCallContext& cx = s.GetCallContext();
55312
55313 JS::Rooted<JS::Value> rval(cx);
55314
55315 JS::Rooted<JS::Value> callable(cx);
55316 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
55317 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
55318 !InitIds(cx, atomsCache)) ||
55319 !GetCallableProperty(cx, atomsCache->receiveNullableRecord_id, &callable)) {
55320 aRv.Throw(NS_ERROR_UNEXPECTED);
55321 return;
55322 }
55323 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
55324 if (!JS::Call(cx, thisValue, callable,
55325 JS::HandleValueArray::empty(), &rval)) {
55326 aRv.NoteJSContextException(cx);
55327 return;
55328 }
55329 Nullable<Record<nsString, int32_t>>& rvalDecl(aRetVal);
55330 if (rval.isObject()) {
55331 auto& recordEntries = rvalDecl.SetValue().Entries();
55332
55333 JS::Rooted<JSObject*> recordObj(cx, &rval.toObject());
55334 JS::RootedVector<jsid> ids(cx);
55335 if (!js::GetPropertyKeys(cx, recordObj,
55336 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
55337 aRv.Throw(NS_ERROR_UNEXPECTED);
55338 return;
55339 }
55340 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
55341 JS_ReportOutOfMemory(cx);
55342 aRv.Throw(NS_ERROR_UNEXPECTED);
55343 return;
55344 }
55345 JS::Rooted<JS::Value> propNameValue(cx);
55346 JS::Rooted<JS::Value> temp(cx);
55347 JS::Rooted<jsid> curId(cx);
55348 JS::Rooted<JS::Value> idVal(cx);
55349 // Use a hashset to keep track of ids seen, to avoid
55350 // introducing nasty O(N^2) behavior scanning for them all the
55351 // time. Ideally we'd use a data structure with O(1) lookup
55352 // _and_ ordering for the MozMap, but we don't have one lying
55353 // around.
55354 nsTHashtable<nsStringHashKey> idsSeen;
55355 for (size_t i = 0; i < ids.length(); ++i) {
55356 curId = ids[i];
55357
55358 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
55359 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
55360 &desc)) {
55361 aRv.Throw(NS_ERROR_UNEXPECTED);
55362 return;
55363 }
55364
55365 if (desc.isNothing() || !desc->enumerable()) {
55366 continue;
55367 }
55368
55369 idVal = js::IdToValue(curId);
55370 nsString propName;
55371 // This will just throw if idVal is a Symbol, like the spec says
55372 // to do.
55373 if (!ConvertJSValueToString(cx, idVal, "key of return value of TestJSImplInterface.receiveNullableRecord", propName)) {
55374 aRv.Throw(NS_ERROR_UNEXPECTED);
55375 return;
55376 }
55377
55378 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
55379 aRv.Throw(NS_ERROR_UNEXPECTED);
55380 return;
55381 }
55382
55383 Record<nsString, int32_t>::EntryType* entry;
55384 if (!idsSeen.EnsureInserted(propName)) {
55385 // Find the existing entry.
55386 auto idx = recordEntries.IndexOf(propName);
55387 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 55388); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 55388; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
55388 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 55388); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 55388; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
55389 // Now blow it away to make it look like it was just added
55390 // to the array, because it's not obvious that it's
55391 // safe to write to its already-initialized mValue via our
55392 // normal codegen conversions. For example, the value
55393 // could be a union and this would change its type, but
55394 // codegen assumes we won't do that.
55395 entry = recordEntries.ReconstructElementAt(idx);
55396 } else {
55397 // Safe to do an infallible append here, because we did a
55398 // SetCapacity above to the right capacity.
55399 entry = recordEntries.AppendElement();
55400 }
55401 entry->mKey = propName;
55402 int32_t& slot = entry->mValue;
55403 if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in return value of TestJSImplInterface.receiveNullableRecord", &slot)) {
55404 aRv.Throw(NS_ERROR_UNEXPECTED);
55405 return;
55406 }
55407 }
55408 } else if (rval.isNullOrUndefined()) {
55409 rvalDecl.SetNull();
55410 } else {
55411 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveNullableRecord");
55412 aRv.Throw(NS_ERROR_UNEXPECTED);
55413 return;
55414 }
55415}
55416
55417void
55418TestJSImplInterfaceJSImpl::ReceiveRecordOfNullableInts(Record<nsString, Nullable<int32_t>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
55419{
55420 CallSetup s(this, aRv, "TestJSImplInterface.receiveRecordOfNullableInts", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
55421 if (aRv.Failed()) {
55422 return;
55423 }
55424 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 55424); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 55424; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
55425 BindingCallContext& cx = s.GetCallContext();
55426
55427 JS::Rooted<JS::Value> rval(cx);
55428
55429 JS::Rooted<JS::Value> callable(cx);
55430 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
55431 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
55432 !InitIds(cx, atomsCache)) ||
55433 !GetCallableProperty(cx, atomsCache->receiveRecordOfNullableInts_id, &callable)) {
55434 aRv.Throw(NS_ERROR_UNEXPECTED);
55435 return;
55436 }
55437 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
55438 if (!JS::Call(cx, thisValue, callable,
55439 JS::HandleValueArray::empty(), &rval)) {
55440 aRv.NoteJSContextException(cx);
55441 return;
55442 }
55443 Record<nsString, Nullable<int32_t>>& rvalDecl(aRetVal);
55444 if (rval.isObject()) {
55445 auto& recordEntries = rvalDecl.Entries();
55446
55447 JS::Rooted<JSObject*> recordObj(cx, &rval.toObject());
55448 JS::RootedVector<jsid> ids(cx);
55449 if (!js::GetPropertyKeys(cx, recordObj,
55450 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
55451 aRv.Throw(NS_ERROR_UNEXPECTED);
55452 return;
55453 }
55454 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
55455 JS_ReportOutOfMemory(cx);
55456 aRv.Throw(NS_ERROR_UNEXPECTED);
55457 return;
55458 }
55459 JS::Rooted<JS::Value> propNameValue(cx);
55460 JS::Rooted<JS::Value> temp(cx);
55461 JS::Rooted<jsid> curId(cx);
55462 JS::Rooted<JS::Value> idVal(cx);
55463 // Use a hashset to keep track of ids seen, to avoid
55464 // introducing nasty O(N^2) behavior scanning for them all the
55465 // time. Ideally we'd use a data structure with O(1) lookup
55466 // _and_ ordering for the MozMap, but we don't have one lying
55467 // around.
55468 nsTHashtable<nsStringHashKey> idsSeen;
55469 for (size_t i = 0; i < ids.length(); ++i) {
55470 curId = ids[i];
55471
55472 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
55473 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
55474 &desc)) {
55475 aRv.Throw(NS_ERROR_UNEXPECTED);
55476 return;
55477 }
55478
55479 if (desc.isNothing() || !desc->enumerable()) {
55480 continue;
55481 }
55482
55483 idVal = js::IdToValue(curId);
55484 nsString propName;
55485 // This will just throw if idVal is a Symbol, like the spec says
55486 // to do.
55487 if (!ConvertJSValueToString(cx, idVal, "key of return value of TestJSImplInterface.receiveRecordOfNullableInts", propName)) {
55488 aRv.Throw(NS_ERROR_UNEXPECTED);
55489 return;
55490 }
55491
55492 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
55493 aRv.Throw(NS_ERROR_UNEXPECTED);
55494 return;
55495 }
55496
55497 Record<nsString, Nullable<int32_t>>::EntryType* entry;
55498 if (!idsSeen.EnsureInserted(propName)) {
55499 // Find the existing entry.
55500 auto idx = recordEntries.IndexOf(propName);
55501 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 55502); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 55502; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
55502 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 55502); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 55502; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
55503 // Now blow it away to make it look like it was just added
55504 // to the array, because it's not obvious that it's
55505 // safe to write to its already-initialized mValue via our
55506 // normal codegen conversions. For example, the value
55507 // could be a union and this would change its type, but
55508 // codegen assumes we won't do that.
55509 entry = recordEntries.ReconstructElementAt(idx);
55510 } else {
55511 // Safe to do an infallible append here, because we did a
55512 // SetCapacity above to the right capacity.
55513 entry = recordEntries.AppendElement();
55514 }
55515 entry->mKey = propName;
55516 Nullable<int32_t>& slot = entry->mValue;
55517 if (temp.isNullOrUndefined()) {
55518 slot.SetNull();
55519 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in return value of TestJSImplInterface.receiveRecordOfNullableInts", &slot.SetValue())) {
55520 aRv.Throw(NS_ERROR_UNEXPECTED);
55521 return;
55522 }
55523 }
55524 } else {
55525 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveRecordOfNullableInts");
55526 aRv.Throw(NS_ERROR_UNEXPECTED);
55527 return;
55528 }
55529}
55530
55531void
55532TestJSImplInterfaceJSImpl::ReceiveNullableRecordOfNullableInts(Nullable<Record<nsString, Nullable<int32_t>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
55533{
55534 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableRecordOfNullableInts", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
55535 if (aRv.Failed()) {
55536 return;
55537 }
55538 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 55538); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 55538; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
55539 BindingCallContext& cx = s.GetCallContext();
55540
55541 JS::Rooted<JS::Value> rval(cx);
55542
55543 JS::Rooted<JS::Value> callable(cx);
55544 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
55545 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
55546 !InitIds(cx, atomsCache)) ||
55547 !GetCallableProperty(cx, atomsCache->receiveNullableRecordOfNullableInts_id, &callable)) {
55548 aRv.Throw(NS_ERROR_UNEXPECTED);
55549 return;
55550 }
55551 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
55552 if (!JS::Call(cx, thisValue, callable,
55553 JS::HandleValueArray::empty(), &rval)) {
55554 aRv.NoteJSContextException(cx);
55555 return;
55556 }
55557 Nullable<Record<nsString, Nullable<int32_t>>>& rvalDecl(aRetVal);
55558 if (rval.isObject()) {
55559 auto& recordEntries = rvalDecl.SetValue().Entries();
55560
55561 JS::Rooted<JSObject*> recordObj(cx, &rval.toObject());
55562 JS::RootedVector<jsid> ids(cx);
55563 if (!js::GetPropertyKeys(cx, recordObj,
55564 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
55565 aRv.Throw(NS_ERROR_UNEXPECTED);
55566 return;
55567 }
55568 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
55569 JS_ReportOutOfMemory(cx);
55570 aRv.Throw(NS_ERROR_UNEXPECTED);
55571 return;
55572 }
55573 JS::Rooted<JS::Value> propNameValue(cx);
55574 JS::Rooted<JS::Value> temp(cx);
55575 JS::Rooted<jsid> curId(cx);
55576 JS::Rooted<JS::Value> idVal(cx);
55577 // Use a hashset to keep track of ids seen, to avoid
55578 // introducing nasty O(N^2) behavior scanning for them all the
55579 // time. Ideally we'd use a data structure with O(1) lookup
55580 // _and_ ordering for the MozMap, but we don't have one lying
55581 // around.
55582 nsTHashtable<nsStringHashKey> idsSeen;
55583 for (size_t i = 0; i < ids.length(); ++i) {
55584 curId = ids[i];
55585
55586 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
55587 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
55588 &desc)) {
55589 aRv.Throw(NS_ERROR_UNEXPECTED);
55590 return;
55591 }
55592
55593 if (desc.isNothing() || !desc->enumerable()) {
55594 continue;
55595 }
55596
55597 idVal = js::IdToValue(curId);
55598 nsString propName;
55599 // This will just throw if idVal is a Symbol, like the spec says
55600 // to do.
55601 if (!ConvertJSValueToString(cx, idVal, "key of return value of TestJSImplInterface.receiveNullableRecordOfNullableInts", propName)) {
55602 aRv.Throw(NS_ERROR_UNEXPECTED);
55603 return;
55604 }
55605
55606 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
55607 aRv.Throw(NS_ERROR_UNEXPECTED);
55608 return;
55609 }
55610
55611 Record<nsString, Nullable<int32_t>>::EntryType* entry;
55612 if (!idsSeen.EnsureInserted(propName)) {
55613 // Find the existing entry.
55614 auto idx = recordEntries.IndexOf(propName);
55615 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 55616); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 55616; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
55616 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 55616); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 55616; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
55617 // Now blow it away to make it look like it was just added
55618 // to the array, because it's not obvious that it's
55619 // safe to write to its already-initialized mValue via our
55620 // normal codegen conversions. For example, the value
55621 // could be a union and this would change its type, but
55622 // codegen assumes we won't do that.
55623 entry = recordEntries.ReconstructElementAt(idx);
55624 } else {
55625 // Safe to do an infallible append here, because we did a
55626 // SetCapacity above to the right capacity.
55627 entry = recordEntries.AppendElement();
55628 }
55629 entry->mKey = propName;
55630 Nullable<int32_t>& slot = entry->mValue;
55631 if (temp.isNullOrUndefined()) {
55632 slot.SetNull();
55633 } else if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, "Value in return value of TestJSImplInterface.receiveNullableRecordOfNullableInts", &slot.SetValue())) {
55634 aRv.Throw(NS_ERROR_UNEXPECTED);
55635 return;
55636 }
55637 }
55638 } else if (rval.isNullOrUndefined()) {
55639 rvalDecl.SetNull();
55640 } else {
55641 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveNullableRecordOfNullableInts");
55642 aRv.Throw(NS_ERROR_UNEXPECTED);
55643 return;
55644 }
55645}
55646
55647void
55648TestJSImplInterfaceJSImpl::ReceiveAnyRecord(Record<nsString, JS::Value>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
55649{
55650 CallSetup s(this, aRv, "TestJSImplInterface.receiveAnyRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
55651 if (aRv.Failed()) {
55652 return;
55653 }
55654 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 55654); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 55654; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
55655 BindingCallContext& cx = s.GetCallContext();
55656
55657 JS::Rooted<JS::Value> rval(cx);
55658
55659 JS::Rooted<JS::Value> callable(cx);
55660 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
55661 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
55662 !InitIds(cx, atomsCache)) ||
55663 !GetCallableProperty(cx, atomsCache->receiveAnyRecord_id, &callable)) {
55664 aRv.Throw(NS_ERROR_UNEXPECTED);
55665 return;
55666 }
55667 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
55668 if (!JS::Call(cx, thisValue, callable,
55669 JS::HandleValueArray::empty(), &rval)) {
55670 aRv.NoteJSContextException(cx);
55671 return;
55672 }
55673 Record<nsString, JS::Value>& rvalDecl(aRetVal);
55674 if (rval.isObject()) {
55675 auto& recordEntries = rvalDecl.Entries();
55676
55677 JS::Rooted<JSObject*> recordObj(cx, &rval.toObject());
55678 JS::RootedVector<jsid> ids(cx);
55679 if (!js::GetPropertyKeys(cx, recordObj,
55680 JSITER_OWNONLY0x8 | JSITER_HIDDEN0x10 | JSITER_SYMBOLS0x20, &ids)) {
55681 aRv.Throw(NS_ERROR_UNEXPECTED);
55682 return;
55683 }
55684 if (!recordEntries.SetCapacity(ids.length(), mozilla::fallible)) {
55685 JS_ReportOutOfMemory(cx);
55686 aRv.Throw(NS_ERROR_UNEXPECTED);
55687 return;
55688 }
55689 JS::Rooted<JS::Value> propNameValue(cx);
55690 JS::Rooted<JS::Value> temp(cx);
55691 JS::Rooted<jsid> curId(cx);
55692 JS::Rooted<JS::Value> idVal(cx);
55693 // Use a hashset to keep track of ids seen, to avoid
55694 // introducing nasty O(N^2) behavior scanning for them all the
55695 // time. Ideally we'd use a data structure with O(1) lookup
55696 // _and_ ordering for the MozMap, but we don't have one lying
55697 // around.
55698 nsTHashtable<nsStringHashKey> idsSeen;
55699 for (size_t i = 0; i < ids.length(); ++i) {
55700 curId = ids[i];
55701
55702 JS::Rooted<mozilla::Maybe<JS::PropertyDescriptor>> desc(cx);
55703 if (!JS_GetOwnPropertyDescriptorById(cx, recordObj, curId,
55704 &desc)) {
55705 aRv.Throw(NS_ERROR_UNEXPECTED);
55706 return;
55707 }
55708
55709 if (desc.isNothing() || !desc->enumerable()) {
55710 continue;
55711 }
55712
55713 idVal = js::IdToValue(curId);
55714 nsString propName;
55715 // This will just throw if idVal is a Symbol, like the spec says
55716 // to do.
55717 if (!ConvertJSValueToString(cx, idVal, "key of return value of TestJSImplInterface.receiveAnyRecord", propName)) {
55718 aRv.Throw(NS_ERROR_UNEXPECTED);
55719 return;
55720 }
55721
55722 if (!JS_GetPropertyById(cx, recordObj, curId, &temp)) {
55723 aRv.Throw(NS_ERROR_UNEXPECTED);
55724 return;
55725 }
55726
55727 Record<nsString, JS::Value>::EntryType* entry;
55728 if (!idsSeen.EnsureInserted(propName)) {
55729 // Find the existing entry.
55730 auto idx = recordEntries.IndexOf(propName);
55731 MOZ_ASSERT(idx != recordEntries.NoIndex,do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 55732); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 55732; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
55732 "Why is it not found?")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(idx != recordEntries.NoIndex)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(idx != recordEntries.NoIndex
))), 0))) { do { } while (false); MOZ_ReportAssertionFailure(
"idx != recordEntries.NoIndex" " (" "Why is it not found?" ")"
, "../TestJSImplGenBinding.cpp", 55732); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "idx != recordEntries.NoIndex" ") (" "Why is it not found?"
")"); do { *((volatile int*)__null) = 55732; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
55733 // Now blow it away to make it look like it was just added
55734 // to the array, because it's not obvious that it's
55735 // safe to write to its already-initialized mValue via our
55736 // normal codegen conversions. For example, the value
55737 // could be a union and this would change its type, but
55738 // codegen assumes we won't do that.
55739 entry = recordEntries.ReconstructElementAt(idx);
55740 } else {
55741 // Safe to do an infallible append here, because we did a
55742 // SetCapacity above to the right capacity.
55743 entry = recordEntries.AppendElement();
55744 }
55745 entry->mKey = propName;
55746 JS::Value& slot = entry->mValue;
55747#ifdef __clang__1
55748#pragma clang diagnostic push
55749#pragma clang diagnostic ignored "-Wunreachable-code"
55750#pragma clang diagnostic ignored "-Wunreachable-code-return"
55751#endif // __clang__
55752 if ((false) && !CallerSubsumes(temp)) {
55753 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("value in return value of TestJSImplInterface.receiveAnyRecord");
55754 aRv.Throw(NS_ERROR_UNEXPECTED);
55755 return;
55756 }
55757#ifdef __clang__1
55758#pragma clang diagnostic pop
55759#endif // __clang__
55760 slot = temp;
55761 }
55762 } else {
55763 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveAnyRecord");
55764 aRv.Throw(NS_ERROR_UNEXPECTED);
55765 return;
55766 }
55767}
55768
55769void
55770TestJSImplInterfaceJSImpl::PassArrayBuffer(const ArrayBuffer& arg, ErrorResult& aRv, JS::Realm* aRealm)
55771{
55772 CallSetup s(this, aRv, "TestJSImplInterface.passArrayBuffer", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
55773 if (aRv.Failed()) {
55774 return;
55775 }
55776 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 55776); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 55776; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
55777 BindingCallContext& cx = s.GetCallContext();
55778
55779 JS::Rooted<JS::Value> rval(cx);
55780 JS::RootedVector<JS::Value> argv(cx);
55781 if (!argv.resize(1)) {
55782 // That threw an exception on the JSContext, and our CallSetup will do
55783 // the right thing with that.
55784 return;
55785 }
55786 unsigned argc = 1;
55787
55788 do {
55789 argv[0].setObject(*arg.Obj());
55790 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
55791 aRv.Throw(NS_ERROR_UNEXPECTED);
55792 return;
55793 }
55794 break;
55795 } while (false);
55796
55797 JS::Rooted<JS::Value> callable(cx);
55798 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
55799 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
55800 !InitIds(cx, atomsCache)) ||
55801 !GetCallableProperty(cx, atomsCache->passArrayBuffer_id, &callable)) {
55802 aRv.Throw(NS_ERROR_UNEXPECTED);
55803 return;
55804 }
55805 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
55806 if (!JS::Call(cx, thisValue, callable,
55807 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
55808 aRv.NoteJSContextException(cx);
55809 return;
55810 }
55811}
55812
55813void
55814TestJSImplInterfaceJSImpl::PassNullableArrayBuffer(const Nullable<ArrayBuffer>& arg, ErrorResult& aRv, JS::Realm* aRealm)
55815{
55816 CallSetup s(this, aRv, "TestJSImplInterface.passNullableArrayBuffer", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
55817 if (aRv.Failed()) {
55818 return;
55819 }
55820 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 55820); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 55820; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
55821 BindingCallContext& cx = s.GetCallContext();
55822
55823 JS::Rooted<JS::Value> rval(cx);
55824 JS::RootedVector<JS::Value> argv(cx);
55825 if (!argv.resize(1)) {
55826 // That threw an exception on the JSContext, and our CallSetup will do
55827 // the right thing with that.
55828 return;
55829 }
55830 unsigned argc = 1;
55831
55832 do {
55833 if (arg.IsNull()) {
55834 argv[0].setNull();
55835 break;
55836 }
55837 argv[0].setObject(*arg.Value().Obj());
55838 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
55839 aRv.Throw(NS_ERROR_UNEXPECTED);
55840 return;
55841 }
55842 break;
55843 } while (false);
55844
55845 JS::Rooted<JS::Value> callable(cx);
55846 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
55847 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
55848 !InitIds(cx, atomsCache)) ||
55849 !GetCallableProperty(cx, atomsCache->passNullableArrayBuffer_id, &callable)) {
55850 aRv.Throw(NS_ERROR_UNEXPECTED);
55851 return;
55852 }
55853 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
55854 if (!JS::Call(cx, thisValue, callable,
55855 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
55856 aRv.NoteJSContextException(cx);
55857 return;
55858 }
55859}
55860
55861void
55862TestJSImplInterfaceJSImpl::PassOptionalArrayBuffer(const Optional<ArrayBuffer>& arg, ErrorResult& aRv, JS::Realm* aRealm)
55863{
55864 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalArrayBuffer", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
55865 if (aRv.Failed()) {
55866 return;
55867 }
55868 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 55868); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 55868; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
55869 BindingCallContext& cx = s.GetCallContext();
55870
55871 JS::Rooted<JS::Value> rval(cx);
55872 JS::RootedVector<JS::Value> argv(cx);
55873 if (!argv.resize(1)) {
55874 // That threw an exception on the JSContext, and our CallSetup will do
55875 // the right thing with that.
55876 return;
55877 }
55878 unsigned argc = 1;
55879
55880 do {
55881 if (arg.WasPassed()) {
55882 argv[0].setObject(*arg.Value().Obj());
55883 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
55884 aRv.Throw(NS_ERROR_UNEXPECTED);
55885 return;
55886 }
55887 break;
55888 } else if (argc == 1) {
55889 // This is our current trailing argument; reduce argc
55890 --argc;
55891 } else {
55892 argv[0].setUndefined();
55893 }
55894 } while (false);
55895
55896 JS::Rooted<JS::Value> callable(cx);
55897 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
55898 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
55899 !InitIds(cx, atomsCache)) ||
55900 !GetCallableProperty(cx, atomsCache->passOptionalArrayBuffer_id, &callable)) {
55901 aRv.Throw(NS_ERROR_UNEXPECTED);
55902 return;
55903 }
55904 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
55905 if (!JS::Call(cx, thisValue, callable,
55906 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
55907 aRv.NoteJSContextException(cx);
55908 return;
55909 }
55910}
55911
55912void
55913TestJSImplInterfaceJSImpl::PassOptionalNullableArrayBuffer(const Optional<Nullable<ArrayBuffer>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
55914{
55915 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableArrayBuffer", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
55916 if (aRv.Failed()) {
55917 return;
55918 }
55919 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 55919); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 55919; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
55920 BindingCallContext& cx = s.GetCallContext();
55921
55922 JS::Rooted<JS::Value> rval(cx);
55923 JS::RootedVector<JS::Value> argv(cx);
55924 if (!argv.resize(1)) {
55925 // That threw an exception on the JSContext, and our CallSetup will do
55926 // the right thing with that.
55927 return;
55928 }
55929 unsigned argc = 1;
55930
55931 do {
55932 if (arg.WasPassed()) {
55933 if (arg.Value().IsNull()) {
55934 argv[0].setNull();
55935 break;
55936 }
55937 argv[0].setObject(*arg.Value().Value().Obj());
55938 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
55939 aRv.Throw(NS_ERROR_UNEXPECTED);
55940 return;
55941 }
55942 break;
55943 } else if (argc == 1) {
55944 // This is our current trailing argument; reduce argc
55945 --argc;
55946 } else {
55947 argv[0].setUndefined();
55948 }
55949 } while (false);
55950
55951 JS::Rooted<JS::Value> callable(cx);
55952 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
55953 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
55954 !InitIds(cx, atomsCache)) ||
55955 !GetCallableProperty(cx, atomsCache->passOptionalNullableArrayBuffer_id, &callable)) {
55956 aRv.Throw(NS_ERROR_UNEXPECTED);
55957 return;
55958 }
55959 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
55960 if (!JS::Call(cx, thisValue, callable,
55961 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
55962 aRv.NoteJSContextException(cx);
55963 return;
55964 }
55965}
55966
55967void
55968TestJSImplInterfaceJSImpl::PassOptionalNullableArrayBufferWithDefaultValue(const Nullable<ArrayBuffer>& arg, ErrorResult& aRv, JS::Realm* aRealm)
55969{
55970 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableArrayBufferWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
55971 if (aRv.Failed()) {
55972 return;
55973 }
55974 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 55974); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 55974; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
55975 BindingCallContext& cx = s.GetCallContext();
55976
55977 JS::Rooted<JS::Value> rval(cx);
55978 JS::RootedVector<JS::Value> argv(cx);
55979 if (!argv.resize(1)) {
55980 // That threw an exception on the JSContext, and our CallSetup will do
55981 // the right thing with that.
55982 return;
55983 }
55984 unsigned argc = 1;
55985
55986 do {
55987 if (arg.IsNull()) {
55988 argv[0].setNull();
55989 break;
55990 }
55991 argv[0].setObject(*arg.Value().Obj());
55992 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
55993 aRv.Throw(NS_ERROR_UNEXPECTED);
55994 return;
55995 }
55996 break;
55997 } while (false);
55998
55999 JS::Rooted<JS::Value> callable(cx);
56000 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56001 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56002 !InitIds(cx, atomsCache)) ||
56003 !GetCallableProperty(cx, atomsCache->passOptionalNullableArrayBufferWithDefaultValue_id, &callable)) {
56004 aRv.Throw(NS_ERROR_UNEXPECTED);
56005 return;
56006 }
56007 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56008 if (!JS::Call(cx, thisValue, callable,
56009 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56010 aRv.NoteJSContextException(cx);
56011 return;
56012 }
56013}
56014
56015void
56016TestJSImplInterfaceJSImpl::PassArrayBufferView(const ArrayBufferView& arg, ErrorResult& aRv, JS::Realm* aRealm)
56017{
56018 CallSetup s(this, aRv, "TestJSImplInterface.passArrayBufferView", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56019 if (aRv.Failed()) {
56020 return;
56021 }
56022 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56022); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56022; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56023 BindingCallContext& cx = s.GetCallContext();
56024
56025 JS::Rooted<JS::Value> rval(cx);
56026 JS::RootedVector<JS::Value> argv(cx);
56027 if (!argv.resize(1)) {
56028 // That threw an exception on the JSContext, and our CallSetup will do
56029 // the right thing with that.
56030 return;
56031 }
56032 unsigned argc = 1;
56033
56034 do {
56035 argv[0].setObject(*arg.Obj());
56036 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
56037 aRv.Throw(NS_ERROR_UNEXPECTED);
56038 return;
56039 }
56040 break;
56041 } while (false);
56042
56043 JS::Rooted<JS::Value> callable(cx);
56044 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56045 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56046 !InitIds(cx, atomsCache)) ||
56047 !GetCallableProperty(cx, atomsCache->passArrayBufferView_id, &callable)) {
56048 aRv.Throw(NS_ERROR_UNEXPECTED);
56049 return;
56050 }
56051 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56052 if (!JS::Call(cx, thisValue, callable,
56053 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56054 aRv.NoteJSContextException(cx);
56055 return;
56056 }
56057}
56058
56059void
56060TestJSImplInterfaceJSImpl::PassInt8Array(const Int8Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
56061{
56062 CallSetup s(this, aRv, "TestJSImplInterface.passInt8Array", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56063 if (aRv.Failed()) {
56064 return;
56065 }
56066 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56066); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56066; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56067 BindingCallContext& cx = s.GetCallContext();
56068
56069 JS::Rooted<JS::Value> rval(cx);
56070 JS::RootedVector<JS::Value> argv(cx);
56071 if (!argv.resize(1)) {
56072 // That threw an exception on the JSContext, and our CallSetup will do
56073 // the right thing with that.
56074 return;
56075 }
56076 unsigned argc = 1;
56077
56078 do {
56079 argv[0].setObject(*arg.Obj());
56080 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
56081 aRv.Throw(NS_ERROR_UNEXPECTED);
56082 return;
56083 }
56084 break;
56085 } while (false);
56086
56087 JS::Rooted<JS::Value> callable(cx);
56088 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56089 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56090 !InitIds(cx, atomsCache)) ||
56091 !GetCallableProperty(cx, atomsCache->passInt8Array_id, &callable)) {
56092 aRv.Throw(NS_ERROR_UNEXPECTED);
56093 return;
56094 }
56095 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56096 if (!JS::Call(cx, thisValue, callable,
56097 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56098 aRv.NoteJSContextException(cx);
56099 return;
56100 }
56101}
56102
56103void
56104TestJSImplInterfaceJSImpl::PassInt16Array(const Int16Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
56105{
56106 CallSetup s(this, aRv, "TestJSImplInterface.passInt16Array", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56107 if (aRv.Failed()) {
56108 return;
56109 }
56110 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56110); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56110; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56111 BindingCallContext& cx = s.GetCallContext();
56112
56113 JS::Rooted<JS::Value> rval(cx);
56114 JS::RootedVector<JS::Value> argv(cx);
56115 if (!argv.resize(1)) {
56116 // That threw an exception on the JSContext, and our CallSetup will do
56117 // the right thing with that.
56118 return;
56119 }
56120 unsigned argc = 1;
56121
56122 do {
56123 argv[0].setObject(*arg.Obj());
56124 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
56125 aRv.Throw(NS_ERROR_UNEXPECTED);
56126 return;
56127 }
56128 break;
56129 } while (false);
56130
56131 JS::Rooted<JS::Value> callable(cx);
56132 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56133 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56134 !InitIds(cx, atomsCache)) ||
56135 !GetCallableProperty(cx, atomsCache->passInt16Array_id, &callable)) {
56136 aRv.Throw(NS_ERROR_UNEXPECTED);
56137 return;
56138 }
56139 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56140 if (!JS::Call(cx, thisValue, callable,
56141 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56142 aRv.NoteJSContextException(cx);
56143 return;
56144 }
56145}
56146
56147void
56148TestJSImplInterfaceJSImpl::PassInt32Array(const Int32Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
56149{
56150 CallSetup s(this, aRv, "TestJSImplInterface.passInt32Array", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56151 if (aRv.Failed()) {
56152 return;
56153 }
56154 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56154); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56154; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56155 BindingCallContext& cx = s.GetCallContext();
56156
56157 JS::Rooted<JS::Value> rval(cx);
56158 JS::RootedVector<JS::Value> argv(cx);
56159 if (!argv.resize(1)) {
56160 // That threw an exception on the JSContext, and our CallSetup will do
56161 // the right thing with that.
56162 return;
56163 }
56164 unsigned argc = 1;
56165
56166 do {
56167 argv[0].setObject(*arg.Obj());
56168 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
56169 aRv.Throw(NS_ERROR_UNEXPECTED);
56170 return;
56171 }
56172 break;
56173 } while (false);
56174
56175 JS::Rooted<JS::Value> callable(cx);
56176 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56177 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56178 !InitIds(cx, atomsCache)) ||
56179 !GetCallableProperty(cx, atomsCache->passInt32Array_id, &callable)) {
56180 aRv.Throw(NS_ERROR_UNEXPECTED);
56181 return;
56182 }
56183 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56184 if (!JS::Call(cx, thisValue, callable,
56185 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56186 aRv.NoteJSContextException(cx);
56187 return;
56188 }
56189}
56190
56191void
56192TestJSImplInterfaceJSImpl::PassUint8Array(const Uint8Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
56193{
56194 CallSetup s(this, aRv, "TestJSImplInterface.passUint8Array", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56195 if (aRv.Failed()) {
56196 return;
56197 }
56198 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56198); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56198; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56199 BindingCallContext& cx = s.GetCallContext();
56200
56201 JS::Rooted<JS::Value> rval(cx);
56202 JS::RootedVector<JS::Value> argv(cx);
56203 if (!argv.resize(1)) {
56204 // That threw an exception on the JSContext, and our CallSetup will do
56205 // the right thing with that.
56206 return;
56207 }
56208 unsigned argc = 1;
56209
56210 do {
56211 argv[0].setObject(*arg.Obj());
56212 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
56213 aRv.Throw(NS_ERROR_UNEXPECTED);
56214 return;
56215 }
56216 break;
56217 } while (false);
56218
56219 JS::Rooted<JS::Value> callable(cx);
56220 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56221 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56222 !InitIds(cx, atomsCache)) ||
56223 !GetCallableProperty(cx, atomsCache->passUint8Array_id, &callable)) {
56224 aRv.Throw(NS_ERROR_UNEXPECTED);
56225 return;
56226 }
56227 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56228 if (!JS::Call(cx, thisValue, callable,
56229 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56230 aRv.NoteJSContextException(cx);
56231 return;
56232 }
56233}
56234
56235void
56236TestJSImplInterfaceJSImpl::PassUint16Array(const Uint16Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
56237{
56238 CallSetup s(this, aRv, "TestJSImplInterface.passUint16Array", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56239 if (aRv.Failed()) {
56240 return;
56241 }
56242 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56242); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56242; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56243 BindingCallContext& cx = s.GetCallContext();
56244
56245 JS::Rooted<JS::Value> rval(cx);
56246 JS::RootedVector<JS::Value> argv(cx);
56247 if (!argv.resize(1)) {
56248 // That threw an exception on the JSContext, and our CallSetup will do
56249 // the right thing with that.
56250 return;
56251 }
56252 unsigned argc = 1;
56253
56254 do {
56255 argv[0].setObject(*arg.Obj());
56256 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
56257 aRv.Throw(NS_ERROR_UNEXPECTED);
56258 return;
56259 }
56260 break;
56261 } while (false);
56262
56263 JS::Rooted<JS::Value> callable(cx);
56264 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56265 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56266 !InitIds(cx, atomsCache)) ||
56267 !GetCallableProperty(cx, atomsCache->passUint16Array_id, &callable)) {
56268 aRv.Throw(NS_ERROR_UNEXPECTED);
56269 return;
56270 }
56271 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56272 if (!JS::Call(cx, thisValue, callable,
56273 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56274 aRv.NoteJSContextException(cx);
56275 return;
56276 }
56277}
56278
56279void
56280TestJSImplInterfaceJSImpl::PassUint32Array(const Uint32Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
56281{
56282 CallSetup s(this, aRv, "TestJSImplInterface.passUint32Array", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56283 if (aRv.Failed()) {
56284 return;
56285 }
56286 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56286); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56286; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56287 BindingCallContext& cx = s.GetCallContext();
56288
56289 JS::Rooted<JS::Value> rval(cx);
56290 JS::RootedVector<JS::Value> argv(cx);
56291 if (!argv.resize(1)) {
56292 // That threw an exception on the JSContext, and our CallSetup will do
56293 // the right thing with that.
56294 return;
56295 }
56296 unsigned argc = 1;
56297
56298 do {
56299 argv[0].setObject(*arg.Obj());
56300 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
56301 aRv.Throw(NS_ERROR_UNEXPECTED);
56302 return;
56303 }
56304 break;
56305 } while (false);
56306
56307 JS::Rooted<JS::Value> callable(cx);
56308 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56309 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56310 !InitIds(cx, atomsCache)) ||
56311 !GetCallableProperty(cx, atomsCache->passUint32Array_id, &callable)) {
56312 aRv.Throw(NS_ERROR_UNEXPECTED);
56313 return;
56314 }
56315 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56316 if (!JS::Call(cx, thisValue, callable,
56317 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56318 aRv.NoteJSContextException(cx);
56319 return;
56320 }
56321}
56322
56323void
56324TestJSImplInterfaceJSImpl::PassUint8ClampedArray(const Uint8ClampedArray& arg, ErrorResult& aRv, JS::Realm* aRealm)
56325{
56326 CallSetup s(this, aRv, "TestJSImplInterface.passUint8ClampedArray", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56327 if (aRv.Failed()) {
56328 return;
56329 }
56330 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56330); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56330; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56331 BindingCallContext& cx = s.GetCallContext();
56332
56333 JS::Rooted<JS::Value> rval(cx);
56334 JS::RootedVector<JS::Value> argv(cx);
56335 if (!argv.resize(1)) {
56336 // That threw an exception on the JSContext, and our CallSetup will do
56337 // the right thing with that.
56338 return;
56339 }
56340 unsigned argc = 1;
56341
56342 do {
56343 argv[0].setObject(*arg.Obj());
56344 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
56345 aRv.Throw(NS_ERROR_UNEXPECTED);
56346 return;
56347 }
56348 break;
56349 } while (false);
56350
56351 JS::Rooted<JS::Value> callable(cx);
56352 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56353 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56354 !InitIds(cx, atomsCache)) ||
56355 !GetCallableProperty(cx, atomsCache->passUint8ClampedArray_id, &callable)) {
56356 aRv.Throw(NS_ERROR_UNEXPECTED);
56357 return;
56358 }
56359 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56360 if (!JS::Call(cx, thisValue, callable,
56361 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56362 aRv.NoteJSContextException(cx);
56363 return;
56364 }
56365}
56366
56367void
56368TestJSImplInterfaceJSImpl::PassFloat32Array(const Float32Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
56369{
56370 CallSetup s(this, aRv, "TestJSImplInterface.passFloat32Array", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56371 if (aRv.Failed()) {
56372 return;
56373 }
56374 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56374); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56374; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56375 BindingCallContext& cx = s.GetCallContext();
56376
56377 JS::Rooted<JS::Value> rval(cx);
56378 JS::RootedVector<JS::Value> argv(cx);
56379 if (!argv.resize(1)) {
56380 // That threw an exception on the JSContext, and our CallSetup will do
56381 // the right thing with that.
56382 return;
56383 }
56384 unsigned argc = 1;
56385
56386 do {
56387 argv[0].setObject(*arg.Obj());
56388 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
56389 aRv.Throw(NS_ERROR_UNEXPECTED);
56390 return;
56391 }
56392 break;
56393 } while (false);
56394
56395 JS::Rooted<JS::Value> callable(cx);
56396 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56397 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56398 !InitIds(cx, atomsCache)) ||
56399 !GetCallableProperty(cx, atomsCache->passFloat32Array_id, &callable)) {
56400 aRv.Throw(NS_ERROR_UNEXPECTED);
56401 return;
56402 }
56403 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56404 if (!JS::Call(cx, thisValue, callable,
56405 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56406 aRv.NoteJSContextException(cx);
56407 return;
56408 }
56409}
56410
56411void
56412TestJSImplInterfaceJSImpl::PassFloat64Array(const Float64Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
56413{
56414 CallSetup s(this, aRv, "TestJSImplInterface.passFloat64Array", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56415 if (aRv.Failed()) {
56416 return;
56417 }
56418 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56418); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56418; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56419 BindingCallContext& cx = s.GetCallContext();
56420
56421 JS::Rooted<JS::Value> rval(cx);
56422 JS::RootedVector<JS::Value> argv(cx);
56423 if (!argv.resize(1)) {
56424 // That threw an exception on the JSContext, and our CallSetup will do
56425 // the right thing with that.
56426 return;
56427 }
56428 unsigned argc = 1;
56429
56430 do {
56431 argv[0].setObject(*arg.Obj());
56432 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
56433 aRv.Throw(NS_ERROR_UNEXPECTED);
56434 return;
56435 }
56436 break;
56437 } while (false);
56438
56439 JS::Rooted<JS::Value> callable(cx);
56440 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56441 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56442 !InitIds(cx, atomsCache)) ||
56443 !GetCallableProperty(cx, atomsCache->passFloat64Array_id, &callable)) {
56444 aRv.Throw(NS_ERROR_UNEXPECTED);
56445 return;
56446 }
56447 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56448 if (!JS::Call(cx, thisValue, callable,
56449 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56450 aRv.NoteJSContextException(cx);
56451 return;
56452 }
56453}
56454
56455void
56456TestJSImplInterfaceJSImpl::PassSequenceOfArrayBuffers(const Sequence<ArrayBuffer>& arg, ErrorResult& aRv, JS::Realm* aRealm)
56457{
56458 CallSetup s(this, aRv, "TestJSImplInterface.passSequenceOfArrayBuffers", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56459 if (aRv.Failed()) {
56460 return;
56461 }
56462 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56462); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56462; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56463 BindingCallContext& cx = s.GetCallContext();
56464
56465 JS::Rooted<JS::Value> rval(cx);
56466 JS::RootedVector<JS::Value> argv(cx);
56467 if (!argv.resize(1)) {
56468 // That threw an exception on the JSContext, and our CallSetup will do
56469 // the right thing with that.
56470 return;
56471 }
56472 unsigned argc = 1;
56473
56474 do {
56475
56476 uint32_t length = arg.Length();
56477 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
56478 if (!returnArray) {
56479 aRv.Throw(NS_ERROR_UNEXPECTED);
56480 return;
56481 }
56482 // Scope for 'tmp'
56483 {
56484 JS::Rooted<JS::Value> tmp(cx);
56485 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
56486 // Control block to let us common up the JS_DefineElement calls when there
56487 // are different ways to succeed at wrapping the object.
56488 do {
56489 tmp.setObject(*arg[sequenceIdx0].Obj());
56490 if (!MaybeWrapNonDOMObjectValue(cx, &tmp)) {
56491 aRv.Throw(NS_ERROR_UNEXPECTED);
56492 return;
56493 }
56494 break;
56495 } while (false);
56496 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
56497 JSPROP_ENUMERATE)) {
56498 aRv.Throw(NS_ERROR_UNEXPECTED);
56499 return;
56500 }
56501 }
56502 }
56503 argv[0].setObject(*returnArray);
56504 break;
56505 } while (false);
56506
56507 JS::Rooted<JS::Value> callable(cx);
56508 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56509 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56510 !InitIds(cx, atomsCache)) ||
56511 !GetCallableProperty(cx, atomsCache->passSequenceOfArrayBuffers_id, &callable)) {
56512 aRv.Throw(NS_ERROR_UNEXPECTED);
56513 return;
56514 }
56515 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56516 if (!JS::Call(cx, thisValue, callable,
56517 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56518 aRv.NoteJSContextException(cx);
56519 return;
56520 }
56521}
56522
56523void
56524TestJSImplInterfaceJSImpl::PassSequenceOfNullableArrayBuffers(const Sequence<Nullable<ArrayBuffer>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
56525{
56526 CallSetup s(this, aRv, "TestJSImplInterface.passSequenceOfNullableArrayBuffers", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56527 if (aRv.Failed()) {
56528 return;
56529 }
56530 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56530); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56530; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56531 BindingCallContext& cx = s.GetCallContext();
56532
56533 JS::Rooted<JS::Value> rval(cx);
56534 JS::RootedVector<JS::Value> argv(cx);
56535 if (!argv.resize(1)) {
56536 // That threw an exception on the JSContext, and our CallSetup will do
56537 // the right thing with that.
56538 return;
56539 }
56540 unsigned argc = 1;
56541
56542 do {
56543
56544 uint32_t length = arg.Length();
56545 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
56546 if (!returnArray) {
56547 aRv.Throw(NS_ERROR_UNEXPECTED);
56548 return;
56549 }
56550 // Scope for 'tmp'
56551 {
56552 JS::Rooted<JS::Value> tmp(cx);
56553 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
56554 // Control block to let us common up the JS_DefineElement calls when there
56555 // are different ways to succeed at wrapping the object.
56556 do {
56557 if (arg[sequenceIdx0].IsNull()) {
56558 tmp.setNull();
56559 break;
56560 }
56561 tmp.setObject(*arg[sequenceIdx0].Value().Obj());
56562 if (!MaybeWrapNonDOMObjectValue(cx, &tmp)) {
56563 aRv.Throw(NS_ERROR_UNEXPECTED);
56564 return;
56565 }
56566 break;
56567 } while (false);
56568 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
56569 JSPROP_ENUMERATE)) {
56570 aRv.Throw(NS_ERROR_UNEXPECTED);
56571 return;
56572 }
56573 }
56574 }
56575 argv[0].setObject(*returnArray);
56576 break;
56577 } while (false);
56578
56579 JS::Rooted<JS::Value> callable(cx);
56580 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56581 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56582 !InitIds(cx, atomsCache)) ||
56583 !GetCallableProperty(cx, atomsCache->passSequenceOfNullableArrayBuffers_id, &callable)) {
56584 aRv.Throw(NS_ERROR_UNEXPECTED);
56585 return;
56586 }
56587 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56588 if (!JS::Call(cx, thisValue, callable,
56589 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56590 aRv.NoteJSContextException(cx);
56591 return;
56592 }
56593}
56594
56595void
56596TestJSImplInterfaceJSImpl::PassRecordOfArrayBuffers(const Record<nsString, ArrayBuffer>& arg, ErrorResult& aRv, JS::Realm* aRealm)
56597{
56598 CallSetup s(this, aRv, "TestJSImplInterface.passRecordOfArrayBuffers", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56599 if (aRv.Failed()) {
56600 return;
56601 }
56602 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56602); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56602; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56603 BindingCallContext& cx = s.GetCallContext();
56604
56605 JS::Rooted<JS::Value> rval(cx);
56606 JS::RootedVector<JS::Value> argv(cx);
56607 if (!argv.resize(1)) {
56608 // That threw an exception on the JSContext, and our CallSetup will do
56609 // the right thing with that.
56610 return;
56611 }
56612 unsigned argc = 1;
56613
56614 do {
56615
56616 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
56617 if (!returnObj) {
56618 aRv.Throw(NS_ERROR_UNEXPECTED);
56619 return;
56620 }
56621 // Scope for 'tmp'
56622 {
56623 JS::Rooted<JS::Value> tmp(cx);
56624 for (auto& entry : arg.Entries()) {
56625 auto& recordValue0 = entry.mValue;
56626 // Control block to let us common up the JS_DefineUCProperty calls when there
56627 // are different ways to succeed at wrapping the value.
56628 do {
56629 tmp.setObject(*recordValue0.Obj());
56630 if (!MaybeWrapNonDOMObjectValue(cx, &tmp)) {
56631 aRv.Throw(NS_ERROR_UNEXPECTED);
56632 return;
56633 }
56634 break;
56635 } while (false);
56636 if (!JS_DefineUCProperty(cx, returnObj,
56637 entry.mKey.BeginReading(),
56638 entry.mKey.Length(), tmp,
56639 JSPROP_ENUMERATE)) {
56640 aRv.Throw(NS_ERROR_UNEXPECTED);
56641 return;
56642 }
56643 }
56644 }
56645 argv[0].setObject(*returnObj);
56646 break;
56647 } while (false);
56648
56649 JS::Rooted<JS::Value> callable(cx);
56650 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56651 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56652 !InitIds(cx, atomsCache)) ||
56653 !GetCallableProperty(cx, atomsCache->passRecordOfArrayBuffers_id, &callable)) {
56654 aRv.Throw(NS_ERROR_UNEXPECTED);
56655 return;
56656 }
56657 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56658 if (!JS::Call(cx, thisValue, callable,
56659 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56660 aRv.NoteJSContextException(cx);
56661 return;
56662 }
56663}
56664
56665void
56666TestJSImplInterfaceJSImpl::PassRecordOfNullableArrayBuffers(const Record<nsString, Nullable<ArrayBuffer>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
56667{
56668 CallSetup s(this, aRv, "TestJSImplInterface.passRecordOfNullableArrayBuffers", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56669 if (aRv.Failed()) {
56670 return;
56671 }
56672 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56672); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56672; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56673 BindingCallContext& cx = s.GetCallContext();
56674
56675 JS::Rooted<JS::Value> rval(cx);
56676 JS::RootedVector<JS::Value> argv(cx);
56677 if (!argv.resize(1)) {
56678 // That threw an exception on the JSContext, and our CallSetup will do
56679 // the right thing with that.
56680 return;
56681 }
56682 unsigned argc = 1;
56683
56684 do {
56685
56686 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
56687 if (!returnObj) {
56688 aRv.Throw(NS_ERROR_UNEXPECTED);
56689 return;
56690 }
56691 // Scope for 'tmp'
56692 {
56693 JS::Rooted<JS::Value> tmp(cx);
56694 for (auto& entry : arg.Entries()) {
56695 auto& recordValue0 = entry.mValue;
56696 // Control block to let us common up the JS_DefineUCProperty calls when there
56697 // are different ways to succeed at wrapping the value.
56698 do {
56699 if (recordValue0.IsNull()) {
56700 tmp.setNull();
56701 break;
56702 }
56703 tmp.setObject(*recordValue0.Value().Obj());
56704 if (!MaybeWrapNonDOMObjectValue(cx, &tmp)) {
56705 aRv.Throw(NS_ERROR_UNEXPECTED);
56706 return;
56707 }
56708 break;
56709 } while (false);
56710 if (!JS_DefineUCProperty(cx, returnObj,
56711 entry.mKey.BeginReading(),
56712 entry.mKey.Length(), tmp,
56713 JSPROP_ENUMERATE)) {
56714 aRv.Throw(NS_ERROR_UNEXPECTED);
56715 return;
56716 }
56717 }
56718 }
56719 argv[0].setObject(*returnObj);
56720 break;
56721 } while (false);
56722
56723 JS::Rooted<JS::Value> callable(cx);
56724 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56725 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56726 !InitIds(cx, atomsCache)) ||
56727 !GetCallableProperty(cx, atomsCache->passRecordOfNullableArrayBuffers_id, &callable)) {
56728 aRv.Throw(NS_ERROR_UNEXPECTED);
56729 return;
56730 }
56731 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56732 if (!JS::Call(cx, thisValue, callable,
56733 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56734 aRv.NoteJSContextException(cx);
56735 return;
56736 }
56737}
56738
56739void
56740TestJSImplInterfaceJSImpl::PassVariadicTypedArray(const nsTArray<Float32Array>& arg, ErrorResult& aRv, JS::Realm* aRealm)
56741{
56742 CallSetup s(this, aRv, "TestJSImplInterface.passVariadicTypedArray", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56743 if (aRv.Failed()) {
56744 return;
56745 }
56746 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56746); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56746; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56747 BindingCallContext& cx = s.GetCallContext();
56748
56749 JS::Rooted<JS::Value> rval(cx);
56750 JS::RootedVector<JS::Value> argv(cx);
56751 if (!argv.resize((1 - 1) + arg.Length())) {
56752 // That threw an exception on the JSContext, and our CallSetup will do
56753 // the right thing with that.
56754 return;
56755 }
56756 unsigned argc = (1 - 1) + arg.Length();
56757
56758 do {
56759 for (uint32_t idx = 0; idx < arg.Length(); ++idx) {
56760 argv[0 + idx].setObject(*arg[idx].Obj());
56761 if (!MaybeWrapNonDOMObjectValue(cx, argv[0 + idx])) {
56762 aRv.Throw(NS_ERROR_UNEXPECTED);
56763 return;
56764 }
56765 continue;
56766 }
56767 break;
56768 } while (false);
56769
56770 JS::Rooted<JS::Value> callable(cx);
56771 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56772 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56773 !InitIds(cx, atomsCache)) ||
56774 !GetCallableProperty(cx, atomsCache->passVariadicTypedArray_id, &callable)) {
56775 aRv.Throw(NS_ERROR_UNEXPECTED);
56776 return;
56777 }
56778 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56779 if (!JS::Call(cx, thisValue, callable,
56780 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56781 aRv.NoteJSContextException(cx);
56782 return;
56783 }
56784}
56785
56786void
56787TestJSImplInterfaceJSImpl::PassVariadicNullableTypedArray(const nsTArray<Nullable<Float32Array>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
56788{
56789 CallSetup s(this, aRv, "TestJSImplInterface.passVariadicNullableTypedArray", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56790 if (aRv.Failed()) {
56791 return;
56792 }
56793 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56793); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56793; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56794 BindingCallContext& cx = s.GetCallContext();
56795
56796 JS::Rooted<JS::Value> rval(cx);
56797 JS::RootedVector<JS::Value> argv(cx);
56798 if (!argv.resize((1 - 1) + arg.Length())) {
56799 // That threw an exception on the JSContext, and our CallSetup will do
56800 // the right thing with that.
56801 return;
56802 }
56803 unsigned argc = (1 - 1) + arg.Length();
56804
56805 do {
56806 for (uint32_t idx = 0; idx < arg.Length(); ++idx) {
56807 if (arg[idx].IsNull()) {
56808 argv[0 + idx].setNull();
56809 continue;
56810 }
56811 argv[0 + idx].setObject(*arg[idx].Value().Obj());
56812 if (!MaybeWrapNonDOMObjectValue(cx, argv[0 + idx])) {
56813 aRv.Throw(NS_ERROR_UNEXPECTED);
56814 return;
56815 }
56816 continue;
56817 }
56818 break;
56819 } while (false);
56820
56821 JS::Rooted<JS::Value> callable(cx);
56822 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56823 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56824 !InitIds(cx, atomsCache)) ||
56825 !GetCallableProperty(cx, atomsCache->passVariadicNullableTypedArray_id, &callable)) {
56826 aRv.Throw(NS_ERROR_UNEXPECTED);
56827 return;
56828 }
56829 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56830 if (!JS::Call(cx, thisValue, callable,
56831 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56832 aRv.NoteJSContextException(cx);
56833 return;
56834 }
56835}
56836
56837void
56838TestJSImplInterfaceJSImpl::ReceiveUint8Array(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
56839{
56840 CallSetup s(this, aRv, "TestJSImplInterface.receiveUint8Array", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56841 if (aRv.Failed()) {
56842 return;
56843 }
56844 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56844); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56844; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56845 BindingCallContext& cx = s.GetCallContext();
56846
56847 JS::Rooted<JS::Value> rval(cx);
56848
56849 JS::Rooted<JS::Value> callable(cx);
56850 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56851 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56852 !InitIds(cx, atomsCache)) ||
56853 !GetCallableProperty(cx, atomsCache->receiveUint8Array_id, &callable)) {
56854 aRv.Throw(NS_ERROR_UNEXPECTED);
56855 return;
56856 }
56857 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56858 if (!JS::Call(cx, thisValue, callable,
56859 JS::HandleValueArray::empty(), &rval)) {
56860 aRv.NoteJSContextException(cx);
56861 return;
56862 }
56863 RootedSpiderMonkeyInterface<Uint8Array> rvalDecl(cx);
56864 if (rval.isObject()) {
56865 if (!rvalDecl.Init(&rval.toObject())) {
56866 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.receiveUint8Array", "Uint8Array");
56867 aRv.Throw(NS_ERROR_UNEXPECTED);
56868 return;
56869 }
56870 if (JS::IsArrayBufferViewShared(rvalDecl.Obj())) {
56871 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Return value of TestJSImplInterface.receiveUint8Array");
56872 aRv.Throw(NS_ERROR_UNEXPECTED);
56873 return;
56874 }
56875 if (JS::IsLargeArrayBufferView(rvalDecl.Obj())) {
56876 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Return value of TestJSImplInterface.receiveUint8Array");
56877 aRv.Throw(NS_ERROR_UNEXPECTED);
56878 return;
56879 }
56880 if (JS::IsResizableArrayBufferView(rvalDecl.Obj())) {
56881 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Return value of TestJSImplInterface.receiveUint8Array");
56882 aRv.Throw(NS_ERROR_UNEXPECTED);
56883 return;
56884 }
56885 } else {
56886 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveUint8Array");
56887 aRv.Throw(NS_ERROR_UNEXPECTED);
56888 return;
56889 }
56890 aRetVal.set(rvalDecl.Obj());
56891}
56892
56893void
56894TestJSImplInterfaceJSImpl::PassString(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
56895{
56896 CallSetup s(this, aRv, "TestJSImplInterface.passString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56897 if (aRv.Failed()) {
56898 return;
56899 }
56900 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56900); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56900; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56901 BindingCallContext& cx = s.GetCallContext();
56902
56903 JS::Rooted<JS::Value> rval(cx);
56904 JS::RootedVector<JS::Value> argv(cx);
56905 if (!argv.resize(1)) {
56906 // That threw an exception on the JSContext, and our CallSetup will do
56907 // the right thing with that.
56908 return;
56909 }
56910 unsigned argc = 1;
56911
56912 do {
56913 if (!xpc::NonVoidStringToJsval(cx, arg, argv[0])) {
56914 aRv.Throw(NS_ERROR_UNEXPECTED);
56915 return;
56916 }
56917 break;
56918 } while (false);
56919
56920 JS::Rooted<JS::Value> callable(cx);
56921 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56922 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56923 !InitIds(cx, atomsCache)) ||
56924 !GetCallableProperty(cx, atomsCache->passString_id, &callable)) {
56925 aRv.Throw(NS_ERROR_UNEXPECTED);
56926 return;
56927 }
56928 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56929 if (!JS::Call(cx, thisValue, callable,
56930 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56931 aRv.NoteJSContextException(cx);
56932 return;
56933 }
56934}
56935
56936void
56937TestJSImplInterfaceJSImpl::PassNullableString(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
56938{
56939 CallSetup s(this, aRv, "TestJSImplInterface.passNullableString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56940 if (aRv.Failed()) {
56941 return;
56942 }
56943 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56943); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56943; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56944 BindingCallContext& cx = s.GetCallContext();
56945
56946 JS::Rooted<JS::Value> rval(cx);
56947 JS::RootedVector<JS::Value> argv(cx);
56948 if (!argv.resize(1)) {
56949 // That threw an exception on the JSContext, and our CallSetup will do
56950 // the right thing with that.
56951 return;
56952 }
56953 unsigned argc = 1;
56954
56955 do {
56956 if (!xpc::StringToJsval(cx, arg, argv[0])) {
56957 aRv.Throw(NS_ERROR_UNEXPECTED);
56958 return;
56959 }
56960 break;
56961 } while (false);
56962
56963 JS::Rooted<JS::Value> callable(cx);
56964 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
56965 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
56966 !InitIds(cx, atomsCache)) ||
56967 !GetCallableProperty(cx, atomsCache->passNullableString_id, &callable)) {
56968 aRv.Throw(NS_ERROR_UNEXPECTED);
56969 return;
56970 }
56971 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
56972 if (!JS::Call(cx, thisValue, callable,
56973 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
56974 aRv.NoteJSContextException(cx);
56975 return;
56976 }
56977}
56978
56979void
56980TestJSImplInterfaceJSImpl::PassOptionalString(const Optional<nsAString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
56981{
56982 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
56983 if (aRv.Failed()) {
56984 return;
56985 }
56986 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 56986); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 56986; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
56987 BindingCallContext& cx = s.GetCallContext();
56988
56989 JS::Rooted<JS::Value> rval(cx);
56990 JS::RootedVector<JS::Value> argv(cx);
56991 if (!argv.resize(1)) {
56992 // That threw an exception on the JSContext, and our CallSetup will do
56993 // the right thing with that.
56994 return;
56995 }
56996 unsigned argc = 1;
56997
56998 do {
56999 if (arg.WasPassed()) {
57000 if (!xpc::NonVoidStringToJsval(cx, arg.Value(), argv[0])) {
57001 aRv.Throw(NS_ERROR_UNEXPECTED);
57002 return;
57003 }
57004 break;
57005 } else if (argc == 1) {
57006 // This is our current trailing argument; reduce argc
57007 --argc;
57008 } else {
57009 argv[0].setUndefined();
57010 }
57011 } while (false);
57012
57013 JS::Rooted<JS::Value> callable(cx);
57014 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57015 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57016 !InitIds(cx, atomsCache)) ||
57017 !GetCallableProperty(cx, atomsCache->passOptionalString_id, &callable)) {
57018 aRv.Throw(NS_ERROR_UNEXPECTED);
57019 return;
57020 }
57021 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57022 if (!JS::Call(cx, thisValue, callable,
57023 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57024 aRv.NoteJSContextException(cx);
57025 return;
57026 }
57027}
57028
57029void
57030TestJSImplInterfaceJSImpl::PassOptionalStringWithDefaultValue(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
57031{
57032 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalStringWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57033 if (aRv.Failed()) {
57034 return;
57035 }
57036 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57036); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57036; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57037 BindingCallContext& cx = s.GetCallContext();
57038
57039 JS::Rooted<JS::Value> rval(cx);
57040 JS::RootedVector<JS::Value> argv(cx);
57041 if (!argv.resize(1)) {
57042 // That threw an exception on the JSContext, and our CallSetup will do
57043 // the right thing with that.
57044 return;
57045 }
57046 unsigned argc = 1;
57047
57048 do {
57049 if (!xpc::NonVoidStringToJsval(cx, arg, argv[0])) {
57050 aRv.Throw(NS_ERROR_UNEXPECTED);
57051 return;
57052 }
57053 break;
57054 } while (false);
57055
57056 JS::Rooted<JS::Value> callable(cx);
57057 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57058 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57059 !InitIds(cx, atomsCache)) ||
57060 !GetCallableProperty(cx, atomsCache->passOptionalStringWithDefaultValue_id, &callable)) {
57061 aRv.Throw(NS_ERROR_UNEXPECTED);
57062 return;
57063 }
57064 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57065 if (!JS::Call(cx, thisValue, callable,
57066 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57067 aRv.NoteJSContextException(cx);
57068 return;
57069 }
57070}
57071
57072void
57073TestJSImplInterfaceJSImpl::PassOptionalNullableString(const Optional<nsAString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
57074{
57075 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57076 if (aRv.Failed()) {
57077 return;
57078 }
57079 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57079); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57079; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57080 BindingCallContext& cx = s.GetCallContext();
57081
57082 JS::Rooted<JS::Value> rval(cx);
57083 JS::RootedVector<JS::Value> argv(cx);
57084 if (!argv.resize(1)) {
57085 // That threw an exception on the JSContext, and our CallSetup will do
57086 // the right thing with that.
57087 return;
57088 }
57089 unsigned argc = 1;
57090
57091 do {
57092 if (arg.WasPassed()) {
57093 if (!xpc::StringToJsval(cx, arg.Value(), argv[0])) {
57094 aRv.Throw(NS_ERROR_UNEXPECTED);
57095 return;
57096 }
57097 break;
57098 } else if (argc == 1) {
57099 // This is our current trailing argument; reduce argc
57100 --argc;
57101 } else {
57102 argv[0].setUndefined();
57103 }
57104 } while (false);
57105
57106 JS::Rooted<JS::Value> callable(cx);
57107 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57108 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57109 !InitIds(cx, atomsCache)) ||
57110 !GetCallableProperty(cx, atomsCache->passOptionalNullableString_id, &callable)) {
57111 aRv.Throw(NS_ERROR_UNEXPECTED);
57112 return;
57113 }
57114 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57115 if (!JS::Call(cx, thisValue, callable,
57116 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57117 aRv.NoteJSContextException(cx);
57118 return;
57119 }
57120}
57121
57122void
57123TestJSImplInterfaceJSImpl::PassOptionalNullableStringWithDefaultValue(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
57124{
57125 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableStringWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57126 if (aRv.Failed()) {
57127 return;
57128 }
57129 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57129); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57129; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57130 BindingCallContext& cx = s.GetCallContext();
57131
57132 JS::Rooted<JS::Value> rval(cx);
57133 JS::RootedVector<JS::Value> argv(cx);
57134 if (!argv.resize(1)) {
57135 // That threw an exception on the JSContext, and our CallSetup will do
57136 // the right thing with that.
57137 return;
57138 }
57139 unsigned argc = 1;
57140
57141 do {
57142 if (!xpc::StringToJsval(cx, arg, argv[0])) {
57143 aRv.Throw(NS_ERROR_UNEXPECTED);
57144 return;
57145 }
57146 break;
57147 } while (false);
57148
57149 JS::Rooted<JS::Value> callable(cx);
57150 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57151 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57152 !InitIds(cx, atomsCache)) ||
57153 !GetCallableProperty(cx, atomsCache->passOptionalNullableStringWithDefaultValue_id, &callable)) {
57154 aRv.Throw(NS_ERROR_UNEXPECTED);
57155 return;
57156 }
57157 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57158 if (!JS::Call(cx, thisValue, callable,
57159 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57160 aRv.NoteJSContextException(cx);
57161 return;
57162 }
57163}
57164
57165void
57166TestJSImplInterfaceJSImpl::PassVariadicString(const nsTArray<nsString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
57167{
57168 CallSetup s(this, aRv, "TestJSImplInterface.passVariadicString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57169 if (aRv.Failed()) {
57170 return;
57171 }
57172 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57172); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57172; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57173 BindingCallContext& cx = s.GetCallContext();
57174
57175 JS::Rooted<JS::Value> rval(cx);
57176 JS::RootedVector<JS::Value> argv(cx);
57177 if (!argv.resize((1 - 1) + arg.Length())) {
57178 // That threw an exception on the JSContext, and our CallSetup will do
57179 // the right thing with that.
57180 return;
57181 }
57182 unsigned argc = (1 - 1) + arg.Length();
57183
57184 do {
57185 for (uint32_t idx = 0; idx < arg.Length(); ++idx) {
57186 if (!xpc::NonVoidStringToJsval(cx, arg[idx], argv[0 + idx])) {
57187 aRv.Throw(NS_ERROR_UNEXPECTED);
57188 return;
57189 }
57190 continue;
57191 }
57192 break;
57193 } while (false);
57194
57195 JS::Rooted<JS::Value> callable(cx);
57196 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57197 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57198 !InitIds(cx, atomsCache)) ||
57199 !GetCallableProperty(cx, atomsCache->passVariadicString_id, &callable)) {
57200 aRv.Throw(NS_ERROR_UNEXPECTED);
57201 return;
57202 }
57203 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57204 if (!JS::Call(cx, thisValue, callable,
57205 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57206 aRv.NoteJSContextException(cx);
57207 return;
57208 }
57209}
57210
57211void
57212TestJSImplInterfaceJSImpl::PassByteString(const nsCString& arg, ErrorResult& aRv, JS::Realm* aRealm)
57213{
57214 CallSetup s(this, aRv, "TestJSImplInterface.passByteString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57215 if (aRv.Failed()) {
57216 return;
57217 }
57218 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57218); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57218; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57219 BindingCallContext& cx = s.GetCallContext();
57220
57221 JS::Rooted<JS::Value> rval(cx);
57222 JS::RootedVector<JS::Value> argv(cx);
57223 if (!argv.resize(1)) {
57224 // That threw an exception on the JSContext, and our CallSetup will do
57225 // the right thing with that.
57226 return;
57227 }
57228 unsigned argc = 1;
57229
57230 do {
57231 if (!NonVoidByteStringToJsval(cx, arg, argv[0])) {
57232 aRv.Throw(NS_ERROR_UNEXPECTED);
57233 return;
57234 }
57235 break;
57236 } while (false);
57237
57238 JS::Rooted<JS::Value> callable(cx);
57239 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57240 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57241 !InitIds(cx, atomsCache)) ||
57242 !GetCallableProperty(cx, atomsCache->passByteString_id, &callable)) {
57243 aRv.Throw(NS_ERROR_UNEXPECTED);
57244 return;
57245 }
57246 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57247 if (!JS::Call(cx, thisValue, callable,
57248 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57249 aRv.NoteJSContextException(cx);
57250 return;
57251 }
57252}
57253
57254void
57255TestJSImplInterfaceJSImpl::PassNullableByteString(const nsCString& arg, ErrorResult& aRv, JS::Realm* aRealm)
57256{
57257 CallSetup s(this, aRv, "TestJSImplInterface.passNullableByteString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57258 if (aRv.Failed()) {
57259 return;
57260 }
57261 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57261); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57261; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57262 BindingCallContext& cx = s.GetCallContext();
57263
57264 JS::Rooted<JS::Value> rval(cx);
57265 JS::RootedVector<JS::Value> argv(cx);
57266 if (!argv.resize(1)) {
57267 // That threw an exception on the JSContext, and our CallSetup will do
57268 // the right thing with that.
57269 return;
57270 }
57271 unsigned argc = 1;
57272
57273 do {
57274 if (!ByteStringToJsval(cx, arg, argv[0])) {
57275 aRv.Throw(NS_ERROR_UNEXPECTED);
57276 return;
57277 }
57278 break;
57279 } while (false);
57280
57281 JS::Rooted<JS::Value> callable(cx);
57282 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57283 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57284 !InitIds(cx, atomsCache)) ||
57285 !GetCallableProperty(cx, atomsCache->passNullableByteString_id, &callable)) {
57286 aRv.Throw(NS_ERROR_UNEXPECTED);
57287 return;
57288 }
57289 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57290 if (!JS::Call(cx, thisValue, callable,
57291 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57292 aRv.NoteJSContextException(cx);
57293 return;
57294 }
57295}
57296
57297void
57298TestJSImplInterfaceJSImpl::PassOptionalByteString(const Optional<nsCString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
57299{
57300 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalByteString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57301 if (aRv.Failed()) {
57302 return;
57303 }
57304 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57304); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57304; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57305 BindingCallContext& cx = s.GetCallContext();
57306
57307 JS::Rooted<JS::Value> rval(cx);
57308 JS::RootedVector<JS::Value> argv(cx);
57309 if (!argv.resize(1)) {
57310 // That threw an exception on the JSContext, and our CallSetup will do
57311 // the right thing with that.
57312 return;
57313 }
57314 unsigned argc = 1;
57315
57316 do {
57317 if (arg.WasPassed()) {
57318 if (!NonVoidByteStringToJsval(cx, arg.Value(), argv[0])) {
57319 aRv.Throw(NS_ERROR_UNEXPECTED);
57320 return;
57321 }
57322 break;
57323 } else if (argc == 1) {
57324 // This is our current trailing argument; reduce argc
57325 --argc;
57326 } else {
57327 argv[0].setUndefined();
57328 }
57329 } while (false);
57330
57331 JS::Rooted<JS::Value> callable(cx);
57332 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57333 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57334 !InitIds(cx, atomsCache)) ||
57335 !GetCallableProperty(cx, atomsCache->passOptionalByteString_id, &callable)) {
57336 aRv.Throw(NS_ERROR_UNEXPECTED);
57337 return;
57338 }
57339 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57340 if (!JS::Call(cx, thisValue, callable,
57341 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57342 aRv.NoteJSContextException(cx);
57343 return;
57344 }
57345}
57346
57347void
57348TestJSImplInterfaceJSImpl::PassOptionalByteStringWithDefaultValue(const nsCString& arg, ErrorResult& aRv, JS::Realm* aRealm)
57349{
57350 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalByteStringWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57351 if (aRv.Failed()) {
57352 return;
57353 }
57354 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57354); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57354; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57355 BindingCallContext& cx = s.GetCallContext();
57356
57357 JS::Rooted<JS::Value> rval(cx);
57358 JS::RootedVector<JS::Value> argv(cx);
57359 if (!argv.resize(1)) {
57360 // That threw an exception on the JSContext, and our CallSetup will do
57361 // the right thing with that.
57362 return;
57363 }
57364 unsigned argc = 1;
57365
57366 do {
57367 if (!NonVoidByteStringToJsval(cx, arg, argv[0])) {
57368 aRv.Throw(NS_ERROR_UNEXPECTED);
57369 return;
57370 }
57371 break;
57372 } while (false);
57373
57374 JS::Rooted<JS::Value> callable(cx);
57375 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57376 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57377 !InitIds(cx, atomsCache)) ||
57378 !GetCallableProperty(cx, atomsCache->passOptionalByteStringWithDefaultValue_id, &callable)) {
57379 aRv.Throw(NS_ERROR_UNEXPECTED);
57380 return;
57381 }
57382 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57383 if (!JS::Call(cx, thisValue, callable,
57384 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57385 aRv.NoteJSContextException(cx);
57386 return;
57387 }
57388}
57389
57390void
57391TestJSImplInterfaceJSImpl::PassOptionalNullableByteString(const Optional<nsCString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
57392{
57393 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableByteString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57394 if (aRv.Failed()) {
57395 return;
57396 }
57397 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57397); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57397; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57398 BindingCallContext& cx = s.GetCallContext();
57399
57400 JS::Rooted<JS::Value> rval(cx);
57401 JS::RootedVector<JS::Value> argv(cx);
57402 if (!argv.resize(1)) {
57403 // That threw an exception on the JSContext, and our CallSetup will do
57404 // the right thing with that.
57405 return;
57406 }
57407 unsigned argc = 1;
57408
57409 do {
57410 if (arg.WasPassed()) {
57411 if (!ByteStringToJsval(cx, arg.Value(), argv[0])) {
57412 aRv.Throw(NS_ERROR_UNEXPECTED);
57413 return;
57414 }
57415 break;
57416 } else if (argc == 1) {
57417 // This is our current trailing argument; reduce argc
57418 --argc;
57419 } else {
57420 argv[0].setUndefined();
57421 }
57422 } while (false);
57423
57424 JS::Rooted<JS::Value> callable(cx);
57425 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57426 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57427 !InitIds(cx, atomsCache)) ||
57428 !GetCallableProperty(cx, atomsCache->passOptionalNullableByteString_id, &callable)) {
57429 aRv.Throw(NS_ERROR_UNEXPECTED);
57430 return;
57431 }
57432 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57433 if (!JS::Call(cx, thisValue, callable,
57434 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57435 aRv.NoteJSContextException(cx);
57436 return;
57437 }
57438}
57439
57440void
57441TestJSImplInterfaceJSImpl::PassOptionalNullableByteStringWithDefaultValue(const nsCString& arg, ErrorResult& aRv, JS::Realm* aRealm)
57442{
57443 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableByteStringWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57444 if (aRv.Failed()) {
57445 return;
57446 }
57447 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57447); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57447; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57448 BindingCallContext& cx = s.GetCallContext();
57449
57450 JS::Rooted<JS::Value> rval(cx);
57451 JS::RootedVector<JS::Value> argv(cx);
57452 if (!argv.resize(1)) {
57453 // That threw an exception on the JSContext, and our CallSetup will do
57454 // the right thing with that.
57455 return;
57456 }
57457 unsigned argc = 1;
57458
57459 do {
57460 if (!ByteStringToJsval(cx, arg, argv[0])) {
57461 aRv.Throw(NS_ERROR_UNEXPECTED);
57462 return;
57463 }
57464 break;
57465 } while (false);
57466
57467 JS::Rooted<JS::Value> callable(cx);
57468 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57469 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57470 !InitIds(cx, atomsCache)) ||
57471 !GetCallableProperty(cx, atomsCache->passOptionalNullableByteStringWithDefaultValue_id, &callable)) {
57472 aRv.Throw(NS_ERROR_UNEXPECTED);
57473 return;
57474 }
57475 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57476 if (!JS::Call(cx, thisValue, callable,
57477 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57478 aRv.NoteJSContextException(cx);
57479 return;
57480 }
57481}
57482
57483void
57484TestJSImplInterfaceJSImpl::PassVariadicByteString(const nsTArray<nsCString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
57485{
57486 CallSetup s(this, aRv, "TestJSImplInterface.passVariadicByteString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57487 if (aRv.Failed()) {
57488 return;
57489 }
57490 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57490); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57490; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57491 BindingCallContext& cx = s.GetCallContext();
57492
57493 JS::Rooted<JS::Value> rval(cx);
57494 JS::RootedVector<JS::Value> argv(cx);
57495 if (!argv.resize((1 - 1) + arg.Length())) {
57496 // That threw an exception on the JSContext, and our CallSetup will do
57497 // the right thing with that.
57498 return;
57499 }
57500 unsigned argc = (1 - 1) + arg.Length();
57501
57502 do {
57503 for (uint32_t idx = 0; idx < arg.Length(); ++idx) {
57504 if (!NonVoidByteStringToJsval(cx, arg[idx], argv[0 + idx])) {
57505 aRv.Throw(NS_ERROR_UNEXPECTED);
57506 return;
57507 }
57508 continue;
57509 }
57510 break;
57511 } while (false);
57512
57513 JS::Rooted<JS::Value> callable(cx);
57514 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57515 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57516 !InitIds(cx, atomsCache)) ||
57517 !GetCallableProperty(cx, atomsCache->passVariadicByteString_id, &callable)) {
57518 aRv.Throw(NS_ERROR_UNEXPECTED);
57519 return;
57520 }
57521 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57522 if (!JS::Call(cx, thisValue, callable,
57523 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57524 aRv.NoteJSContextException(cx);
57525 return;
57526 }
57527}
57528
57529void
57530TestJSImplInterfaceJSImpl::PassUnionByteString(const ByteStringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
57531{
57532 CallSetup s(this, aRv, "TestJSImplInterface.passUnionByteString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57533 if (aRv.Failed()) {
57534 return;
57535 }
57536 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57536); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57536; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57537 BindingCallContext& cx = s.GetCallContext();
57538
57539 JS::Rooted<JS::Value> rval(cx);
57540 JS::RootedVector<JS::Value> argv(cx);
57541 if (!argv.resize(1)) {
57542 // That threw an exception on the JSContext, and our CallSetup will do
57543 // the right thing with that.
57544 return;
57545 }
57546 unsigned argc = 1;
57547
57548 do {
57549 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
57550 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
57551 aRv.Throw(NS_ERROR_UNEXPECTED);
57552 return;
57553 }
57554 break;
57555 } while (false);
57556
57557 JS::Rooted<JS::Value> callable(cx);
57558 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57559 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57560 !InitIds(cx, atomsCache)) ||
57561 !GetCallableProperty(cx, atomsCache->passUnionByteString_id, &callable)) {
57562 aRv.Throw(NS_ERROR_UNEXPECTED);
57563 return;
57564 }
57565 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57566 if (!JS::Call(cx, thisValue, callable,
57567 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57568 aRv.NoteJSContextException(cx);
57569 return;
57570 }
57571}
57572
57573void
57574TestJSImplInterfaceJSImpl::PassOptionalUnionByteString(const Optional<ByteStringOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
57575{
57576 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalUnionByteString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57577 if (aRv.Failed()) {
57578 return;
57579 }
57580 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57580); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57580; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57581 BindingCallContext& cx = s.GetCallContext();
57582
57583 JS::Rooted<JS::Value> rval(cx);
57584 JS::RootedVector<JS::Value> argv(cx);
57585 if (!argv.resize(1)) {
57586 // That threw an exception on the JSContext, and our CallSetup will do
57587 // the right thing with that.
57588 return;
57589 }
57590 unsigned argc = 1;
57591
57592 do {
57593 if (arg.WasPassed()) {
57594 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
57595 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
57596 aRv.Throw(NS_ERROR_UNEXPECTED);
57597 return;
57598 }
57599 break;
57600 } else if (argc == 1) {
57601 // This is our current trailing argument; reduce argc
57602 --argc;
57603 } else {
57604 argv[0].setUndefined();
57605 }
57606 } while (false);
57607
57608 JS::Rooted<JS::Value> callable(cx);
57609 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57610 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57611 !InitIds(cx, atomsCache)) ||
57612 !GetCallableProperty(cx, atomsCache->passOptionalUnionByteString_id, &callable)) {
57613 aRv.Throw(NS_ERROR_UNEXPECTED);
57614 return;
57615 }
57616 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57617 if (!JS::Call(cx, thisValue, callable,
57618 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57619 aRv.NoteJSContextException(cx);
57620 return;
57621 }
57622}
57623
57624void
57625TestJSImplInterfaceJSImpl::PassOptionalUnionByteStringWithDefaultValue(const ByteStringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
57626{
57627 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalUnionByteStringWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57628 if (aRv.Failed()) {
57629 return;
57630 }
57631 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57631); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57631; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57632 BindingCallContext& cx = s.GetCallContext();
57633
57634 JS::Rooted<JS::Value> rval(cx);
57635 JS::RootedVector<JS::Value> argv(cx);
57636 if (!argv.resize(1)) {
57637 // That threw an exception on the JSContext, and our CallSetup will do
57638 // the right thing with that.
57639 return;
57640 }
57641 unsigned argc = 1;
57642
57643 do {
57644 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
57645 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
57646 aRv.Throw(NS_ERROR_UNEXPECTED);
57647 return;
57648 }
57649 break;
57650 } while (false);
57651
57652 JS::Rooted<JS::Value> callable(cx);
57653 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57654 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57655 !InitIds(cx, atomsCache)) ||
57656 !GetCallableProperty(cx, atomsCache->passOptionalUnionByteStringWithDefaultValue_id, &callable)) {
57657 aRv.Throw(NS_ERROR_UNEXPECTED);
57658 return;
57659 }
57660 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57661 if (!JS::Call(cx, thisValue, callable,
57662 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57663 aRv.NoteJSContextException(cx);
57664 return;
57665 }
57666}
57667
57668void
57669TestJSImplInterfaceJSImpl::PassUTF8String(const nsACString& arg, ErrorResult& aRv, JS::Realm* aRealm)
57670{
57671 CallSetup s(this, aRv, "TestJSImplInterface.passUTF8String", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57672 if (aRv.Failed()) {
57673 return;
57674 }
57675 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57675); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57675; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57676 BindingCallContext& cx = s.GetCallContext();
57677
57678 JS::Rooted<JS::Value> rval(cx);
57679 JS::RootedVector<JS::Value> argv(cx);
57680 if (!argv.resize(1)) {
57681 // That threw an exception on the JSContext, and our CallSetup will do
57682 // the right thing with that.
57683 return;
57684 }
57685 unsigned argc = 1;
57686
57687 do {
57688 if (!NonVoidUTF8StringToJsval(cx, arg, argv[0])) {
57689 aRv.Throw(NS_ERROR_UNEXPECTED);
57690 return;
57691 }
57692 break;
57693 } while (false);
57694
57695 JS::Rooted<JS::Value> callable(cx);
57696 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57697 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57698 !InitIds(cx, atomsCache)) ||
57699 !GetCallableProperty(cx, atomsCache->passUTF8String_id, &callable)) {
57700 aRv.Throw(NS_ERROR_UNEXPECTED);
57701 return;
57702 }
57703 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57704 if (!JS::Call(cx, thisValue, callable,
57705 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57706 aRv.NoteJSContextException(cx);
57707 return;
57708 }
57709}
57710
57711void
57712TestJSImplInterfaceJSImpl::PassNullableUTF8String(const nsACString& arg, ErrorResult& aRv, JS::Realm* aRealm)
57713{
57714 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUTF8String", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57715 if (aRv.Failed()) {
57716 return;
57717 }
57718 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57718); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57718; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57719 BindingCallContext& cx = s.GetCallContext();
57720
57721 JS::Rooted<JS::Value> rval(cx);
57722 JS::RootedVector<JS::Value> argv(cx);
57723 if (!argv.resize(1)) {
57724 // That threw an exception on the JSContext, and our CallSetup will do
57725 // the right thing with that.
57726 return;
57727 }
57728 unsigned argc = 1;
57729
57730 do {
57731 if (!UTF8StringToJsval(cx, arg, argv[0])) {
57732 aRv.Throw(NS_ERROR_UNEXPECTED);
57733 return;
57734 }
57735 break;
57736 } while (false);
57737
57738 JS::Rooted<JS::Value> callable(cx);
57739 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57740 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57741 !InitIds(cx, atomsCache)) ||
57742 !GetCallableProperty(cx, atomsCache->passNullableUTF8String_id, &callable)) {
57743 aRv.Throw(NS_ERROR_UNEXPECTED);
57744 return;
57745 }
57746 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57747 if (!JS::Call(cx, thisValue, callable,
57748 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57749 aRv.NoteJSContextException(cx);
57750 return;
57751 }
57752}
57753
57754void
57755TestJSImplInterfaceJSImpl::PassOptionalUTF8String(const Optional<nsACString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
57756{
57757 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalUTF8String", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57758 if (aRv.Failed()) {
57759 return;
57760 }
57761 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57761); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57761; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57762 BindingCallContext& cx = s.GetCallContext();
57763
57764 JS::Rooted<JS::Value> rval(cx);
57765 JS::RootedVector<JS::Value> argv(cx);
57766 if (!argv.resize(1)) {
57767 // That threw an exception on the JSContext, and our CallSetup will do
57768 // the right thing with that.
57769 return;
57770 }
57771 unsigned argc = 1;
57772
57773 do {
57774 if (arg.WasPassed()) {
57775 if (!NonVoidUTF8StringToJsval(cx, arg.Value(), argv[0])) {
57776 aRv.Throw(NS_ERROR_UNEXPECTED);
57777 return;
57778 }
57779 break;
57780 } else if (argc == 1) {
57781 // This is our current trailing argument; reduce argc
57782 --argc;
57783 } else {
57784 argv[0].setUndefined();
57785 }
57786 } while (false);
57787
57788 JS::Rooted<JS::Value> callable(cx);
57789 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57790 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57791 !InitIds(cx, atomsCache)) ||
57792 !GetCallableProperty(cx, atomsCache->passOptionalUTF8String_id, &callable)) {
57793 aRv.Throw(NS_ERROR_UNEXPECTED);
57794 return;
57795 }
57796 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57797 if (!JS::Call(cx, thisValue, callable,
57798 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57799 aRv.NoteJSContextException(cx);
57800 return;
57801 }
57802}
57803
57804void
57805TestJSImplInterfaceJSImpl::PassOptionalUTF8StringWithDefaultValue(const nsACString& arg, ErrorResult& aRv, JS::Realm* aRealm)
57806{
57807 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalUTF8StringWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57808 if (aRv.Failed()) {
57809 return;
57810 }
57811 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57811); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57811; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57812 BindingCallContext& cx = s.GetCallContext();
57813
57814 JS::Rooted<JS::Value> rval(cx);
57815 JS::RootedVector<JS::Value> argv(cx);
57816 if (!argv.resize(1)) {
57817 // That threw an exception on the JSContext, and our CallSetup will do
57818 // the right thing with that.
57819 return;
57820 }
57821 unsigned argc = 1;
57822
57823 do {
57824 if (!NonVoidUTF8StringToJsval(cx, arg, argv[0])) {
57825 aRv.Throw(NS_ERROR_UNEXPECTED);
57826 return;
57827 }
57828 break;
57829 } while (false);
57830
57831 JS::Rooted<JS::Value> callable(cx);
57832 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57833 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57834 !InitIds(cx, atomsCache)) ||
57835 !GetCallableProperty(cx, atomsCache->passOptionalUTF8StringWithDefaultValue_id, &callable)) {
57836 aRv.Throw(NS_ERROR_UNEXPECTED);
57837 return;
57838 }
57839 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57840 if (!JS::Call(cx, thisValue, callable,
57841 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57842 aRv.NoteJSContextException(cx);
57843 return;
57844 }
57845}
57846
57847void
57848TestJSImplInterfaceJSImpl::PassOptionalNullableUTF8String(const Optional<nsACString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
57849{
57850 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableUTF8String", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57851 if (aRv.Failed()) {
57852 return;
57853 }
57854 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57854); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57854; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57855 BindingCallContext& cx = s.GetCallContext();
57856
57857 JS::Rooted<JS::Value> rval(cx);
57858 JS::RootedVector<JS::Value> argv(cx);
57859 if (!argv.resize(1)) {
57860 // That threw an exception on the JSContext, and our CallSetup will do
57861 // the right thing with that.
57862 return;
57863 }
57864 unsigned argc = 1;
57865
57866 do {
57867 if (arg.WasPassed()) {
57868 if (!UTF8StringToJsval(cx, arg.Value(), argv[0])) {
57869 aRv.Throw(NS_ERROR_UNEXPECTED);
57870 return;
57871 }
57872 break;
57873 } else if (argc == 1) {
57874 // This is our current trailing argument; reduce argc
57875 --argc;
57876 } else {
57877 argv[0].setUndefined();
57878 }
57879 } while (false);
57880
57881 JS::Rooted<JS::Value> callable(cx);
57882 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57883 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57884 !InitIds(cx, atomsCache)) ||
57885 !GetCallableProperty(cx, atomsCache->passOptionalNullableUTF8String_id, &callable)) {
57886 aRv.Throw(NS_ERROR_UNEXPECTED);
57887 return;
57888 }
57889 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57890 if (!JS::Call(cx, thisValue, callable,
57891 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57892 aRv.NoteJSContextException(cx);
57893 return;
57894 }
57895}
57896
57897void
57898TestJSImplInterfaceJSImpl::PassOptionalNullableUTF8StringWithDefaultValue(const nsACString& arg, ErrorResult& aRv, JS::Realm* aRealm)
57899{
57900 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableUTF8StringWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57901 if (aRv.Failed()) {
57902 return;
57903 }
57904 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57904); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57904; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57905 BindingCallContext& cx = s.GetCallContext();
57906
57907 JS::Rooted<JS::Value> rval(cx);
57908 JS::RootedVector<JS::Value> argv(cx);
57909 if (!argv.resize(1)) {
57910 // That threw an exception on the JSContext, and our CallSetup will do
57911 // the right thing with that.
57912 return;
57913 }
57914 unsigned argc = 1;
57915
57916 do {
57917 if (!UTF8StringToJsval(cx, arg, argv[0])) {
57918 aRv.Throw(NS_ERROR_UNEXPECTED);
57919 return;
57920 }
57921 break;
57922 } while (false);
57923
57924 JS::Rooted<JS::Value> callable(cx);
57925 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57926 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57927 !InitIds(cx, atomsCache)) ||
57928 !GetCallableProperty(cx, atomsCache->passOptionalNullableUTF8StringWithDefaultValue_id, &callable)) {
57929 aRv.Throw(NS_ERROR_UNEXPECTED);
57930 return;
57931 }
57932 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57933 if (!JS::Call(cx, thisValue, callable,
57934 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57935 aRv.NoteJSContextException(cx);
57936 return;
57937 }
57938}
57939
57940void
57941TestJSImplInterfaceJSImpl::PassVariadicUTF8String(const nsTArray<nsCString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
57942{
57943 CallSetup s(this, aRv, "TestJSImplInterface.passVariadicUTF8String", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57944 if (aRv.Failed()) {
57945 return;
57946 }
57947 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57947); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57947; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57948 BindingCallContext& cx = s.GetCallContext();
57949
57950 JS::Rooted<JS::Value> rval(cx);
57951 JS::RootedVector<JS::Value> argv(cx);
57952 if (!argv.resize((1 - 1) + arg.Length())) {
57953 // That threw an exception on the JSContext, and our CallSetup will do
57954 // the right thing with that.
57955 return;
57956 }
57957 unsigned argc = (1 - 1) + arg.Length();
57958
57959 do {
57960 for (uint32_t idx = 0; idx < arg.Length(); ++idx) {
57961 if (!NonVoidUTF8StringToJsval(cx, arg[idx], argv[0 + idx])) {
57962 aRv.Throw(NS_ERROR_UNEXPECTED);
57963 return;
57964 }
57965 continue;
57966 }
57967 break;
57968 } while (false);
57969
57970 JS::Rooted<JS::Value> callable(cx);
57971 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
57972 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
57973 !InitIds(cx, atomsCache)) ||
57974 !GetCallableProperty(cx, atomsCache->passVariadicUTF8String_id, &callable)) {
57975 aRv.Throw(NS_ERROR_UNEXPECTED);
57976 return;
57977 }
57978 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
57979 if (!JS::Call(cx, thisValue, callable,
57980 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
57981 aRv.NoteJSContextException(cx);
57982 return;
57983 }
57984}
57985
57986void
57987TestJSImplInterfaceJSImpl::PassUnionUTF8String(const UTF8StringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
57988{
57989 CallSetup s(this, aRv, "TestJSImplInterface.passUnionUTF8String", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
57990 if (aRv.Failed()) {
57991 return;
57992 }
57993 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 57993); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 57993; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
57994 BindingCallContext& cx = s.GetCallContext();
57995
57996 JS::Rooted<JS::Value> rval(cx);
57997 JS::RootedVector<JS::Value> argv(cx);
57998 if (!argv.resize(1)) {
57999 // That threw an exception on the JSContext, and our CallSetup will do
58000 // the right thing with that.
58001 return;
58002 }
58003 unsigned argc = 1;
58004
58005 do {
58006 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
58007 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
58008 aRv.Throw(NS_ERROR_UNEXPECTED);
58009 return;
58010 }
58011 break;
58012 } while (false);
58013
58014 JS::Rooted<JS::Value> callable(cx);
58015 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58016 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58017 !InitIds(cx, atomsCache)) ||
58018 !GetCallableProperty(cx, atomsCache->passUnionUTF8String_id, &callable)) {
58019 aRv.Throw(NS_ERROR_UNEXPECTED);
58020 return;
58021 }
58022 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58023 if (!JS::Call(cx, thisValue, callable,
58024 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58025 aRv.NoteJSContextException(cx);
58026 return;
58027 }
58028}
58029
58030void
58031TestJSImplInterfaceJSImpl::PassOptionalUnionUTF8String(const Optional<UTF8StringOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
58032{
58033 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalUnionUTF8String", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58034 if (aRv.Failed()) {
58035 return;
58036 }
58037 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58037); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58037; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58038 BindingCallContext& cx = s.GetCallContext();
58039
58040 JS::Rooted<JS::Value> rval(cx);
58041 JS::RootedVector<JS::Value> argv(cx);
58042 if (!argv.resize(1)) {
58043 // That threw an exception on the JSContext, and our CallSetup will do
58044 // the right thing with that.
58045 return;
58046 }
58047 unsigned argc = 1;
58048
58049 do {
58050 if (arg.WasPassed()) {
58051 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
58052 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
58053 aRv.Throw(NS_ERROR_UNEXPECTED);
58054 return;
58055 }
58056 break;
58057 } else if (argc == 1) {
58058 // This is our current trailing argument; reduce argc
58059 --argc;
58060 } else {
58061 argv[0].setUndefined();
58062 }
58063 } while (false);
58064
58065 JS::Rooted<JS::Value> callable(cx);
58066 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58067 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58068 !InitIds(cx, atomsCache)) ||
58069 !GetCallableProperty(cx, atomsCache->passOptionalUnionUTF8String_id, &callable)) {
58070 aRv.Throw(NS_ERROR_UNEXPECTED);
58071 return;
58072 }
58073 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58074 if (!JS::Call(cx, thisValue, callable,
58075 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58076 aRv.NoteJSContextException(cx);
58077 return;
58078 }
58079}
58080
58081void
58082TestJSImplInterfaceJSImpl::PassOptionalUnionUTF8StringWithDefaultValue(const UTF8StringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
58083{
58084 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalUnionUTF8StringWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58085 if (aRv.Failed()) {
58086 return;
58087 }
58088 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58088); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58088; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58089 BindingCallContext& cx = s.GetCallContext();
58090
58091 JS::Rooted<JS::Value> rval(cx);
58092 JS::RootedVector<JS::Value> argv(cx);
58093 if (!argv.resize(1)) {
58094 // That threw an exception on the JSContext, and our CallSetup will do
58095 // the right thing with that.
58096 return;
58097 }
58098 unsigned argc = 1;
58099
58100 do {
58101 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
58102 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
58103 aRv.Throw(NS_ERROR_UNEXPECTED);
58104 return;
58105 }
58106 break;
58107 } while (false);
58108
58109 JS::Rooted<JS::Value> callable(cx);
58110 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58111 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58112 !InitIds(cx, atomsCache)) ||
58113 !GetCallableProperty(cx, atomsCache->passOptionalUnionUTF8StringWithDefaultValue_id, &callable)) {
58114 aRv.Throw(NS_ERROR_UNEXPECTED);
58115 return;
58116 }
58117 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58118 if (!JS::Call(cx, thisValue, callable,
58119 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58120 aRv.NoteJSContextException(cx);
58121 return;
58122 }
58123}
58124
58125void
58126TestJSImplInterfaceJSImpl::PassSVS(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
58127{
58128 CallSetup s(this, aRv, "TestJSImplInterface.passSVS", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58129 if (aRv.Failed()) {
58130 return;
58131 }
58132 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58132); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58132; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58133 BindingCallContext& cx = s.GetCallContext();
58134
58135 JS::Rooted<JS::Value> rval(cx);
58136 JS::RootedVector<JS::Value> argv(cx);
58137 if (!argv.resize(1)) {
58138 // That threw an exception on the JSContext, and our CallSetup will do
58139 // the right thing with that.
58140 return;
58141 }
58142 unsigned argc = 1;
58143
58144 do {
58145 if (!xpc::NonVoidStringToJsval(cx, arg, argv[0])) {
58146 aRv.Throw(NS_ERROR_UNEXPECTED);
58147 return;
58148 }
58149 break;
58150 } while (false);
58151
58152 JS::Rooted<JS::Value> callable(cx);
58153 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58154 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58155 !InitIds(cx, atomsCache)) ||
58156 !GetCallableProperty(cx, atomsCache->passSVS_id, &callable)) {
58157 aRv.Throw(NS_ERROR_UNEXPECTED);
58158 return;
58159 }
58160 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58161 if (!JS::Call(cx, thisValue, callable,
58162 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58163 aRv.NoteJSContextException(cx);
58164 return;
58165 }
58166}
58167
58168void
58169TestJSImplInterfaceJSImpl::PassNullableSVS(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
58170{
58171 CallSetup s(this, aRv, "TestJSImplInterface.passNullableSVS", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58172 if (aRv.Failed()) {
58173 return;
58174 }
58175 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58175); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58175; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58176 BindingCallContext& cx = s.GetCallContext();
58177
58178 JS::Rooted<JS::Value> rval(cx);
58179 JS::RootedVector<JS::Value> argv(cx);
58180 if (!argv.resize(1)) {
58181 // That threw an exception on the JSContext, and our CallSetup will do
58182 // the right thing with that.
58183 return;
58184 }
58185 unsigned argc = 1;
58186
58187 do {
58188 if (!xpc::StringToJsval(cx, arg, argv[0])) {
58189 aRv.Throw(NS_ERROR_UNEXPECTED);
58190 return;
58191 }
58192 break;
58193 } while (false);
58194
58195 JS::Rooted<JS::Value> callable(cx);
58196 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58197 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58198 !InitIds(cx, atomsCache)) ||
58199 !GetCallableProperty(cx, atomsCache->passNullableSVS_id, &callable)) {
58200 aRv.Throw(NS_ERROR_UNEXPECTED);
58201 return;
58202 }
58203 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58204 if (!JS::Call(cx, thisValue, callable,
58205 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58206 aRv.NoteJSContextException(cx);
58207 return;
58208 }
58209}
58210
58211void
58212TestJSImplInterfaceJSImpl::PassOptionalSVS(const Optional<nsAString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
58213{
58214 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalSVS", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58215 if (aRv.Failed()) {
58216 return;
58217 }
58218 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58218); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58218; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58219 BindingCallContext& cx = s.GetCallContext();
58220
58221 JS::Rooted<JS::Value> rval(cx);
58222 JS::RootedVector<JS::Value> argv(cx);
58223 if (!argv.resize(1)) {
58224 // That threw an exception on the JSContext, and our CallSetup will do
58225 // the right thing with that.
58226 return;
58227 }
58228 unsigned argc = 1;
58229
58230 do {
58231 if (arg.WasPassed()) {
58232 if (!xpc::NonVoidStringToJsval(cx, arg.Value(), argv[0])) {
58233 aRv.Throw(NS_ERROR_UNEXPECTED);
58234 return;
58235 }
58236 break;
58237 } else if (argc == 1) {
58238 // This is our current trailing argument; reduce argc
58239 --argc;
58240 } else {
58241 argv[0].setUndefined();
58242 }
58243 } while (false);
58244
58245 JS::Rooted<JS::Value> callable(cx);
58246 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58247 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58248 !InitIds(cx, atomsCache)) ||
58249 !GetCallableProperty(cx, atomsCache->passOptionalSVS_id, &callable)) {
58250 aRv.Throw(NS_ERROR_UNEXPECTED);
58251 return;
58252 }
58253 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58254 if (!JS::Call(cx, thisValue, callable,
58255 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58256 aRv.NoteJSContextException(cx);
58257 return;
58258 }
58259}
58260
58261void
58262TestJSImplInterfaceJSImpl::PassOptionalSVSWithDefaultValue(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
58263{
58264 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalSVSWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58265 if (aRv.Failed()) {
58266 return;
58267 }
58268 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58268); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58268; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58269 BindingCallContext& cx = s.GetCallContext();
58270
58271 JS::Rooted<JS::Value> rval(cx);
58272 JS::RootedVector<JS::Value> argv(cx);
58273 if (!argv.resize(1)) {
58274 // That threw an exception on the JSContext, and our CallSetup will do
58275 // the right thing with that.
58276 return;
58277 }
58278 unsigned argc = 1;
58279
58280 do {
58281 if (!xpc::NonVoidStringToJsval(cx, arg, argv[0])) {
58282 aRv.Throw(NS_ERROR_UNEXPECTED);
58283 return;
58284 }
58285 break;
58286 } while (false);
58287
58288 JS::Rooted<JS::Value> callable(cx);
58289 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58290 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58291 !InitIds(cx, atomsCache)) ||
58292 !GetCallableProperty(cx, atomsCache->passOptionalSVSWithDefaultValue_id, &callable)) {
58293 aRv.Throw(NS_ERROR_UNEXPECTED);
58294 return;
58295 }
58296 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58297 if (!JS::Call(cx, thisValue, callable,
58298 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58299 aRv.NoteJSContextException(cx);
58300 return;
58301 }
58302}
58303
58304void
58305TestJSImplInterfaceJSImpl::PassOptionalNullableSVS(const Optional<nsAString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
58306{
58307 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableSVS", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58308 if (aRv.Failed()) {
58309 return;
58310 }
58311 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58311); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58311; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58312 BindingCallContext& cx = s.GetCallContext();
58313
58314 JS::Rooted<JS::Value> rval(cx);
58315 JS::RootedVector<JS::Value> argv(cx);
58316 if (!argv.resize(1)) {
58317 // That threw an exception on the JSContext, and our CallSetup will do
58318 // the right thing with that.
58319 return;
58320 }
58321 unsigned argc = 1;
58322
58323 do {
58324 if (arg.WasPassed()) {
58325 if (!xpc::StringToJsval(cx, arg.Value(), argv[0])) {
58326 aRv.Throw(NS_ERROR_UNEXPECTED);
58327 return;
58328 }
58329 break;
58330 } else if (argc == 1) {
58331 // This is our current trailing argument; reduce argc
58332 --argc;
58333 } else {
58334 argv[0].setUndefined();
58335 }
58336 } while (false);
58337
58338 JS::Rooted<JS::Value> callable(cx);
58339 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58340 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58341 !InitIds(cx, atomsCache)) ||
58342 !GetCallableProperty(cx, atomsCache->passOptionalNullableSVS_id, &callable)) {
58343 aRv.Throw(NS_ERROR_UNEXPECTED);
58344 return;
58345 }
58346 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58347 if (!JS::Call(cx, thisValue, callable,
58348 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58349 aRv.NoteJSContextException(cx);
58350 return;
58351 }
58352}
58353
58354void
58355TestJSImplInterfaceJSImpl::PassOptionalNullableSVSWithDefaultValue(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
58356{
58357 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableSVSWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58358 if (aRv.Failed()) {
58359 return;
58360 }
58361 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58361); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58361; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58362 BindingCallContext& cx = s.GetCallContext();
58363
58364 JS::Rooted<JS::Value> rval(cx);
58365 JS::RootedVector<JS::Value> argv(cx);
58366 if (!argv.resize(1)) {
58367 // That threw an exception on the JSContext, and our CallSetup will do
58368 // the right thing with that.
58369 return;
58370 }
58371 unsigned argc = 1;
58372
58373 do {
58374 if (!xpc::StringToJsval(cx, arg, argv[0])) {
58375 aRv.Throw(NS_ERROR_UNEXPECTED);
58376 return;
58377 }
58378 break;
58379 } while (false);
58380
58381 JS::Rooted<JS::Value> callable(cx);
58382 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58383 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58384 !InitIds(cx, atomsCache)) ||
58385 !GetCallableProperty(cx, atomsCache->passOptionalNullableSVSWithDefaultValue_id, &callable)) {
58386 aRv.Throw(NS_ERROR_UNEXPECTED);
58387 return;
58388 }
58389 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58390 if (!JS::Call(cx, thisValue, callable,
58391 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58392 aRv.NoteJSContextException(cx);
58393 return;
58394 }
58395}
58396
58397void
58398TestJSImplInterfaceJSImpl::PassVariadicSVS(const nsTArray<nsString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
58399{
58400 CallSetup s(this, aRv, "TestJSImplInterface.passVariadicSVS", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58401 if (aRv.Failed()) {
58402 return;
58403 }
58404 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58404); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58404; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58405 BindingCallContext& cx = s.GetCallContext();
58406
58407 JS::Rooted<JS::Value> rval(cx);
58408 JS::RootedVector<JS::Value> argv(cx);
58409 if (!argv.resize((1 - 1) + arg.Length())) {
58410 // That threw an exception on the JSContext, and our CallSetup will do
58411 // the right thing with that.
58412 return;
58413 }
58414 unsigned argc = (1 - 1) + arg.Length();
58415
58416 do {
58417 for (uint32_t idx = 0; idx < arg.Length(); ++idx) {
58418 if (!xpc::NonVoidStringToJsval(cx, arg[idx], argv[0 + idx])) {
58419 aRv.Throw(NS_ERROR_UNEXPECTED);
58420 return;
58421 }
58422 continue;
58423 }
58424 break;
58425 } while (false);
58426
58427 JS::Rooted<JS::Value> callable(cx);
58428 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58429 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58430 !InitIds(cx, atomsCache)) ||
58431 !GetCallableProperty(cx, atomsCache->passVariadicSVS_id, &callable)) {
58432 aRv.Throw(NS_ERROR_UNEXPECTED);
58433 return;
58434 }
58435 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58436 if (!JS::Call(cx, thisValue, callable,
58437 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58438 aRv.NoteJSContextException(cx);
58439 return;
58440 }
58441}
58442
58443void
58444TestJSImplInterfaceJSImpl::ReceiveSVS(nsString& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
58445{
58446 CallSetup s(this, aRv, "TestJSImplInterface.receiveSVS", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58447 if (aRv.Failed()) {
58448 return;
58449 }
58450 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58450); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58450; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58451 BindingCallContext& cx = s.GetCallContext();
58452
58453 JS::Rooted<JS::Value> rval(cx);
58454
58455 JS::Rooted<JS::Value> callable(cx);
58456 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58457 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58458 !InitIds(cx, atomsCache)) ||
58459 !GetCallableProperty(cx, atomsCache->receiveSVS_id, &callable)) {
58460 aRv.Throw(NS_ERROR_UNEXPECTED);
58461 return;
58462 }
58463 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58464 if (!JS::Call(cx, thisValue, callable,
58465 JS::HandleValueArray::empty(), &rval)) {
58466 aRv.NoteJSContextException(cx);
58467 return;
58468 }
58469 binding_detail::FakeString<char16_t> rvalDecl;
58470 if (!ConvertJSValueToString(cx, rval, eStringify, eStringify, rvalDecl)) {
58471 aRv.Throw(NS_ERROR_UNEXPECTED);
58472 return;
58473 }
58474 if (!NormalizeUSVString(rvalDecl)) {
58475 JS_ReportOutOfMemory(cx);
58476 aRv.Throw(NS_ERROR_UNEXPECTED);
58477 return;
58478 }
58479 aRetVal = rvalDecl;
58480}
58481
58482void
58483TestJSImplInterfaceJSImpl::PassJSString(JS::Handle<JSString*> arg, ErrorResult& aRv, JS::Realm* aRealm)
58484{
58485 CallSetup s(this, aRv, "TestJSImplInterface.passJSString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58486 if (aRv.Failed()) {
58487 return;
58488 }
58489 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58489); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58489; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58490 BindingCallContext& cx = s.GetCallContext();
58491
58492 JS::Rooted<JS::Value> rval(cx);
58493 JS::RootedVector<JS::Value> argv(cx);
58494 if (!argv.resize(1)) {
58495 // That threw an exception on the JSContext, and our CallSetup will do
58496 // the right thing with that.
58497 return;
58498 }
58499 unsigned argc = 1;
58500
58501 do {
58502 argv[0].setString(arg);
58503 if (!MaybeWrapStringValue(cx, argv[0])) {
58504 aRv.Throw(NS_ERROR_UNEXPECTED);
58505 return;
58506 }
58507 break;
58508 } while (false);
58509
58510 JS::Rooted<JS::Value> callable(cx);
58511 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58512 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58513 !InitIds(cx, atomsCache)) ||
58514 !GetCallableProperty(cx, atomsCache->passJSString_id, &callable)) {
58515 aRv.Throw(NS_ERROR_UNEXPECTED);
58516 return;
58517 }
58518 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58519 if (!JS::Call(cx, thisValue, callable,
58520 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58521 aRv.NoteJSContextException(cx);
58522 return;
58523 }
58524}
58525
58526void
58527TestJSImplInterfaceJSImpl::PassOptionalJSStringWithDefaultValue(JS::Handle<JSString*> arg, ErrorResult& aRv, JS::Realm* aRealm)
58528{
58529 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalJSStringWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58530 if (aRv.Failed()) {
58531 return;
58532 }
58533 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58533); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58533; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58534 BindingCallContext& cx = s.GetCallContext();
58535
58536 JS::Rooted<JS::Value> rval(cx);
58537 JS::RootedVector<JS::Value> argv(cx);
58538 if (!argv.resize(1)) {
58539 // That threw an exception on the JSContext, and our CallSetup will do
58540 // the right thing with that.
58541 return;
58542 }
58543 unsigned argc = 1;
58544
58545 do {
58546 argv[0].setString(arg);
58547 if (!MaybeWrapStringValue(cx, argv[0])) {
58548 aRv.Throw(NS_ERROR_UNEXPECTED);
58549 return;
58550 }
58551 break;
58552 } while (false);
58553
58554 JS::Rooted<JS::Value> callable(cx);
58555 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58556 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58557 !InitIds(cx, atomsCache)) ||
58558 !GetCallableProperty(cx, atomsCache->passOptionalJSStringWithDefaultValue_id, &callable)) {
58559 aRv.Throw(NS_ERROR_UNEXPECTED);
58560 return;
58561 }
58562 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58563 if (!JS::Call(cx, thisValue, callable,
58564 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58565 aRv.NoteJSContextException(cx);
58566 return;
58567 }
58568}
58569
58570void
58571TestJSImplInterfaceJSImpl::ReceiveJSString(JS::MutableHandle<JSString*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
58572{
58573 CallSetup s(this, aRv, "TestJSImplInterface.receiveJSString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58574 if (aRv.Failed()) {
58575 return;
58576 }
58577 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58577); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58577; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58578 BindingCallContext& cx = s.GetCallContext();
58579
58580 JS::Rooted<JS::Value> rval(cx);
58581
58582 JS::Rooted<JS::Value> callable(cx);
58583 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58584 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58585 !InitIds(cx, atomsCache)) ||
58586 !GetCallableProperty(cx, atomsCache->receiveJSString_id, &callable)) {
58587 aRv.Throw(NS_ERROR_UNEXPECTED);
58588 return;
58589 }
58590 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58591 if (!JS::Call(cx, thisValue, callable,
58592 JS::HandleValueArray::empty(), &rval)) {
58593 aRv.NoteJSContextException(cx);
58594 return;
58595 }
58596 JS::Rooted<JSString*> rvalDecl(cx);
58597 if (!(rvalDecl = ConvertJSValueToJSString(cx, rval))) {
58598 aRv.Throw(NS_ERROR_UNEXPECTED);
58599 return;
58600 }
58601 aRetVal.set(rvalDecl);
58602}
58603
58604void
58605TestJSImplInterfaceJSImpl::PassEnum(MyTestEnum arg, ErrorResult& aRv, JS::Realm* aRealm)
58606{
58607 CallSetup s(this, aRv, "TestJSImplInterface.passEnum", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58608 if (aRv.Failed()) {
58609 return;
58610 }
58611 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58611); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58611; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58612 BindingCallContext& cx = s.GetCallContext();
58613
58614 JS::Rooted<JS::Value> rval(cx);
58615 JS::RootedVector<JS::Value> argv(cx);
58616 if (!argv.resize(1)) {
58617 // That threw an exception on the JSContext, and our CallSetup will do
58618 // the right thing with that.
58619 return;
58620 }
58621 unsigned argc = 1;
58622
58623 do {
58624 if (!ToJSValue(cx, arg, argv[0])) {
58625 aRv.Throw(NS_ERROR_UNEXPECTED);
58626 return;
58627 }
58628 break;
58629 } while (false);
58630
58631 JS::Rooted<JS::Value> callable(cx);
58632 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58633 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58634 !InitIds(cx, atomsCache)) ||
58635 !GetCallableProperty(cx, atomsCache->passEnum_id, &callable)) {
58636 aRv.Throw(NS_ERROR_UNEXPECTED);
58637 return;
58638 }
58639 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58640 if (!JS::Call(cx, thisValue, callable,
58641 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58642 aRv.NoteJSContextException(cx);
58643 return;
58644 }
58645}
58646
58647void
58648TestJSImplInterfaceJSImpl::PassNullableEnum(const Nullable<MyTestEnum>& arg, ErrorResult& aRv, JS::Realm* aRealm)
58649{
58650 CallSetup s(this, aRv, "TestJSImplInterface.passNullableEnum", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58651 if (aRv.Failed()) {
58652 return;
58653 }
58654 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58654); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58654; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58655 BindingCallContext& cx = s.GetCallContext();
58656
58657 JS::Rooted<JS::Value> rval(cx);
58658 JS::RootedVector<JS::Value> argv(cx);
58659 if (!argv.resize(1)) {
58660 // That threw an exception on the JSContext, and our CallSetup will do
58661 // the right thing with that.
58662 return;
58663 }
58664 unsigned argc = 1;
58665
58666 do {
58667 if (arg.IsNull()) {
58668 argv[0].setNull();
58669 break;
58670 } else {
58671 if (!ToJSValue(cx, arg.Value(), argv[0])) {
58672 aRv.Throw(NS_ERROR_UNEXPECTED);
58673 return;
58674 }
58675 break;
58676 }
58677 } while (false);
58678
58679 JS::Rooted<JS::Value> callable(cx);
58680 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58681 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58682 !InitIds(cx, atomsCache)) ||
58683 !GetCallableProperty(cx, atomsCache->passNullableEnum_id, &callable)) {
58684 aRv.Throw(NS_ERROR_UNEXPECTED);
58685 return;
58686 }
58687 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58688 if (!JS::Call(cx, thisValue, callable,
58689 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58690 aRv.NoteJSContextException(cx);
58691 return;
58692 }
58693}
58694
58695void
58696TestJSImplInterfaceJSImpl::PassOptionalEnum(const Optional<MyTestEnum>& arg, ErrorResult& aRv, JS::Realm* aRealm)
58697{
58698 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalEnum", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58699 if (aRv.Failed()) {
58700 return;
58701 }
58702 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58702); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58702; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58703 BindingCallContext& cx = s.GetCallContext();
58704
58705 JS::Rooted<JS::Value> rval(cx);
58706 JS::RootedVector<JS::Value> argv(cx);
58707 if (!argv.resize(1)) {
58708 // That threw an exception on the JSContext, and our CallSetup will do
58709 // the right thing with that.
58710 return;
58711 }
58712 unsigned argc = 1;
58713
58714 do {
58715 if (arg.WasPassed()) {
58716 if (!ToJSValue(cx, arg.Value(), argv[0])) {
58717 aRv.Throw(NS_ERROR_UNEXPECTED);
58718 return;
58719 }
58720 break;
58721 } else if (argc == 1) {
58722 // This is our current trailing argument; reduce argc
58723 --argc;
58724 } else {
58725 argv[0].setUndefined();
58726 }
58727 } while (false);
58728
58729 JS::Rooted<JS::Value> callable(cx);
58730 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58731 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58732 !InitIds(cx, atomsCache)) ||
58733 !GetCallableProperty(cx, atomsCache->passOptionalEnum_id, &callable)) {
58734 aRv.Throw(NS_ERROR_UNEXPECTED);
58735 return;
58736 }
58737 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58738 if (!JS::Call(cx, thisValue, callable,
58739 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58740 aRv.NoteJSContextException(cx);
58741 return;
58742 }
58743}
58744
58745void
58746TestJSImplInterfaceJSImpl::PassEnumWithDefault(MyTestEnum arg, ErrorResult& aRv, JS::Realm* aRealm)
58747{
58748 CallSetup s(this, aRv, "TestJSImplInterface.passEnumWithDefault", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58749 if (aRv.Failed()) {
58750 return;
58751 }
58752 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58752); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58752; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58753 BindingCallContext& cx = s.GetCallContext();
58754
58755 JS::Rooted<JS::Value> rval(cx);
58756 JS::RootedVector<JS::Value> argv(cx);
58757 if (!argv.resize(1)) {
58758 // That threw an exception on the JSContext, and our CallSetup will do
58759 // the right thing with that.
58760 return;
58761 }
58762 unsigned argc = 1;
58763
58764 do {
58765 if (!ToJSValue(cx, arg, argv[0])) {
58766 aRv.Throw(NS_ERROR_UNEXPECTED);
58767 return;
58768 }
58769 break;
58770 } while (false);
58771
58772 JS::Rooted<JS::Value> callable(cx);
58773 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58774 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58775 !InitIds(cx, atomsCache)) ||
58776 !GetCallableProperty(cx, atomsCache->passEnumWithDefault_id, &callable)) {
58777 aRv.Throw(NS_ERROR_UNEXPECTED);
58778 return;
58779 }
58780 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58781 if (!JS::Call(cx, thisValue, callable,
58782 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58783 aRv.NoteJSContextException(cx);
58784 return;
58785 }
58786}
58787
58788void
58789TestJSImplInterfaceJSImpl::PassOptionalNullableEnum(const Optional<Nullable<MyTestEnum>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
58790{
58791 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableEnum", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58792 if (aRv.Failed()) {
58793 return;
58794 }
58795 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58795); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58795; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58796 BindingCallContext& cx = s.GetCallContext();
58797
58798 JS::Rooted<JS::Value> rval(cx);
58799 JS::RootedVector<JS::Value> argv(cx);
58800 if (!argv.resize(1)) {
58801 // That threw an exception on the JSContext, and our CallSetup will do
58802 // the right thing with that.
58803 return;
58804 }
58805 unsigned argc = 1;
58806
58807 do {
58808 if (arg.WasPassed()) {
58809 if (arg.Value().IsNull()) {
58810 argv[0].setNull();
58811 break;
58812 } else {
58813 if (!ToJSValue(cx, arg.Value().Value(), argv[0])) {
58814 aRv.Throw(NS_ERROR_UNEXPECTED);
58815 return;
58816 }
58817 break;
58818 }
58819 } else if (argc == 1) {
58820 // This is our current trailing argument; reduce argc
58821 --argc;
58822 } else {
58823 argv[0].setUndefined();
58824 }
58825 } while (false);
58826
58827 JS::Rooted<JS::Value> callable(cx);
58828 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58829 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58830 !InitIds(cx, atomsCache)) ||
58831 !GetCallableProperty(cx, atomsCache->passOptionalNullableEnum_id, &callable)) {
58832 aRv.Throw(NS_ERROR_UNEXPECTED);
58833 return;
58834 }
58835 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58836 if (!JS::Call(cx, thisValue, callable,
58837 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58838 aRv.NoteJSContextException(cx);
58839 return;
58840 }
58841}
58842
58843void
58844TestJSImplInterfaceJSImpl::PassOptionalNullableEnumWithDefaultValue(const Nullable<MyTestEnum>& arg, ErrorResult& aRv, JS::Realm* aRealm)
58845{
58846 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableEnumWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58847 if (aRv.Failed()) {
58848 return;
58849 }
58850 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58850); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58850; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58851 BindingCallContext& cx = s.GetCallContext();
58852
58853 JS::Rooted<JS::Value> rval(cx);
58854 JS::RootedVector<JS::Value> argv(cx);
58855 if (!argv.resize(1)) {
58856 // That threw an exception on the JSContext, and our CallSetup will do
58857 // the right thing with that.
58858 return;
58859 }
58860 unsigned argc = 1;
58861
58862 do {
58863 if (arg.IsNull()) {
58864 argv[0].setNull();
58865 break;
58866 } else {
58867 if (!ToJSValue(cx, arg.Value(), argv[0])) {
58868 aRv.Throw(NS_ERROR_UNEXPECTED);
58869 return;
58870 }
58871 break;
58872 }
58873 } while (false);
58874
58875 JS::Rooted<JS::Value> callable(cx);
58876 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58877 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58878 !InitIds(cx, atomsCache)) ||
58879 !GetCallableProperty(cx, atomsCache->passOptionalNullableEnumWithDefaultValue_id, &callable)) {
58880 aRv.Throw(NS_ERROR_UNEXPECTED);
58881 return;
58882 }
58883 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58884 if (!JS::Call(cx, thisValue, callable,
58885 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58886 aRv.NoteJSContextException(cx);
58887 return;
58888 }
58889}
58890
58891void
58892TestJSImplInterfaceJSImpl::PassOptionalNullableEnumWithDefaultValue2(const Nullable<MyTestEnum>& arg, ErrorResult& aRv, JS::Realm* aRealm)
58893{
58894 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableEnumWithDefaultValue2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58895 if (aRv.Failed()) {
58896 return;
58897 }
58898 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58898); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58898; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58899 BindingCallContext& cx = s.GetCallContext();
58900
58901 JS::Rooted<JS::Value> rval(cx);
58902 JS::RootedVector<JS::Value> argv(cx);
58903 if (!argv.resize(1)) {
58904 // That threw an exception on the JSContext, and our CallSetup will do
58905 // the right thing with that.
58906 return;
58907 }
58908 unsigned argc = 1;
58909
58910 do {
58911 if (arg.IsNull()) {
58912 argv[0].setNull();
58913 break;
58914 } else {
58915 if (!ToJSValue(cx, arg.Value(), argv[0])) {
58916 aRv.Throw(NS_ERROR_UNEXPECTED);
58917 return;
58918 }
58919 break;
58920 }
58921 } while (false);
58922
58923 JS::Rooted<JS::Value> callable(cx);
58924 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58925 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58926 !InitIds(cx, atomsCache)) ||
58927 !GetCallableProperty(cx, atomsCache->passOptionalNullableEnumWithDefaultValue2_id, &callable)) {
58928 aRv.Throw(NS_ERROR_UNEXPECTED);
58929 return;
58930 }
58931 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58932 if (!JS::Call(cx, thisValue, callable,
58933 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
58934 aRv.NoteJSContextException(cx);
58935 return;
58936 }
58937}
58938
58939MyTestEnum
58940TestJSImplInterfaceJSImpl::ReceiveEnum(ErrorResult& aRv, JS::Realm* aRealm)
58941{
58942 CallSetup s(this, aRv, "TestJSImplInterface.receiveEnum", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58943 if (aRv.Failed()) {
58944 return MyTestEnum(0);
58945 }
58946 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58946); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58946; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58947 BindingCallContext& cx = s.GetCallContext();
58948
58949 JS::Rooted<JS::Value> rval(cx);
58950
58951 JS::Rooted<JS::Value> callable(cx);
58952 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58953 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58954 !InitIds(cx, atomsCache)) ||
58955 !GetCallableProperty(cx, atomsCache->receiveEnum_id, &callable)) {
58956 aRv.Throw(NS_ERROR_UNEXPECTED);
58957 return MyTestEnum(0);
58958 }
58959 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
58960 if (!JS::Call(cx, thisValue, callable,
58961 JS::HandleValueArray::empty(), &rval)) {
58962 aRv.NoteJSContextException(cx);
58963 return MyTestEnum(0);
58964 }
58965 MyTestEnum rvalDecl;
58966 {
58967 int index;
58968 if (!binding_detail::FindEnumStringIndex<true>(cx, rval,
58969 binding_detail::EnumStrings<MyTestEnum>::Values,
58970 "MyTestEnum", "return value of TestJSImplInterface.receiveEnum",
58971 &index)) {
58972 aRv.Throw(NS_ERROR_UNEXPECTED);
58973 return MyTestEnum(0);
58974 }
58975 MOZ_ASSERT(index >= 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(index >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(index >= 0))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("index >= 0",
"../TestJSImplGenBinding.cpp", 58975); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 58975; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58976 rvalDecl = static_cast<MyTestEnum>(index);
58977 }
58978 return rvalDecl;
58979}
58980
58981Nullable<MyTestEnum>
58982TestJSImplInterfaceJSImpl::ReceiveNullableEnum(ErrorResult& aRv, JS::Realm* aRealm)
58983{
58984 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableEnum", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
58985 if (aRv.Failed()) {
58986 return Nullable<MyTestEnum>();
58987 }
58988 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 58988); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 58988; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
58989 BindingCallContext& cx = s.GetCallContext();
58990
58991 JS::Rooted<JS::Value> rval(cx);
58992
58993 JS::Rooted<JS::Value> callable(cx);
58994 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
58995 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
58996 !InitIds(cx, atomsCache)) ||
58997 !GetCallableProperty(cx, atomsCache->receiveNullableEnum_id, &callable)) {
58998 aRv.Throw(NS_ERROR_UNEXPECTED);
58999 return Nullable<MyTestEnum>();
59000 }
59001 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59002 if (!JS::Call(cx, thisValue, callable,
59003 JS::HandleValueArray::empty(), &rval)) {
59004 aRv.NoteJSContextException(cx);
59005 return Nullable<MyTestEnum>();
59006 }
59007 Nullable<MyTestEnum> rvalDecl;
59008 if (rval.isNullOrUndefined()) {
59009 rvalDecl.SetNull();
59010 } else {
59011 {
59012 int index;
59013 if (!binding_detail::FindEnumStringIndex<true>(cx, rval,
59014 binding_detail::EnumStrings<MyTestEnum>::Values,
59015 "MyTestEnum", "return value of TestJSImplInterface.receiveNullableEnum",
59016 &index)) {
59017 aRv.Throw(NS_ERROR_UNEXPECTED);
59018 return Nullable<MyTestEnum>();
59019 }
59020 MOZ_ASSERT(index >= 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(index >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(index >= 0))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("index >= 0",
"../TestJSImplGenBinding.cpp", 59020); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 59020; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59021 rvalDecl.SetValue() = static_cast<MyTestEnum>(index);
59022 }
59023 }
59024 return rvalDecl;
59025}
59026
59027void
59028TestJSImplInterfaceJSImpl::PassCallback(MyTestCallback& arg, ErrorResult& aRv, JS::Realm* aRealm)
59029{
59030 CallSetup s(this, aRv, "TestJSImplInterface.passCallback", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59031 if (aRv.Failed()) {
59032 return;
59033 }
59034 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59034); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59034; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59035 BindingCallContext& cx = s.GetCallContext();
59036
59037 JS::Rooted<JS::Value> rval(cx);
59038 JS::RootedVector<JS::Value> argv(cx);
59039 if (!argv.resize(1)) {
59040 // That threw an exception on the JSContext, and our CallSetup will do
59041 // the right thing with that.
59042 return;
59043 }
59044 unsigned argc = 1;
59045
59046 do {
59047 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg));
59048 if (!MaybeWrapObjectValue(cx, argv[0])) {
59049 aRv.Throw(NS_ERROR_UNEXPECTED);
59050 return;
59051 }
59052 break;
59053 } while (false);
59054
59055 JS::Rooted<JS::Value> callable(cx);
59056 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59057 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59058 !InitIds(cx, atomsCache)) ||
59059 !GetCallableProperty(cx, atomsCache->passCallback_id, &callable)) {
59060 aRv.Throw(NS_ERROR_UNEXPECTED);
59061 return;
59062 }
59063 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59064 if (!JS::Call(cx, thisValue, callable,
59065 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59066 aRv.NoteJSContextException(cx);
59067 return;
59068 }
59069}
59070
59071void
59072TestJSImplInterfaceJSImpl::PassNullableCallback(MyTestCallback* arg, ErrorResult& aRv, JS::Realm* aRealm)
59073{
59074 CallSetup s(this, aRv, "TestJSImplInterface.passNullableCallback", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59075 if (aRv.Failed()) {
59076 return;
59077 }
59078 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59078); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59078; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59079 BindingCallContext& cx = s.GetCallContext();
59080
59081 JS::Rooted<JS::Value> rval(cx);
59082 JS::RootedVector<JS::Value> argv(cx);
59083 if (!argv.resize(1)) {
59084 // That threw an exception on the JSContext, and our CallSetup will do
59085 // the right thing with that.
59086 return;
59087 }
59088 unsigned argc = 1;
59089
59090 do {
59091 if (arg) {
59092 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg));
59093 if (!MaybeWrapObjectOrNullValue(cx, argv[0])) {
59094 aRv.Throw(NS_ERROR_UNEXPECTED);
59095 return;
59096 }
59097 break;
59098 } else {
59099 argv[0].setNull();
59100 break;
59101 }
59102 } while (false);
59103
59104 JS::Rooted<JS::Value> callable(cx);
59105 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59106 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59107 !InitIds(cx, atomsCache)) ||
59108 !GetCallableProperty(cx, atomsCache->passNullableCallback_id, &callable)) {
59109 aRv.Throw(NS_ERROR_UNEXPECTED);
59110 return;
59111 }
59112 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59113 if (!JS::Call(cx, thisValue, callable,
59114 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59115 aRv.NoteJSContextException(cx);
59116 return;
59117 }
59118}
59119
59120void
59121TestJSImplInterfaceJSImpl::PassOptionalCallback(const Optional<OwningNonNull<MyTestCallback>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
59122{
59123 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalCallback", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59124 if (aRv.Failed()) {
59125 return;
59126 }
59127 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59127); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59127; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59128 BindingCallContext& cx = s.GetCallContext();
59129
59130 JS::Rooted<JS::Value> rval(cx);
59131 JS::RootedVector<JS::Value> argv(cx);
59132 if (!argv.resize(1)) {
59133 // That threw an exception on the JSContext, and our CallSetup will do
59134 // the right thing with that.
59135 return;
59136 }
59137 unsigned argc = 1;
59138
59139 do {
59140 if (arg.WasPassed()) {
59141 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg.Value()));
59142 if (!MaybeWrapObjectValue(cx, argv[0])) {
59143 aRv.Throw(NS_ERROR_UNEXPECTED);
59144 return;
59145 }
59146 break;
59147 } else if (argc == 1) {
59148 // This is our current trailing argument; reduce argc
59149 --argc;
59150 } else {
59151 argv[0].setUndefined();
59152 }
59153 } while (false);
59154
59155 JS::Rooted<JS::Value> callable(cx);
59156 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59157 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59158 !InitIds(cx, atomsCache)) ||
59159 !GetCallableProperty(cx, atomsCache->passOptionalCallback_id, &callable)) {
59160 aRv.Throw(NS_ERROR_UNEXPECTED);
59161 return;
59162 }
59163 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59164 if (!JS::Call(cx, thisValue, callable,
59165 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59166 aRv.NoteJSContextException(cx);
59167 return;
59168 }
59169}
59170
59171void
59172TestJSImplInterfaceJSImpl::PassOptionalNullableCallback(const Optional<RefPtr<MyTestCallback>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
59173{
59174 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableCallback", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59175 if (aRv.Failed()) {
59176 return;
59177 }
59178 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59178); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59178; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59179 BindingCallContext& cx = s.GetCallContext();
59180
59181 JS::Rooted<JS::Value> rval(cx);
59182 JS::RootedVector<JS::Value> argv(cx);
59183 if (!argv.resize(1)) {
59184 // That threw an exception on the JSContext, and our CallSetup will do
59185 // the right thing with that.
59186 return;
59187 }
59188 unsigned argc = 1;
59189
59190 do {
59191 if (arg.WasPassed()) {
59192 if (arg.Value()) {
59193 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg.Value()));
59194 if (!MaybeWrapObjectOrNullValue(cx, argv[0])) {
59195 aRv.Throw(NS_ERROR_UNEXPECTED);
59196 return;
59197 }
59198 break;
59199 } else {
59200 argv[0].setNull();
59201 break;
59202 }
59203 } else if (argc == 1) {
59204 // This is our current trailing argument; reduce argc
59205 --argc;
59206 } else {
59207 argv[0].setUndefined();
59208 }
59209 } while (false);
59210
59211 JS::Rooted<JS::Value> callable(cx);
59212 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59213 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59214 !InitIds(cx, atomsCache)) ||
59215 !GetCallableProperty(cx, atomsCache->passOptionalNullableCallback_id, &callable)) {
59216 aRv.Throw(NS_ERROR_UNEXPECTED);
59217 return;
59218 }
59219 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59220 if (!JS::Call(cx, thisValue, callable,
59221 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59222 aRv.NoteJSContextException(cx);
59223 return;
59224 }
59225}
59226
59227void
59228TestJSImplInterfaceJSImpl::PassOptionalNullableCallbackWithDefaultValue(MyTestCallback* arg, ErrorResult& aRv, JS::Realm* aRealm)
59229{
59230 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableCallbackWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59231 if (aRv.Failed()) {
59232 return;
59233 }
59234 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59234); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59234; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59235 BindingCallContext& cx = s.GetCallContext();
59236
59237 JS::Rooted<JS::Value> rval(cx);
59238 JS::RootedVector<JS::Value> argv(cx);
59239 if (!argv.resize(1)) {
59240 // That threw an exception on the JSContext, and our CallSetup will do
59241 // the right thing with that.
59242 return;
59243 }
59244 unsigned argc = 1;
59245
59246 do {
59247 if (arg) {
59248 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg));
59249 if (!MaybeWrapObjectOrNullValue(cx, argv[0])) {
59250 aRv.Throw(NS_ERROR_UNEXPECTED);
59251 return;
59252 }
59253 break;
59254 } else {
59255 argv[0].setNull();
59256 break;
59257 }
59258 } while (false);
59259
59260 JS::Rooted<JS::Value> callable(cx);
59261 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59262 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59263 !InitIds(cx, atomsCache)) ||
59264 !GetCallableProperty(cx, atomsCache->passOptionalNullableCallbackWithDefaultValue_id, &callable)) {
59265 aRv.Throw(NS_ERROR_UNEXPECTED);
59266 return;
59267 }
59268 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59269 if (!JS::Call(cx, thisValue, callable,
59270 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59271 aRv.NoteJSContextException(cx);
59272 return;
59273 }
59274}
59275
59276already_AddRefed<MyTestCallback>
59277TestJSImplInterfaceJSImpl::ReceiveCallback(ErrorResult& aRv, JS::Realm* aRealm)
59278{
59279 CallSetup s(this, aRv, "TestJSImplInterface.receiveCallback", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59280 if (aRv.Failed()) {
59281 return nullptr;
59282 }
59283 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59283); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59283; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59284 BindingCallContext& cx = s.GetCallContext();
59285
59286 JS::Rooted<JS::Value> rval(cx);
59287
59288 JS::Rooted<JS::Value> callable(cx);
59289 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59290 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59291 !InitIds(cx, atomsCache)) ||
59292 !GetCallableProperty(cx, atomsCache->receiveCallback_id, &callable)) {
59293 aRv.Throw(NS_ERROR_UNEXPECTED);
59294 return nullptr;
59295 }
59296 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59297 if (!JS::Call(cx, thisValue, callable,
59298 JS::HandleValueArray::empty(), &rval)) {
59299 aRv.NoteJSContextException(cx);
59300 return nullptr;
59301 }
59302 RefPtr<MyTestCallback> rvalDecl;
59303 if (rval.isObject()) {
59304 if (JS::IsCallable(&rval.toObject())) {
59305 { // scope for tempRoot and tempGlobalRoot if needed
59306 JS::Rooted<JSObject*> tempRoot(cx, &rval.toObject());
59307 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
59308 rvalDecl = new MyTestCallback(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
59309 }
59310 } else {
59311 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Return value of TestJSImplInterface.receiveCallback");
59312 aRv.Throw(NS_ERROR_UNEXPECTED);
59313 return nullptr;
59314 }
59315 } else {
59316 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveCallback");
59317 aRv.Throw(NS_ERROR_UNEXPECTED);
59318 return nullptr;
59319 }
59320 return rvalDecl.forget();
59321}
59322
59323already_AddRefed<MyTestCallback>
59324TestJSImplInterfaceJSImpl::ReceiveNullableCallback(ErrorResult& aRv, JS::Realm* aRealm)
59325{
59326 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableCallback", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59327 if (aRv.Failed()) {
59328 return nullptr;
59329 }
59330 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59330); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59330; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59331 BindingCallContext& cx = s.GetCallContext();
59332
59333 JS::Rooted<JS::Value> rval(cx);
59334
59335 JS::Rooted<JS::Value> callable(cx);
59336 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59337 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59338 !InitIds(cx, atomsCache)) ||
59339 !GetCallableProperty(cx, atomsCache->receiveNullableCallback_id, &callable)) {
59340 aRv.Throw(NS_ERROR_UNEXPECTED);
59341 return nullptr;
59342 }
59343 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59344 if (!JS::Call(cx, thisValue, callable,
59345 JS::HandleValueArray::empty(), &rval)) {
59346 aRv.NoteJSContextException(cx);
59347 return nullptr;
59348 }
59349 RefPtr<MyTestCallback> rvalDecl;
59350 if (rval.isObject()) {
59351 if (JS::IsCallable(&rval.toObject())) {
59352 { // scope for tempRoot and tempGlobalRoot if needed
59353 JS::Rooted<JSObject*> tempRoot(cx, &rval.toObject());
59354 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
59355 rvalDecl = new MyTestCallback(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
59356 }
59357 } else {
59358 cx.ThrowErrorMessage<MSG_NOT_CALLABLE>("Return value of TestJSImplInterface.receiveNullableCallback");
59359 aRv.Throw(NS_ERROR_UNEXPECTED);
59360 return nullptr;
59361 }
59362 } else if (rval.isNullOrUndefined()) {
59363 rvalDecl = nullptr;
59364 } else {
59365 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveNullableCallback");
59366 aRv.Throw(NS_ERROR_UNEXPECTED);
59367 return nullptr;
59368 }
59369 return rvalDecl.forget();
59370}
59371
59372void
59373TestJSImplInterfaceJSImpl::PassOptionalNullableTreatAsNullCallbackWithDefaultValue(TestTreatAsNullCallback* arg, ErrorResult& aRv, JS::Realm* aRealm)
59374{
59375 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableTreatAsNullCallbackWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59376 if (aRv.Failed()) {
59377 return;
59378 }
59379 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59379); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59379; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59380 BindingCallContext& cx = s.GetCallContext();
59381
59382 JS::Rooted<JS::Value> rval(cx);
59383 JS::RootedVector<JS::Value> argv(cx);
59384 if (!argv.resize(1)) {
59385 // That threw an exception on the JSContext, and our CallSetup will do
59386 // the right thing with that.
59387 return;
59388 }
59389 unsigned argc = 1;
59390
59391 do {
59392 if (arg) {
59393 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg));
59394 if (!MaybeWrapObjectOrNullValue(cx, argv[0])) {
59395 aRv.Throw(NS_ERROR_UNEXPECTED);
59396 return;
59397 }
59398 break;
59399 } else {
59400 argv[0].setNull();
59401 break;
59402 }
59403 } while (false);
59404
59405 JS::Rooted<JS::Value> callable(cx);
59406 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59407 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59408 !InitIds(cx, atomsCache)) ||
59409 !GetCallableProperty(cx, atomsCache->passOptionalNullableTreatAsNullCallbackWithDefaultValue_id, &callable)) {
59410 aRv.Throw(NS_ERROR_UNEXPECTED);
59411 return;
59412 }
59413 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59414 if (!JS::Call(cx, thisValue, callable,
59415 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59416 aRv.NoteJSContextException(cx);
59417 return;
59418 }
59419}
59420
59421void
59422TestJSImplInterfaceJSImpl::PassAny(JS::Handle<JS::Value> arg, ErrorResult& aRv, JS::Realm* aRealm)
59423{
59424 CallSetup s(this, aRv, "TestJSImplInterface.passAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59425 if (aRv.Failed()) {
59426 return;
59427 }
59428 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59428); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59428; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59429 BindingCallContext& cx = s.GetCallContext();
59430
59431 JS::Rooted<JS::Value> rval(cx);
59432 JS::RootedVector<JS::Value> argv(cx);
59433 if (!argv.resize(1)) {
59434 // That threw an exception on the JSContext, and our CallSetup will do
59435 // the right thing with that.
59436 return;
59437 }
59438 unsigned argc = 1;
59439
59440 do {
59441 JS::ExposeValueToActiveJS(arg);
59442 argv[0].set(arg);
59443 if (!MaybeWrapValue(cx, argv[0])) {
59444 aRv.Throw(NS_ERROR_UNEXPECTED);
59445 return;
59446 }
59447 break;
59448 } while (false);
59449
59450 JS::Rooted<JS::Value> callable(cx);
59451 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59452 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59453 !InitIds(cx, atomsCache)) ||
59454 !GetCallableProperty(cx, atomsCache->passAny_id, &callable)) {
59455 aRv.Throw(NS_ERROR_UNEXPECTED);
59456 return;
59457 }
59458 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59459 if (!JS::Call(cx, thisValue, callable,
59460 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59461 aRv.NoteJSContextException(cx);
59462 return;
59463 }
59464}
59465
59466void
59467TestJSImplInterfaceJSImpl::PassVariadicAny(const nsTArray<JS::Value>& arg, ErrorResult& aRv, JS::Realm* aRealm)
59468{
59469 CallSetup s(this, aRv, "TestJSImplInterface.passVariadicAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59470 if (aRv.Failed()) {
59471 return;
59472 }
59473 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59473); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59473; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59474 BindingCallContext& cx = s.GetCallContext();
59475
59476 JS::Rooted<JS::Value> rval(cx);
59477 JS::RootedVector<JS::Value> argv(cx);
59478 if (!argv.resize((1 - 1) + arg.Length())) {
59479 // That threw an exception on the JSContext, and our CallSetup will do
59480 // the right thing with that.
59481 return;
59482 }
59483 unsigned argc = (1 - 1) + arg.Length();
59484
59485 do {
59486 for (uint32_t idx = 0; idx < arg.Length(); ++idx) {
59487 JS::ExposeValueToActiveJS(arg[idx]);
59488 argv[0 + idx].set(arg[idx]);
59489 if (!MaybeWrapValue(cx, argv[0 + idx])) {
59490 aRv.Throw(NS_ERROR_UNEXPECTED);
59491 return;
59492 }
59493 continue;
59494 }
59495 break;
59496 } while (false);
59497
59498 JS::Rooted<JS::Value> callable(cx);
59499 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59500 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59501 !InitIds(cx, atomsCache)) ||
59502 !GetCallableProperty(cx, atomsCache->passVariadicAny_id, &callable)) {
59503 aRv.Throw(NS_ERROR_UNEXPECTED);
59504 return;
59505 }
59506 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59507 if (!JS::Call(cx, thisValue, callable,
59508 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59509 aRv.NoteJSContextException(cx);
59510 return;
59511 }
59512}
59513
59514void
59515TestJSImplInterfaceJSImpl::PassOptionalAny(JS::Handle<JS::Value> arg, ErrorResult& aRv, JS::Realm* aRealm)
59516{
59517 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59518 if (aRv.Failed()) {
59519 return;
59520 }
59521 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59521); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59521; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59522 BindingCallContext& cx = s.GetCallContext();
59523
59524 JS::Rooted<JS::Value> rval(cx);
59525 JS::RootedVector<JS::Value> argv(cx);
59526 if (!argv.resize(1)) {
59527 // That threw an exception on the JSContext, and our CallSetup will do
59528 // the right thing with that.
59529 return;
59530 }
59531 unsigned argc = 1;
59532
59533 do {
59534 JS::ExposeValueToActiveJS(arg);
59535 argv[0].set(arg);
59536 if (!MaybeWrapValue(cx, argv[0])) {
59537 aRv.Throw(NS_ERROR_UNEXPECTED);
59538 return;
59539 }
59540 break;
59541 } while (false);
59542
59543 JS::Rooted<JS::Value> callable(cx);
59544 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59545 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59546 !InitIds(cx, atomsCache)) ||
59547 !GetCallableProperty(cx, atomsCache->passOptionalAny_id, &callable)) {
59548 aRv.Throw(NS_ERROR_UNEXPECTED);
59549 return;
59550 }
59551 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59552 if (!JS::Call(cx, thisValue, callable,
59553 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59554 aRv.NoteJSContextException(cx);
59555 return;
59556 }
59557}
59558
59559void
59560TestJSImplInterfaceJSImpl::PassAnyDefaultNull(JS::Handle<JS::Value> arg, ErrorResult& aRv, JS::Realm* aRealm)
59561{
59562 CallSetup s(this, aRv, "TestJSImplInterface.passAnyDefaultNull", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59563 if (aRv.Failed()) {
59564 return;
59565 }
59566 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59566); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59566; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59567 BindingCallContext& cx = s.GetCallContext();
59568
59569 JS::Rooted<JS::Value> rval(cx);
59570 JS::RootedVector<JS::Value> argv(cx);
59571 if (!argv.resize(1)) {
59572 // That threw an exception on the JSContext, and our CallSetup will do
59573 // the right thing with that.
59574 return;
59575 }
59576 unsigned argc = 1;
59577
59578 do {
59579 JS::ExposeValueToActiveJS(arg);
59580 argv[0].set(arg);
59581 if (!MaybeWrapValue(cx, argv[0])) {
59582 aRv.Throw(NS_ERROR_UNEXPECTED);
59583 return;
59584 }
59585 break;
59586 } while (false);
59587
59588 JS::Rooted<JS::Value> callable(cx);
59589 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59590 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59591 !InitIds(cx, atomsCache)) ||
59592 !GetCallableProperty(cx, atomsCache->passAnyDefaultNull_id, &callable)) {
59593 aRv.Throw(NS_ERROR_UNEXPECTED);
59594 return;
59595 }
59596 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59597 if (!JS::Call(cx, thisValue, callable,
59598 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59599 aRv.NoteJSContextException(cx);
59600 return;
59601 }
59602}
59603
59604void
59605TestJSImplInterfaceJSImpl::PassSequenceOfAny(const Sequence<JS::Value>& arg, ErrorResult& aRv, JS::Realm* aRealm)
59606{
59607 CallSetup s(this, aRv, "TestJSImplInterface.passSequenceOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59608 if (aRv.Failed()) {
59609 return;
59610 }
59611 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59611); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59611; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59612 BindingCallContext& cx = s.GetCallContext();
59613
59614 JS::Rooted<JS::Value> rval(cx);
59615 JS::RootedVector<JS::Value> argv(cx);
59616 if (!argv.resize(1)) {
59617 // That threw an exception on the JSContext, and our CallSetup will do
59618 // the right thing with that.
59619 return;
59620 }
59621 unsigned argc = 1;
59622
59623 do {
59624
59625 uint32_t length = arg.Length();
59626 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
59627 if (!returnArray) {
59628 aRv.Throw(NS_ERROR_UNEXPECTED);
59629 return;
59630 }
59631 // Scope for 'tmp'
59632 {
59633 JS::Rooted<JS::Value> tmp(cx);
59634 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
59635 // Control block to let us common up the JS_DefineElement calls when there
59636 // are different ways to succeed at wrapping the object.
59637 do {
59638 JS::ExposeValueToActiveJS(arg[sequenceIdx0]);
59639 tmp.set(arg[sequenceIdx0]);
59640 if (!MaybeWrapValue(cx, &tmp)) {
59641 aRv.Throw(NS_ERROR_UNEXPECTED);
59642 return;
59643 }
59644 break;
59645 } while (false);
59646 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
59647 JSPROP_ENUMERATE)) {
59648 aRv.Throw(NS_ERROR_UNEXPECTED);
59649 return;
59650 }
59651 }
59652 }
59653 argv[0].setObject(*returnArray);
59654 break;
59655 } while (false);
59656
59657 JS::Rooted<JS::Value> callable(cx);
59658 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59659 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59660 !InitIds(cx, atomsCache)) ||
59661 !GetCallableProperty(cx, atomsCache->passSequenceOfAny_id, &callable)) {
59662 aRv.Throw(NS_ERROR_UNEXPECTED);
59663 return;
59664 }
59665 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59666 if (!JS::Call(cx, thisValue, callable,
59667 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59668 aRv.NoteJSContextException(cx);
59669 return;
59670 }
59671}
59672
59673void
59674TestJSImplInterfaceJSImpl::PassNullableSequenceOfAny(const Nullable<Sequence<JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
59675{
59676 CallSetup s(this, aRv, "TestJSImplInterface.passNullableSequenceOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59677 if (aRv.Failed()) {
59678 return;
59679 }
59680 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59680); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59680; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59681 BindingCallContext& cx = s.GetCallContext();
59682
59683 JS::Rooted<JS::Value> rval(cx);
59684 JS::RootedVector<JS::Value> argv(cx);
59685 if (!argv.resize(1)) {
59686 // That threw an exception on the JSContext, and our CallSetup will do
59687 // the right thing with that.
59688 return;
59689 }
59690 unsigned argc = 1;
59691
59692 do {
59693
59694 if (arg.IsNull()) {
59695 argv[0].setNull();
59696 break;
59697 }
59698
59699 uint32_t length = arg.Value().Length();
59700 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
59701 if (!returnArray) {
59702 aRv.Throw(NS_ERROR_UNEXPECTED);
59703 return;
59704 }
59705 // Scope for 'tmp'
59706 {
59707 JS::Rooted<JS::Value> tmp(cx);
59708 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
59709 // Control block to let us common up the JS_DefineElement calls when there
59710 // are different ways to succeed at wrapping the object.
59711 do {
59712 JS::ExposeValueToActiveJS(arg.Value()[sequenceIdx0]);
59713 tmp.set(arg.Value()[sequenceIdx0]);
59714 if (!MaybeWrapValue(cx, &tmp)) {
59715 aRv.Throw(NS_ERROR_UNEXPECTED);
59716 return;
59717 }
59718 break;
59719 } while (false);
59720 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
59721 JSPROP_ENUMERATE)) {
59722 aRv.Throw(NS_ERROR_UNEXPECTED);
59723 return;
59724 }
59725 }
59726 }
59727 argv[0].setObject(*returnArray);
59728 break;
59729 } while (false);
59730
59731 JS::Rooted<JS::Value> callable(cx);
59732 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59733 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59734 !InitIds(cx, atomsCache)) ||
59735 !GetCallableProperty(cx, atomsCache->passNullableSequenceOfAny_id, &callable)) {
59736 aRv.Throw(NS_ERROR_UNEXPECTED);
59737 return;
59738 }
59739 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59740 if (!JS::Call(cx, thisValue, callable,
59741 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59742 aRv.NoteJSContextException(cx);
59743 return;
59744 }
59745}
59746
59747void
59748TestJSImplInterfaceJSImpl::PassOptionalSequenceOfAny(const Optional<Sequence<JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
59749{
59750 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalSequenceOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59751 if (aRv.Failed()) {
59752 return;
59753 }
59754 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59754); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59754; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59755 BindingCallContext& cx = s.GetCallContext();
59756
59757 JS::Rooted<JS::Value> rval(cx);
59758 JS::RootedVector<JS::Value> argv(cx);
59759 if (!argv.resize(1)) {
59760 // That threw an exception on the JSContext, and our CallSetup will do
59761 // the right thing with that.
59762 return;
59763 }
59764 unsigned argc = 1;
59765
59766 do {
59767 if (arg.WasPassed()) {
59768
59769 uint32_t length = arg.Value().Length();
59770 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
59771 if (!returnArray) {
59772 aRv.Throw(NS_ERROR_UNEXPECTED);
59773 return;
59774 }
59775 // Scope for 'tmp'
59776 {
59777 JS::Rooted<JS::Value> tmp(cx);
59778 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
59779 // Control block to let us common up the JS_DefineElement calls when there
59780 // are different ways to succeed at wrapping the object.
59781 do {
59782 JS::ExposeValueToActiveJS(arg.Value()[sequenceIdx0]);
59783 tmp.set(arg.Value()[sequenceIdx0]);
59784 if (!MaybeWrapValue(cx, &tmp)) {
59785 aRv.Throw(NS_ERROR_UNEXPECTED);
59786 return;
59787 }
59788 break;
59789 } while (false);
59790 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
59791 JSPROP_ENUMERATE)) {
59792 aRv.Throw(NS_ERROR_UNEXPECTED);
59793 return;
59794 }
59795 }
59796 }
59797 argv[0].setObject(*returnArray);
59798 break;
59799 } else if (argc == 1) {
59800 // This is our current trailing argument; reduce argc
59801 --argc;
59802 } else {
59803 argv[0].setUndefined();
59804 }
59805 } while (false);
59806
59807 JS::Rooted<JS::Value> callable(cx);
59808 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59809 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59810 !InitIds(cx, atomsCache)) ||
59811 !GetCallableProperty(cx, atomsCache->passOptionalSequenceOfAny_id, &callable)) {
59812 aRv.Throw(NS_ERROR_UNEXPECTED);
59813 return;
59814 }
59815 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59816 if (!JS::Call(cx, thisValue, callable,
59817 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59818 aRv.NoteJSContextException(cx);
59819 return;
59820 }
59821}
59822
59823void
59824TestJSImplInterfaceJSImpl::PassOptionalNullableSequenceOfAny(const Optional<Nullable<Sequence<JS::Value>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
59825{
59826 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableSequenceOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59827 if (aRv.Failed()) {
59828 return;
59829 }
59830 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59830); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59830; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59831 BindingCallContext& cx = s.GetCallContext();
59832
59833 JS::Rooted<JS::Value> rval(cx);
59834 JS::RootedVector<JS::Value> argv(cx);
59835 if (!argv.resize(1)) {
59836 // That threw an exception on the JSContext, and our CallSetup will do
59837 // the right thing with that.
59838 return;
59839 }
59840 unsigned argc = 1;
59841
59842 do {
59843 if (arg.WasPassed()) {
59844
59845 if (arg.Value().IsNull()) {
59846 argv[0].setNull();
59847 break;
59848 }
59849
59850 uint32_t length = arg.Value().Value().Length();
59851 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
59852 if (!returnArray) {
59853 aRv.Throw(NS_ERROR_UNEXPECTED);
59854 return;
59855 }
59856 // Scope for 'tmp'
59857 {
59858 JS::Rooted<JS::Value> tmp(cx);
59859 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
59860 // Control block to let us common up the JS_DefineElement calls when there
59861 // are different ways to succeed at wrapping the object.
59862 do {
59863 JS::ExposeValueToActiveJS(arg.Value().Value()[sequenceIdx0]);
59864 tmp.set(arg.Value().Value()[sequenceIdx0]);
59865 if (!MaybeWrapValue(cx, &tmp)) {
59866 aRv.Throw(NS_ERROR_UNEXPECTED);
59867 return;
59868 }
59869 break;
59870 } while (false);
59871 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
59872 JSPROP_ENUMERATE)) {
59873 aRv.Throw(NS_ERROR_UNEXPECTED);
59874 return;
59875 }
59876 }
59877 }
59878 argv[0].setObject(*returnArray);
59879 break;
59880 } else if (argc == 1) {
59881 // This is our current trailing argument; reduce argc
59882 --argc;
59883 } else {
59884 argv[0].setUndefined();
59885 }
59886 } while (false);
59887
59888 JS::Rooted<JS::Value> callable(cx);
59889 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59890 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59891 !InitIds(cx, atomsCache)) ||
59892 !GetCallableProperty(cx, atomsCache->passOptionalNullableSequenceOfAny_id, &callable)) {
59893 aRv.Throw(NS_ERROR_UNEXPECTED);
59894 return;
59895 }
59896 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59897 if (!JS::Call(cx, thisValue, callable,
59898 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59899 aRv.NoteJSContextException(cx);
59900 return;
59901 }
59902}
59903
59904void
59905TestJSImplInterfaceJSImpl::PassOptionalSequenceOfAnyWithDefaultValue(const Nullable<Sequence<JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
59906{
59907 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalSequenceOfAnyWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59908 if (aRv.Failed()) {
59909 return;
59910 }
59911 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59911); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59911; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59912 BindingCallContext& cx = s.GetCallContext();
59913
59914 JS::Rooted<JS::Value> rval(cx);
59915 JS::RootedVector<JS::Value> argv(cx);
59916 if (!argv.resize(1)) {
59917 // That threw an exception on the JSContext, and our CallSetup will do
59918 // the right thing with that.
59919 return;
59920 }
59921 unsigned argc = 1;
59922
59923 do {
59924
59925 if (arg.IsNull()) {
59926 argv[0].setNull();
59927 break;
59928 }
59929
59930 uint32_t length = arg.Value().Length();
59931 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
59932 if (!returnArray) {
59933 aRv.Throw(NS_ERROR_UNEXPECTED);
59934 return;
59935 }
59936 // Scope for 'tmp'
59937 {
59938 JS::Rooted<JS::Value> tmp(cx);
59939 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
59940 // Control block to let us common up the JS_DefineElement calls when there
59941 // are different ways to succeed at wrapping the object.
59942 do {
59943 JS::ExposeValueToActiveJS(arg.Value()[sequenceIdx0]);
59944 tmp.set(arg.Value()[sequenceIdx0]);
59945 if (!MaybeWrapValue(cx, &tmp)) {
59946 aRv.Throw(NS_ERROR_UNEXPECTED);
59947 return;
59948 }
59949 break;
59950 } while (false);
59951 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
59952 JSPROP_ENUMERATE)) {
59953 aRv.Throw(NS_ERROR_UNEXPECTED);
59954 return;
59955 }
59956 }
59957 }
59958 argv[0].setObject(*returnArray);
59959 break;
59960 } while (false);
59961
59962 JS::Rooted<JS::Value> callable(cx);
59963 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
59964 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
59965 !InitIds(cx, atomsCache)) ||
59966 !GetCallableProperty(cx, atomsCache->passOptionalSequenceOfAnyWithDefaultValue_id, &callable)) {
59967 aRv.Throw(NS_ERROR_UNEXPECTED);
59968 return;
59969 }
59970 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
59971 if (!JS::Call(cx, thisValue, callable,
59972 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
59973 aRv.NoteJSContextException(cx);
59974 return;
59975 }
59976}
59977
59978void
59979TestJSImplInterfaceJSImpl::PassSequenceOfSequenceOfAny(const Sequence<Sequence<JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
59980{
59981 CallSetup s(this, aRv, "TestJSImplInterface.passSequenceOfSequenceOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
59982 if (aRv.Failed()) {
59983 return;
59984 }
59985 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 59985); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 59985; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
59986 BindingCallContext& cx = s.GetCallContext();
59987
59988 JS::Rooted<JS::Value> rval(cx);
59989 JS::RootedVector<JS::Value> argv(cx);
59990 if (!argv.resize(1)) {
59991 // That threw an exception on the JSContext, and our CallSetup will do
59992 // the right thing with that.
59993 return;
59994 }
59995 unsigned argc = 1;
59996
59997 do {
59998
59999 uint32_t length = arg.Length();
60000 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
60001 if (!returnArray) {
60002 aRv.Throw(NS_ERROR_UNEXPECTED);
60003 return;
60004 }
60005 // Scope for 'tmp'
60006 {
60007 JS::Rooted<JS::Value> tmp(cx);
60008 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
60009 // Control block to let us common up the JS_DefineElement calls when there
60010 // are different ways to succeed at wrapping the object.
60011 do {
60012
60013 uint32_t length = arg[sequenceIdx0].Length();
60014 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
60015 if (!returnArray) {
60016 aRv.Throw(NS_ERROR_UNEXPECTED);
60017 return;
60018 }
60019 // Scope for 'tmp'
60020 {
60021 JS::Rooted<JS::Value> tmp(cx);
60022 for (uint32_t sequenceIdx1 = 0; sequenceIdx1 < length; ++sequenceIdx1) {
60023 // Control block to let us common up the JS_DefineElement calls when there
60024 // are different ways to succeed at wrapping the object.
60025 do {
60026 JS::ExposeValueToActiveJS(arg[sequenceIdx0][sequenceIdx1]);
60027 tmp.set(arg[sequenceIdx0][sequenceIdx1]);
60028 if (!MaybeWrapValue(cx, &tmp)) {
60029 aRv.Throw(NS_ERROR_UNEXPECTED);
60030 return;
60031 }
60032 break;
60033 } while (false);
60034 if (!JS_DefineElement(cx, returnArray, sequenceIdx1, tmp,
60035 JSPROP_ENUMERATE)) {
60036 aRv.Throw(NS_ERROR_UNEXPECTED);
60037 return;
60038 }
60039 }
60040 }
60041 tmp.setObject(*returnArray);
60042 break;
60043 } while (false);
60044 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
60045 JSPROP_ENUMERATE)) {
60046 aRv.Throw(NS_ERROR_UNEXPECTED);
60047 return;
60048 }
60049 }
60050 }
60051 argv[0].setObject(*returnArray);
60052 break;
60053 } while (false);
60054
60055 JS::Rooted<JS::Value> callable(cx);
60056 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
60057 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
60058 !InitIds(cx, atomsCache)) ||
60059 !GetCallableProperty(cx, atomsCache->passSequenceOfSequenceOfAny_id, &callable)) {
60060 aRv.Throw(NS_ERROR_UNEXPECTED);
60061 return;
60062 }
60063 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
60064 if (!JS::Call(cx, thisValue, callable,
60065 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
60066 aRv.NoteJSContextException(cx);
60067 return;
60068 }
60069}
60070
60071void
60072TestJSImplInterfaceJSImpl::PassSequenceOfNullableSequenceOfAny(const Sequence<Nullable<Sequence<JS::Value>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
60073{
60074 CallSetup s(this, aRv, "TestJSImplInterface.passSequenceOfNullableSequenceOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
60075 if (aRv.Failed()) {
60076 return;
60077 }
60078 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 60078); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 60078; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
60079 BindingCallContext& cx = s.GetCallContext();
60080
60081 JS::Rooted<JS::Value> rval(cx);
60082 JS::RootedVector<JS::Value> argv(cx);
60083 if (!argv.resize(1)) {
60084 // That threw an exception on the JSContext, and our CallSetup will do
60085 // the right thing with that.
60086 return;
60087 }
60088 unsigned argc = 1;
60089
60090 do {
60091
60092 uint32_t length = arg.Length();
60093 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
60094 if (!returnArray) {
60095 aRv.Throw(NS_ERROR_UNEXPECTED);
60096 return;
60097 }
60098 // Scope for 'tmp'
60099 {
60100 JS::Rooted<JS::Value> tmp(cx);
60101 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
60102 // Control block to let us common up the JS_DefineElement calls when there
60103 // are different ways to succeed at wrapping the object.
60104 do {
60105
60106 if (arg[sequenceIdx0].IsNull()) {
60107 tmp.setNull();
60108 break;
60109 }
60110
60111 uint32_t length = arg[sequenceIdx0].Value().Length();
60112 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
60113 if (!returnArray) {
60114 aRv.Throw(NS_ERROR_UNEXPECTED);
60115 return;
60116 }
60117 // Scope for 'tmp'
60118 {
60119 JS::Rooted<JS::Value> tmp(cx);
60120 for (uint32_t sequenceIdx1 = 0; sequenceIdx1 < length; ++sequenceIdx1) {
60121 // Control block to let us common up the JS_DefineElement calls when there
60122 // are different ways to succeed at wrapping the object.
60123 do {
60124 JS::ExposeValueToActiveJS(arg[sequenceIdx0].Value()[sequenceIdx1]);
60125 tmp.set(arg[sequenceIdx0].Value()[sequenceIdx1]);
60126 if (!MaybeWrapValue(cx, &tmp)) {
60127 aRv.Throw(NS_ERROR_UNEXPECTED);
60128 return;
60129 }
60130 break;
60131 } while (false);
60132 if (!JS_DefineElement(cx, returnArray, sequenceIdx1, tmp,
60133 JSPROP_ENUMERATE)) {
60134 aRv.Throw(NS_ERROR_UNEXPECTED);
60135 return;
60136 }
60137 }
60138 }
60139 tmp.setObject(*returnArray);
60140 break;
60141 } while (false);
60142 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
60143 JSPROP_ENUMERATE)) {
60144 aRv.Throw(NS_ERROR_UNEXPECTED);
60145 return;
60146 }
60147 }
60148 }
60149 argv[0].setObject(*returnArray);
60150 break;
60151 } while (false);
60152
60153 JS::Rooted<JS::Value> callable(cx);
60154 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
60155 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
60156 !InitIds(cx, atomsCache)) ||
60157 !GetCallableProperty(cx, atomsCache->passSequenceOfNullableSequenceOfAny_id, &callable)) {
60158 aRv.Throw(NS_ERROR_UNEXPECTED);
60159 return;
60160 }
60161 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
60162 if (!JS::Call(cx, thisValue, callable,
60163 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
60164 aRv.NoteJSContextException(cx);
60165 return;
60166 }
60167}
60168
60169void
60170TestJSImplInterfaceJSImpl::PassNullableSequenceOfNullableSequenceOfAny(const Nullable<Sequence<Nullable<Sequence<JS::Value>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
60171{
60172 CallSetup s(this, aRv, "TestJSImplInterface.passNullableSequenceOfNullableSequenceOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
60173 if (aRv.Failed()) {
60174 return;
60175 }
60176 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 60176); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 60176; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
60177 BindingCallContext& cx = s.GetCallContext();
60178
60179 JS::Rooted<JS::Value> rval(cx);
60180 JS::RootedVector<JS::Value> argv(cx);
60181 if (!argv.resize(1)) {
60182 // That threw an exception on the JSContext, and our CallSetup will do
60183 // the right thing with that.
60184 return;
60185 }
60186 unsigned argc = 1;
60187
60188 do {
60189
60190 if (arg.IsNull()) {
60191 argv[0].setNull();
60192 break;
60193 }
60194
60195 uint32_t length = arg.Value().Length();
60196 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
60197 if (!returnArray) {
60198 aRv.Throw(NS_ERROR_UNEXPECTED);
60199 return;
60200 }
60201 // Scope for 'tmp'
60202 {
60203 JS::Rooted<JS::Value> tmp(cx);
60204 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
60205 // Control block to let us common up the JS_DefineElement calls when there
60206 // are different ways to succeed at wrapping the object.
60207 do {
60208
60209 if (arg.Value()[sequenceIdx0].IsNull()) {
60210 tmp.setNull();
60211 break;
60212 }
60213
60214 uint32_t length = arg.Value()[sequenceIdx0].Value().Length();
60215 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
60216 if (!returnArray) {
60217 aRv.Throw(NS_ERROR_UNEXPECTED);
60218 return;
60219 }
60220 // Scope for 'tmp'
60221 {
60222 JS::Rooted<JS::Value> tmp(cx);
60223 for (uint32_t sequenceIdx1 = 0; sequenceIdx1 < length; ++sequenceIdx1) {
60224 // Control block to let us common up the JS_DefineElement calls when there
60225 // are different ways to succeed at wrapping the object.
60226 do {
60227 JS::ExposeValueToActiveJS(arg.Value()[sequenceIdx0].Value()[sequenceIdx1]);
60228 tmp.set(arg.Value()[sequenceIdx0].Value()[sequenceIdx1]);
60229 if (!MaybeWrapValue(cx, &tmp)) {
60230 aRv.Throw(NS_ERROR_UNEXPECTED);
60231 return;
60232 }
60233 break;
60234 } while (false);
60235 if (!JS_DefineElement(cx, returnArray, sequenceIdx1, tmp,
60236 JSPROP_ENUMERATE)) {
60237 aRv.Throw(NS_ERROR_UNEXPECTED);
60238 return;
60239 }
60240 }
60241 }
60242 tmp.setObject(*returnArray);
60243 break;
60244 } while (false);
60245 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
60246 JSPROP_ENUMERATE)) {
60247 aRv.Throw(NS_ERROR_UNEXPECTED);
60248 return;
60249 }
60250 }
60251 }
60252 argv[0].setObject(*returnArray);
60253 break;
60254 } while (false);
60255
60256 JS::Rooted<JS::Value> callable(cx);
60257 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
60258 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
60259 !InitIds(cx, atomsCache)) ||
60260 !GetCallableProperty(cx, atomsCache->passNullableSequenceOfNullableSequenceOfAny_id, &callable)) {
60261 aRv.Throw(NS_ERROR_UNEXPECTED);
60262 return;
60263 }
60264 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
60265 if (!JS::Call(cx, thisValue, callable,
60266 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
60267 aRv.NoteJSContextException(cx);
60268 return;
60269 }
60270}
60271
60272void
60273TestJSImplInterfaceJSImpl::PassOptionalNullableSequenceOfNullableSequenceOfAny(const Optional<Nullable<Sequence<Nullable<Sequence<JS::Value>>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
60274{
60275 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableSequenceOfNullableSequenceOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
60276 if (aRv.Failed()) {
60277 return;
60278 }
60279 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 60279); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 60279; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
60280 BindingCallContext& cx = s.GetCallContext();
60281
60282 JS::Rooted<JS::Value> rval(cx);
60283 JS::RootedVector<JS::Value> argv(cx);
60284 if (!argv.resize(1)) {
60285 // That threw an exception on the JSContext, and our CallSetup will do
60286 // the right thing with that.
60287 return;
60288 }
60289 unsigned argc = 1;
60290
60291 do {
60292 if (arg.WasPassed()) {
60293
60294 if (arg.Value().IsNull()) {
60295 argv[0].setNull();
60296 break;
60297 }
60298
60299 uint32_t length = arg.Value().Value().Length();
60300 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
60301 if (!returnArray) {
60302 aRv.Throw(NS_ERROR_UNEXPECTED);
60303 return;
60304 }
60305 // Scope for 'tmp'
60306 {
60307 JS::Rooted<JS::Value> tmp(cx);
60308 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
60309 // Control block to let us common up the JS_DefineElement calls when there
60310 // are different ways to succeed at wrapping the object.
60311 do {
60312
60313 if (arg.Value().Value()[sequenceIdx0].IsNull()) {
60314 tmp.setNull();
60315 break;
60316 }
60317
60318 uint32_t length = arg.Value().Value()[sequenceIdx0].Value().Length();
60319 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
60320 if (!returnArray) {
60321 aRv.Throw(NS_ERROR_UNEXPECTED);
60322 return;
60323 }
60324 // Scope for 'tmp'
60325 {
60326 JS::Rooted<JS::Value> tmp(cx);
60327 for (uint32_t sequenceIdx1 = 0; sequenceIdx1 < length; ++sequenceIdx1) {
60328 // Control block to let us common up the JS_DefineElement calls when there
60329 // are different ways to succeed at wrapping the object.
60330 do {
60331 JS::ExposeValueToActiveJS(arg.Value().Value()[sequenceIdx0].Value()[sequenceIdx1]);
60332 tmp.set(arg.Value().Value()[sequenceIdx0].Value()[sequenceIdx1]);
60333 if (!MaybeWrapValue(cx, &tmp)) {
60334 aRv.Throw(NS_ERROR_UNEXPECTED);
60335 return;
60336 }
60337 break;
60338 } while (false);
60339 if (!JS_DefineElement(cx, returnArray, sequenceIdx1, tmp,
60340 JSPROP_ENUMERATE)) {
60341 aRv.Throw(NS_ERROR_UNEXPECTED);
60342 return;
60343 }
60344 }
60345 }
60346 tmp.setObject(*returnArray);
60347 break;
60348 } while (false);
60349 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
60350 JSPROP_ENUMERATE)) {
60351 aRv.Throw(NS_ERROR_UNEXPECTED);
60352 return;
60353 }
60354 }
60355 }
60356 argv[0].setObject(*returnArray);
60357 break;
60358 } else if (argc == 1) {
60359 // This is our current trailing argument; reduce argc
60360 --argc;
60361 } else {
60362 argv[0].setUndefined();
60363 }
60364 } while (false);
60365
60366 JS::Rooted<JS::Value> callable(cx);
60367 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
60368 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
60369 !InitIds(cx, atomsCache)) ||
60370 !GetCallableProperty(cx, atomsCache->passOptionalNullableSequenceOfNullableSequenceOfAny_id, &callable)) {
60371 aRv.Throw(NS_ERROR_UNEXPECTED);
60372 return;
60373 }
60374 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
60375 if (!JS::Call(cx, thisValue, callable,
60376 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
60377 aRv.NoteJSContextException(cx);
60378 return;
60379 }
60380}
60381
60382void
60383TestJSImplInterfaceJSImpl::PassRecordOfAny(const Record<nsString, JS::Value>& arg, ErrorResult& aRv, JS::Realm* aRealm)
60384{
60385 CallSetup s(this, aRv, "TestJSImplInterface.passRecordOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
60386 if (aRv.Failed()) {
60387 return;
60388 }
60389 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 60389); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 60389; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
60390 BindingCallContext& cx = s.GetCallContext();
60391
60392 JS::Rooted<JS::Value> rval(cx);
60393 JS::RootedVector<JS::Value> argv(cx);
60394 if (!argv.resize(1)) {
60395 // That threw an exception on the JSContext, and our CallSetup will do
60396 // the right thing with that.
60397 return;
60398 }
60399 unsigned argc = 1;
60400
60401 do {
60402
60403 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
60404 if (!returnObj) {
60405 aRv.Throw(NS_ERROR_UNEXPECTED);
60406 return;
60407 }
60408 // Scope for 'tmp'
60409 {
60410 JS::Rooted<JS::Value> tmp(cx);
60411 for (auto& entry : arg.Entries()) {
60412 auto& recordValue0 = entry.mValue;
60413 // Control block to let us common up the JS_DefineUCProperty calls when there
60414 // are different ways to succeed at wrapping the value.
60415 do {
60416 JS::ExposeValueToActiveJS(recordValue0);
60417 tmp.set(recordValue0);
60418 if (!MaybeWrapValue(cx, &tmp)) {
60419 aRv.Throw(NS_ERROR_UNEXPECTED);
60420 return;
60421 }
60422 break;
60423 } while (false);
60424 if (!JS_DefineUCProperty(cx, returnObj,
60425 entry.mKey.BeginReading(),
60426 entry.mKey.Length(), tmp,
60427 JSPROP_ENUMERATE)) {
60428 aRv.Throw(NS_ERROR_UNEXPECTED);
60429 return;
60430 }
60431 }
60432 }
60433 argv[0].setObject(*returnObj);
60434 break;
60435 } while (false);
60436
60437 JS::Rooted<JS::Value> callable(cx);
60438 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
60439 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
60440 !InitIds(cx, atomsCache)) ||
60441 !GetCallableProperty(cx, atomsCache->passRecordOfAny_id, &callable)) {
60442 aRv.Throw(NS_ERROR_UNEXPECTED);
60443 return;
60444 }
60445 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
60446 if (!JS::Call(cx, thisValue, callable,
60447 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
60448 aRv.NoteJSContextException(cx);
60449 return;
60450 }
60451}
60452
60453void
60454TestJSImplInterfaceJSImpl::PassNullableRecordOfAny(const Nullable<Record<nsString, JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
60455{
60456 CallSetup s(this, aRv, "TestJSImplInterface.passNullableRecordOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
60457 if (aRv.Failed()) {
60458 return;
60459 }
60460 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 60460); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 60460; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
60461 BindingCallContext& cx = s.GetCallContext();
60462
60463 JS::Rooted<JS::Value> rval(cx);
60464 JS::RootedVector<JS::Value> argv(cx);
60465 if (!argv.resize(1)) {
60466 // That threw an exception on the JSContext, and our CallSetup will do
60467 // the right thing with that.
60468 return;
60469 }
60470 unsigned argc = 1;
60471
60472 do {
60473
60474 if (arg.IsNull()) {
60475 argv[0].setNull();
60476 break;
60477 }
60478
60479 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
60480 if (!returnObj) {
60481 aRv.Throw(NS_ERROR_UNEXPECTED);
60482 return;
60483 }
60484 // Scope for 'tmp'
60485 {
60486 JS::Rooted<JS::Value> tmp(cx);
60487 for (auto& entry : arg.Value().Entries()) {
60488 auto& recordValue0 = entry.mValue;
60489 // Control block to let us common up the JS_DefineUCProperty calls when there
60490 // are different ways to succeed at wrapping the value.
60491 do {
60492 JS::ExposeValueToActiveJS(recordValue0);
60493 tmp.set(recordValue0);
60494 if (!MaybeWrapValue(cx, &tmp)) {
60495 aRv.Throw(NS_ERROR_UNEXPECTED);
60496 return;
60497 }
60498 break;
60499 } while (false);
60500 if (!JS_DefineUCProperty(cx, returnObj,
60501 entry.mKey.BeginReading(),
60502 entry.mKey.Length(), tmp,
60503 JSPROP_ENUMERATE)) {
60504 aRv.Throw(NS_ERROR_UNEXPECTED);
60505 return;
60506 }
60507 }
60508 }
60509 argv[0].setObject(*returnObj);
60510 break;
60511 } while (false);
60512
60513 JS::Rooted<JS::Value> callable(cx);
60514 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
60515 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
60516 !InitIds(cx, atomsCache)) ||
60517 !GetCallableProperty(cx, atomsCache->passNullableRecordOfAny_id, &callable)) {
60518 aRv.Throw(NS_ERROR_UNEXPECTED);
60519 return;
60520 }
60521 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
60522 if (!JS::Call(cx, thisValue, callable,
60523 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
60524 aRv.NoteJSContextException(cx);
60525 return;
60526 }
60527}
60528
60529void
60530TestJSImplInterfaceJSImpl::PassOptionalRecordOfAny(const Optional<Record<nsString, JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
60531{
60532 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalRecordOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
60533 if (aRv.Failed()) {
60534 return;
60535 }
60536 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 60536); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 60536; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
60537 BindingCallContext& cx = s.GetCallContext();
60538
60539 JS::Rooted<JS::Value> rval(cx);
60540 JS::RootedVector<JS::Value> argv(cx);
60541 if (!argv.resize(1)) {
60542 // That threw an exception on the JSContext, and our CallSetup will do
60543 // the right thing with that.
60544 return;
60545 }
60546 unsigned argc = 1;
60547
60548 do {
60549 if (arg.WasPassed()) {
60550
60551 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
60552 if (!returnObj) {
60553 aRv.Throw(NS_ERROR_UNEXPECTED);
60554 return;
60555 }
60556 // Scope for 'tmp'
60557 {
60558 JS::Rooted<JS::Value> tmp(cx);
60559 for (auto& entry : arg.Value().Entries()) {
60560 auto& recordValue0 = entry.mValue;
60561 // Control block to let us common up the JS_DefineUCProperty calls when there
60562 // are different ways to succeed at wrapping the value.
60563 do {
60564 JS::ExposeValueToActiveJS(recordValue0);
60565 tmp.set(recordValue0);
60566 if (!MaybeWrapValue(cx, &tmp)) {
60567 aRv.Throw(NS_ERROR_UNEXPECTED);
60568 return;
60569 }
60570 break;
60571 } while (false);
60572 if (!JS_DefineUCProperty(cx, returnObj,
60573 entry.mKey.BeginReading(),
60574 entry.mKey.Length(), tmp,
60575 JSPROP_ENUMERATE)) {
60576 aRv.Throw(NS_ERROR_UNEXPECTED);
60577 return;
60578 }
60579 }
60580 }
60581 argv[0].setObject(*returnObj);
60582 break;
60583 } else if (argc == 1) {
60584 // This is our current trailing argument; reduce argc
60585 --argc;
60586 } else {
60587 argv[0].setUndefined();
60588 }
60589 } while (false);
60590
60591 JS::Rooted<JS::Value> callable(cx);
60592 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
60593 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
60594 !InitIds(cx, atomsCache)) ||
60595 !GetCallableProperty(cx, atomsCache->passOptionalRecordOfAny_id, &callable)) {
60596 aRv.Throw(NS_ERROR_UNEXPECTED);
60597 return;
60598 }
60599 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
60600 if (!JS::Call(cx, thisValue, callable,
60601 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
60602 aRv.NoteJSContextException(cx);
60603 return;
60604 }
60605}
60606
60607void
60608TestJSImplInterfaceJSImpl::PassOptionalNullableRecordOfAny(const Optional<Nullable<Record<nsString, JS::Value>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
60609{
60610 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableRecordOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
60611 if (aRv.Failed()) {
60612 return;
60613 }
60614 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 60614); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 60614; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
60615 BindingCallContext& cx = s.GetCallContext();
60616
60617 JS::Rooted<JS::Value> rval(cx);
60618 JS::RootedVector<JS::Value> argv(cx);
60619 if (!argv.resize(1)) {
60620 // That threw an exception on the JSContext, and our CallSetup will do
60621 // the right thing with that.
60622 return;
60623 }
60624 unsigned argc = 1;
60625
60626 do {
60627 if (arg.WasPassed()) {
60628
60629 if (arg.Value().IsNull()) {
60630 argv[0].setNull();
60631 break;
60632 }
60633
60634 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
60635 if (!returnObj) {
60636 aRv.Throw(NS_ERROR_UNEXPECTED);
60637 return;
60638 }
60639 // Scope for 'tmp'
60640 {
60641 JS::Rooted<JS::Value> tmp(cx);
60642 for (auto& entry : arg.Value().Value().Entries()) {
60643 auto& recordValue0 = entry.mValue;
60644 // Control block to let us common up the JS_DefineUCProperty calls when there
60645 // are different ways to succeed at wrapping the value.
60646 do {
60647 JS::ExposeValueToActiveJS(recordValue0);
60648 tmp.set(recordValue0);
60649 if (!MaybeWrapValue(cx, &tmp)) {
60650 aRv.Throw(NS_ERROR_UNEXPECTED);
60651 return;
60652 }
60653 break;
60654 } while (false);
60655 if (!JS_DefineUCProperty(cx, returnObj,
60656 entry.mKey.BeginReading(),
60657 entry.mKey.Length(), tmp,
60658 JSPROP_ENUMERATE)) {
60659 aRv.Throw(NS_ERROR_UNEXPECTED);
60660 return;
60661 }
60662 }
60663 }
60664 argv[0].setObject(*returnObj);
60665 break;
60666 } else if (argc == 1) {
60667 // This is our current trailing argument; reduce argc
60668 --argc;
60669 } else {
60670 argv[0].setUndefined();
60671 }
60672 } while (false);
60673
60674 JS::Rooted<JS::Value> callable(cx);
60675 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
60676 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
60677 !InitIds(cx, atomsCache)) ||
60678 !GetCallableProperty(cx, atomsCache->passOptionalNullableRecordOfAny_id, &callable)) {
60679 aRv.Throw(NS_ERROR_UNEXPECTED);
60680 return;
60681 }
60682 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
60683 if (!JS::Call(cx, thisValue, callable,
60684 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
60685 aRv.NoteJSContextException(cx);
60686 return;
60687 }
60688}
60689
60690void
60691TestJSImplInterfaceJSImpl::PassOptionalRecordOfAnyWithDefaultValue(const Nullable<Record<nsString, JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
60692{
60693 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalRecordOfAnyWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
60694 if (aRv.Failed()) {
60695 return;
60696 }
60697 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 60697); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 60697; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
60698 BindingCallContext& cx = s.GetCallContext();
60699
60700 JS::Rooted<JS::Value> rval(cx);
60701 JS::RootedVector<JS::Value> argv(cx);
60702 if (!argv.resize(1)) {
60703 // That threw an exception on the JSContext, and our CallSetup will do
60704 // the right thing with that.
60705 return;
60706 }
60707 unsigned argc = 1;
60708
60709 do {
60710
60711 if (arg.IsNull()) {
60712 argv[0].setNull();
60713 break;
60714 }
60715
60716 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
60717 if (!returnObj) {
60718 aRv.Throw(NS_ERROR_UNEXPECTED);
60719 return;
60720 }
60721 // Scope for 'tmp'
60722 {
60723 JS::Rooted<JS::Value> tmp(cx);
60724 for (auto& entry : arg.Value().Entries()) {
60725 auto& recordValue0 = entry.mValue;
60726 // Control block to let us common up the JS_DefineUCProperty calls when there
60727 // are different ways to succeed at wrapping the value.
60728 do {
60729 JS::ExposeValueToActiveJS(recordValue0);
60730 tmp.set(recordValue0);
60731 if (!MaybeWrapValue(cx, &tmp)) {
60732 aRv.Throw(NS_ERROR_UNEXPECTED);
60733 return;
60734 }
60735 break;
60736 } while (false);
60737 if (!JS_DefineUCProperty(cx, returnObj,
60738 entry.mKey.BeginReading(),
60739 entry.mKey.Length(), tmp,
60740 JSPROP_ENUMERATE)) {
60741 aRv.Throw(NS_ERROR_UNEXPECTED);
60742 return;
60743 }
60744 }
60745 }
60746 argv[0].setObject(*returnObj);
60747 break;
60748 } while (false);
60749
60750 JS::Rooted<JS::Value> callable(cx);
60751 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
60752 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
60753 !InitIds(cx, atomsCache)) ||
60754 !GetCallableProperty(cx, atomsCache->passOptionalRecordOfAnyWithDefaultValue_id, &callable)) {
60755 aRv.Throw(NS_ERROR_UNEXPECTED);
60756 return;
60757 }
60758 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
60759 if (!JS::Call(cx, thisValue, callable,
60760 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
60761 aRv.NoteJSContextException(cx);
60762 return;
60763 }
60764}
60765
60766void
60767TestJSImplInterfaceJSImpl::PassRecordOfRecordOfAny(const Record<nsString, Record<nsString, JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
60768{
60769 CallSetup s(this, aRv, "TestJSImplInterface.passRecordOfRecordOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
60770 if (aRv.Failed()) {
60771 return;
60772 }
60773 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 60773); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 60773; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
60774 BindingCallContext& cx = s.GetCallContext();
60775
60776 JS::Rooted<JS::Value> rval(cx);
60777 JS::RootedVector<JS::Value> argv(cx);
60778 if (!argv.resize(1)) {
60779 // That threw an exception on the JSContext, and our CallSetup will do
60780 // the right thing with that.
60781 return;
60782 }
60783 unsigned argc = 1;
60784
60785 do {
60786
60787 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
60788 if (!returnObj) {
60789 aRv.Throw(NS_ERROR_UNEXPECTED);
60790 return;
60791 }
60792 // Scope for 'tmp'
60793 {
60794 JS::Rooted<JS::Value> tmp(cx);
60795 for (auto& entry : arg.Entries()) {
60796 auto& recordValue0 = entry.mValue;
60797 // Control block to let us common up the JS_DefineUCProperty calls when there
60798 // are different ways to succeed at wrapping the value.
60799 do {
60800
60801 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
60802 if (!returnObj) {
60803 aRv.Throw(NS_ERROR_UNEXPECTED);
60804 return;
60805 }
60806 // Scope for 'tmp'
60807 {
60808 JS::Rooted<JS::Value> tmp(cx);
60809 for (auto& entry : recordValue0.Entries()) {
60810 auto& recordValue1 = entry.mValue;
60811 // Control block to let us common up the JS_DefineUCProperty calls when there
60812 // are different ways to succeed at wrapping the value.
60813 do {
60814 JS::ExposeValueToActiveJS(recordValue1);
60815 tmp.set(recordValue1);
60816 if (!MaybeWrapValue(cx, &tmp)) {
60817 aRv.Throw(NS_ERROR_UNEXPECTED);
60818 return;
60819 }
60820 break;
60821 } while (false);
60822 if (!JS_DefineUCProperty(cx, returnObj,
60823 entry.mKey.BeginReading(),
60824 entry.mKey.Length(), tmp,
60825 JSPROP_ENUMERATE)) {
60826 aRv.Throw(NS_ERROR_UNEXPECTED);
60827 return;
60828 }
60829 }
60830 }
60831 tmp.setObject(*returnObj);
60832 break;
60833 } while (false);
60834 if (!JS_DefineUCProperty(cx, returnObj,
60835 entry.mKey.BeginReading(),
60836 entry.mKey.Length(), tmp,
60837 JSPROP_ENUMERATE)) {
60838 aRv.Throw(NS_ERROR_UNEXPECTED);
60839 return;
60840 }
60841 }
60842 }
60843 argv[0].setObject(*returnObj);
60844 break;
60845 } while (false);
60846
60847 JS::Rooted<JS::Value> callable(cx);
60848 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
60849 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
60850 !InitIds(cx, atomsCache)) ||
60851 !GetCallableProperty(cx, atomsCache->passRecordOfRecordOfAny_id, &callable)) {
60852 aRv.Throw(NS_ERROR_UNEXPECTED);
60853 return;
60854 }
60855 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
60856 if (!JS::Call(cx, thisValue, callable,
60857 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
60858 aRv.NoteJSContextException(cx);
60859 return;
60860 }
60861}
60862
60863void
60864TestJSImplInterfaceJSImpl::PassRecordOfNullableRecordOfAny(const Record<nsString, Nullable<Record<nsString, JS::Value>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
60865{
60866 CallSetup s(this, aRv, "TestJSImplInterface.passRecordOfNullableRecordOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
60867 if (aRv.Failed()) {
60868 return;
60869 }
60870 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 60870); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 60870; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
60871 BindingCallContext& cx = s.GetCallContext();
60872
60873 JS::Rooted<JS::Value> rval(cx);
60874 JS::RootedVector<JS::Value> argv(cx);
60875 if (!argv.resize(1)) {
60876 // That threw an exception on the JSContext, and our CallSetup will do
60877 // the right thing with that.
60878 return;
60879 }
60880 unsigned argc = 1;
60881
60882 do {
60883
60884 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
60885 if (!returnObj) {
60886 aRv.Throw(NS_ERROR_UNEXPECTED);
60887 return;
60888 }
60889 // Scope for 'tmp'
60890 {
60891 JS::Rooted<JS::Value> tmp(cx);
60892 for (auto& entry : arg.Entries()) {
60893 auto& recordValue0 = entry.mValue;
60894 // Control block to let us common up the JS_DefineUCProperty calls when there
60895 // are different ways to succeed at wrapping the value.
60896 do {
60897
60898 if (recordValue0.IsNull()) {
60899 tmp.setNull();
60900 break;
60901 }
60902
60903 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
60904 if (!returnObj) {
60905 aRv.Throw(NS_ERROR_UNEXPECTED);
60906 return;
60907 }
60908 // Scope for 'tmp'
60909 {
60910 JS::Rooted<JS::Value> tmp(cx);
60911 for (auto& entry : recordValue0.Value().Entries()) {
60912 auto& recordValue1 = entry.mValue;
60913 // Control block to let us common up the JS_DefineUCProperty calls when there
60914 // are different ways to succeed at wrapping the value.
60915 do {
60916 JS::ExposeValueToActiveJS(recordValue1);
60917 tmp.set(recordValue1);
60918 if (!MaybeWrapValue(cx, &tmp)) {
60919 aRv.Throw(NS_ERROR_UNEXPECTED);
60920 return;
60921 }
60922 break;
60923 } while (false);
60924 if (!JS_DefineUCProperty(cx, returnObj,
60925 entry.mKey.BeginReading(),
60926 entry.mKey.Length(), tmp,
60927 JSPROP_ENUMERATE)) {
60928 aRv.Throw(NS_ERROR_UNEXPECTED);
60929 return;
60930 }
60931 }
60932 }
60933 tmp.setObject(*returnObj);
60934 break;
60935 } while (false);
60936 if (!JS_DefineUCProperty(cx, returnObj,
60937 entry.mKey.BeginReading(),
60938 entry.mKey.Length(), tmp,
60939 JSPROP_ENUMERATE)) {
60940 aRv.Throw(NS_ERROR_UNEXPECTED);
60941 return;
60942 }
60943 }
60944 }
60945 argv[0].setObject(*returnObj);
60946 break;
60947 } while (false);
60948
60949 JS::Rooted<JS::Value> callable(cx);
60950 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
60951 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
60952 !InitIds(cx, atomsCache)) ||
60953 !GetCallableProperty(cx, atomsCache->passRecordOfNullableRecordOfAny_id, &callable)) {
60954 aRv.Throw(NS_ERROR_UNEXPECTED);
60955 return;
60956 }
60957 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
60958 if (!JS::Call(cx, thisValue, callable,
60959 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
60960 aRv.NoteJSContextException(cx);
60961 return;
60962 }
60963}
60964
60965void
60966TestJSImplInterfaceJSImpl::PassNullableRecordOfNullableRecordOfAny(const Nullable<Record<nsString, Nullable<Record<nsString, JS::Value>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
60967{
60968 CallSetup s(this, aRv, "TestJSImplInterface.passNullableRecordOfNullableRecordOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
60969 if (aRv.Failed()) {
60970 return;
60971 }
60972 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 60972); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 60972; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
60973 BindingCallContext& cx = s.GetCallContext();
60974
60975 JS::Rooted<JS::Value> rval(cx);
60976 JS::RootedVector<JS::Value> argv(cx);
60977 if (!argv.resize(1)) {
60978 // That threw an exception on the JSContext, and our CallSetup will do
60979 // the right thing with that.
60980 return;
60981 }
60982 unsigned argc = 1;
60983
60984 do {
60985
60986 if (arg.IsNull()) {
60987 argv[0].setNull();
60988 break;
60989 }
60990
60991 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
60992 if (!returnObj) {
60993 aRv.Throw(NS_ERROR_UNEXPECTED);
60994 return;
60995 }
60996 // Scope for 'tmp'
60997 {
60998 JS::Rooted<JS::Value> tmp(cx);
60999 for (auto& entry : arg.Value().Entries()) {
61000 auto& recordValue0 = entry.mValue;
61001 // Control block to let us common up the JS_DefineUCProperty calls when there
61002 // are different ways to succeed at wrapping the value.
61003 do {
61004
61005 if (recordValue0.IsNull()) {
61006 tmp.setNull();
61007 break;
61008 }
61009
61010 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
61011 if (!returnObj) {
61012 aRv.Throw(NS_ERROR_UNEXPECTED);
61013 return;
61014 }
61015 // Scope for 'tmp'
61016 {
61017 JS::Rooted<JS::Value> tmp(cx);
61018 for (auto& entry : recordValue0.Value().Entries()) {
61019 auto& recordValue1 = entry.mValue;
61020 // Control block to let us common up the JS_DefineUCProperty calls when there
61021 // are different ways to succeed at wrapping the value.
61022 do {
61023 JS::ExposeValueToActiveJS(recordValue1);
61024 tmp.set(recordValue1);
61025 if (!MaybeWrapValue(cx, &tmp)) {
61026 aRv.Throw(NS_ERROR_UNEXPECTED);
61027 return;
61028 }
61029 break;
61030 } while (false);
61031 if (!JS_DefineUCProperty(cx, returnObj,
61032 entry.mKey.BeginReading(),
61033 entry.mKey.Length(), tmp,
61034 JSPROP_ENUMERATE)) {
61035 aRv.Throw(NS_ERROR_UNEXPECTED);
61036 return;
61037 }
61038 }
61039 }
61040 tmp.setObject(*returnObj);
61041 break;
61042 } while (false);
61043 if (!JS_DefineUCProperty(cx, returnObj,
61044 entry.mKey.BeginReading(),
61045 entry.mKey.Length(), tmp,
61046 JSPROP_ENUMERATE)) {
61047 aRv.Throw(NS_ERROR_UNEXPECTED);
61048 return;
61049 }
61050 }
61051 }
61052 argv[0].setObject(*returnObj);
61053 break;
61054 } while (false);
61055
61056 JS::Rooted<JS::Value> callable(cx);
61057 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61058 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61059 !InitIds(cx, atomsCache)) ||
61060 !GetCallableProperty(cx, atomsCache->passNullableRecordOfNullableRecordOfAny_id, &callable)) {
61061 aRv.Throw(NS_ERROR_UNEXPECTED);
61062 return;
61063 }
61064 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
61065 if (!JS::Call(cx, thisValue, callable,
61066 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
61067 aRv.NoteJSContextException(cx);
61068 return;
61069 }
61070}
61071
61072void
61073TestJSImplInterfaceJSImpl::PassOptionalNullableRecordOfNullableRecordOfAny(const Optional<Nullable<Record<nsString, Nullable<Record<nsString, JS::Value>>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
61074{
61075 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableRecordOfNullableRecordOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
61076 if (aRv.Failed()) {
61077 return;
61078 }
61079 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 61079); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 61079; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
61080 BindingCallContext& cx = s.GetCallContext();
61081
61082 JS::Rooted<JS::Value> rval(cx);
61083 JS::RootedVector<JS::Value> argv(cx);
61084 if (!argv.resize(1)) {
61085 // That threw an exception on the JSContext, and our CallSetup will do
61086 // the right thing with that.
61087 return;
61088 }
61089 unsigned argc = 1;
61090
61091 do {
61092 if (arg.WasPassed()) {
61093
61094 if (arg.Value().IsNull()) {
61095 argv[0].setNull();
61096 break;
61097 }
61098
61099 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
61100 if (!returnObj) {
61101 aRv.Throw(NS_ERROR_UNEXPECTED);
61102 return;
61103 }
61104 // Scope for 'tmp'
61105 {
61106 JS::Rooted<JS::Value> tmp(cx);
61107 for (auto& entry : arg.Value().Value().Entries()) {
61108 auto& recordValue0 = entry.mValue;
61109 // Control block to let us common up the JS_DefineUCProperty calls when there
61110 // are different ways to succeed at wrapping the value.
61111 do {
61112
61113 if (recordValue0.IsNull()) {
61114 tmp.setNull();
61115 break;
61116 }
61117
61118 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
61119 if (!returnObj) {
61120 aRv.Throw(NS_ERROR_UNEXPECTED);
61121 return;
61122 }
61123 // Scope for 'tmp'
61124 {
61125 JS::Rooted<JS::Value> tmp(cx);
61126 for (auto& entry : recordValue0.Value().Entries()) {
61127 auto& recordValue1 = entry.mValue;
61128 // Control block to let us common up the JS_DefineUCProperty calls when there
61129 // are different ways to succeed at wrapping the value.
61130 do {
61131 JS::ExposeValueToActiveJS(recordValue1);
61132 tmp.set(recordValue1);
61133 if (!MaybeWrapValue(cx, &tmp)) {
61134 aRv.Throw(NS_ERROR_UNEXPECTED);
61135 return;
61136 }
61137 break;
61138 } while (false);
61139 if (!JS_DefineUCProperty(cx, returnObj,
61140 entry.mKey.BeginReading(),
61141 entry.mKey.Length(), tmp,
61142 JSPROP_ENUMERATE)) {
61143 aRv.Throw(NS_ERROR_UNEXPECTED);
61144 return;
61145 }
61146 }
61147 }
61148 tmp.setObject(*returnObj);
61149 break;
61150 } while (false);
61151 if (!JS_DefineUCProperty(cx, returnObj,
61152 entry.mKey.BeginReading(),
61153 entry.mKey.Length(), tmp,
61154 JSPROP_ENUMERATE)) {
61155 aRv.Throw(NS_ERROR_UNEXPECTED);
61156 return;
61157 }
61158 }
61159 }
61160 argv[0].setObject(*returnObj);
61161 break;
61162 } else if (argc == 1) {
61163 // This is our current trailing argument; reduce argc
61164 --argc;
61165 } else {
61166 argv[0].setUndefined();
61167 }
61168 } while (false);
61169
61170 JS::Rooted<JS::Value> callable(cx);
61171 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61172 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61173 !InitIds(cx, atomsCache)) ||
61174 !GetCallableProperty(cx, atomsCache->passOptionalNullableRecordOfNullableRecordOfAny_id, &callable)) {
61175 aRv.Throw(NS_ERROR_UNEXPECTED);
61176 return;
61177 }
61178 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
61179 if (!JS::Call(cx, thisValue, callable,
61180 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
61181 aRv.NoteJSContextException(cx);
61182 return;
61183 }
61184}
61185
61186void
61187TestJSImplInterfaceJSImpl::PassOptionalNullableRecordOfNullableSequenceOfAny(const Optional<Nullable<Record<nsString, Nullable<Sequence<JS::Value>>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
61188{
61189 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableRecordOfNullableSequenceOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
61190 if (aRv.Failed()) {
61191 return;
61192 }
61193 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 61193); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 61193; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
61194 BindingCallContext& cx = s.GetCallContext();
61195
61196 JS::Rooted<JS::Value> rval(cx);
61197 JS::RootedVector<JS::Value> argv(cx);
61198 if (!argv.resize(1)) {
61199 // That threw an exception on the JSContext, and our CallSetup will do
61200 // the right thing with that.
61201 return;
61202 }
61203 unsigned argc = 1;
61204
61205 do {
61206 if (arg.WasPassed()) {
61207
61208 if (arg.Value().IsNull()) {
61209 argv[0].setNull();
61210 break;
61211 }
61212
61213 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
61214 if (!returnObj) {
61215 aRv.Throw(NS_ERROR_UNEXPECTED);
61216 return;
61217 }
61218 // Scope for 'tmp'
61219 {
61220 JS::Rooted<JS::Value> tmp(cx);
61221 for (auto& entry : arg.Value().Value().Entries()) {
61222 auto& recordValue0 = entry.mValue;
61223 // Control block to let us common up the JS_DefineUCProperty calls when there
61224 // are different ways to succeed at wrapping the value.
61225 do {
61226
61227 if (recordValue0.IsNull()) {
61228 tmp.setNull();
61229 break;
61230 }
61231
61232 uint32_t length = recordValue0.Value().Length();
61233 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
61234 if (!returnArray) {
61235 aRv.Throw(NS_ERROR_UNEXPECTED);
61236 return;
61237 }
61238 // Scope for 'tmp'
61239 {
61240 JS::Rooted<JS::Value> tmp(cx);
61241 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
61242 // Control block to let us common up the JS_DefineElement calls when there
61243 // are different ways to succeed at wrapping the object.
61244 do {
61245 JS::ExposeValueToActiveJS(recordValue0.Value()[sequenceIdx0]);
61246 tmp.set(recordValue0.Value()[sequenceIdx0]);
61247 if (!MaybeWrapValue(cx, &tmp)) {
61248 aRv.Throw(NS_ERROR_UNEXPECTED);
61249 return;
61250 }
61251 break;
61252 } while (false);
61253 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
61254 JSPROP_ENUMERATE)) {
61255 aRv.Throw(NS_ERROR_UNEXPECTED);
61256 return;
61257 }
61258 }
61259 }
61260 tmp.setObject(*returnArray);
61261 break;
61262 } while (false);
61263 if (!JS_DefineUCProperty(cx, returnObj,
61264 entry.mKey.BeginReading(),
61265 entry.mKey.Length(), tmp,
61266 JSPROP_ENUMERATE)) {
61267 aRv.Throw(NS_ERROR_UNEXPECTED);
61268 return;
61269 }
61270 }
61271 }
61272 argv[0].setObject(*returnObj);
61273 break;
61274 } else if (argc == 1) {
61275 // This is our current trailing argument; reduce argc
61276 --argc;
61277 } else {
61278 argv[0].setUndefined();
61279 }
61280 } while (false);
61281
61282 JS::Rooted<JS::Value> callable(cx);
61283 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61284 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61285 !InitIds(cx, atomsCache)) ||
61286 !GetCallableProperty(cx, atomsCache->passOptionalNullableRecordOfNullableSequenceOfAny_id, &callable)) {
61287 aRv.Throw(NS_ERROR_UNEXPECTED);
61288 return;
61289 }
61290 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
61291 if (!JS::Call(cx, thisValue, callable,
61292 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
61293 aRv.NoteJSContextException(cx);
61294 return;
61295 }
61296}
61297
61298void
61299TestJSImplInterfaceJSImpl::PassOptionalNullableSequenceOfNullableRecordOfAny(const Optional<Nullable<Sequence<Nullable<Record<nsString, JS::Value>>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
61300{
61301 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableSequenceOfNullableRecordOfAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
61302 if (aRv.Failed()) {
61303 return;
61304 }
61305 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 61305); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 61305; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
61306 BindingCallContext& cx = s.GetCallContext();
61307
61308 JS::Rooted<JS::Value> rval(cx);
61309 JS::RootedVector<JS::Value> argv(cx);
61310 if (!argv.resize(1)) {
61311 // That threw an exception on the JSContext, and our CallSetup will do
61312 // the right thing with that.
61313 return;
61314 }
61315 unsigned argc = 1;
61316
61317 do {
61318 if (arg.WasPassed()) {
61319
61320 if (arg.Value().IsNull()) {
61321 argv[0].setNull();
61322 break;
61323 }
61324
61325 uint32_t length = arg.Value().Value().Length();
61326 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
61327 if (!returnArray) {
61328 aRv.Throw(NS_ERROR_UNEXPECTED);
61329 return;
61330 }
61331 // Scope for 'tmp'
61332 {
61333 JS::Rooted<JS::Value> tmp(cx);
61334 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
61335 // Control block to let us common up the JS_DefineElement calls when there
61336 // are different ways to succeed at wrapping the object.
61337 do {
61338
61339 if (arg.Value().Value()[sequenceIdx0].IsNull()) {
61340 tmp.setNull();
61341 break;
61342 }
61343
61344 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
61345 if (!returnObj) {
61346 aRv.Throw(NS_ERROR_UNEXPECTED);
61347 return;
61348 }
61349 // Scope for 'tmp'
61350 {
61351 JS::Rooted<JS::Value> tmp(cx);
61352 for (auto& entry : arg.Value().Value()[sequenceIdx0].Value().Entries()) {
61353 auto& recordValue0 = entry.mValue;
61354 // Control block to let us common up the JS_DefineUCProperty calls when there
61355 // are different ways to succeed at wrapping the value.
61356 do {
61357 JS::ExposeValueToActiveJS(recordValue0);
61358 tmp.set(recordValue0);
61359 if (!MaybeWrapValue(cx, &tmp)) {
61360 aRv.Throw(NS_ERROR_UNEXPECTED);
61361 return;
61362 }
61363 break;
61364 } while (false);
61365 if (!JS_DefineUCProperty(cx, returnObj,
61366 entry.mKey.BeginReading(),
61367 entry.mKey.Length(), tmp,
61368 JSPROP_ENUMERATE)) {
61369 aRv.Throw(NS_ERROR_UNEXPECTED);
61370 return;
61371 }
61372 }
61373 }
61374 tmp.setObject(*returnObj);
61375 break;
61376 } while (false);
61377 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
61378 JSPROP_ENUMERATE)) {
61379 aRv.Throw(NS_ERROR_UNEXPECTED);
61380 return;
61381 }
61382 }
61383 }
61384 argv[0].setObject(*returnArray);
61385 break;
61386 } else if (argc == 1) {
61387 // This is our current trailing argument; reduce argc
61388 --argc;
61389 } else {
61390 argv[0].setUndefined();
61391 }
61392 } while (false);
61393
61394 JS::Rooted<JS::Value> callable(cx);
61395 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61396 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61397 !InitIds(cx, atomsCache)) ||
61398 !GetCallableProperty(cx, atomsCache->passOptionalNullableSequenceOfNullableRecordOfAny_id, &callable)) {
61399 aRv.Throw(NS_ERROR_UNEXPECTED);
61400 return;
61401 }
61402 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
61403 if (!JS::Call(cx, thisValue, callable,
61404 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
61405 aRv.NoteJSContextException(cx);
61406 return;
61407 }
61408}
61409
61410void
61411TestJSImplInterfaceJSImpl::ReceiveAny(JS::MutableHandle<JS::Value> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
61412{
61413 CallSetup s(this, aRv, "TestJSImplInterface.receiveAny", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
61414 if (aRv.Failed()) {
61415 return;
61416 }
61417 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 61417); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 61417; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
61418 BindingCallContext& cx = s.GetCallContext();
61419
61420 JS::Rooted<JS::Value> rval(cx);
61421
61422 JS::Rooted<JS::Value> callable(cx);
61423 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61424 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61425 !InitIds(cx, atomsCache)) ||
61426 !GetCallableProperty(cx, atomsCache->receiveAny_id, &callable)) {
61427 aRv.Throw(NS_ERROR_UNEXPECTED);
61428 return;
61429 }
61430 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
61431 if (!JS::Call(cx, thisValue, callable,
61432 JS::HandleValueArray::empty(), &rval)) {
61433 aRv.NoteJSContextException(cx);
61434 return;
61435 }
61436 JS::Rooted<JS::Value> rvalDecl(cx);
61437#ifdef __clang__1
61438#pragma clang diagnostic push
61439#pragma clang diagnostic ignored "-Wunreachable-code"
61440#pragma clang diagnostic ignored "-Wunreachable-code-return"
61441#endif // __clang__
61442 if ((false) && !CallerSubsumes(rval)) {
61443 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("return value of TestJSImplInterface.receiveAny");
61444 aRv.Throw(NS_ERROR_UNEXPECTED);
61445 return;
61446 }
61447#ifdef __clang__1
61448#pragma clang diagnostic pop
61449#endif // __clang__
61450 rvalDecl = rval;
61451 aRetVal.set(rvalDecl);
61452}
61453
61454void
61455TestJSImplInterfaceJSImpl::PassObject(JS::Handle<JSObject*> arg, ErrorResult& aRv, JS::Realm* aRealm)
61456{
61457 CallSetup s(this, aRv, "TestJSImplInterface.passObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
61458 if (aRv.Failed()) {
61459 return;
61460 }
61461 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 61461); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 61461; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
61462 BindingCallContext& cx = s.GetCallContext();
61463
61464 JS::Rooted<JS::Value> rval(cx);
61465 JS::RootedVector<JS::Value> argv(cx);
61466 if (!argv.resize(1)) {
61467 // That threw an exception on the JSContext, and our CallSetup will do
61468 // the right thing with that.
61469 return;
61470 }
61471 unsigned argc = 1;
61472
61473 do {
61474 JS::ExposeObjectToActiveJS(arg);
61475 argv[0].setObject(*arg);
61476 if (!MaybeWrapObjectValue(cx, argv[0])) {
61477 aRv.Throw(NS_ERROR_UNEXPECTED);
61478 return;
61479 }
61480 break;
61481 } while (false);
61482
61483 JS::Rooted<JS::Value> callable(cx);
61484 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61485 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61486 !InitIds(cx, atomsCache)) ||
61487 !GetCallableProperty(cx, atomsCache->passObject_id, &callable)) {
61488 aRv.Throw(NS_ERROR_UNEXPECTED);
61489 return;
61490 }
61491 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
61492 if (!JS::Call(cx, thisValue, callable,
61493 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
61494 aRv.NoteJSContextException(cx);
61495 return;
61496 }
61497}
61498
61499void
61500TestJSImplInterfaceJSImpl::PassVariadicObject(const nsTArray<JSObject*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
61501{
61502 CallSetup s(this, aRv, "TestJSImplInterface.passVariadicObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
61503 if (aRv.Failed()) {
61504 return;
61505 }
61506 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 61506); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 61506; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
61507 BindingCallContext& cx = s.GetCallContext();
61508
61509 JS::Rooted<JS::Value> rval(cx);
61510 JS::RootedVector<JS::Value> argv(cx);
61511 if (!argv.resize((1 - 1) + arg.Length())) {
61512 // That threw an exception on the JSContext, and our CallSetup will do
61513 // the right thing with that.
61514 return;
61515 }
61516 unsigned argc = (1 - 1) + arg.Length();
61517
61518 do {
61519 for (uint32_t idx = 0; idx < arg.Length(); ++idx) {
61520 JS::ExposeObjectToActiveJS(arg[idx]);
61521 argv[0 + idx].setObject(*arg[idx]);
61522 if (!MaybeWrapObjectValue(cx, argv[0 + idx])) {
61523 aRv.Throw(NS_ERROR_UNEXPECTED);
61524 return;
61525 }
61526 continue;
61527 }
61528 break;
61529 } while (false);
61530
61531 JS::Rooted<JS::Value> callable(cx);
61532 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61533 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61534 !InitIds(cx, atomsCache)) ||
61535 !GetCallableProperty(cx, atomsCache->passVariadicObject_id, &callable)) {
61536 aRv.Throw(NS_ERROR_UNEXPECTED);
61537 return;
61538 }
61539 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
61540 if (!JS::Call(cx, thisValue, callable,
61541 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
61542 aRv.NoteJSContextException(cx);
61543 return;
61544 }
61545}
61546
61547void
61548TestJSImplInterfaceJSImpl::PassNullableObject(JS::Handle<JSObject*> arg, ErrorResult& aRv, JS::Realm* aRealm)
61549{
61550 CallSetup s(this, aRv, "TestJSImplInterface.passNullableObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
61551 if (aRv.Failed()) {
61552 return;
61553 }
61554 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 61554); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 61554; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
61555 BindingCallContext& cx = s.GetCallContext();
61556
61557 JS::Rooted<JS::Value> rval(cx);
61558 JS::RootedVector<JS::Value> argv(cx);
61559 if (!argv.resize(1)) {
61560 // That threw an exception on the JSContext, and our CallSetup will do
61561 // the right thing with that.
61562 return;
61563 }
61564 unsigned argc = 1;
61565
61566 do {
61567 if (arg) {
61568 JS::ExposeObjectToActiveJS(arg);
61569 }
61570 argv[0].setObjectOrNull(arg);
61571 if (!MaybeWrapObjectOrNullValue(cx, argv[0])) {
61572 aRv.Throw(NS_ERROR_UNEXPECTED);
61573 return;
61574 }
61575 break;
61576 } while (false);
61577
61578 JS::Rooted<JS::Value> callable(cx);
61579 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61580 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61581 !InitIds(cx, atomsCache)) ||
61582 !GetCallableProperty(cx, atomsCache->passNullableObject_id, &callable)) {
61583 aRv.Throw(NS_ERROR_UNEXPECTED);
61584 return;
61585 }
61586 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
61587 if (!JS::Call(cx, thisValue, callable,
61588 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
61589 aRv.NoteJSContextException(cx);
61590 return;
61591 }
61592}
61593
61594void
61595TestJSImplInterfaceJSImpl::PassVariadicNullableObject(const nsTArray<JSObject*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
61596{
61597 CallSetup s(this, aRv, "TestJSImplInterface.passVariadicNullableObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
61598 if (aRv.Failed()) {
61599 return;
61600 }
61601 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 61601); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 61601; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
61602 BindingCallContext& cx = s.GetCallContext();
61603
61604 JS::Rooted<JS::Value> rval(cx);
61605 JS::RootedVector<JS::Value> argv(cx);
61606 if (!argv.resize((1 - 1) + arg.Length())) {
61607 // That threw an exception on the JSContext, and our CallSetup will do
61608 // the right thing with that.
61609 return;
61610 }
61611 unsigned argc = (1 - 1) + arg.Length();
61612
61613 do {
61614 for (uint32_t idx = 0; idx < arg.Length(); ++idx) {
61615 JS::ExposeObjectToActiveJS(arg[idx]);
61616 argv[0 + idx].setObject(*arg[idx]);
61617 if (!MaybeWrapObjectValue(cx, argv[0 + idx])) {
61618 aRv.Throw(NS_ERROR_UNEXPECTED);
61619 return;
61620 }
61621 continue;
61622 }
61623 break;
61624 } while (false);
61625
61626 JS::Rooted<JS::Value> callable(cx);
61627 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61628 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61629 !InitIds(cx, atomsCache)) ||
61630 !GetCallableProperty(cx, atomsCache->passVariadicNullableObject_id, &callable)) {
61631 aRv.Throw(NS_ERROR_UNEXPECTED);
61632 return;
61633 }
61634 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
61635 if (!JS::Call(cx, thisValue, callable,
61636 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
61637 aRv.NoteJSContextException(cx);
61638 return;
61639 }
61640}
61641
61642void
61643TestJSImplInterfaceJSImpl::PassOptionalObject(const Optional<JS::Handle<JSObject*>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
61644{
61645 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
61646 if (aRv.Failed()) {
61647 return;
61648 }
61649 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 61649); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 61649; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
61650 BindingCallContext& cx = s.GetCallContext();
61651
61652 JS::Rooted<JS::Value> rval(cx);
61653 JS::RootedVector<JS::Value> argv(cx);
61654 if (!argv.resize(1)) {
61655 // That threw an exception on the JSContext, and our CallSetup will do
61656 // the right thing with that.
61657 return;
61658 }
61659 unsigned argc = 1;
61660
61661 do {
61662 if (arg.WasPassed()) {
61663 JS::ExposeObjectToActiveJS(arg.Value());
61664 argv[0].setObject(*arg.Value());
61665 if (!MaybeWrapObjectValue(cx, argv[0])) {
61666 aRv.Throw(NS_ERROR_UNEXPECTED);
61667 return;
61668 }
61669 break;
61670 } else if (argc == 1) {
61671 // This is our current trailing argument; reduce argc
61672 --argc;
61673 } else {
61674 argv[0].setUndefined();
61675 }
61676 } while (false);
61677
61678 JS::Rooted<JS::Value> callable(cx);
61679 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61680 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61681 !InitIds(cx, atomsCache)) ||
61682 !GetCallableProperty(cx, atomsCache->passOptionalObject_id, &callable)) {
61683 aRv.Throw(NS_ERROR_UNEXPECTED);
61684 return;
61685 }
61686 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
61687 if (!JS::Call(cx, thisValue, callable,
61688 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
61689 aRv.NoteJSContextException(cx);
61690 return;
61691 }
61692}
61693
61694void
61695TestJSImplInterfaceJSImpl::PassOptionalNullableObject(const Optional<JS::Handle<JSObject*>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
61696{
61697 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
61698 if (aRv.Failed()) {
61699 return;
61700 }
61701 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 61701); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 61701; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
61702 BindingCallContext& cx = s.GetCallContext();
61703
61704 JS::Rooted<JS::Value> rval(cx);
61705 JS::RootedVector<JS::Value> argv(cx);
61706 if (!argv.resize(1)) {
61707 // That threw an exception on the JSContext, and our CallSetup will do
61708 // the right thing with that.
61709 return;
61710 }
61711 unsigned argc = 1;
61712
61713 do {
61714 if (arg.WasPassed()) {
61715 if (arg.Value()) {
61716 JS::ExposeObjectToActiveJS(arg.Value());
61717 }
61718 argv[0].setObjectOrNull(arg.Value());
61719 if (!MaybeWrapObjectOrNullValue(cx, argv[0])) {
61720 aRv.Throw(NS_ERROR_UNEXPECTED);
61721 return;
61722 }
61723 break;
61724 } else if (argc == 1) {
61725 // This is our current trailing argument; reduce argc
61726 --argc;
61727 } else {
61728 argv[0].setUndefined();
61729 }
61730 } while (false);
61731
61732 JS::Rooted<JS::Value> callable(cx);
61733 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61734 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61735 !InitIds(cx, atomsCache)) ||
61736 !GetCallableProperty(cx, atomsCache->passOptionalNullableObject_id, &callable)) {
61737 aRv.Throw(NS_ERROR_UNEXPECTED);
61738 return;
61739 }
61740 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
61741 if (!JS::Call(cx, thisValue, callable,
61742 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
61743 aRv.NoteJSContextException(cx);
61744 return;
61745 }
61746}
61747
61748void
61749TestJSImplInterfaceJSImpl::PassOptionalNullableObjectWithDefaultValue(JS::Handle<JSObject*> arg, ErrorResult& aRv, JS::Realm* aRealm)
61750{
61751 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableObjectWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
61752 if (aRv.Failed()) {
61753 return;
61754 }
61755 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 61755); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 61755; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
61756 BindingCallContext& cx = s.GetCallContext();
61757
61758 JS::Rooted<JS::Value> rval(cx);
61759 JS::RootedVector<JS::Value> argv(cx);
61760 if (!argv.resize(1)) {
61761 // That threw an exception on the JSContext, and our CallSetup will do
61762 // the right thing with that.
61763 return;
61764 }
61765 unsigned argc = 1;
61766
61767 do {
61768 if (arg) {
61769 JS::ExposeObjectToActiveJS(arg);
61770 }
61771 argv[0].setObjectOrNull(arg);
61772 if (!MaybeWrapObjectOrNullValue(cx, argv[0])) {
61773 aRv.Throw(NS_ERROR_UNEXPECTED);
61774 return;
61775 }
61776 break;
61777 } while (false);
61778
61779 JS::Rooted<JS::Value> callable(cx);
61780 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61781 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61782 !InitIds(cx, atomsCache)) ||
61783 !GetCallableProperty(cx, atomsCache->passOptionalNullableObjectWithDefaultValue_id, &callable)) {
61784 aRv.Throw(NS_ERROR_UNEXPECTED);
61785 return;
61786 }
61787 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
61788 if (!JS::Call(cx, thisValue, callable,
61789 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
61790 aRv.NoteJSContextException(cx);
61791 return;
61792 }
61793}
61794
61795void
61796TestJSImplInterfaceJSImpl::PassSequenceOfObject(const Sequence<JSObject*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
61797{
61798 CallSetup s(this, aRv, "TestJSImplInterface.passSequenceOfObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
61799 if (aRv.Failed()) {
61800 return;
61801 }
61802 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 61802); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 61802; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
61803 BindingCallContext& cx = s.GetCallContext();
61804
61805 JS::Rooted<JS::Value> rval(cx);
61806 JS::RootedVector<JS::Value> argv(cx);
61807 if (!argv.resize(1)) {
61808 // That threw an exception on the JSContext, and our CallSetup will do
61809 // the right thing with that.
61810 return;
61811 }
61812 unsigned argc = 1;
61813
61814 do {
61815
61816 uint32_t length = arg.Length();
61817 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
61818 if (!returnArray) {
61819 aRv.Throw(NS_ERROR_UNEXPECTED);
61820 return;
61821 }
61822 // Scope for 'tmp'
61823 {
61824 JS::Rooted<JS::Value> tmp(cx);
61825 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
61826 // Control block to let us common up the JS_DefineElement calls when there
61827 // are different ways to succeed at wrapping the object.
61828 do {
61829 JS::ExposeObjectToActiveJS(arg[sequenceIdx0]);
61830 tmp.setObject(*arg[sequenceIdx0]);
61831 if (!MaybeWrapObjectValue(cx, &tmp)) {
61832 aRv.Throw(NS_ERROR_UNEXPECTED);
61833 return;
61834 }
61835 break;
61836 } while (false);
61837 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
61838 JSPROP_ENUMERATE)) {
61839 aRv.Throw(NS_ERROR_UNEXPECTED);
61840 return;
61841 }
61842 }
61843 }
61844 argv[0].setObject(*returnArray);
61845 break;
61846 } while (false);
61847
61848 JS::Rooted<JS::Value> callable(cx);
61849 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61850 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61851 !InitIds(cx, atomsCache)) ||
61852 !GetCallableProperty(cx, atomsCache->passSequenceOfObject_id, &callable)) {
61853 aRv.Throw(NS_ERROR_UNEXPECTED);
61854 return;
61855 }
61856 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
61857 if (!JS::Call(cx, thisValue, callable,
61858 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
61859 aRv.NoteJSContextException(cx);
61860 return;
61861 }
61862}
61863
61864void
61865TestJSImplInterfaceJSImpl::PassSequenceOfNullableObject(const Sequence<JSObject*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
61866{
61867 CallSetup s(this, aRv, "TestJSImplInterface.passSequenceOfNullableObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
61868 if (aRv.Failed()) {
61869 return;
61870 }
61871 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 61871); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 61871; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
61872 BindingCallContext& cx = s.GetCallContext();
61873
61874 JS::Rooted<JS::Value> rval(cx);
61875 JS::RootedVector<JS::Value> argv(cx);
61876 if (!argv.resize(1)) {
61877 // That threw an exception on the JSContext, and our CallSetup will do
61878 // the right thing with that.
61879 return;
61880 }
61881 unsigned argc = 1;
61882
61883 do {
61884
61885 uint32_t length = arg.Length();
61886 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
61887 if (!returnArray) {
61888 aRv.Throw(NS_ERROR_UNEXPECTED);
61889 return;
61890 }
61891 // Scope for 'tmp'
61892 {
61893 JS::Rooted<JS::Value> tmp(cx);
61894 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
61895 // Control block to let us common up the JS_DefineElement calls when there
61896 // are different ways to succeed at wrapping the object.
61897 do {
61898 if (arg[sequenceIdx0]) {
61899 JS::ExposeObjectToActiveJS(arg[sequenceIdx0]);
61900 }
61901 tmp.setObjectOrNull(arg[sequenceIdx0]);
61902 if (!MaybeWrapObjectOrNullValue(cx, &tmp)) {
61903 aRv.Throw(NS_ERROR_UNEXPECTED);
61904 return;
61905 }
61906 break;
61907 } while (false);
61908 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
61909 JSPROP_ENUMERATE)) {
61910 aRv.Throw(NS_ERROR_UNEXPECTED);
61911 return;
61912 }
61913 }
61914 }
61915 argv[0].setObject(*returnArray);
61916 break;
61917 } while (false);
61918
61919 JS::Rooted<JS::Value> callable(cx);
61920 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61921 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61922 !InitIds(cx, atomsCache)) ||
61923 !GetCallableProperty(cx, atomsCache->passSequenceOfNullableObject_id, &callable)) {
61924 aRv.Throw(NS_ERROR_UNEXPECTED);
61925 return;
61926 }
61927 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
61928 if (!JS::Call(cx, thisValue, callable,
61929 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
61930 aRv.NoteJSContextException(cx);
61931 return;
61932 }
61933}
61934
61935void
61936TestJSImplInterfaceJSImpl::PassNullableSequenceOfObject(const Nullable<Sequence<JSObject*>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
61937{
61938 CallSetup s(this, aRv, "TestJSImplInterface.passNullableSequenceOfObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
61939 if (aRv.Failed()) {
61940 return;
61941 }
61942 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 61942); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 61942; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
61943 BindingCallContext& cx = s.GetCallContext();
61944
61945 JS::Rooted<JS::Value> rval(cx);
61946 JS::RootedVector<JS::Value> argv(cx);
61947 if (!argv.resize(1)) {
61948 // That threw an exception on the JSContext, and our CallSetup will do
61949 // the right thing with that.
61950 return;
61951 }
61952 unsigned argc = 1;
61953
61954 do {
61955
61956 if (arg.IsNull()) {
61957 argv[0].setNull();
61958 break;
61959 }
61960
61961 uint32_t length = arg.Value().Length();
61962 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
61963 if (!returnArray) {
61964 aRv.Throw(NS_ERROR_UNEXPECTED);
61965 return;
61966 }
61967 // Scope for 'tmp'
61968 {
61969 JS::Rooted<JS::Value> tmp(cx);
61970 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
61971 // Control block to let us common up the JS_DefineElement calls when there
61972 // are different ways to succeed at wrapping the object.
61973 do {
61974 JS::ExposeObjectToActiveJS(arg.Value()[sequenceIdx0]);
61975 tmp.setObject(*arg.Value()[sequenceIdx0]);
61976 if (!MaybeWrapObjectValue(cx, &tmp)) {
61977 aRv.Throw(NS_ERROR_UNEXPECTED);
61978 return;
61979 }
61980 break;
61981 } while (false);
61982 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
61983 JSPROP_ENUMERATE)) {
61984 aRv.Throw(NS_ERROR_UNEXPECTED);
61985 return;
61986 }
61987 }
61988 }
61989 argv[0].setObject(*returnArray);
61990 break;
61991 } while (false);
61992
61993 JS::Rooted<JS::Value> callable(cx);
61994 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
61995 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
61996 !InitIds(cx, atomsCache)) ||
61997 !GetCallableProperty(cx, atomsCache->passNullableSequenceOfObject_id, &callable)) {
61998 aRv.Throw(NS_ERROR_UNEXPECTED);
61999 return;
62000 }
62001 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62002 if (!JS::Call(cx, thisValue, callable,
62003 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62004 aRv.NoteJSContextException(cx);
62005 return;
62006 }
62007}
62008
62009void
62010TestJSImplInterfaceJSImpl::PassOptionalNullableSequenceOfNullableSequenceOfObject(const Optional<Nullable<Sequence<Nullable<Sequence<JSObject*>>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
62011{
62012 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableSequenceOfNullableSequenceOfObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62013 if (aRv.Failed()) {
62014 return;
62015 }
62016 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62016); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62016; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62017 BindingCallContext& cx = s.GetCallContext();
62018
62019 JS::Rooted<JS::Value> rval(cx);
62020 JS::RootedVector<JS::Value> argv(cx);
62021 if (!argv.resize(1)) {
62022 // That threw an exception on the JSContext, and our CallSetup will do
62023 // the right thing with that.
62024 return;
62025 }
62026 unsigned argc = 1;
62027
62028 do {
62029 if (arg.WasPassed()) {
62030
62031 if (arg.Value().IsNull()) {
62032 argv[0].setNull();
62033 break;
62034 }
62035
62036 uint32_t length = arg.Value().Value().Length();
62037 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
62038 if (!returnArray) {
62039 aRv.Throw(NS_ERROR_UNEXPECTED);
62040 return;
62041 }
62042 // Scope for 'tmp'
62043 {
62044 JS::Rooted<JS::Value> tmp(cx);
62045 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
62046 // Control block to let us common up the JS_DefineElement calls when there
62047 // are different ways to succeed at wrapping the object.
62048 do {
62049
62050 if (arg.Value().Value()[sequenceIdx0].IsNull()) {
62051 tmp.setNull();
62052 break;
62053 }
62054
62055 uint32_t length = arg.Value().Value()[sequenceIdx0].Value().Length();
62056 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
62057 if (!returnArray) {
62058 aRv.Throw(NS_ERROR_UNEXPECTED);
62059 return;
62060 }
62061 // Scope for 'tmp'
62062 {
62063 JS::Rooted<JS::Value> tmp(cx);
62064 for (uint32_t sequenceIdx1 = 0; sequenceIdx1 < length; ++sequenceIdx1) {
62065 // Control block to let us common up the JS_DefineElement calls when there
62066 // are different ways to succeed at wrapping the object.
62067 do {
62068 JS::ExposeObjectToActiveJS(arg.Value().Value()[sequenceIdx0].Value()[sequenceIdx1]);
62069 tmp.setObject(*arg.Value().Value()[sequenceIdx0].Value()[sequenceIdx1]);
62070 if (!MaybeWrapObjectValue(cx, &tmp)) {
62071 aRv.Throw(NS_ERROR_UNEXPECTED);
62072 return;
62073 }
62074 break;
62075 } while (false);
62076 if (!JS_DefineElement(cx, returnArray, sequenceIdx1, tmp,
62077 JSPROP_ENUMERATE)) {
62078 aRv.Throw(NS_ERROR_UNEXPECTED);
62079 return;
62080 }
62081 }
62082 }
62083 tmp.setObject(*returnArray);
62084 break;
62085 } while (false);
62086 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
62087 JSPROP_ENUMERATE)) {
62088 aRv.Throw(NS_ERROR_UNEXPECTED);
62089 return;
62090 }
62091 }
62092 }
62093 argv[0].setObject(*returnArray);
62094 break;
62095 } else if (argc == 1) {
62096 // This is our current trailing argument; reduce argc
62097 --argc;
62098 } else {
62099 argv[0].setUndefined();
62100 }
62101 } while (false);
62102
62103 JS::Rooted<JS::Value> callable(cx);
62104 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62105 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62106 !InitIds(cx, atomsCache)) ||
62107 !GetCallableProperty(cx, atomsCache->passOptionalNullableSequenceOfNullableSequenceOfObject_id, &callable)) {
62108 aRv.Throw(NS_ERROR_UNEXPECTED);
62109 return;
62110 }
62111 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62112 if (!JS::Call(cx, thisValue, callable,
62113 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62114 aRv.NoteJSContextException(cx);
62115 return;
62116 }
62117}
62118
62119void
62120TestJSImplInterfaceJSImpl::PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(const Optional<Nullable<Sequence<Nullable<Sequence<JSObject*>>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
62121{
62122 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableSequenceOfNullableSequenceOfNullableObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62123 if (aRv.Failed()) {
62124 return;
62125 }
62126 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62126); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62126; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62127 BindingCallContext& cx = s.GetCallContext();
62128
62129 JS::Rooted<JS::Value> rval(cx);
62130 JS::RootedVector<JS::Value> argv(cx);
62131 if (!argv.resize(1)) {
62132 // That threw an exception on the JSContext, and our CallSetup will do
62133 // the right thing with that.
62134 return;
62135 }
62136 unsigned argc = 1;
62137
62138 do {
62139 if (arg.WasPassed()) {
62140
62141 if (arg.Value().IsNull()) {
62142 argv[0].setNull();
62143 break;
62144 }
62145
62146 uint32_t length = arg.Value().Value().Length();
62147 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
62148 if (!returnArray) {
62149 aRv.Throw(NS_ERROR_UNEXPECTED);
62150 return;
62151 }
62152 // Scope for 'tmp'
62153 {
62154 JS::Rooted<JS::Value> tmp(cx);
62155 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
62156 // Control block to let us common up the JS_DefineElement calls when there
62157 // are different ways to succeed at wrapping the object.
62158 do {
62159
62160 if (arg.Value().Value()[sequenceIdx0].IsNull()) {
62161 tmp.setNull();
62162 break;
62163 }
62164
62165 uint32_t length = arg.Value().Value()[sequenceIdx0].Value().Length();
62166 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
62167 if (!returnArray) {
62168 aRv.Throw(NS_ERROR_UNEXPECTED);
62169 return;
62170 }
62171 // Scope for 'tmp'
62172 {
62173 JS::Rooted<JS::Value> tmp(cx);
62174 for (uint32_t sequenceIdx1 = 0; sequenceIdx1 < length; ++sequenceIdx1) {
62175 // Control block to let us common up the JS_DefineElement calls when there
62176 // are different ways to succeed at wrapping the object.
62177 do {
62178 if (arg.Value().Value()[sequenceIdx0].Value()[sequenceIdx1]) {
62179 JS::ExposeObjectToActiveJS(arg.Value().Value()[sequenceIdx0].Value()[sequenceIdx1]);
62180 }
62181 tmp.setObjectOrNull(arg.Value().Value()[sequenceIdx0].Value()[sequenceIdx1]);
62182 if (!MaybeWrapObjectOrNullValue(cx, &tmp)) {
62183 aRv.Throw(NS_ERROR_UNEXPECTED);
62184 return;
62185 }
62186 break;
62187 } while (false);
62188 if (!JS_DefineElement(cx, returnArray, sequenceIdx1, tmp,
62189 JSPROP_ENUMERATE)) {
62190 aRv.Throw(NS_ERROR_UNEXPECTED);
62191 return;
62192 }
62193 }
62194 }
62195 tmp.setObject(*returnArray);
62196 break;
62197 } while (false);
62198 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
62199 JSPROP_ENUMERATE)) {
62200 aRv.Throw(NS_ERROR_UNEXPECTED);
62201 return;
62202 }
62203 }
62204 }
62205 argv[0].setObject(*returnArray);
62206 break;
62207 } else if (argc == 1) {
62208 // This is our current trailing argument; reduce argc
62209 --argc;
62210 } else {
62211 argv[0].setUndefined();
62212 }
62213 } while (false);
62214
62215 JS::Rooted<JS::Value> callable(cx);
62216 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62217 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62218 !InitIds(cx, atomsCache)) ||
62219 !GetCallableProperty(cx, atomsCache->passOptionalNullableSequenceOfNullableSequenceOfNullableObject_id, &callable)) {
62220 aRv.Throw(NS_ERROR_UNEXPECTED);
62221 return;
62222 }
62223 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62224 if (!JS::Call(cx, thisValue, callable,
62225 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62226 aRv.NoteJSContextException(cx);
62227 return;
62228 }
62229}
62230
62231void
62232TestJSImplInterfaceJSImpl::PassRecordOfObject(const Record<nsString, JSObject*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
62233{
62234 CallSetup s(this, aRv, "TestJSImplInterface.passRecordOfObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62235 if (aRv.Failed()) {
62236 return;
62237 }
62238 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62238); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62238; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62239 BindingCallContext& cx = s.GetCallContext();
62240
62241 JS::Rooted<JS::Value> rval(cx);
62242 JS::RootedVector<JS::Value> argv(cx);
62243 if (!argv.resize(1)) {
62244 // That threw an exception on the JSContext, and our CallSetup will do
62245 // the right thing with that.
62246 return;
62247 }
62248 unsigned argc = 1;
62249
62250 do {
62251
62252 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
62253 if (!returnObj) {
62254 aRv.Throw(NS_ERROR_UNEXPECTED);
62255 return;
62256 }
62257 // Scope for 'tmp'
62258 {
62259 JS::Rooted<JS::Value> tmp(cx);
62260 for (auto& entry : arg.Entries()) {
62261 auto& recordValue0 = entry.mValue;
62262 // Control block to let us common up the JS_DefineUCProperty calls when there
62263 // are different ways to succeed at wrapping the value.
62264 do {
62265 JS::ExposeObjectToActiveJS(recordValue0);
62266 tmp.setObject(*recordValue0);
62267 if (!MaybeWrapObjectValue(cx, &tmp)) {
62268 aRv.Throw(NS_ERROR_UNEXPECTED);
62269 return;
62270 }
62271 break;
62272 } while (false);
62273 if (!JS_DefineUCProperty(cx, returnObj,
62274 entry.mKey.BeginReading(),
62275 entry.mKey.Length(), tmp,
62276 JSPROP_ENUMERATE)) {
62277 aRv.Throw(NS_ERROR_UNEXPECTED);
62278 return;
62279 }
62280 }
62281 }
62282 argv[0].setObject(*returnObj);
62283 break;
62284 } while (false);
62285
62286 JS::Rooted<JS::Value> callable(cx);
62287 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62288 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62289 !InitIds(cx, atomsCache)) ||
62290 !GetCallableProperty(cx, atomsCache->passRecordOfObject_id, &callable)) {
62291 aRv.Throw(NS_ERROR_UNEXPECTED);
62292 return;
62293 }
62294 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62295 if (!JS::Call(cx, thisValue, callable,
62296 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62297 aRv.NoteJSContextException(cx);
62298 return;
62299 }
62300}
62301
62302void
62303TestJSImplInterfaceJSImpl::ReceiveObject(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
62304{
62305 CallSetup s(this, aRv, "TestJSImplInterface.receiveObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62306 if (aRv.Failed()) {
62307 return;
62308 }
62309 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62309); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62309; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62310 BindingCallContext& cx = s.GetCallContext();
62311
62312 JS::Rooted<JS::Value> rval(cx);
62313
62314 JS::Rooted<JS::Value> callable(cx);
62315 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62316 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62317 !InitIds(cx, atomsCache)) ||
62318 !GetCallableProperty(cx, atomsCache->receiveObject_id, &callable)) {
62319 aRv.Throw(NS_ERROR_UNEXPECTED);
62320 return;
62321 }
62322 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62323 if (!JS::Call(cx, thisValue, callable,
62324 JS::HandleValueArray::empty(), &rval)) {
62325 aRv.NoteJSContextException(cx);
62326 return;
62327 }
62328 JS::Rooted<JSObject*> rvalDecl(cx);
62329 if (rval.isObject()) {
62330#ifdef __clang__1
62331#pragma clang diagnostic push
62332#pragma clang diagnostic ignored "-Wunreachable-code"
62333#pragma clang diagnostic ignored "-Wunreachable-code-return"
62334#endif // __clang__
62335 if ((false) && !CallerSubsumes(rval)) {
62336 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("return value of TestJSImplInterface.receiveObject");
62337 aRv.Throw(NS_ERROR_UNEXPECTED);
62338 return;
62339 }
62340#ifdef __clang__1
62341#pragma clang diagnostic pop
62342#endif // __clang__
62343 rvalDecl = &rval.toObject();
62344 } else {
62345 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveObject");
62346 aRv.Throw(NS_ERROR_UNEXPECTED);
62347 return;
62348 }
62349 aRetVal.set(rvalDecl);
62350}
62351
62352void
62353TestJSImplInterfaceJSImpl::ReceiveNullableObject(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
62354{
62355 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62356 if (aRv.Failed()) {
62357 return;
62358 }
62359 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62359); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62359; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62360 BindingCallContext& cx = s.GetCallContext();
62361
62362 JS::Rooted<JS::Value> rval(cx);
62363
62364 JS::Rooted<JS::Value> callable(cx);
62365 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62366 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62367 !InitIds(cx, atomsCache)) ||
62368 !GetCallableProperty(cx, atomsCache->receiveNullableObject_id, &callable)) {
62369 aRv.Throw(NS_ERROR_UNEXPECTED);
62370 return;
62371 }
62372 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62373 if (!JS::Call(cx, thisValue, callable,
62374 JS::HandleValueArray::empty(), &rval)) {
62375 aRv.NoteJSContextException(cx);
62376 return;
62377 }
62378 JS::Rooted<JSObject*> rvalDecl(cx);
62379 if (rval.isObject()) {
62380#ifdef __clang__1
62381#pragma clang diagnostic push
62382#pragma clang diagnostic ignored "-Wunreachable-code"
62383#pragma clang diagnostic ignored "-Wunreachable-code-return"
62384#endif // __clang__
62385 if ((false) && !CallerSubsumes(rval)) {
62386 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("return value of TestJSImplInterface.receiveNullableObject");
62387 aRv.Throw(NS_ERROR_UNEXPECTED);
62388 return;
62389 }
62390#ifdef __clang__1
62391#pragma clang diagnostic pop
62392#endif // __clang__
62393 rvalDecl = &rval.toObject();
62394 } else if (rval.isNullOrUndefined()) {
62395 rvalDecl = nullptr;
62396 } else {
62397 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.receiveNullableObject");
62398 aRv.Throw(NS_ERROR_UNEXPECTED);
62399 return;
62400 }
62401 aRetVal.set(rvalDecl);
62402}
62403
62404void
62405TestJSImplInterfaceJSImpl::PassUnion(const ObjectOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
62406{
62407 CallSetup s(this, aRv, "TestJSImplInterface.passUnion", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62408 if (aRv.Failed()) {
62409 return;
62410 }
62411 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62411); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62411; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62412 BindingCallContext& cx = s.GetCallContext();
62413
62414 JS::Rooted<JS::Value> rval(cx);
62415 JS::RootedVector<JS::Value> argv(cx);
62416 if (!argv.resize(1)) {
62417 // That threw an exception on the JSContext, and our CallSetup will do
62418 // the right thing with that.
62419 return;
62420 }
62421 unsigned argc = 1;
62422
62423 do {
62424 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
62425 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
62426 aRv.Throw(NS_ERROR_UNEXPECTED);
62427 return;
62428 }
62429 break;
62430 } while (false);
62431
62432 JS::Rooted<JS::Value> callable(cx);
62433 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62434 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62435 !InitIds(cx, atomsCache)) ||
62436 !GetCallableProperty(cx, atomsCache->passUnion_id, &callable)) {
62437 aRv.Throw(NS_ERROR_UNEXPECTED);
62438 return;
62439 }
62440 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62441 if (!JS::Call(cx, thisValue, callable,
62442 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62443 aRv.NoteJSContextException(cx);
62444 return;
62445 }
62446}
62447
62448void
62449TestJSImplInterfaceJSImpl::PassUnion2(const LongOrBoolean& arg, ErrorResult& aRv, JS::Realm* aRealm)
62450{
62451 CallSetup s(this, aRv, "TestJSImplInterface.passUnion2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62452 if (aRv.Failed()) {
62453 return;
62454 }
62455 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62455); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62455; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62456 BindingCallContext& cx = s.GetCallContext();
62457
62458 JS::Rooted<JS::Value> rval(cx);
62459 JS::RootedVector<JS::Value> argv(cx);
62460 if (!argv.resize(1)) {
62461 // That threw an exception on the JSContext, and our CallSetup will do
62462 // the right thing with that.
62463 return;
62464 }
62465 unsigned argc = 1;
62466
62467 do {
62468 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
62469 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
62470 aRv.Throw(NS_ERROR_UNEXPECTED);
62471 return;
62472 }
62473 break;
62474 } while (false);
62475
62476 JS::Rooted<JS::Value> callable(cx);
62477 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62478 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62479 !InitIds(cx, atomsCache)) ||
62480 !GetCallableProperty(cx, atomsCache->passUnion2_id, &callable)) {
62481 aRv.Throw(NS_ERROR_UNEXPECTED);
62482 return;
62483 }
62484 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62485 if (!JS::Call(cx, thisValue, callable,
62486 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62487 aRv.NoteJSContextException(cx);
62488 return;
62489 }
62490}
62491
62492void
62493TestJSImplInterfaceJSImpl::PassUnion3(const ObjectOrLongOrBoolean& arg, ErrorResult& aRv, JS::Realm* aRealm)
62494{
62495 CallSetup s(this, aRv, "TestJSImplInterface.passUnion3", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62496 if (aRv.Failed()) {
62497 return;
62498 }
62499 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62499); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62499; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62500 BindingCallContext& cx = s.GetCallContext();
62501
62502 JS::Rooted<JS::Value> rval(cx);
62503 JS::RootedVector<JS::Value> argv(cx);
62504 if (!argv.resize(1)) {
62505 // That threw an exception on the JSContext, and our CallSetup will do
62506 // the right thing with that.
62507 return;
62508 }
62509 unsigned argc = 1;
62510
62511 do {
62512 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
62513 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
62514 aRv.Throw(NS_ERROR_UNEXPECTED);
62515 return;
62516 }
62517 break;
62518 } while (false);
62519
62520 JS::Rooted<JS::Value> callable(cx);
62521 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62522 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62523 !InitIds(cx, atomsCache)) ||
62524 !GetCallableProperty(cx, atomsCache->passUnion3_id, &callable)) {
62525 aRv.Throw(NS_ERROR_UNEXPECTED);
62526 return;
62527 }
62528 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62529 if (!JS::Call(cx, thisValue, callable,
62530 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62531 aRv.NoteJSContextException(cx);
62532 return;
62533 }
62534}
62535
62536void
62537TestJSImplInterfaceJSImpl::PassUnion4(const NodeOrLongOrBoolean& arg, ErrorResult& aRv, JS::Realm* aRealm)
62538{
62539 CallSetup s(this, aRv, "TestJSImplInterface.passUnion4", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62540 if (aRv.Failed()) {
62541 return;
62542 }
62543 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62543); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62543; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62544 BindingCallContext& cx = s.GetCallContext();
62545
62546 JS::Rooted<JS::Value> rval(cx);
62547 JS::RootedVector<JS::Value> argv(cx);
62548 if (!argv.resize(1)) {
62549 // That threw an exception on the JSContext, and our CallSetup will do
62550 // the right thing with that.
62551 return;
62552 }
62553 unsigned argc = 1;
62554
62555 do {
62556 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
62557 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
62558 aRv.Throw(NS_ERROR_UNEXPECTED);
62559 return;
62560 }
62561 break;
62562 } while (false);
62563
62564 JS::Rooted<JS::Value> callable(cx);
62565 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62566 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62567 !InitIds(cx, atomsCache)) ||
62568 !GetCallableProperty(cx, atomsCache->passUnion4_id, &callable)) {
62569 aRv.Throw(NS_ERROR_UNEXPECTED);
62570 return;
62571 }
62572 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62573 if (!JS::Call(cx, thisValue, callable,
62574 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62575 aRv.NoteJSContextException(cx);
62576 return;
62577 }
62578}
62579
62580void
62581TestJSImplInterfaceJSImpl::PassUnion5(const ObjectOrBoolean& arg, ErrorResult& aRv, JS::Realm* aRealm)
62582{
62583 CallSetup s(this, aRv, "TestJSImplInterface.passUnion5", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62584 if (aRv.Failed()) {
62585 return;
62586 }
62587 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62587); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62587; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62588 BindingCallContext& cx = s.GetCallContext();
62589
62590 JS::Rooted<JS::Value> rval(cx);
62591 JS::RootedVector<JS::Value> argv(cx);
62592 if (!argv.resize(1)) {
62593 // That threw an exception on the JSContext, and our CallSetup will do
62594 // the right thing with that.
62595 return;
62596 }
62597 unsigned argc = 1;
62598
62599 do {
62600 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
62601 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
62602 aRv.Throw(NS_ERROR_UNEXPECTED);
62603 return;
62604 }
62605 break;
62606 } while (false);
62607
62608 JS::Rooted<JS::Value> callable(cx);
62609 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62610 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62611 !InitIds(cx, atomsCache)) ||
62612 !GetCallableProperty(cx, atomsCache->passUnion5_id, &callable)) {
62613 aRv.Throw(NS_ERROR_UNEXPECTED);
62614 return;
62615 }
62616 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62617 if (!JS::Call(cx, thisValue, callable,
62618 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62619 aRv.NoteJSContextException(cx);
62620 return;
62621 }
62622}
62623
62624void
62625TestJSImplInterfaceJSImpl::PassUnion6(const ObjectOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
62626{
62627 CallSetup s(this, aRv, "TestJSImplInterface.passUnion6", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62628 if (aRv.Failed()) {
62629 return;
62630 }
62631 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62631); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62631; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62632 BindingCallContext& cx = s.GetCallContext();
62633
62634 JS::Rooted<JS::Value> rval(cx);
62635 JS::RootedVector<JS::Value> argv(cx);
62636 if (!argv.resize(1)) {
62637 // That threw an exception on the JSContext, and our CallSetup will do
62638 // the right thing with that.
62639 return;
62640 }
62641 unsigned argc = 1;
62642
62643 do {
62644 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
62645 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
62646 aRv.Throw(NS_ERROR_UNEXPECTED);
62647 return;
62648 }
62649 break;
62650 } while (false);
62651
62652 JS::Rooted<JS::Value> callable(cx);
62653 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62654 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62655 !InitIds(cx, atomsCache)) ||
62656 !GetCallableProperty(cx, atomsCache->passUnion6_id, &callable)) {
62657 aRv.Throw(NS_ERROR_UNEXPECTED);
62658 return;
62659 }
62660 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62661 if (!JS::Call(cx, thisValue, callable,
62662 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62663 aRv.NoteJSContextException(cx);
62664 return;
62665 }
62666}
62667
62668void
62669TestJSImplInterfaceJSImpl::PassUnion7(const ObjectOrStringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
62670{
62671 CallSetup s(this, aRv, "TestJSImplInterface.passUnion7", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62672 if (aRv.Failed()) {
62673 return;
62674 }
62675 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62675); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62675; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62676 BindingCallContext& cx = s.GetCallContext();
62677
62678 JS::Rooted<JS::Value> rval(cx);
62679 JS::RootedVector<JS::Value> argv(cx);
62680 if (!argv.resize(1)) {
62681 // That threw an exception on the JSContext, and our CallSetup will do
62682 // the right thing with that.
62683 return;
62684 }
62685 unsigned argc = 1;
62686
62687 do {
62688 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
62689 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
62690 aRv.Throw(NS_ERROR_UNEXPECTED);
62691 return;
62692 }
62693 break;
62694 } while (false);
62695
62696 JS::Rooted<JS::Value> callable(cx);
62697 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62698 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62699 !InitIds(cx, atomsCache)) ||
62700 !GetCallableProperty(cx, atomsCache->passUnion7_id, &callable)) {
62701 aRv.Throw(NS_ERROR_UNEXPECTED);
62702 return;
62703 }
62704 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62705 if (!JS::Call(cx, thisValue, callable,
62706 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62707 aRv.NoteJSContextException(cx);
62708 return;
62709 }
62710}
62711
62712void
62713TestJSImplInterfaceJSImpl::PassUnion8(const ObjectOrStringOrBoolean& arg, ErrorResult& aRv, JS::Realm* aRealm)
62714{
62715 CallSetup s(this, aRv, "TestJSImplInterface.passUnion8", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62716 if (aRv.Failed()) {
62717 return;
62718 }
62719 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62719); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62719; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62720 BindingCallContext& cx = s.GetCallContext();
62721
62722 JS::Rooted<JS::Value> rval(cx);
62723 JS::RootedVector<JS::Value> argv(cx);
62724 if (!argv.resize(1)) {
62725 // That threw an exception on the JSContext, and our CallSetup will do
62726 // the right thing with that.
62727 return;
62728 }
62729 unsigned argc = 1;
62730
62731 do {
62732 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
62733 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
62734 aRv.Throw(NS_ERROR_UNEXPECTED);
62735 return;
62736 }
62737 break;
62738 } while (false);
62739
62740 JS::Rooted<JS::Value> callable(cx);
62741 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62742 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62743 !InitIds(cx, atomsCache)) ||
62744 !GetCallableProperty(cx, atomsCache->passUnion8_id, &callable)) {
62745 aRv.Throw(NS_ERROR_UNEXPECTED);
62746 return;
62747 }
62748 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62749 if (!JS::Call(cx, thisValue, callable,
62750 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62751 aRv.NoteJSContextException(cx);
62752 return;
62753 }
62754}
62755
62756void
62757TestJSImplInterfaceJSImpl::PassUnion9(const ObjectOrStringOrLongOrBoolean& arg, ErrorResult& aRv, JS::Realm* aRealm)
62758{
62759 CallSetup s(this, aRv, "TestJSImplInterface.passUnion9", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62760 if (aRv.Failed()) {
62761 return;
62762 }
62763 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62763); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62763; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62764 BindingCallContext& cx = s.GetCallContext();
62765
62766 JS::Rooted<JS::Value> rval(cx);
62767 JS::RootedVector<JS::Value> argv(cx);
62768 if (!argv.resize(1)) {
62769 // That threw an exception on the JSContext, and our CallSetup will do
62770 // the right thing with that.
62771 return;
62772 }
62773 unsigned argc = 1;
62774
62775 do {
62776 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
62777 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
62778 aRv.Throw(NS_ERROR_UNEXPECTED);
62779 return;
62780 }
62781 break;
62782 } while (false);
62783
62784 JS::Rooted<JS::Value> callable(cx);
62785 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62786 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62787 !InitIds(cx, atomsCache)) ||
62788 !GetCallableProperty(cx, atomsCache->passUnion9_id, &callable)) {
62789 aRv.Throw(NS_ERROR_UNEXPECTED);
62790 return;
62791 }
62792 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62793 if (!JS::Call(cx, thisValue, callable,
62794 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62795 aRv.NoteJSContextException(cx);
62796 return;
62797 }
62798}
62799
62800void
62801TestJSImplInterfaceJSImpl::PassUnion10(const EventInitOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
62802{
62803 CallSetup s(this, aRv, "TestJSImplInterface.passUnion10", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62804 if (aRv.Failed()) {
62805 return;
62806 }
62807 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62807); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62807; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62808 BindingCallContext& cx = s.GetCallContext();
62809
62810 JS::Rooted<JS::Value> rval(cx);
62811 JS::RootedVector<JS::Value> argv(cx);
62812 if (!argv.resize(1)) {
62813 // That threw an exception on the JSContext, and our CallSetup will do
62814 // the right thing with that.
62815 return;
62816 }
62817 unsigned argc = 1;
62818
62819 do {
62820 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
62821 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
62822 aRv.Throw(NS_ERROR_UNEXPECTED);
62823 return;
62824 }
62825 break;
62826 } while (false);
62827
62828 JS::Rooted<JS::Value> callable(cx);
62829 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62830 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62831 !InitIds(cx, atomsCache)) ||
62832 !GetCallableProperty(cx, atomsCache->passUnion10_id, &callable)) {
62833 aRv.Throw(NS_ERROR_UNEXPECTED);
62834 return;
62835 }
62836 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62837 if (!JS::Call(cx, thisValue, callable,
62838 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62839 aRv.NoteJSContextException(cx);
62840 return;
62841 }
62842}
62843
62844void
62845TestJSImplInterfaceJSImpl::PassUnion11(const CustomEventInitOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
62846{
62847 CallSetup s(this, aRv, "TestJSImplInterface.passUnion11", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62848 if (aRv.Failed()) {
62849 return;
62850 }
62851 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62851); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62851; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62852 BindingCallContext& cx = s.GetCallContext();
62853
62854 JS::Rooted<JS::Value> rval(cx);
62855 JS::RootedVector<JS::Value> argv(cx);
62856 if (!argv.resize(1)) {
62857 // That threw an exception on the JSContext, and our CallSetup will do
62858 // the right thing with that.
62859 return;
62860 }
62861 unsigned argc = 1;
62862
62863 do {
62864 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
62865 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
62866 aRv.Throw(NS_ERROR_UNEXPECTED);
62867 return;
62868 }
62869 break;
62870 } while (false);
62871
62872 JS::Rooted<JS::Value> callable(cx);
62873 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62874 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62875 !InitIds(cx, atomsCache)) ||
62876 !GetCallableProperty(cx, atomsCache->passUnion11_id, &callable)) {
62877 aRv.Throw(NS_ERROR_UNEXPECTED);
62878 return;
62879 }
62880 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62881 if (!JS::Call(cx, thisValue, callable,
62882 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62883 aRv.NoteJSContextException(cx);
62884 return;
62885 }
62886}
62887
62888void
62889TestJSImplInterfaceJSImpl::PassUnion12(const EventInitOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
62890{
62891 CallSetup s(this, aRv, "TestJSImplInterface.passUnion12", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62892 if (aRv.Failed()) {
62893 return;
62894 }
62895 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62895); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62895; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62896 BindingCallContext& cx = s.GetCallContext();
62897
62898 JS::Rooted<JS::Value> rval(cx);
62899 JS::RootedVector<JS::Value> argv(cx);
62900 if (!argv.resize(1)) {
62901 // That threw an exception on the JSContext, and our CallSetup will do
62902 // the right thing with that.
62903 return;
62904 }
62905 unsigned argc = 1;
62906
62907 do {
62908 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
62909 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
62910 aRv.Throw(NS_ERROR_UNEXPECTED);
62911 return;
62912 }
62913 break;
62914 } while (false);
62915
62916 JS::Rooted<JS::Value> callable(cx);
62917 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62918 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62919 !InitIds(cx, atomsCache)) ||
62920 !GetCallableProperty(cx, atomsCache->passUnion12_id, &callable)) {
62921 aRv.Throw(NS_ERROR_UNEXPECTED);
62922 return;
62923 }
62924 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62925 if (!JS::Call(cx, thisValue, callable,
62926 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62927 aRv.NoteJSContextException(cx);
62928 return;
62929 }
62930}
62931
62932void
62933TestJSImplInterfaceJSImpl::PassUnion13(const ObjectOrLongOrNull& arg, ErrorResult& aRv, JS::Realm* aRealm)
62934{
62935 CallSetup s(this, aRv, "TestJSImplInterface.passUnion13", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62936 if (aRv.Failed()) {
62937 return;
62938 }
62939 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62939); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62939; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62940 BindingCallContext& cx = s.GetCallContext();
62941
62942 JS::Rooted<JS::Value> rval(cx);
62943 JS::RootedVector<JS::Value> argv(cx);
62944 if (!argv.resize(1)) {
62945 // That threw an exception on the JSContext, and our CallSetup will do
62946 // the right thing with that.
62947 return;
62948 }
62949 unsigned argc = 1;
62950
62951 do {
62952 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
62953 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
62954 aRv.Throw(NS_ERROR_UNEXPECTED);
62955 return;
62956 }
62957 break;
62958 } while (false);
62959
62960 JS::Rooted<JS::Value> callable(cx);
62961 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
62962 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
62963 !InitIds(cx, atomsCache)) ||
62964 !GetCallableProperty(cx, atomsCache->passUnion13_id, &callable)) {
62965 aRv.Throw(NS_ERROR_UNEXPECTED);
62966 return;
62967 }
62968 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
62969 if (!JS::Call(cx, thisValue, callable,
62970 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
62971 aRv.NoteJSContextException(cx);
62972 return;
62973 }
62974}
62975
62976void
62977TestJSImplInterfaceJSImpl::PassUnion14(const ObjectOrLongOrNull& arg, ErrorResult& aRv, JS::Realm* aRealm)
62978{
62979 CallSetup s(this, aRv, "TestJSImplInterface.passUnion14", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
62980 if (aRv.Failed()) {
62981 return;
62982 }
62983 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 62983); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 62983; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
62984 BindingCallContext& cx = s.GetCallContext();
62985
62986 JS::Rooted<JS::Value> rval(cx);
62987 JS::RootedVector<JS::Value> argv(cx);
62988 if (!argv.resize(1)) {
62989 // That threw an exception on the JSContext, and our CallSetup will do
62990 // the right thing with that.
62991 return;
62992 }
62993 unsigned argc = 1;
62994
62995 do {
62996 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
62997 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
62998 aRv.Throw(NS_ERROR_UNEXPECTED);
62999 return;
63000 }
63001 break;
63002 } while (false);
63003
63004 JS::Rooted<JS::Value> callable(cx);
63005 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63006 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63007 !InitIds(cx, atomsCache)) ||
63008 !GetCallableProperty(cx, atomsCache->passUnion14_id, &callable)) {
63009 aRv.Throw(NS_ERROR_UNEXPECTED);
63010 return;
63011 }
63012 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63013 if (!JS::Call(cx, thisValue, callable,
63014 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63015 aRv.NoteJSContextException(cx);
63016 return;
63017 }
63018}
63019
63020void
63021TestJSImplInterfaceJSImpl::PassUnion15(const LongSequenceOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63022{
63023 CallSetup s(this, aRv, "TestJSImplInterface.passUnion15", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63024 if (aRv.Failed()) {
63025 return;
63026 }
63027 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63027); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63027; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63028 BindingCallContext& cx = s.GetCallContext();
63029
63030 JS::Rooted<JS::Value> rval(cx);
63031 JS::RootedVector<JS::Value> argv(cx);
63032 if (!argv.resize(1)) {
63033 // That threw an exception on the JSContext, and our CallSetup will do
63034 // the right thing with that.
63035 return;
63036 }
63037 unsigned argc = 1;
63038
63039 do {
63040 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63041 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63042 aRv.Throw(NS_ERROR_UNEXPECTED);
63043 return;
63044 }
63045 break;
63046 } while (false);
63047
63048 JS::Rooted<JS::Value> callable(cx);
63049 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63050 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63051 !InitIds(cx, atomsCache)) ||
63052 !GetCallableProperty(cx, atomsCache->passUnion15_id, &callable)) {
63053 aRv.Throw(NS_ERROR_UNEXPECTED);
63054 return;
63055 }
63056 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63057 if (!JS::Call(cx, thisValue, callable,
63058 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63059 aRv.NoteJSContextException(cx);
63060 return;
63061 }
63062}
63063
63064void
63065TestJSImplInterfaceJSImpl::PassUnion16(const Optional<LongSequenceOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
63066{
63067 CallSetup s(this, aRv, "TestJSImplInterface.passUnion16", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63068 if (aRv.Failed()) {
63069 return;
63070 }
63071 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63071); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63071; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63072 BindingCallContext& cx = s.GetCallContext();
63073
63074 JS::Rooted<JS::Value> rval(cx);
63075 JS::RootedVector<JS::Value> argv(cx);
63076 if (!argv.resize(1)) {
63077 // That threw an exception on the JSContext, and our CallSetup will do
63078 // the right thing with that.
63079 return;
63080 }
63081 unsigned argc = 1;
63082
63083 do {
63084 if (arg.WasPassed()) {
63085 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63086 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
63087 aRv.Throw(NS_ERROR_UNEXPECTED);
63088 return;
63089 }
63090 break;
63091 } else if (argc == 1) {
63092 // This is our current trailing argument; reduce argc
63093 --argc;
63094 } else {
63095 argv[0].setUndefined();
63096 }
63097 } while (false);
63098
63099 JS::Rooted<JS::Value> callable(cx);
63100 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63101 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63102 !InitIds(cx, atomsCache)) ||
63103 !GetCallableProperty(cx, atomsCache->passUnion16_id, &callable)) {
63104 aRv.Throw(NS_ERROR_UNEXPECTED);
63105 return;
63106 }
63107 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63108 if (!JS::Call(cx, thisValue, callable,
63109 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63110 aRv.NoteJSContextException(cx);
63111 return;
63112 }
63113}
63114
63115void
63116TestJSImplInterfaceJSImpl::PassUnion17(const LongSequenceOrNullOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63117{
63118 CallSetup s(this, aRv, "TestJSImplInterface.passUnion17", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63119 if (aRv.Failed()) {
63120 return;
63121 }
63122 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63122); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63122; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63123 BindingCallContext& cx = s.GetCallContext();
63124
63125 JS::Rooted<JS::Value> rval(cx);
63126 JS::RootedVector<JS::Value> argv(cx);
63127 if (!argv.resize(1)) {
63128 // That threw an exception on the JSContext, and our CallSetup will do
63129 // the right thing with that.
63130 return;
63131 }
63132 unsigned argc = 1;
63133
63134 do {
63135 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63136 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63137 aRv.Throw(NS_ERROR_UNEXPECTED);
63138 return;
63139 }
63140 break;
63141 } while (false);
63142
63143 JS::Rooted<JS::Value> callable(cx);
63144 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63145 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63146 !InitIds(cx, atomsCache)) ||
63147 !GetCallableProperty(cx, atomsCache->passUnion17_id, &callable)) {
63148 aRv.Throw(NS_ERROR_UNEXPECTED);
63149 return;
63150 }
63151 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63152 if (!JS::Call(cx, thisValue, callable,
63153 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63154 aRv.NoteJSContextException(cx);
63155 return;
63156 }
63157}
63158
63159void
63160TestJSImplInterfaceJSImpl::PassUnion18(const ObjectSequenceOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63161{
63162 CallSetup s(this, aRv, "TestJSImplInterface.passUnion18", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63163 if (aRv.Failed()) {
63164 return;
63165 }
63166 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63166); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63166; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63167 BindingCallContext& cx = s.GetCallContext();
63168
63169 JS::Rooted<JS::Value> rval(cx);
63170 JS::RootedVector<JS::Value> argv(cx);
63171 if (!argv.resize(1)) {
63172 // That threw an exception on the JSContext, and our CallSetup will do
63173 // the right thing with that.
63174 return;
63175 }
63176 unsigned argc = 1;
63177
63178 do {
63179 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63180 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63181 aRv.Throw(NS_ERROR_UNEXPECTED);
63182 return;
63183 }
63184 break;
63185 } while (false);
63186
63187 JS::Rooted<JS::Value> callable(cx);
63188 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63189 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63190 !InitIds(cx, atomsCache)) ||
63191 !GetCallableProperty(cx, atomsCache->passUnion18_id, &callable)) {
63192 aRv.Throw(NS_ERROR_UNEXPECTED);
63193 return;
63194 }
63195 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63196 if (!JS::Call(cx, thisValue, callable,
63197 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63198 aRv.NoteJSContextException(cx);
63199 return;
63200 }
63201}
63202
63203void
63204TestJSImplInterfaceJSImpl::PassUnion19(const Optional<ObjectSequenceOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
63205{
63206 CallSetup s(this, aRv, "TestJSImplInterface.passUnion19", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63207 if (aRv.Failed()) {
63208 return;
63209 }
63210 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63210); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63210; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63211 BindingCallContext& cx = s.GetCallContext();
63212
63213 JS::Rooted<JS::Value> rval(cx);
63214 JS::RootedVector<JS::Value> argv(cx);
63215 if (!argv.resize(1)) {
63216 // That threw an exception on the JSContext, and our CallSetup will do
63217 // the right thing with that.
63218 return;
63219 }
63220 unsigned argc = 1;
63221
63222 do {
63223 if (arg.WasPassed()) {
63224 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63225 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
63226 aRv.Throw(NS_ERROR_UNEXPECTED);
63227 return;
63228 }
63229 break;
63230 } else if (argc == 1) {
63231 // This is our current trailing argument; reduce argc
63232 --argc;
63233 } else {
63234 argv[0].setUndefined();
63235 }
63236 } while (false);
63237
63238 JS::Rooted<JS::Value> callable(cx);
63239 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63240 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63241 !InitIds(cx, atomsCache)) ||
63242 !GetCallableProperty(cx, atomsCache->passUnion19_id, &callable)) {
63243 aRv.Throw(NS_ERROR_UNEXPECTED);
63244 return;
63245 }
63246 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63247 if (!JS::Call(cx, thisValue, callable,
63248 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63249 aRv.NoteJSContextException(cx);
63250 return;
63251 }
63252}
63253
63254void
63255TestJSImplInterfaceJSImpl::PassUnion20(const ObjectSequenceOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63256{
63257 CallSetup s(this, aRv, "TestJSImplInterface.passUnion20", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63258 if (aRv.Failed()) {
63259 return;
63260 }
63261 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63261); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63261; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63262 BindingCallContext& cx = s.GetCallContext();
63263
63264 JS::Rooted<JS::Value> rval(cx);
63265 JS::RootedVector<JS::Value> argv(cx);
63266 if (!argv.resize(1)) {
63267 // That threw an exception on the JSContext, and our CallSetup will do
63268 // the right thing with that.
63269 return;
63270 }
63271 unsigned argc = 1;
63272
63273 do {
63274 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63275 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63276 aRv.Throw(NS_ERROR_UNEXPECTED);
63277 return;
63278 }
63279 break;
63280 } while (false);
63281
63282 JS::Rooted<JS::Value> callable(cx);
63283 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63284 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63285 !InitIds(cx, atomsCache)) ||
63286 !GetCallableProperty(cx, atomsCache->passUnion20_id, &callable)) {
63287 aRv.Throw(NS_ERROR_UNEXPECTED);
63288 return;
63289 }
63290 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63291 if (!JS::Call(cx, thisValue, callable,
63292 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63293 aRv.NoteJSContextException(cx);
63294 return;
63295 }
63296}
63297
63298void
63299TestJSImplInterfaceJSImpl::PassUnion21(const StringLongRecordOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63300{
63301 CallSetup s(this, aRv, "TestJSImplInterface.passUnion21", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63302 if (aRv.Failed()) {
63303 return;
63304 }
63305 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63305); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63305; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63306 BindingCallContext& cx = s.GetCallContext();
63307
63308 JS::Rooted<JS::Value> rval(cx);
63309 JS::RootedVector<JS::Value> argv(cx);
63310 if (!argv.resize(1)) {
63311 // That threw an exception on the JSContext, and our CallSetup will do
63312 // the right thing with that.
63313 return;
63314 }
63315 unsigned argc = 1;
63316
63317 do {
63318 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63319 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63320 aRv.Throw(NS_ERROR_UNEXPECTED);
63321 return;
63322 }
63323 break;
63324 } while (false);
63325
63326 JS::Rooted<JS::Value> callable(cx);
63327 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63328 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63329 !InitIds(cx, atomsCache)) ||
63330 !GetCallableProperty(cx, atomsCache->passUnion21_id, &callable)) {
63331 aRv.Throw(NS_ERROR_UNEXPECTED);
63332 return;
63333 }
63334 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63335 if (!JS::Call(cx, thisValue, callable,
63336 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63337 aRv.NoteJSContextException(cx);
63338 return;
63339 }
63340}
63341
63342void
63343TestJSImplInterfaceJSImpl::PassUnion22(const StringObjectRecordOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63344{
63345 CallSetup s(this, aRv, "TestJSImplInterface.passUnion22", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63346 if (aRv.Failed()) {
63347 return;
63348 }
63349 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63349); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63349; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63350 BindingCallContext& cx = s.GetCallContext();
63351
63352 JS::Rooted<JS::Value> rval(cx);
63353 JS::RootedVector<JS::Value> argv(cx);
63354 if (!argv.resize(1)) {
63355 // That threw an exception on the JSContext, and our CallSetup will do
63356 // the right thing with that.
63357 return;
63358 }
63359 unsigned argc = 1;
63360
63361 do {
63362 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63363 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63364 aRv.Throw(NS_ERROR_UNEXPECTED);
63365 return;
63366 }
63367 break;
63368 } while (false);
63369
63370 JS::Rooted<JS::Value> callable(cx);
63371 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63372 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63373 !InitIds(cx, atomsCache)) ||
63374 !GetCallableProperty(cx, atomsCache->passUnion22_id, &callable)) {
63375 aRv.Throw(NS_ERROR_UNEXPECTED);
63376 return;
63377 }
63378 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63379 if (!JS::Call(cx, thisValue, callable,
63380 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63381 aRv.NoteJSContextException(cx);
63382 return;
63383 }
63384}
63385
63386void
63387TestJSImplInterfaceJSImpl::PassUnion23(const ImageDataSequenceOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63388{
63389 CallSetup s(this, aRv, "TestJSImplInterface.passUnion23", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63390 if (aRv.Failed()) {
63391 return;
63392 }
63393 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63393); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63393; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63394 BindingCallContext& cx = s.GetCallContext();
63395
63396 JS::Rooted<JS::Value> rval(cx);
63397 JS::RootedVector<JS::Value> argv(cx);
63398 if (!argv.resize(1)) {
63399 // That threw an exception on the JSContext, and our CallSetup will do
63400 // the right thing with that.
63401 return;
63402 }
63403 unsigned argc = 1;
63404
63405 do {
63406 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63407 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63408 aRv.Throw(NS_ERROR_UNEXPECTED);
63409 return;
63410 }
63411 break;
63412 } while (false);
63413
63414 JS::Rooted<JS::Value> callable(cx);
63415 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63416 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63417 !InitIds(cx, atomsCache)) ||
63418 !GetCallableProperty(cx, atomsCache->passUnion23_id, &callable)) {
63419 aRv.Throw(NS_ERROR_UNEXPECTED);
63420 return;
63421 }
63422 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63423 if (!JS::Call(cx, thisValue, callable,
63424 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63425 aRv.NoteJSContextException(cx);
63426 return;
63427 }
63428}
63429
63430void
63431TestJSImplInterfaceJSImpl::PassUnion24(const ImageDataOrNullSequenceOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63432{
63433 CallSetup s(this, aRv, "TestJSImplInterface.passUnion24", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63434 if (aRv.Failed()) {
63435 return;
63436 }
63437 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63437); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63437; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63438 BindingCallContext& cx = s.GetCallContext();
63439
63440 JS::Rooted<JS::Value> rval(cx);
63441 JS::RootedVector<JS::Value> argv(cx);
63442 if (!argv.resize(1)) {
63443 // That threw an exception on the JSContext, and our CallSetup will do
63444 // the right thing with that.
63445 return;
63446 }
63447 unsigned argc = 1;
63448
63449 do {
63450 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63451 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63452 aRv.Throw(NS_ERROR_UNEXPECTED);
63453 return;
63454 }
63455 break;
63456 } while (false);
63457
63458 JS::Rooted<JS::Value> callable(cx);
63459 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63460 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63461 !InitIds(cx, atomsCache)) ||
63462 !GetCallableProperty(cx, atomsCache->passUnion24_id, &callable)) {
63463 aRv.Throw(NS_ERROR_UNEXPECTED);
63464 return;
63465 }
63466 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63467 if (!JS::Call(cx, thisValue, callable,
63468 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63469 aRv.NoteJSContextException(cx);
63470 return;
63471 }
63472}
63473
63474void
63475TestJSImplInterfaceJSImpl::PassUnion25(const ImageDataSequenceSequenceOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63476{
63477 CallSetup s(this, aRv, "TestJSImplInterface.passUnion25", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63478 if (aRv.Failed()) {
63479 return;
63480 }
63481 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63481); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63481; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63482 BindingCallContext& cx = s.GetCallContext();
63483
63484 JS::Rooted<JS::Value> rval(cx);
63485 JS::RootedVector<JS::Value> argv(cx);
63486 if (!argv.resize(1)) {
63487 // That threw an exception on the JSContext, and our CallSetup will do
63488 // the right thing with that.
63489 return;
63490 }
63491 unsigned argc = 1;
63492
63493 do {
63494 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63495 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63496 aRv.Throw(NS_ERROR_UNEXPECTED);
63497 return;
63498 }
63499 break;
63500 } while (false);
63501
63502 JS::Rooted<JS::Value> callable(cx);
63503 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63504 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63505 !InitIds(cx, atomsCache)) ||
63506 !GetCallableProperty(cx, atomsCache->passUnion25_id, &callable)) {
63507 aRv.Throw(NS_ERROR_UNEXPECTED);
63508 return;
63509 }
63510 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63511 if (!JS::Call(cx, thisValue, callable,
63512 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63513 aRv.NoteJSContextException(cx);
63514 return;
63515 }
63516}
63517
63518void
63519TestJSImplInterfaceJSImpl::PassUnion26(const ImageDataOrNullSequenceSequenceOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63520{
63521 CallSetup s(this, aRv, "TestJSImplInterface.passUnion26", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63522 if (aRv.Failed()) {
63523 return;
63524 }
63525 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63525); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63525; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63526 BindingCallContext& cx = s.GetCallContext();
63527
63528 JS::Rooted<JS::Value> rval(cx);
63529 JS::RootedVector<JS::Value> argv(cx);
63530 if (!argv.resize(1)) {
63531 // That threw an exception on the JSContext, and our CallSetup will do
63532 // the right thing with that.
63533 return;
63534 }
63535 unsigned argc = 1;
63536
63537 do {
63538 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63539 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63540 aRv.Throw(NS_ERROR_UNEXPECTED);
63541 return;
63542 }
63543 break;
63544 } while (false);
63545
63546 JS::Rooted<JS::Value> callable(cx);
63547 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63548 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63549 !InitIds(cx, atomsCache)) ||
63550 !GetCallableProperty(cx, atomsCache->passUnion26_id, &callable)) {
63551 aRv.Throw(NS_ERROR_UNEXPECTED);
63552 return;
63553 }
63554 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63555 if (!JS::Call(cx, thisValue, callable,
63556 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63557 aRv.NoteJSContextException(cx);
63558 return;
63559 }
63560}
63561
63562void
63563TestJSImplInterfaceJSImpl::PassUnion27(const StringSequenceOrEventInit& arg, ErrorResult& aRv, JS::Realm* aRealm)
63564{
63565 CallSetup s(this, aRv, "TestJSImplInterface.passUnion27", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63566 if (aRv.Failed()) {
63567 return;
63568 }
63569 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63569); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63569; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63570 BindingCallContext& cx = s.GetCallContext();
63571
63572 JS::Rooted<JS::Value> rval(cx);
63573 JS::RootedVector<JS::Value> argv(cx);
63574 if (!argv.resize(1)) {
63575 // That threw an exception on the JSContext, and our CallSetup will do
63576 // the right thing with that.
63577 return;
63578 }
63579 unsigned argc = 1;
63580
63581 do {
63582 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63583 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63584 aRv.Throw(NS_ERROR_UNEXPECTED);
63585 return;
63586 }
63587 break;
63588 } while (false);
63589
63590 JS::Rooted<JS::Value> callable(cx);
63591 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63592 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63593 !InitIds(cx, atomsCache)) ||
63594 !GetCallableProperty(cx, atomsCache->passUnion27_id, &callable)) {
63595 aRv.Throw(NS_ERROR_UNEXPECTED);
63596 return;
63597 }
63598 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63599 if (!JS::Call(cx, thisValue, callable,
63600 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63601 aRv.NoteJSContextException(cx);
63602 return;
63603 }
63604}
63605
63606void
63607TestJSImplInterfaceJSImpl::PassUnion28(const EventInitOrStringSequence& arg, ErrorResult& aRv, JS::Realm* aRealm)
63608{
63609 CallSetup s(this, aRv, "TestJSImplInterface.passUnion28", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63610 if (aRv.Failed()) {
63611 return;
63612 }
63613 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63613); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63613; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63614 BindingCallContext& cx = s.GetCallContext();
63615
63616 JS::Rooted<JS::Value> rval(cx);
63617 JS::RootedVector<JS::Value> argv(cx);
63618 if (!argv.resize(1)) {
63619 // That threw an exception on the JSContext, and our CallSetup will do
63620 // the right thing with that.
63621 return;
63622 }
63623 unsigned argc = 1;
63624
63625 do {
63626 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63627 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63628 aRv.Throw(NS_ERROR_UNEXPECTED);
63629 return;
63630 }
63631 break;
63632 } while (false);
63633
63634 JS::Rooted<JS::Value> callable(cx);
63635 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63636 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63637 !InitIds(cx, atomsCache)) ||
63638 !GetCallableProperty(cx, atomsCache->passUnion28_id, &callable)) {
63639 aRv.Throw(NS_ERROR_UNEXPECTED);
63640 return;
63641 }
63642 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63643 if (!JS::Call(cx, thisValue, callable,
63644 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63645 aRv.NoteJSContextException(cx);
63646 return;
63647 }
63648}
63649
63650void
63651TestJSImplInterfaceJSImpl::PassUnionWithCallback(const EventHandlerNonNullOrNullOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63652{
63653 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithCallback", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63654 if (aRv.Failed()) {
63655 return;
63656 }
63657 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63657); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63657; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63658 BindingCallContext& cx = s.GetCallContext();
63659
63660 JS::Rooted<JS::Value> rval(cx);
63661 JS::RootedVector<JS::Value> argv(cx);
63662 if (!argv.resize(1)) {
63663 // That threw an exception on the JSContext, and our CallSetup will do
63664 // the right thing with that.
63665 return;
63666 }
63667 unsigned argc = 1;
63668
63669 do {
63670 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63671 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63672 aRv.Throw(NS_ERROR_UNEXPECTED);
63673 return;
63674 }
63675 break;
63676 } while (false);
63677
63678 JS::Rooted<JS::Value> callable(cx);
63679 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63680 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63681 !InitIds(cx, atomsCache)) ||
63682 !GetCallableProperty(cx, atomsCache->passUnionWithCallback_id, &callable)) {
63683 aRv.Throw(NS_ERROR_UNEXPECTED);
63684 return;
63685 }
63686 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63687 if (!JS::Call(cx, thisValue, callable,
63688 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63689 aRv.NoteJSContextException(cx);
63690 return;
63691 }
63692}
63693
63694void
63695TestJSImplInterfaceJSImpl::PassUnionWithByteString(const ByteStringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63696{
63697 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithByteString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63698 if (aRv.Failed()) {
63699 return;
63700 }
63701 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63701); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63701; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63702 BindingCallContext& cx = s.GetCallContext();
63703
63704 JS::Rooted<JS::Value> rval(cx);
63705 JS::RootedVector<JS::Value> argv(cx);
63706 if (!argv.resize(1)) {
63707 // That threw an exception on the JSContext, and our CallSetup will do
63708 // the right thing with that.
63709 return;
63710 }
63711 unsigned argc = 1;
63712
63713 do {
63714 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63715 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63716 aRv.Throw(NS_ERROR_UNEXPECTED);
63717 return;
63718 }
63719 break;
63720 } while (false);
63721
63722 JS::Rooted<JS::Value> callable(cx);
63723 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63724 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63725 !InitIds(cx, atomsCache)) ||
63726 !GetCallableProperty(cx, atomsCache->passUnionWithByteString_id, &callable)) {
63727 aRv.Throw(NS_ERROR_UNEXPECTED);
63728 return;
63729 }
63730 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63731 if (!JS::Call(cx, thisValue, callable,
63732 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63733 aRv.NoteJSContextException(cx);
63734 return;
63735 }
63736}
63737
63738void
63739TestJSImplInterfaceJSImpl::PassUnionWithUTF8String(const UTF8StringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63740{
63741 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithUTF8String", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63742 if (aRv.Failed()) {
63743 return;
63744 }
63745 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63745); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63745; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63746 BindingCallContext& cx = s.GetCallContext();
63747
63748 JS::Rooted<JS::Value> rval(cx);
63749 JS::RootedVector<JS::Value> argv(cx);
63750 if (!argv.resize(1)) {
63751 // That threw an exception on the JSContext, and our CallSetup will do
63752 // the right thing with that.
63753 return;
63754 }
63755 unsigned argc = 1;
63756
63757 do {
63758 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63759 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63760 aRv.Throw(NS_ERROR_UNEXPECTED);
63761 return;
63762 }
63763 break;
63764 } while (false);
63765
63766 JS::Rooted<JS::Value> callable(cx);
63767 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63768 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63769 !InitIds(cx, atomsCache)) ||
63770 !GetCallableProperty(cx, atomsCache->passUnionWithUTF8String_id, &callable)) {
63771 aRv.Throw(NS_ERROR_UNEXPECTED);
63772 return;
63773 }
63774 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63775 if (!JS::Call(cx, thisValue, callable,
63776 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63777 aRv.NoteJSContextException(cx);
63778 return;
63779 }
63780}
63781
63782void
63783TestJSImplInterfaceJSImpl::PassUnionWithRecord(const StringStringRecordOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
63784{
63785 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63786 if (aRv.Failed()) {
63787 return;
63788 }
63789 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63789); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63789; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63790 BindingCallContext& cx = s.GetCallContext();
63791
63792 JS::Rooted<JS::Value> rval(cx);
63793 JS::RootedVector<JS::Value> argv(cx);
63794 if (!argv.resize(1)) {
63795 // That threw an exception on the JSContext, and our CallSetup will do
63796 // the right thing with that.
63797 return;
63798 }
63799 unsigned argc = 1;
63800
63801 do {
63802 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63803 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63804 aRv.Throw(NS_ERROR_UNEXPECTED);
63805 return;
63806 }
63807 break;
63808 } while (false);
63809
63810 JS::Rooted<JS::Value> callable(cx);
63811 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63812 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63813 !InitIds(cx, atomsCache)) ||
63814 !GetCallableProperty(cx, atomsCache->passUnionWithRecord_id, &callable)) {
63815 aRv.Throw(NS_ERROR_UNEXPECTED);
63816 return;
63817 }
63818 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63819 if (!JS::Call(cx, thisValue, callable,
63820 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63821 aRv.NoteJSContextException(cx);
63822 return;
63823 }
63824}
63825
63826void
63827TestJSImplInterfaceJSImpl::PassUnionWithRecordAndSequence(const StringStringRecordOrStringSequence& arg, ErrorResult& aRv, JS::Realm* aRealm)
63828{
63829 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithRecordAndSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63830 if (aRv.Failed()) {
63831 return;
63832 }
63833 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63833); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63833; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63834 BindingCallContext& cx = s.GetCallContext();
63835
63836 JS::Rooted<JS::Value> rval(cx);
63837 JS::RootedVector<JS::Value> argv(cx);
63838 if (!argv.resize(1)) {
63839 // That threw an exception on the JSContext, and our CallSetup will do
63840 // the right thing with that.
63841 return;
63842 }
63843 unsigned argc = 1;
63844
63845 do {
63846 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63847 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63848 aRv.Throw(NS_ERROR_UNEXPECTED);
63849 return;
63850 }
63851 break;
63852 } while (false);
63853
63854 JS::Rooted<JS::Value> callable(cx);
63855 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63856 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63857 !InitIds(cx, atomsCache)) ||
63858 !GetCallableProperty(cx, atomsCache->passUnionWithRecordAndSequence_id, &callable)) {
63859 aRv.Throw(NS_ERROR_UNEXPECTED);
63860 return;
63861 }
63862 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63863 if (!JS::Call(cx, thisValue, callable,
63864 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63865 aRv.NoteJSContextException(cx);
63866 return;
63867 }
63868}
63869
63870void
63871TestJSImplInterfaceJSImpl::PassUnionWithSequenceAndRecord(const StringSequenceOrStringStringRecord& arg, ErrorResult& aRv, JS::Realm* aRealm)
63872{
63873 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithSequenceAndRecord", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63874 if (aRv.Failed()) {
63875 return;
63876 }
63877 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63877); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63877; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63878 BindingCallContext& cx = s.GetCallContext();
63879
63880 JS::Rooted<JS::Value> rval(cx);
63881 JS::RootedVector<JS::Value> argv(cx);
63882 if (!argv.resize(1)) {
63883 // That threw an exception on the JSContext, and our CallSetup will do
63884 // the right thing with that.
63885 return;
63886 }
63887 unsigned argc = 1;
63888
63889 do {
63890 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63891 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63892 aRv.Throw(NS_ERROR_UNEXPECTED);
63893 return;
63894 }
63895 break;
63896 } while (false);
63897
63898 JS::Rooted<JS::Value> callable(cx);
63899 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63900 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63901 !InitIds(cx, atomsCache)) ||
63902 !GetCallableProperty(cx, atomsCache->passUnionWithSequenceAndRecord_id, &callable)) {
63903 aRv.Throw(NS_ERROR_UNEXPECTED);
63904 return;
63905 }
63906 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63907 if (!JS::Call(cx, thisValue, callable,
63908 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63909 aRv.NoteJSContextException(cx);
63910 return;
63911 }
63912}
63913
63914void
63915TestJSImplInterfaceJSImpl::PassUnionWithSVS(const USVStringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63916{
63917 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithSVS", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63918 if (aRv.Failed()) {
63919 return;
63920 }
63921 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63921); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63921; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63922 BindingCallContext& cx = s.GetCallContext();
63923
63924 JS::Rooted<JS::Value> rval(cx);
63925 JS::RootedVector<JS::Value> argv(cx);
63926 if (!argv.resize(1)) {
63927 // That threw an exception on the JSContext, and our CallSetup will do
63928 // the right thing with that.
63929 return;
63930 }
63931 unsigned argc = 1;
63932
63933 do {
63934 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63935 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63936 aRv.Throw(NS_ERROR_UNEXPECTED);
63937 return;
63938 }
63939 break;
63940 } while (false);
63941
63942 JS::Rooted<JS::Value> callable(cx);
63943 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63944 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63945 !InitIds(cx, atomsCache)) ||
63946 !GetCallableProperty(cx, atomsCache->passUnionWithSVS_id, &callable)) {
63947 aRv.Throw(NS_ERROR_UNEXPECTED);
63948 return;
63949 }
63950 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63951 if (!JS::Call(cx, thisValue, callable,
63952 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63953 aRv.NoteJSContextException(cx);
63954 return;
63955 }
63956}
63957
63958void
63959TestJSImplInterfaceJSImpl::PassUnionWithNullable(const ObjectOrNullOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
63960{
63961 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithNullable", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
63962 if (aRv.Failed()) {
63963 return;
63964 }
63965 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 63965); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 63965; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
63966 BindingCallContext& cx = s.GetCallContext();
63967
63968 JS::Rooted<JS::Value> rval(cx);
63969 JS::RootedVector<JS::Value> argv(cx);
63970 if (!argv.resize(1)) {
63971 // That threw an exception on the JSContext, and our CallSetup will do
63972 // the right thing with that.
63973 return;
63974 }
63975 unsigned argc = 1;
63976
63977 do {
63978 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
63979 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
63980 aRv.Throw(NS_ERROR_UNEXPECTED);
63981 return;
63982 }
63983 break;
63984 } while (false);
63985
63986 JS::Rooted<JS::Value> callable(cx);
63987 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
63988 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
63989 !InitIds(cx, atomsCache)) ||
63990 !GetCallableProperty(cx, atomsCache->passUnionWithNullable_id, &callable)) {
63991 aRv.Throw(NS_ERROR_UNEXPECTED);
63992 return;
63993 }
63994 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
63995 if (!JS::Call(cx, thisValue, callable,
63996 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
63997 aRv.NoteJSContextException(cx);
63998 return;
63999 }
64000}
64001
64002void
64003TestJSImplInterfaceJSImpl::PassNullableUnion(const Nullable<ObjectOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
64004{
64005 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnion", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64006 if (aRv.Failed()) {
64007 return;
64008 }
64009 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64009); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64009; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64010 BindingCallContext& cx = s.GetCallContext();
64011
64012 JS::Rooted<JS::Value> rval(cx);
64013 JS::RootedVector<JS::Value> argv(cx);
64014 if (!argv.resize(1)) {
64015 // That threw an exception on the JSContext, and our CallSetup will do
64016 // the right thing with that.
64017 return;
64018 }
64019 unsigned argc = 1;
64020
64021 do {
64022 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64023 if (arg.IsNull()) {
64024 argv[0].setNull();
64025 break;
64026 }
64027 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
64028 aRv.Throw(NS_ERROR_UNEXPECTED);
64029 return;
64030 }
64031 break;
64032 } while (false);
64033
64034 JS::Rooted<JS::Value> callable(cx);
64035 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64036 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64037 !InitIds(cx, atomsCache)) ||
64038 !GetCallableProperty(cx, atomsCache->passNullableUnion_id, &callable)) {
64039 aRv.Throw(NS_ERROR_UNEXPECTED);
64040 return;
64041 }
64042 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64043 if (!JS::Call(cx, thisValue, callable,
64044 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64045 aRv.NoteJSContextException(cx);
64046 return;
64047 }
64048}
64049
64050void
64051TestJSImplInterfaceJSImpl::PassOptionalUnion(const Optional<ObjectOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
64052{
64053 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalUnion", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64054 if (aRv.Failed()) {
64055 return;
64056 }
64057 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64057); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64057; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64058 BindingCallContext& cx = s.GetCallContext();
64059
64060 JS::Rooted<JS::Value> rval(cx);
64061 JS::RootedVector<JS::Value> argv(cx);
64062 if (!argv.resize(1)) {
64063 // That threw an exception on the JSContext, and our CallSetup will do
64064 // the right thing with that.
64065 return;
64066 }
64067 unsigned argc = 1;
64068
64069 do {
64070 if (arg.WasPassed()) {
64071 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64072 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
64073 aRv.Throw(NS_ERROR_UNEXPECTED);
64074 return;
64075 }
64076 break;
64077 } else if (argc == 1) {
64078 // This is our current trailing argument; reduce argc
64079 --argc;
64080 } else {
64081 argv[0].setUndefined();
64082 }
64083 } while (false);
64084
64085 JS::Rooted<JS::Value> callable(cx);
64086 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64087 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64088 !InitIds(cx, atomsCache)) ||
64089 !GetCallableProperty(cx, atomsCache->passOptionalUnion_id, &callable)) {
64090 aRv.Throw(NS_ERROR_UNEXPECTED);
64091 return;
64092 }
64093 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64094 if (!JS::Call(cx, thisValue, callable,
64095 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64096 aRv.NoteJSContextException(cx);
64097 return;
64098 }
64099}
64100
64101void
64102TestJSImplInterfaceJSImpl::PassOptionalNullableUnion(const Optional<Nullable<ObjectOrLong>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
64103{
64104 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableUnion", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64105 if (aRv.Failed()) {
64106 return;
64107 }
64108 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64108); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64108; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64109 BindingCallContext& cx = s.GetCallContext();
64110
64111 JS::Rooted<JS::Value> rval(cx);
64112 JS::RootedVector<JS::Value> argv(cx);
64113 if (!argv.resize(1)) {
64114 // That threw an exception on the JSContext, and our CallSetup will do
64115 // the right thing with that.
64116 return;
64117 }
64118 unsigned argc = 1;
64119
64120 do {
64121 if (arg.WasPassed()) {
64122 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64123 if (arg.Value().IsNull()) {
64124 argv[0].setNull();
64125 break;
64126 }
64127 if (!arg.Value().Value().ToJSVal(cx, callbackObj, argv[0])) {
64128 aRv.Throw(NS_ERROR_UNEXPECTED);
64129 return;
64130 }
64131 break;
64132 } else if (argc == 1) {
64133 // This is our current trailing argument; reduce argc
64134 --argc;
64135 } else {
64136 argv[0].setUndefined();
64137 }
64138 } while (false);
64139
64140 JS::Rooted<JS::Value> callable(cx);
64141 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64142 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64143 !InitIds(cx, atomsCache)) ||
64144 !GetCallableProperty(cx, atomsCache->passOptionalNullableUnion_id, &callable)) {
64145 aRv.Throw(NS_ERROR_UNEXPECTED);
64146 return;
64147 }
64148 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64149 if (!JS::Call(cx, thisValue, callable,
64150 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64151 aRv.NoteJSContextException(cx);
64152 return;
64153 }
64154}
64155
64156void
64157TestJSImplInterfaceJSImpl::PassOptionalNullableUnionWithDefaultValue(const Nullable<ObjectOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
64158{
64159 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalNullableUnionWithDefaultValue", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64160 if (aRv.Failed()) {
64161 return;
64162 }
64163 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64163); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64163; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64164 BindingCallContext& cx = s.GetCallContext();
64165
64166 JS::Rooted<JS::Value> rval(cx);
64167 JS::RootedVector<JS::Value> argv(cx);
64168 if (!argv.resize(1)) {
64169 // That threw an exception on the JSContext, and our CallSetup will do
64170 // the right thing with that.
64171 return;
64172 }
64173 unsigned argc = 1;
64174
64175 do {
64176 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64177 if (arg.IsNull()) {
64178 argv[0].setNull();
64179 break;
64180 }
64181 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
64182 aRv.Throw(NS_ERROR_UNEXPECTED);
64183 return;
64184 }
64185 break;
64186 } while (false);
64187
64188 JS::Rooted<JS::Value> callable(cx);
64189 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64190 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64191 !InitIds(cx, atomsCache)) ||
64192 !GetCallableProperty(cx, atomsCache->passOptionalNullableUnionWithDefaultValue_id, &callable)) {
64193 aRv.Throw(NS_ERROR_UNEXPECTED);
64194 return;
64195 }
64196 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64197 if (!JS::Call(cx, thisValue, callable,
64198 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64199 aRv.NoteJSContextException(cx);
64200 return;
64201 }
64202}
64203
64204void
64205TestJSImplInterfaceJSImpl::PassUnionWithArrayBuffer(const UTF8StringOrArrayBuffer& arg, ErrorResult& aRv, JS::Realm* aRealm)
64206{
64207 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithArrayBuffer", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64208 if (aRv.Failed()) {
64209 return;
64210 }
64211 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64211); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64211; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64212 BindingCallContext& cx = s.GetCallContext();
64213
64214 JS::Rooted<JS::Value> rval(cx);
64215 JS::RootedVector<JS::Value> argv(cx);
64216 if (!argv.resize(1)) {
64217 // That threw an exception on the JSContext, and our CallSetup will do
64218 // the right thing with that.
64219 return;
64220 }
64221 unsigned argc = 1;
64222
64223 do {
64224 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64225 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64226 aRv.Throw(NS_ERROR_UNEXPECTED);
64227 return;
64228 }
64229 break;
64230 } while (false);
64231
64232 JS::Rooted<JS::Value> callable(cx);
64233 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64234 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64235 !InitIds(cx, atomsCache)) ||
64236 !GetCallableProperty(cx, atomsCache->passUnionWithArrayBuffer_id, &callable)) {
64237 aRv.Throw(NS_ERROR_UNEXPECTED);
64238 return;
64239 }
64240 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64241 if (!JS::Call(cx, thisValue, callable,
64242 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64243 aRv.NoteJSContextException(cx);
64244 return;
64245 }
64246}
64247
64248void
64249TestJSImplInterfaceJSImpl::PassUnionWithArrayBufferOrNull(const UTF8StringOrArrayBufferOrNull& arg, ErrorResult& aRv, JS::Realm* aRealm)
64250{
64251 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithArrayBufferOrNull", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64252 if (aRv.Failed()) {
64253 return;
64254 }
64255 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64255); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64255; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64256 BindingCallContext& cx = s.GetCallContext();
64257
64258 JS::Rooted<JS::Value> rval(cx);
64259 JS::RootedVector<JS::Value> argv(cx);
64260 if (!argv.resize(1)) {
64261 // That threw an exception on the JSContext, and our CallSetup will do
64262 // the right thing with that.
64263 return;
64264 }
64265 unsigned argc = 1;
64266
64267 do {
64268 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64269 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64270 aRv.Throw(NS_ERROR_UNEXPECTED);
64271 return;
64272 }
64273 break;
64274 } while (false);
64275
64276 JS::Rooted<JS::Value> callable(cx);
64277 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64278 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64279 !InitIds(cx, atomsCache)) ||
64280 !GetCallableProperty(cx, atomsCache->passUnionWithArrayBufferOrNull_id, &callable)) {
64281 aRv.Throw(NS_ERROR_UNEXPECTED);
64282 return;
64283 }
64284 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64285 if (!JS::Call(cx, thisValue, callable,
64286 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64287 aRv.NoteJSContextException(cx);
64288 return;
64289 }
64290}
64291
64292void
64293TestJSImplInterfaceJSImpl::PassUnionWithTypedArrays(const ArrayBufferViewOrArrayBuffer& arg, ErrorResult& aRv, JS::Realm* aRealm)
64294{
64295 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithTypedArrays", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64296 if (aRv.Failed()) {
64297 return;
64298 }
64299 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64299); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64299; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64300 BindingCallContext& cx = s.GetCallContext();
64301
64302 JS::Rooted<JS::Value> rval(cx);
64303 JS::RootedVector<JS::Value> argv(cx);
64304 if (!argv.resize(1)) {
64305 // That threw an exception on the JSContext, and our CallSetup will do
64306 // the right thing with that.
64307 return;
64308 }
64309 unsigned argc = 1;
64310
64311 do {
64312 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64313 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64314 aRv.Throw(NS_ERROR_UNEXPECTED);
64315 return;
64316 }
64317 break;
64318 } while (false);
64319
64320 JS::Rooted<JS::Value> callable(cx);
64321 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64322 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64323 !InitIds(cx, atomsCache)) ||
64324 !GetCallableProperty(cx, atomsCache->passUnionWithTypedArrays_id, &callable)) {
64325 aRv.Throw(NS_ERROR_UNEXPECTED);
64326 return;
64327 }
64328 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64329 if (!JS::Call(cx, thisValue, callable,
64330 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64331 aRv.NoteJSContextException(cx);
64332 return;
64333 }
64334}
64335
64336void
64337TestJSImplInterfaceJSImpl::PassUnionWithTypedArraysOrNull(const ArrayBufferViewOrArrayBufferOrNull& arg, ErrorResult& aRv, JS::Realm* aRealm)
64338{
64339 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithTypedArraysOrNull", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64340 if (aRv.Failed()) {
64341 return;
64342 }
64343 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64343); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64343; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64344 BindingCallContext& cx = s.GetCallContext();
64345
64346 JS::Rooted<JS::Value> rval(cx);
64347 JS::RootedVector<JS::Value> argv(cx);
64348 if (!argv.resize(1)) {
64349 // That threw an exception on the JSContext, and our CallSetup will do
64350 // the right thing with that.
64351 return;
64352 }
64353 unsigned argc = 1;
64354
64355 do {
64356 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64357 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64358 aRv.Throw(NS_ERROR_UNEXPECTED);
64359 return;
64360 }
64361 break;
64362 } while (false);
64363
64364 JS::Rooted<JS::Value> callable(cx);
64365 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64366 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64367 !InitIds(cx, atomsCache)) ||
64368 !GetCallableProperty(cx, atomsCache->passUnionWithTypedArraysOrNull_id, &callable)) {
64369 aRv.Throw(NS_ERROR_UNEXPECTED);
64370 return;
64371 }
64372 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64373 if (!JS::Call(cx, thisValue, callable,
64374 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64375 aRv.NoteJSContextException(cx);
64376 return;
64377 }
64378}
64379
64380void
64381TestJSImplInterfaceJSImpl::PassUnionWithString(const StringOrObject& arg, ErrorResult& aRv, JS::Realm* aRealm)
64382{
64383 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithString", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64384 if (aRv.Failed()) {
64385 return;
64386 }
64387 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64387); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64387; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64388 BindingCallContext& cx = s.GetCallContext();
64389
64390 JS::Rooted<JS::Value> rval(cx);
64391 JS::RootedVector<JS::Value> argv(cx);
64392 if (!argv.resize(1)) {
64393 // That threw an exception on the JSContext, and our CallSetup will do
64394 // the right thing with that.
64395 return;
64396 }
64397 unsigned argc = 1;
64398
64399 do {
64400 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64401 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64402 aRv.Throw(NS_ERROR_UNEXPECTED);
64403 return;
64404 }
64405 break;
64406 } while (false);
64407
64408 JS::Rooted<JS::Value> callable(cx);
64409 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64410 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64411 !InitIds(cx, atomsCache)) ||
64412 !GetCallableProperty(cx, atomsCache->passUnionWithString_id, &callable)) {
64413 aRv.Throw(NS_ERROR_UNEXPECTED);
64414 return;
64415 }
64416 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64417 if (!JS::Call(cx, thisValue, callable,
64418 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64419 aRv.NoteJSContextException(cx);
64420 return;
64421 }
64422}
64423
64424void
64425TestJSImplInterfaceJSImpl::PassUnionWithEnum(const SupportedTypeOrObject& arg, ErrorResult& aRv, JS::Realm* aRealm)
64426{
64427 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithEnum", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64428 if (aRv.Failed()) {
64429 return;
64430 }
64431 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64431); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64431; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64432 BindingCallContext& cx = s.GetCallContext();
64433
64434 JS::Rooted<JS::Value> rval(cx);
64435 JS::RootedVector<JS::Value> argv(cx);
64436 if (!argv.resize(1)) {
64437 // That threw an exception on the JSContext, and our CallSetup will do
64438 // the right thing with that.
64439 return;
64440 }
64441 unsigned argc = 1;
64442
64443 do {
64444 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64445 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64446 aRv.Throw(NS_ERROR_UNEXPECTED);
64447 return;
64448 }
64449 break;
64450 } while (false);
64451
64452 JS::Rooted<JS::Value> callable(cx);
64453 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64454 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64455 !InitIds(cx, atomsCache)) ||
64456 !GetCallableProperty(cx, atomsCache->passUnionWithEnum_id, &callable)) {
64457 aRv.Throw(NS_ERROR_UNEXPECTED);
64458 return;
64459 }
64460 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64461 if (!JS::Call(cx, thisValue, callable,
64462 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64463 aRv.NoteJSContextException(cx);
64464 return;
64465 }
64466}
64467
64468void
64469TestJSImplInterfaceJSImpl::PassUnionWithObject(const ObjectOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
64470{
64471 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithObject", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64472 if (aRv.Failed()) {
64473 return;
64474 }
64475 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64475); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64475; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64476 BindingCallContext& cx = s.GetCallContext();
64477
64478 JS::Rooted<JS::Value> rval(cx);
64479 JS::RootedVector<JS::Value> argv(cx);
64480 if (!argv.resize(1)) {
64481 // That threw an exception on the JSContext, and our CallSetup will do
64482 // the right thing with that.
64483 return;
64484 }
64485 unsigned argc = 1;
64486
64487 do {
64488 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64489 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64490 aRv.Throw(NS_ERROR_UNEXPECTED);
64491 return;
64492 }
64493 break;
64494 } while (false);
64495
64496 JS::Rooted<JS::Value> callable(cx);
64497 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64498 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64499 !InitIds(cx, atomsCache)) ||
64500 !GetCallableProperty(cx, atomsCache->passUnionWithObject_id, &callable)) {
64501 aRv.Throw(NS_ERROR_UNEXPECTED);
64502 return;
64503 }
64504 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64505 if (!JS::Call(cx, thisValue, callable,
64506 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64507 aRv.NoteJSContextException(cx);
64508 return;
64509 }
64510}
64511
64512void
64513TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue1(const DoubleOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
64514{
64515 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue1", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64516 if (aRv.Failed()) {
64517 return;
64518 }
64519 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64519); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64519; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64520 BindingCallContext& cx = s.GetCallContext();
64521
64522 JS::Rooted<JS::Value> rval(cx);
64523 JS::RootedVector<JS::Value> argv(cx);
64524 if (!argv.resize(1)) {
64525 // That threw an exception on the JSContext, and our CallSetup will do
64526 // the right thing with that.
64527 return;
64528 }
64529 unsigned argc = 1;
64530
64531 do {
64532 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64533 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64534 aRv.Throw(NS_ERROR_UNEXPECTED);
64535 return;
64536 }
64537 break;
64538 } while (false);
64539
64540 JS::Rooted<JS::Value> callable(cx);
64541 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64542 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64543 !InitIds(cx, atomsCache)) ||
64544 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue1_id, &callable)) {
64545 aRv.Throw(NS_ERROR_UNEXPECTED);
64546 return;
64547 }
64548 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64549 if (!JS::Call(cx, thisValue, callable,
64550 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64551 aRv.NoteJSContextException(cx);
64552 return;
64553 }
64554}
64555
64556void
64557TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue2(const DoubleOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
64558{
64559 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64560 if (aRv.Failed()) {
64561 return;
64562 }
64563 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64563); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64563; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64564 BindingCallContext& cx = s.GetCallContext();
64565
64566 JS::Rooted<JS::Value> rval(cx);
64567 JS::RootedVector<JS::Value> argv(cx);
64568 if (!argv.resize(1)) {
64569 // That threw an exception on the JSContext, and our CallSetup will do
64570 // the right thing with that.
64571 return;
64572 }
64573 unsigned argc = 1;
64574
64575 do {
64576 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64577 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64578 aRv.Throw(NS_ERROR_UNEXPECTED);
64579 return;
64580 }
64581 break;
64582 } while (false);
64583
64584 JS::Rooted<JS::Value> callable(cx);
64585 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64586 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64587 !InitIds(cx, atomsCache)) ||
64588 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue2_id, &callable)) {
64589 aRv.Throw(NS_ERROR_UNEXPECTED);
64590 return;
64591 }
64592 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64593 if (!JS::Call(cx, thisValue, callable,
64594 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64595 aRv.NoteJSContextException(cx);
64596 return;
64597 }
64598}
64599
64600void
64601TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue3(const DoubleOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
64602{
64603 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue3", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64604 if (aRv.Failed()) {
64605 return;
64606 }
64607 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64607); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64607; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64608 BindingCallContext& cx = s.GetCallContext();
64609
64610 JS::Rooted<JS::Value> rval(cx);
64611 JS::RootedVector<JS::Value> argv(cx);
64612 if (!argv.resize(1)) {
64613 // That threw an exception on the JSContext, and our CallSetup will do
64614 // the right thing with that.
64615 return;
64616 }
64617 unsigned argc = 1;
64618
64619 do {
64620 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64621 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64622 aRv.Throw(NS_ERROR_UNEXPECTED);
64623 return;
64624 }
64625 break;
64626 } while (false);
64627
64628 JS::Rooted<JS::Value> callable(cx);
64629 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64630 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64631 !InitIds(cx, atomsCache)) ||
64632 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue3_id, &callable)) {
64633 aRv.Throw(NS_ERROR_UNEXPECTED);
64634 return;
64635 }
64636 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64637 if (!JS::Call(cx, thisValue, callable,
64638 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64639 aRv.NoteJSContextException(cx);
64640 return;
64641 }
64642}
64643
64644void
64645TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue4(const FloatOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
64646{
64647 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue4", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64648 if (aRv.Failed()) {
64649 return;
64650 }
64651 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64651); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64651; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64652 BindingCallContext& cx = s.GetCallContext();
64653
64654 JS::Rooted<JS::Value> rval(cx);
64655 JS::RootedVector<JS::Value> argv(cx);
64656 if (!argv.resize(1)) {
64657 // That threw an exception on the JSContext, and our CallSetup will do
64658 // the right thing with that.
64659 return;
64660 }
64661 unsigned argc = 1;
64662
64663 do {
64664 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64665 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64666 aRv.Throw(NS_ERROR_UNEXPECTED);
64667 return;
64668 }
64669 break;
64670 } while (false);
64671
64672 JS::Rooted<JS::Value> callable(cx);
64673 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64674 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64675 !InitIds(cx, atomsCache)) ||
64676 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue4_id, &callable)) {
64677 aRv.Throw(NS_ERROR_UNEXPECTED);
64678 return;
64679 }
64680 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64681 if (!JS::Call(cx, thisValue, callable,
64682 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64683 aRv.NoteJSContextException(cx);
64684 return;
64685 }
64686}
64687
64688void
64689TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue5(const FloatOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
64690{
64691 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue5", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64692 if (aRv.Failed()) {
64693 return;
64694 }
64695 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64695); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64695; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64696 BindingCallContext& cx = s.GetCallContext();
64697
64698 JS::Rooted<JS::Value> rval(cx);
64699 JS::RootedVector<JS::Value> argv(cx);
64700 if (!argv.resize(1)) {
64701 // That threw an exception on the JSContext, and our CallSetup will do
64702 // the right thing with that.
64703 return;
64704 }
64705 unsigned argc = 1;
64706
64707 do {
64708 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64709 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64710 aRv.Throw(NS_ERROR_UNEXPECTED);
64711 return;
64712 }
64713 break;
64714 } while (false);
64715
64716 JS::Rooted<JS::Value> callable(cx);
64717 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64718 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64719 !InitIds(cx, atomsCache)) ||
64720 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue5_id, &callable)) {
64721 aRv.Throw(NS_ERROR_UNEXPECTED);
64722 return;
64723 }
64724 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64725 if (!JS::Call(cx, thisValue, callable,
64726 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64727 aRv.NoteJSContextException(cx);
64728 return;
64729 }
64730}
64731
64732void
64733TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue6(const FloatOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
64734{
64735 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue6", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64736 if (aRv.Failed()) {
64737 return;
64738 }
64739 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64739); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64739; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64740 BindingCallContext& cx = s.GetCallContext();
64741
64742 JS::Rooted<JS::Value> rval(cx);
64743 JS::RootedVector<JS::Value> argv(cx);
64744 if (!argv.resize(1)) {
64745 // That threw an exception on the JSContext, and our CallSetup will do
64746 // the right thing with that.
64747 return;
64748 }
64749 unsigned argc = 1;
64750
64751 do {
64752 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64753 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64754 aRv.Throw(NS_ERROR_UNEXPECTED);
64755 return;
64756 }
64757 break;
64758 } while (false);
64759
64760 JS::Rooted<JS::Value> callable(cx);
64761 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64762 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64763 !InitIds(cx, atomsCache)) ||
64764 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue6_id, &callable)) {
64765 aRv.Throw(NS_ERROR_UNEXPECTED);
64766 return;
64767 }
64768 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64769 if (!JS::Call(cx, thisValue, callable,
64770 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64771 aRv.NoteJSContextException(cx);
64772 return;
64773 }
64774}
64775
64776void
64777TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue7(const UnrestrictedDoubleOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
64778{
64779 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue7", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64780 if (aRv.Failed()) {
64781 return;
64782 }
64783 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64783); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64783; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64784 BindingCallContext& cx = s.GetCallContext();
64785
64786 JS::Rooted<JS::Value> rval(cx);
64787 JS::RootedVector<JS::Value> argv(cx);
64788 if (!argv.resize(1)) {
64789 // That threw an exception on the JSContext, and our CallSetup will do
64790 // the right thing with that.
64791 return;
64792 }
64793 unsigned argc = 1;
64794
64795 do {
64796 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64797 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64798 aRv.Throw(NS_ERROR_UNEXPECTED);
64799 return;
64800 }
64801 break;
64802 } while (false);
64803
64804 JS::Rooted<JS::Value> callable(cx);
64805 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64806 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64807 !InitIds(cx, atomsCache)) ||
64808 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue7_id, &callable)) {
64809 aRv.Throw(NS_ERROR_UNEXPECTED);
64810 return;
64811 }
64812 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64813 if (!JS::Call(cx, thisValue, callable,
64814 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64815 aRv.NoteJSContextException(cx);
64816 return;
64817 }
64818}
64819
64820void
64821TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue8(const UnrestrictedDoubleOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
64822{
64823 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue8", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64824 if (aRv.Failed()) {
64825 return;
64826 }
64827 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64827); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64827; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64828 BindingCallContext& cx = s.GetCallContext();
64829
64830 JS::Rooted<JS::Value> rval(cx);
64831 JS::RootedVector<JS::Value> argv(cx);
64832 if (!argv.resize(1)) {
64833 // That threw an exception on the JSContext, and our CallSetup will do
64834 // the right thing with that.
64835 return;
64836 }
64837 unsigned argc = 1;
64838
64839 do {
64840 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64841 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64842 aRv.Throw(NS_ERROR_UNEXPECTED);
64843 return;
64844 }
64845 break;
64846 } while (false);
64847
64848 JS::Rooted<JS::Value> callable(cx);
64849 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64850 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64851 !InitIds(cx, atomsCache)) ||
64852 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue8_id, &callable)) {
64853 aRv.Throw(NS_ERROR_UNEXPECTED);
64854 return;
64855 }
64856 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64857 if (!JS::Call(cx, thisValue, callable,
64858 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64859 aRv.NoteJSContextException(cx);
64860 return;
64861 }
64862}
64863
64864void
64865TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue9(const UnrestrictedDoubleOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
64866{
64867 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue9", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64868 if (aRv.Failed()) {
64869 return;
64870 }
64871 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64871); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64871; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64872 BindingCallContext& cx = s.GetCallContext();
64873
64874 JS::Rooted<JS::Value> rval(cx);
64875 JS::RootedVector<JS::Value> argv(cx);
64876 if (!argv.resize(1)) {
64877 // That threw an exception on the JSContext, and our CallSetup will do
64878 // the right thing with that.
64879 return;
64880 }
64881 unsigned argc = 1;
64882
64883 do {
64884 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64885 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64886 aRv.Throw(NS_ERROR_UNEXPECTED);
64887 return;
64888 }
64889 break;
64890 } while (false);
64891
64892 JS::Rooted<JS::Value> callable(cx);
64893 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64894 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64895 !InitIds(cx, atomsCache)) ||
64896 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue9_id, &callable)) {
64897 aRv.Throw(NS_ERROR_UNEXPECTED);
64898 return;
64899 }
64900 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64901 if (!JS::Call(cx, thisValue, callable,
64902 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64903 aRv.NoteJSContextException(cx);
64904 return;
64905 }
64906}
64907
64908void
64909TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue10(const UnrestrictedDoubleOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
64910{
64911 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue10", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64912 if (aRv.Failed()) {
64913 return;
64914 }
64915 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64915); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64915; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64916 BindingCallContext& cx = s.GetCallContext();
64917
64918 JS::Rooted<JS::Value> rval(cx);
64919 JS::RootedVector<JS::Value> argv(cx);
64920 if (!argv.resize(1)) {
64921 // That threw an exception on the JSContext, and our CallSetup will do
64922 // the right thing with that.
64923 return;
64924 }
64925 unsigned argc = 1;
64926
64927 do {
64928 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64929 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64930 aRv.Throw(NS_ERROR_UNEXPECTED);
64931 return;
64932 }
64933 break;
64934 } while (false);
64935
64936 JS::Rooted<JS::Value> callable(cx);
64937 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64938 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64939 !InitIds(cx, atomsCache)) ||
64940 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue10_id, &callable)) {
64941 aRv.Throw(NS_ERROR_UNEXPECTED);
64942 return;
64943 }
64944 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64945 if (!JS::Call(cx, thisValue, callable,
64946 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64947 aRv.NoteJSContextException(cx);
64948 return;
64949 }
64950}
64951
64952void
64953TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue11(const UnrestrictedFloatOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
64954{
64955 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue11", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
64956 if (aRv.Failed()) {
64957 return;
64958 }
64959 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 64959); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 64959; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
64960 BindingCallContext& cx = s.GetCallContext();
64961
64962 JS::Rooted<JS::Value> rval(cx);
64963 JS::RootedVector<JS::Value> argv(cx);
64964 if (!argv.resize(1)) {
64965 // That threw an exception on the JSContext, and our CallSetup will do
64966 // the right thing with that.
64967 return;
64968 }
64969 unsigned argc = 1;
64970
64971 do {
64972 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
64973 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
64974 aRv.Throw(NS_ERROR_UNEXPECTED);
64975 return;
64976 }
64977 break;
64978 } while (false);
64979
64980 JS::Rooted<JS::Value> callable(cx);
64981 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
64982 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
64983 !InitIds(cx, atomsCache)) ||
64984 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue11_id, &callable)) {
64985 aRv.Throw(NS_ERROR_UNEXPECTED);
64986 return;
64987 }
64988 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
64989 if (!JS::Call(cx, thisValue, callable,
64990 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
64991 aRv.NoteJSContextException(cx);
64992 return;
64993 }
64994}
64995
64996void
64997TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue12(const UnrestrictedFloatOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
64998{
64999 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue12", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65000 if (aRv.Failed()) {
65001 return;
65002 }
65003 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65003); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65003; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65004 BindingCallContext& cx = s.GetCallContext();
65005
65006 JS::Rooted<JS::Value> rval(cx);
65007 JS::RootedVector<JS::Value> argv(cx);
65008 if (!argv.resize(1)) {
65009 // That threw an exception on the JSContext, and our CallSetup will do
65010 // the right thing with that.
65011 return;
65012 }
65013 unsigned argc = 1;
65014
65015 do {
65016 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65017 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
65018 aRv.Throw(NS_ERROR_UNEXPECTED);
65019 return;
65020 }
65021 break;
65022 } while (false);
65023
65024 JS::Rooted<JS::Value> callable(cx);
65025 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65026 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65027 !InitIds(cx, atomsCache)) ||
65028 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue12_id, &callable)) {
65029 aRv.Throw(NS_ERROR_UNEXPECTED);
65030 return;
65031 }
65032 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65033 if (!JS::Call(cx, thisValue, callable,
65034 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65035 aRv.NoteJSContextException(cx);
65036 return;
65037 }
65038}
65039
65040void
65041TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue13(const UnrestrictedFloatOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
65042{
65043 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue13", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65044 if (aRv.Failed()) {
65045 return;
65046 }
65047 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65047); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65047; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65048 BindingCallContext& cx = s.GetCallContext();
65049
65050 JS::Rooted<JS::Value> rval(cx);
65051 JS::RootedVector<JS::Value> argv(cx);
65052 if (!argv.resize(1)) {
65053 // That threw an exception on the JSContext, and our CallSetup will do
65054 // the right thing with that.
65055 return;
65056 }
65057 unsigned argc = 1;
65058
65059 do {
65060 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65061 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
65062 aRv.Throw(NS_ERROR_UNEXPECTED);
65063 return;
65064 }
65065 break;
65066 } while (false);
65067
65068 JS::Rooted<JS::Value> callable(cx);
65069 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65070 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65071 !InitIds(cx, atomsCache)) ||
65072 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue13_id, &callable)) {
65073 aRv.Throw(NS_ERROR_UNEXPECTED);
65074 return;
65075 }
65076 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65077 if (!JS::Call(cx, thisValue, callable,
65078 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65079 aRv.NoteJSContextException(cx);
65080 return;
65081 }
65082}
65083
65084void
65085TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue14(const DoubleOrByteString& arg, ErrorResult& aRv, JS::Realm* aRealm)
65086{
65087 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue14", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65088 if (aRv.Failed()) {
65089 return;
65090 }
65091 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65091); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65091; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65092 BindingCallContext& cx = s.GetCallContext();
65093
65094 JS::Rooted<JS::Value> rval(cx);
65095 JS::RootedVector<JS::Value> argv(cx);
65096 if (!argv.resize(1)) {
65097 // That threw an exception on the JSContext, and our CallSetup will do
65098 // the right thing with that.
65099 return;
65100 }
65101 unsigned argc = 1;
65102
65103 do {
65104 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65105 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
65106 aRv.Throw(NS_ERROR_UNEXPECTED);
65107 return;
65108 }
65109 break;
65110 } while (false);
65111
65112 JS::Rooted<JS::Value> callable(cx);
65113 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65114 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65115 !InitIds(cx, atomsCache)) ||
65116 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue14_id, &callable)) {
65117 aRv.Throw(NS_ERROR_UNEXPECTED);
65118 return;
65119 }
65120 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65121 if (!JS::Call(cx, thisValue, callable,
65122 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65123 aRv.NoteJSContextException(cx);
65124 return;
65125 }
65126}
65127
65128void
65129TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue15(const DoubleOrByteString& arg, ErrorResult& aRv, JS::Realm* aRealm)
65130{
65131 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue15", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65132 if (aRv.Failed()) {
65133 return;
65134 }
65135 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65135); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65135; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65136 BindingCallContext& cx = s.GetCallContext();
65137
65138 JS::Rooted<JS::Value> rval(cx);
65139 JS::RootedVector<JS::Value> argv(cx);
65140 if (!argv.resize(1)) {
65141 // That threw an exception on the JSContext, and our CallSetup will do
65142 // the right thing with that.
65143 return;
65144 }
65145 unsigned argc = 1;
65146
65147 do {
65148 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65149 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
65150 aRv.Throw(NS_ERROR_UNEXPECTED);
65151 return;
65152 }
65153 break;
65154 } while (false);
65155
65156 JS::Rooted<JS::Value> callable(cx);
65157 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65158 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65159 !InitIds(cx, atomsCache)) ||
65160 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue15_id, &callable)) {
65161 aRv.Throw(NS_ERROR_UNEXPECTED);
65162 return;
65163 }
65164 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65165 if (!JS::Call(cx, thisValue, callable,
65166 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65167 aRv.NoteJSContextException(cx);
65168 return;
65169 }
65170}
65171
65172void
65173TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue16(const DoubleOrByteString& arg, ErrorResult& aRv, JS::Realm* aRealm)
65174{
65175 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue16", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65176 if (aRv.Failed()) {
65177 return;
65178 }
65179 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65179); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65179; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65180 BindingCallContext& cx = s.GetCallContext();
65181
65182 JS::Rooted<JS::Value> rval(cx);
65183 JS::RootedVector<JS::Value> argv(cx);
65184 if (!argv.resize(1)) {
65185 // That threw an exception on the JSContext, and our CallSetup will do
65186 // the right thing with that.
65187 return;
65188 }
65189 unsigned argc = 1;
65190
65191 do {
65192 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65193 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
65194 aRv.Throw(NS_ERROR_UNEXPECTED);
65195 return;
65196 }
65197 break;
65198 } while (false);
65199
65200 JS::Rooted<JS::Value> callable(cx);
65201 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65202 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65203 !InitIds(cx, atomsCache)) ||
65204 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue16_id, &callable)) {
65205 aRv.Throw(NS_ERROR_UNEXPECTED);
65206 return;
65207 }
65208 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65209 if (!JS::Call(cx, thisValue, callable,
65210 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65211 aRv.NoteJSContextException(cx);
65212 return;
65213 }
65214}
65215
65216void
65217TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue17(const DoubleOrSupportedType& arg, ErrorResult& aRv, JS::Realm* aRealm)
65218{
65219 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue17", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65220 if (aRv.Failed()) {
65221 return;
65222 }
65223 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65223); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65223; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65224 BindingCallContext& cx = s.GetCallContext();
65225
65226 JS::Rooted<JS::Value> rval(cx);
65227 JS::RootedVector<JS::Value> argv(cx);
65228 if (!argv.resize(1)) {
65229 // That threw an exception on the JSContext, and our CallSetup will do
65230 // the right thing with that.
65231 return;
65232 }
65233 unsigned argc = 1;
65234
65235 do {
65236 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65237 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
65238 aRv.Throw(NS_ERROR_UNEXPECTED);
65239 return;
65240 }
65241 break;
65242 } while (false);
65243
65244 JS::Rooted<JS::Value> callable(cx);
65245 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65246 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65247 !InitIds(cx, atomsCache)) ||
65248 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue17_id, &callable)) {
65249 aRv.Throw(NS_ERROR_UNEXPECTED);
65250 return;
65251 }
65252 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65253 if (!JS::Call(cx, thisValue, callable,
65254 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65255 aRv.NoteJSContextException(cx);
65256 return;
65257 }
65258}
65259
65260void
65261TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue18(const DoubleOrSupportedType& arg, ErrorResult& aRv, JS::Realm* aRealm)
65262{
65263 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue18", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65264 if (aRv.Failed()) {
65265 return;
65266 }
65267 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65267); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65267; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65268 BindingCallContext& cx = s.GetCallContext();
65269
65270 JS::Rooted<JS::Value> rval(cx);
65271 JS::RootedVector<JS::Value> argv(cx);
65272 if (!argv.resize(1)) {
65273 // That threw an exception on the JSContext, and our CallSetup will do
65274 // the right thing with that.
65275 return;
65276 }
65277 unsigned argc = 1;
65278
65279 do {
65280 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65281 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
65282 aRv.Throw(NS_ERROR_UNEXPECTED);
65283 return;
65284 }
65285 break;
65286 } while (false);
65287
65288 JS::Rooted<JS::Value> callable(cx);
65289 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65290 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65291 !InitIds(cx, atomsCache)) ||
65292 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue18_id, &callable)) {
65293 aRv.Throw(NS_ERROR_UNEXPECTED);
65294 return;
65295 }
65296 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65297 if (!JS::Call(cx, thisValue, callable,
65298 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65299 aRv.NoteJSContextException(cx);
65300 return;
65301 }
65302}
65303
65304void
65305TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue19(const DoubleOrSupportedType& arg, ErrorResult& aRv, JS::Realm* aRealm)
65306{
65307 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue19", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65308 if (aRv.Failed()) {
65309 return;
65310 }
65311 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65311); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65311; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65312 BindingCallContext& cx = s.GetCallContext();
65313
65314 JS::Rooted<JS::Value> rval(cx);
65315 JS::RootedVector<JS::Value> argv(cx);
65316 if (!argv.resize(1)) {
65317 // That threw an exception on the JSContext, and our CallSetup will do
65318 // the right thing with that.
65319 return;
65320 }
65321 unsigned argc = 1;
65322
65323 do {
65324 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65325 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
65326 aRv.Throw(NS_ERROR_UNEXPECTED);
65327 return;
65328 }
65329 break;
65330 } while (false);
65331
65332 JS::Rooted<JS::Value> callable(cx);
65333 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65334 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65335 !InitIds(cx, atomsCache)) ||
65336 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue19_id, &callable)) {
65337 aRv.Throw(NS_ERROR_UNEXPECTED);
65338 return;
65339 }
65340 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65341 if (!JS::Call(cx, thisValue, callable,
65342 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65343 aRv.NoteJSContextException(cx);
65344 return;
65345 }
65346}
65347
65348void
65349TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue20(const DoubleOrUSVString& arg, ErrorResult& aRv, JS::Realm* aRealm)
65350{
65351 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue20", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65352 if (aRv.Failed()) {
65353 return;
65354 }
65355 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65355); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65355; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65356 BindingCallContext& cx = s.GetCallContext();
65357
65358 JS::Rooted<JS::Value> rval(cx);
65359 JS::RootedVector<JS::Value> argv(cx);
65360 if (!argv.resize(1)) {
65361 // That threw an exception on the JSContext, and our CallSetup will do
65362 // the right thing with that.
65363 return;
65364 }
65365 unsigned argc = 1;
65366
65367 do {
65368 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65369 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
65370 aRv.Throw(NS_ERROR_UNEXPECTED);
65371 return;
65372 }
65373 break;
65374 } while (false);
65375
65376 JS::Rooted<JS::Value> callable(cx);
65377 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65378 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65379 !InitIds(cx, atomsCache)) ||
65380 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue20_id, &callable)) {
65381 aRv.Throw(NS_ERROR_UNEXPECTED);
65382 return;
65383 }
65384 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65385 if (!JS::Call(cx, thisValue, callable,
65386 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65387 aRv.NoteJSContextException(cx);
65388 return;
65389 }
65390}
65391
65392void
65393TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue21(const DoubleOrUSVString& arg, ErrorResult& aRv, JS::Realm* aRealm)
65394{
65395 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue21", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65396 if (aRv.Failed()) {
65397 return;
65398 }
65399 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65399); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65399; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65400 BindingCallContext& cx = s.GetCallContext();
65401
65402 JS::Rooted<JS::Value> rval(cx);
65403 JS::RootedVector<JS::Value> argv(cx);
65404 if (!argv.resize(1)) {
65405 // That threw an exception on the JSContext, and our CallSetup will do
65406 // the right thing with that.
65407 return;
65408 }
65409 unsigned argc = 1;
65410
65411 do {
65412 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65413 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
65414 aRv.Throw(NS_ERROR_UNEXPECTED);
65415 return;
65416 }
65417 break;
65418 } while (false);
65419
65420 JS::Rooted<JS::Value> callable(cx);
65421 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65422 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65423 !InitIds(cx, atomsCache)) ||
65424 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue21_id, &callable)) {
65425 aRv.Throw(NS_ERROR_UNEXPECTED);
65426 return;
65427 }
65428 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65429 if (!JS::Call(cx, thisValue, callable,
65430 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65431 aRv.NoteJSContextException(cx);
65432 return;
65433 }
65434}
65435
65436void
65437TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue22(const DoubleOrUSVString& arg, ErrorResult& aRv, JS::Realm* aRealm)
65438{
65439 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue22", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65440 if (aRv.Failed()) {
65441 return;
65442 }
65443 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65443); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65443; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65444 BindingCallContext& cx = s.GetCallContext();
65445
65446 JS::Rooted<JS::Value> rval(cx);
65447 JS::RootedVector<JS::Value> argv(cx);
65448 if (!argv.resize(1)) {
65449 // That threw an exception on the JSContext, and our CallSetup will do
65450 // the right thing with that.
65451 return;
65452 }
65453 unsigned argc = 1;
65454
65455 do {
65456 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65457 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
65458 aRv.Throw(NS_ERROR_UNEXPECTED);
65459 return;
65460 }
65461 break;
65462 } while (false);
65463
65464 JS::Rooted<JS::Value> callable(cx);
65465 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65466 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65467 !InitIds(cx, atomsCache)) ||
65468 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue22_id, &callable)) {
65469 aRv.Throw(NS_ERROR_UNEXPECTED);
65470 return;
65471 }
65472 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65473 if (!JS::Call(cx, thisValue, callable,
65474 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65475 aRv.NoteJSContextException(cx);
65476 return;
65477 }
65478}
65479
65480void
65481TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue23(const DoubleOrUTF8String& arg, ErrorResult& aRv, JS::Realm* aRealm)
65482{
65483 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue23", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65484 if (aRv.Failed()) {
65485 return;
65486 }
65487 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65487); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65487; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65488 BindingCallContext& cx = s.GetCallContext();
65489
65490 JS::Rooted<JS::Value> rval(cx);
65491 JS::RootedVector<JS::Value> argv(cx);
65492 if (!argv.resize(1)) {
65493 // That threw an exception on the JSContext, and our CallSetup will do
65494 // the right thing with that.
65495 return;
65496 }
65497 unsigned argc = 1;
65498
65499 do {
65500 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65501 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
65502 aRv.Throw(NS_ERROR_UNEXPECTED);
65503 return;
65504 }
65505 break;
65506 } while (false);
65507
65508 JS::Rooted<JS::Value> callable(cx);
65509 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65510 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65511 !InitIds(cx, atomsCache)) ||
65512 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue23_id, &callable)) {
65513 aRv.Throw(NS_ERROR_UNEXPECTED);
65514 return;
65515 }
65516 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65517 if (!JS::Call(cx, thisValue, callable,
65518 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65519 aRv.NoteJSContextException(cx);
65520 return;
65521 }
65522}
65523
65524void
65525TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue24(const DoubleOrUTF8String& arg, ErrorResult& aRv, JS::Realm* aRealm)
65526{
65527 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue24", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65528 if (aRv.Failed()) {
65529 return;
65530 }
65531 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65531); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65531; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65532 BindingCallContext& cx = s.GetCallContext();
65533
65534 JS::Rooted<JS::Value> rval(cx);
65535 JS::RootedVector<JS::Value> argv(cx);
65536 if (!argv.resize(1)) {
65537 // That threw an exception on the JSContext, and our CallSetup will do
65538 // the right thing with that.
65539 return;
65540 }
65541 unsigned argc = 1;
65542
65543 do {
65544 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65545 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
65546 aRv.Throw(NS_ERROR_UNEXPECTED);
65547 return;
65548 }
65549 break;
65550 } while (false);
65551
65552 JS::Rooted<JS::Value> callable(cx);
65553 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65554 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65555 !InitIds(cx, atomsCache)) ||
65556 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue24_id, &callable)) {
65557 aRv.Throw(NS_ERROR_UNEXPECTED);
65558 return;
65559 }
65560 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65561 if (!JS::Call(cx, thisValue, callable,
65562 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65563 aRv.NoteJSContextException(cx);
65564 return;
65565 }
65566}
65567
65568void
65569TestJSImplInterfaceJSImpl::PassUnionWithDefaultValue25(const DoubleOrUTF8String& arg, ErrorResult& aRv, JS::Realm* aRealm)
65570{
65571 CallSetup s(this, aRv, "TestJSImplInterface.passUnionWithDefaultValue25", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65572 if (aRv.Failed()) {
65573 return;
65574 }
65575 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65575); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65575; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65576 BindingCallContext& cx = s.GetCallContext();
65577
65578 JS::Rooted<JS::Value> rval(cx);
65579 JS::RootedVector<JS::Value> argv(cx);
65580 if (!argv.resize(1)) {
65581 // That threw an exception on the JSContext, and our CallSetup will do
65582 // the right thing with that.
65583 return;
65584 }
65585 unsigned argc = 1;
65586
65587 do {
65588 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65589 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
65590 aRv.Throw(NS_ERROR_UNEXPECTED);
65591 return;
65592 }
65593 break;
65594 } while (false);
65595
65596 JS::Rooted<JS::Value> callable(cx);
65597 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65598 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65599 !InitIds(cx, atomsCache)) ||
65600 !GetCallableProperty(cx, atomsCache->passUnionWithDefaultValue25_id, &callable)) {
65601 aRv.Throw(NS_ERROR_UNEXPECTED);
65602 return;
65603 }
65604 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65605 if (!JS::Call(cx, thisValue, callable,
65606 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65607 aRv.NoteJSContextException(cx);
65608 return;
65609 }
65610}
65611
65612void
65613TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue1(const Nullable<DoubleOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
65614{
65615 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue1", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65616 if (aRv.Failed()) {
65617 return;
65618 }
65619 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65619); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65619; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65620 BindingCallContext& cx = s.GetCallContext();
65621
65622 JS::Rooted<JS::Value> rval(cx);
65623 JS::RootedVector<JS::Value> argv(cx);
65624 if (!argv.resize(1)) {
65625 // That threw an exception on the JSContext, and our CallSetup will do
65626 // the right thing with that.
65627 return;
65628 }
65629 unsigned argc = 1;
65630
65631 do {
65632 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65633 if (arg.IsNull()) {
65634 argv[0].setNull();
65635 break;
65636 }
65637 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
65638 aRv.Throw(NS_ERROR_UNEXPECTED);
65639 return;
65640 }
65641 break;
65642 } while (false);
65643
65644 JS::Rooted<JS::Value> callable(cx);
65645 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65646 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65647 !InitIds(cx, atomsCache)) ||
65648 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue1_id, &callable)) {
65649 aRv.Throw(NS_ERROR_UNEXPECTED);
65650 return;
65651 }
65652 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65653 if (!JS::Call(cx, thisValue, callable,
65654 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65655 aRv.NoteJSContextException(cx);
65656 return;
65657 }
65658}
65659
65660void
65661TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue2(const Nullable<DoubleOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
65662{
65663 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65664 if (aRv.Failed()) {
65665 return;
65666 }
65667 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65667); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65667; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65668 BindingCallContext& cx = s.GetCallContext();
65669
65670 JS::Rooted<JS::Value> rval(cx);
65671 JS::RootedVector<JS::Value> argv(cx);
65672 if (!argv.resize(1)) {
65673 // That threw an exception on the JSContext, and our CallSetup will do
65674 // the right thing with that.
65675 return;
65676 }
65677 unsigned argc = 1;
65678
65679 do {
65680 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65681 if (arg.IsNull()) {
65682 argv[0].setNull();
65683 break;
65684 }
65685 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
65686 aRv.Throw(NS_ERROR_UNEXPECTED);
65687 return;
65688 }
65689 break;
65690 } while (false);
65691
65692 JS::Rooted<JS::Value> callable(cx);
65693 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65694 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65695 !InitIds(cx, atomsCache)) ||
65696 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue2_id, &callable)) {
65697 aRv.Throw(NS_ERROR_UNEXPECTED);
65698 return;
65699 }
65700 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65701 if (!JS::Call(cx, thisValue, callable,
65702 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65703 aRv.NoteJSContextException(cx);
65704 return;
65705 }
65706}
65707
65708void
65709TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue3(const Nullable<DoubleOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
65710{
65711 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue3", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65712 if (aRv.Failed()) {
65713 return;
65714 }
65715 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65715); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65715; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65716 BindingCallContext& cx = s.GetCallContext();
65717
65718 JS::Rooted<JS::Value> rval(cx);
65719 JS::RootedVector<JS::Value> argv(cx);
65720 if (!argv.resize(1)) {
65721 // That threw an exception on the JSContext, and our CallSetup will do
65722 // the right thing with that.
65723 return;
65724 }
65725 unsigned argc = 1;
65726
65727 do {
65728 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65729 if (arg.IsNull()) {
65730 argv[0].setNull();
65731 break;
65732 }
65733 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
65734 aRv.Throw(NS_ERROR_UNEXPECTED);
65735 return;
65736 }
65737 break;
65738 } while (false);
65739
65740 JS::Rooted<JS::Value> callable(cx);
65741 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65742 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65743 !InitIds(cx, atomsCache)) ||
65744 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue3_id, &callable)) {
65745 aRv.Throw(NS_ERROR_UNEXPECTED);
65746 return;
65747 }
65748 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65749 if (!JS::Call(cx, thisValue, callable,
65750 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65751 aRv.NoteJSContextException(cx);
65752 return;
65753 }
65754}
65755
65756void
65757TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue4(const Nullable<FloatOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
65758{
65759 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue4", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65760 if (aRv.Failed()) {
65761 return;
65762 }
65763 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65763); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65763; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65764 BindingCallContext& cx = s.GetCallContext();
65765
65766 JS::Rooted<JS::Value> rval(cx);
65767 JS::RootedVector<JS::Value> argv(cx);
65768 if (!argv.resize(1)) {
65769 // That threw an exception on the JSContext, and our CallSetup will do
65770 // the right thing with that.
65771 return;
65772 }
65773 unsigned argc = 1;
65774
65775 do {
65776 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65777 if (arg.IsNull()) {
65778 argv[0].setNull();
65779 break;
65780 }
65781 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
65782 aRv.Throw(NS_ERROR_UNEXPECTED);
65783 return;
65784 }
65785 break;
65786 } while (false);
65787
65788 JS::Rooted<JS::Value> callable(cx);
65789 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65790 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65791 !InitIds(cx, atomsCache)) ||
65792 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue4_id, &callable)) {
65793 aRv.Throw(NS_ERROR_UNEXPECTED);
65794 return;
65795 }
65796 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65797 if (!JS::Call(cx, thisValue, callable,
65798 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65799 aRv.NoteJSContextException(cx);
65800 return;
65801 }
65802}
65803
65804void
65805TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue5(const Nullable<FloatOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
65806{
65807 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue5", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65808 if (aRv.Failed()) {
65809 return;
65810 }
65811 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65811); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65811; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65812 BindingCallContext& cx = s.GetCallContext();
65813
65814 JS::Rooted<JS::Value> rval(cx);
65815 JS::RootedVector<JS::Value> argv(cx);
65816 if (!argv.resize(1)) {
65817 // That threw an exception on the JSContext, and our CallSetup will do
65818 // the right thing with that.
65819 return;
65820 }
65821 unsigned argc = 1;
65822
65823 do {
65824 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65825 if (arg.IsNull()) {
65826 argv[0].setNull();
65827 break;
65828 }
65829 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
65830 aRv.Throw(NS_ERROR_UNEXPECTED);
65831 return;
65832 }
65833 break;
65834 } while (false);
65835
65836 JS::Rooted<JS::Value> callable(cx);
65837 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65838 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65839 !InitIds(cx, atomsCache)) ||
65840 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue5_id, &callable)) {
65841 aRv.Throw(NS_ERROR_UNEXPECTED);
65842 return;
65843 }
65844 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65845 if (!JS::Call(cx, thisValue, callable,
65846 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65847 aRv.NoteJSContextException(cx);
65848 return;
65849 }
65850}
65851
65852void
65853TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue6(const Nullable<FloatOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
65854{
65855 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue6", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65856 if (aRv.Failed()) {
65857 return;
65858 }
65859 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65859); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65859; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65860 BindingCallContext& cx = s.GetCallContext();
65861
65862 JS::Rooted<JS::Value> rval(cx);
65863 JS::RootedVector<JS::Value> argv(cx);
65864 if (!argv.resize(1)) {
65865 // That threw an exception on the JSContext, and our CallSetup will do
65866 // the right thing with that.
65867 return;
65868 }
65869 unsigned argc = 1;
65870
65871 do {
65872 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65873 if (arg.IsNull()) {
65874 argv[0].setNull();
65875 break;
65876 }
65877 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
65878 aRv.Throw(NS_ERROR_UNEXPECTED);
65879 return;
65880 }
65881 break;
65882 } while (false);
65883
65884 JS::Rooted<JS::Value> callable(cx);
65885 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65886 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65887 !InitIds(cx, atomsCache)) ||
65888 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue6_id, &callable)) {
65889 aRv.Throw(NS_ERROR_UNEXPECTED);
65890 return;
65891 }
65892 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65893 if (!JS::Call(cx, thisValue, callable,
65894 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65895 aRv.NoteJSContextException(cx);
65896 return;
65897 }
65898}
65899
65900void
65901TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue7(const Nullable<UnrestrictedDoubleOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
65902{
65903 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue7", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65904 if (aRv.Failed()) {
65905 return;
65906 }
65907 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65907); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65907; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65908 BindingCallContext& cx = s.GetCallContext();
65909
65910 JS::Rooted<JS::Value> rval(cx);
65911 JS::RootedVector<JS::Value> argv(cx);
65912 if (!argv.resize(1)) {
65913 // That threw an exception on the JSContext, and our CallSetup will do
65914 // the right thing with that.
65915 return;
65916 }
65917 unsigned argc = 1;
65918
65919 do {
65920 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65921 if (arg.IsNull()) {
65922 argv[0].setNull();
65923 break;
65924 }
65925 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
65926 aRv.Throw(NS_ERROR_UNEXPECTED);
65927 return;
65928 }
65929 break;
65930 } while (false);
65931
65932 JS::Rooted<JS::Value> callable(cx);
65933 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65934 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65935 !InitIds(cx, atomsCache)) ||
65936 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue7_id, &callable)) {
65937 aRv.Throw(NS_ERROR_UNEXPECTED);
65938 return;
65939 }
65940 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65941 if (!JS::Call(cx, thisValue, callable,
65942 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65943 aRv.NoteJSContextException(cx);
65944 return;
65945 }
65946}
65947
65948void
65949TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue8(const Nullable<UnrestrictedDoubleOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
65950{
65951 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue8", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
65952 if (aRv.Failed()) {
65953 return;
65954 }
65955 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 65955); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 65955; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
65956 BindingCallContext& cx = s.GetCallContext();
65957
65958 JS::Rooted<JS::Value> rval(cx);
65959 JS::RootedVector<JS::Value> argv(cx);
65960 if (!argv.resize(1)) {
65961 // That threw an exception on the JSContext, and our CallSetup will do
65962 // the right thing with that.
65963 return;
65964 }
65965 unsigned argc = 1;
65966
65967 do {
65968 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
65969 if (arg.IsNull()) {
65970 argv[0].setNull();
65971 break;
65972 }
65973 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
65974 aRv.Throw(NS_ERROR_UNEXPECTED);
65975 return;
65976 }
65977 break;
65978 } while (false);
65979
65980 JS::Rooted<JS::Value> callable(cx);
65981 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
65982 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
65983 !InitIds(cx, atomsCache)) ||
65984 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue8_id, &callable)) {
65985 aRv.Throw(NS_ERROR_UNEXPECTED);
65986 return;
65987 }
65988 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
65989 if (!JS::Call(cx, thisValue, callable,
65990 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
65991 aRv.NoteJSContextException(cx);
65992 return;
65993 }
65994}
65995
65996void
65997TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue9(const Nullable<UnrestrictedDoubleOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
65998{
65999 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue9", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66000 if (aRv.Failed()) {
66001 return;
66002 }
66003 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66003); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66003; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66004 BindingCallContext& cx = s.GetCallContext();
66005
66006 JS::Rooted<JS::Value> rval(cx);
66007 JS::RootedVector<JS::Value> argv(cx);
66008 if (!argv.resize(1)) {
66009 // That threw an exception on the JSContext, and our CallSetup will do
66010 // the right thing with that.
66011 return;
66012 }
66013 unsigned argc = 1;
66014
66015 do {
66016 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66017 if (arg.IsNull()) {
66018 argv[0].setNull();
66019 break;
66020 }
66021 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66022 aRv.Throw(NS_ERROR_UNEXPECTED);
66023 return;
66024 }
66025 break;
66026 } while (false);
66027
66028 JS::Rooted<JS::Value> callable(cx);
66029 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66030 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66031 !InitIds(cx, atomsCache)) ||
66032 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue9_id, &callable)) {
66033 aRv.Throw(NS_ERROR_UNEXPECTED);
66034 return;
66035 }
66036 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66037 if (!JS::Call(cx, thisValue, callable,
66038 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66039 aRv.NoteJSContextException(cx);
66040 return;
66041 }
66042}
66043
66044void
66045TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue10(const Nullable<UnrestrictedFloatOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66046{
66047 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue10", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66048 if (aRv.Failed()) {
66049 return;
66050 }
66051 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66051); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66051; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66052 BindingCallContext& cx = s.GetCallContext();
66053
66054 JS::Rooted<JS::Value> rval(cx);
66055 JS::RootedVector<JS::Value> argv(cx);
66056 if (!argv.resize(1)) {
66057 // That threw an exception on the JSContext, and our CallSetup will do
66058 // the right thing with that.
66059 return;
66060 }
66061 unsigned argc = 1;
66062
66063 do {
66064 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66065 if (arg.IsNull()) {
66066 argv[0].setNull();
66067 break;
66068 }
66069 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66070 aRv.Throw(NS_ERROR_UNEXPECTED);
66071 return;
66072 }
66073 break;
66074 } while (false);
66075
66076 JS::Rooted<JS::Value> callable(cx);
66077 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66078 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66079 !InitIds(cx, atomsCache)) ||
66080 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue10_id, &callable)) {
66081 aRv.Throw(NS_ERROR_UNEXPECTED);
66082 return;
66083 }
66084 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66085 if (!JS::Call(cx, thisValue, callable,
66086 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66087 aRv.NoteJSContextException(cx);
66088 return;
66089 }
66090}
66091
66092void
66093TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue11(const Nullable<UnrestrictedFloatOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66094{
66095 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue11", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66096 if (aRv.Failed()) {
66097 return;
66098 }
66099 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66099); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66099; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66100 BindingCallContext& cx = s.GetCallContext();
66101
66102 JS::Rooted<JS::Value> rval(cx);
66103 JS::RootedVector<JS::Value> argv(cx);
66104 if (!argv.resize(1)) {
66105 // That threw an exception on the JSContext, and our CallSetup will do
66106 // the right thing with that.
66107 return;
66108 }
66109 unsigned argc = 1;
66110
66111 do {
66112 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66113 if (arg.IsNull()) {
66114 argv[0].setNull();
66115 break;
66116 }
66117 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66118 aRv.Throw(NS_ERROR_UNEXPECTED);
66119 return;
66120 }
66121 break;
66122 } while (false);
66123
66124 JS::Rooted<JS::Value> callable(cx);
66125 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66126 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66127 !InitIds(cx, atomsCache)) ||
66128 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue11_id, &callable)) {
66129 aRv.Throw(NS_ERROR_UNEXPECTED);
66130 return;
66131 }
66132 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66133 if (!JS::Call(cx, thisValue, callable,
66134 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66135 aRv.NoteJSContextException(cx);
66136 return;
66137 }
66138}
66139
66140void
66141TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue12(const Nullable<UnrestrictedFloatOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66142{
66143 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue12", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66144 if (aRv.Failed()) {
66145 return;
66146 }
66147 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66147); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66147; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66148 BindingCallContext& cx = s.GetCallContext();
66149
66150 JS::Rooted<JS::Value> rval(cx);
66151 JS::RootedVector<JS::Value> argv(cx);
66152 if (!argv.resize(1)) {
66153 // That threw an exception on the JSContext, and our CallSetup will do
66154 // the right thing with that.
66155 return;
66156 }
66157 unsigned argc = 1;
66158
66159 do {
66160 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66161 if (arg.IsNull()) {
66162 argv[0].setNull();
66163 break;
66164 }
66165 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66166 aRv.Throw(NS_ERROR_UNEXPECTED);
66167 return;
66168 }
66169 break;
66170 } while (false);
66171
66172 JS::Rooted<JS::Value> callable(cx);
66173 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66174 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66175 !InitIds(cx, atomsCache)) ||
66176 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue12_id, &callable)) {
66177 aRv.Throw(NS_ERROR_UNEXPECTED);
66178 return;
66179 }
66180 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66181 if (!JS::Call(cx, thisValue, callable,
66182 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66183 aRv.NoteJSContextException(cx);
66184 return;
66185 }
66186}
66187
66188void
66189TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue13(const Nullable<DoubleOrByteString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66190{
66191 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue13", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66192 if (aRv.Failed()) {
66193 return;
66194 }
66195 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66195); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66195; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66196 BindingCallContext& cx = s.GetCallContext();
66197
66198 JS::Rooted<JS::Value> rval(cx);
66199 JS::RootedVector<JS::Value> argv(cx);
66200 if (!argv.resize(1)) {
66201 // That threw an exception on the JSContext, and our CallSetup will do
66202 // the right thing with that.
66203 return;
66204 }
66205 unsigned argc = 1;
66206
66207 do {
66208 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66209 if (arg.IsNull()) {
66210 argv[0].setNull();
66211 break;
66212 }
66213 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66214 aRv.Throw(NS_ERROR_UNEXPECTED);
66215 return;
66216 }
66217 break;
66218 } while (false);
66219
66220 JS::Rooted<JS::Value> callable(cx);
66221 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66222 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66223 !InitIds(cx, atomsCache)) ||
66224 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue13_id, &callable)) {
66225 aRv.Throw(NS_ERROR_UNEXPECTED);
66226 return;
66227 }
66228 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66229 if (!JS::Call(cx, thisValue, callable,
66230 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66231 aRv.NoteJSContextException(cx);
66232 return;
66233 }
66234}
66235
66236void
66237TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue14(const Nullable<DoubleOrByteString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66238{
66239 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue14", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66240 if (aRv.Failed()) {
66241 return;
66242 }
66243 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66243); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66243; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66244 BindingCallContext& cx = s.GetCallContext();
66245
66246 JS::Rooted<JS::Value> rval(cx);
66247 JS::RootedVector<JS::Value> argv(cx);
66248 if (!argv.resize(1)) {
66249 // That threw an exception on the JSContext, and our CallSetup will do
66250 // the right thing with that.
66251 return;
66252 }
66253 unsigned argc = 1;
66254
66255 do {
66256 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66257 if (arg.IsNull()) {
66258 argv[0].setNull();
66259 break;
66260 }
66261 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66262 aRv.Throw(NS_ERROR_UNEXPECTED);
66263 return;
66264 }
66265 break;
66266 } while (false);
66267
66268 JS::Rooted<JS::Value> callable(cx);
66269 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66270 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66271 !InitIds(cx, atomsCache)) ||
66272 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue14_id, &callable)) {
66273 aRv.Throw(NS_ERROR_UNEXPECTED);
66274 return;
66275 }
66276 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66277 if (!JS::Call(cx, thisValue, callable,
66278 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66279 aRv.NoteJSContextException(cx);
66280 return;
66281 }
66282}
66283
66284void
66285TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue15(const Nullable<DoubleOrByteString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66286{
66287 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue15", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66288 if (aRv.Failed()) {
66289 return;
66290 }
66291 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66291); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66291; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66292 BindingCallContext& cx = s.GetCallContext();
66293
66294 JS::Rooted<JS::Value> rval(cx);
66295 JS::RootedVector<JS::Value> argv(cx);
66296 if (!argv.resize(1)) {
66297 // That threw an exception on the JSContext, and our CallSetup will do
66298 // the right thing with that.
66299 return;
66300 }
66301 unsigned argc = 1;
66302
66303 do {
66304 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66305 if (arg.IsNull()) {
66306 argv[0].setNull();
66307 break;
66308 }
66309 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66310 aRv.Throw(NS_ERROR_UNEXPECTED);
66311 return;
66312 }
66313 break;
66314 } while (false);
66315
66316 JS::Rooted<JS::Value> callable(cx);
66317 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66318 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66319 !InitIds(cx, atomsCache)) ||
66320 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue15_id, &callable)) {
66321 aRv.Throw(NS_ERROR_UNEXPECTED);
66322 return;
66323 }
66324 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66325 if (!JS::Call(cx, thisValue, callable,
66326 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66327 aRv.NoteJSContextException(cx);
66328 return;
66329 }
66330}
66331
66332void
66333TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue16(const Nullable<DoubleOrByteString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66334{
66335 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue16", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66336 if (aRv.Failed()) {
66337 return;
66338 }
66339 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66339); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66339; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66340 BindingCallContext& cx = s.GetCallContext();
66341
66342 JS::Rooted<JS::Value> rval(cx);
66343 JS::RootedVector<JS::Value> argv(cx);
66344 if (!argv.resize(1)) {
66345 // That threw an exception on the JSContext, and our CallSetup will do
66346 // the right thing with that.
66347 return;
66348 }
66349 unsigned argc = 1;
66350
66351 do {
66352 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66353 if (arg.IsNull()) {
66354 argv[0].setNull();
66355 break;
66356 }
66357 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66358 aRv.Throw(NS_ERROR_UNEXPECTED);
66359 return;
66360 }
66361 break;
66362 } while (false);
66363
66364 JS::Rooted<JS::Value> callable(cx);
66365 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66366 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66367 !InitIds(cx, atomsCache)) ||
66368 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue16_id, &callable)) {
66369 aRv.Throw(NS_ERROR_UNEXPECTED);
66370 return;
66371 }
66372 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66373 if (!JS::Call(cx, thisValue, callable,
66374 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66375 aRv.NoteJSContextException(cx);
66376 return;
66377 }
66378}
66379
66380void
66381TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue17(const Nullable<DoubleOrSupportedType>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66382{
66383 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue17", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66384 if (aRv.Failed()) {
66385 return;
66386 }
66387 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66387); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66387; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66388 BindingCallContext& cx = s.GetCallContext();
66389
66390 JS::Rooted<JS::Value> rval(cx);
66391 JS::RootedVector<JS::Value> argv(cx);
66392 if (!argv.resize(1)) {
66393 // That threw an exception on the JSContext, and our CallSetup will do
66394 // the right thing with that.
66395 return;
66396 }
66397 unsigned argc = 1;
66398
66399 do {
66400 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66401 if (arg.IsNull()) {
66402 argv[0].setNull();
66403 break;
66404 }
66405 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66406 aRv.Throw(NS_ERROR_UNEXPECTED);
66407 return;
66408 }
66409 break;
66410 } while (false);
66411
66412 JS::Rooted<JS::Value> callable(cx);
66413 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66414 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66415 !InitIds(cx, atomsCache)) ||
66416 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue17_id, &callable)) {
66417 aRv.Throw(NS_ERROR_UNEXPECTED);
66418 return;
66419 }
66420 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66421 if (!JS::Call(cx, thisValue, callable,
66422 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66423 aRv.NoteJSContextException(cx);
66424 return;
66425 }
66426}
66427
66428void
66429TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue18(const Nullable<DoubleOrSupportedType>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66430{
66431 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue18", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66432 if (aRv.Failed()) {
66433 return;
66434 }
66435 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66435); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66435; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66436 BindingCallContext& cx = s.GetCallContext();
66437
66438 JS::Rooted<JS::Value> rval(cx);
66439 JS::RootedVector<JS::Value> argv(cx);
66440 if (!argv.resize(1)) {
66441 // That threw an exception on the JSContext, and our CallSetup will do
66442 // the right thing with that.
66443 return;
66444 }
66445 unsigned argc = 1;
66446
66447 do {
66448 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66449 if (arg.IsNull()) {
66450 argv[0].setNull();
66451 break;
66452 }
66453 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66454 aRv.Throw(NS_ERROR_UNEXPECTED);
66455 return;
66456 }
66457 break;
66458 } while (false);
66459
66460 JS::Rooted<JS::Value> callable(cx);
66461 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66462 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66463 !InitIds(cx, atomsCache)) ||
66464 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue18_id, &callable)) {
66465 aRv.Throw(NS_ERROR_UNEXPECTED);
66466 return;
66467 }
66468 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66469 if (!JS::Call(cx, thisValue, callable,
66470 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66471 aRv.NoteJSContextException(cx);
66472 return;
66473 }
66474}
66475
66476void
66477TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue19(const Nullable<DoubleOrSupportedType>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66478{
66479 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue19", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66480 if (aRv.Failed()) {
66481 return;
66482 }
66483 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66483); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66483; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66484 BindingCallContext& cx = s.GetCallContext();
66485
66486 JS::Rooted<JS::Value> rval(cx);
66487 JS::RootedVector<JS::Value> argv(cx);
66488 if (!argv.resize(1)) {
66489 // That threw an exception on the JSContext, and our CallSetup will do
66490 // the right thing with that.
66491 return;
66492 }
66493 unsigned argc = 1;
66494
66495 do {
66496 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66497 if (arg.IsNull()) {
66498 argv[0].setNull();
66499 break;
66500 }
66501 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66502 aRv.Throw(NS_ERROR_UNEXPECTED);
66503 return;
66504 }
66505 break;
66506 } while (false);
66507
66508 JS::Rooted<JS::Value> callable(cx);
66509 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66510 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66511 !InitIds(cx, atomsCache)) ||
66512 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue19_id, &callable)) {
66513 aRv.Throw(NS_ERROR_UNEXPECTED);
66514 return;
66515 }
66516 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66517 if (!JS::Call(cx, thisValue, callable,
66518 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66519 aRv.NoteJSContextException(cx);
66520 return;
66521 }
66522}
66523
66524void
66525TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue20(const Nullable<DoubleOrSupportedType>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66526{
66527 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue20", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66528 if (aRv.Failed()) {
66529 return;
66530 }
66531 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66531); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66531; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66532 BindingCallContext& cx = s.GetCallContext();
66533
66534 JS::Rooted<JS::Value> rval(cx);
66535 JS::RootedVector<JS::Value> argv(cx);
66536 if (!argv.resize(1)) {
66537 // That threw an exception on the JSContext, and our CallSetup will do
66538 // the right thing with that.
66539 return;
66540 }
66541 unsigned argc = 1;
66542
66543 do {
66544 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66545 if (arg.IsNull()) {
66546 argv[0].setNull();
66547 break;
66548 }
66549 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66550 aRv.Throw(NS_ERROR_UNEXPECTED);
66551 return;
66552 }
66553 break;
66554 } while (false);
66555
66556 JS::Rooted<JS::Value> callable(cx);
66557 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66558 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66559 !InitIds(cx, atomsCache)) ||
66560 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue20_id, &callable)) {
66561 aRv.Throw(NS_ERROR_UNEXPECTED);
66562 return;
66563 }
66564 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66565 if (!JS::Call(cx, thisValue, callable,
66566 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66567 aRv.NoteJSContextException(cx);
66568 return;
66569 }
66570}
66571
66572void
66573TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue21(const Nullable<DoubleOrUSVString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66574{
66575 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue21", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66576 if (aRv.Failed()) {
66577 return;
66578 }
66579 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66579); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66579; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66580 BindingCallContext& cx = s.GetCallContext();
66581
66582 JS::Rooted<JS::Value> rval(cx);
66583 JS::RootedVector<JS::Value> argv(cx);
66584 if (!argv.resize(1)) {
66585 // That threw an exception on the JSContext, and our CallSetup will do
66586 // the right thing with that.
66587 return;
66588 }
66589 unsigned argc = 1;
66590
66591 do {
66592 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66593 if (arg.IsNull()) {
66594 argv[0].setNull();
66595 break;
66596 }
66597 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66598 aRv.Throw(NS_ERROR_UNEXPECTED);
66599 return;
66600 }
66601 break;
66602 } while (false);
66603
66604 JS::Rooted<JS::Value> callable(cx);
66605 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66606 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66607 !InitIds(cx, atomsCache)) ||
66608 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue21_id, &callable)) {
66609 aRv.Throw(NS_ERROR_UNEXPECTED);
66610 return;
66611 }
66612 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66613 if (!JS::Call(cx, thisValue, callable,
66614 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66615 aRv.NoteJSContextException(cx);
66616 return;
66617 }
66618}
66619
66620void
66621TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue22(const Nullable<DoubleOrUSVString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66622{
66623 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue22", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66624 if (aRv.Failed()) {
66625 return;
66626 }
66627 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66627); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66627; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66628 BindingCallContext& cx = s.GetCallContext();
66629
66630 JS::Rooted<JS::Value> rval(cx);
66631 JS::RootedVector<JS::Value> argv(cx);
66632 if (!argv.resize(1)) {
66633 // That threw an exception on the JSContext, and our CallSetup will do
66634 // the right thing with that.
66635 return;
66636 }
66637 unsigned argc = 1;
66638
66639 do {
66640 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66641 if (arg.IsNull()) {
66642 argv[0].setNull();
66643 break;
66644 }
66645 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66646 aRv.Throw(NS_ERROR_UNEXPECTED);
66647 return;
66648 }
66649 break;
66650 } while (false);
66651
66652 JS::Rooted<JS::Value> callable(cx);
66653 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66654 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66655 !InitIds(cx, atomsCache)) ||
66656 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue22_id, &callable)) {
66657 aRv.Throw(NS_ERROR_UNEXPECTED);
66658 return;
66659 }
66660 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66661 if (!JS::Call(cx, thisValue, callable,
66662 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66663 aRv.NoteJSContextException(cx);
66664 return;
66665 }
66666}
66667
66668void
66669TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue23(const Nullable<DoubleOrUSVString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66670{
66671 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue23", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66672 if (aRv.Failed()) {
66673 return;
66674 }
66675 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66675); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66675; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66676 BindingCallContext& cx = s.GetCallContext();
66677
66678 JS::Rooted<JS::Value> rval(cx);
66679 JS::RootedVector<JS::Value> argv(cx);
66680 if (!argv.resize(1)) {
66681 // That threw an exception on the JSContext, and our CallSetup will do
66682 // the right thing with that.
66683 return;
66684 }
66685 unsigned argc = 1;
66686
66687 do {
66688 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66689 if (arg.IsNull()) {
66690 argv[0].setNull();
66691 break;
66692 }
66693 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66694 aRv.Throw(NS_ERROR_UNEXPECTED);
66695 return;
66696 }
66697 break;
66698 } while (false);
66699
66700 JS::Rooted<JS::Value> callable(cx);
66701 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66702 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66703 !InitIds(cx, atomsCache)) ||
66704 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue23_id, &callable)) {
66705 aRv.Throw(NS_ERROR_UNEXPECTED);
66706 return;
66707 }
66708 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66709 if (!JS::Call(cx, thisValue, callable,
66710 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66711 aRv.NoteJSContextException(cx);
66712 return;
66713 }
66714}
66715
66716void
66717TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue24(const Nullable<DoubleOrUSVString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66718{
66719 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue24", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66720 if (aRv.Failed()) {
66721 return;
66722 }
66723 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66723); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66723; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66724 BindingCallContext& cx = s.GetCallContext();
66725
66726 JS::Rooted<JS::Value> rval(cx);
66727 JS::RootedVector<JS::Value> argv(cx);
66728 if (!argv.resize(1)) {
66729 // That threw an exception on the JSContext, and our CallSetup will do
66730 // the right thing with that.
66731 return;
66732 }
66733 unsigned argc = 1;
66734
66735 do {
66736 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66737 if (arg.IsNull()) {
66738 argv[0].setNull();
66739 break;
66740 }
66741 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66742 aRv.Throw(NS_ERROR_UNEXPECTED);
66743 return;
66744 }
66745 break;
66746 } while (false);
66747
66748 JS::Rooted<JS::Value> callable(cx);
66749 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66750 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66751 !InitIds(cx, atomsCache)) ||
66752 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue24_id, &callable)) {
66753 aRv.Throw(NS_ERROR_UNEXPECTED);
66754 return;
66755 }
66756 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66757 if (!JS::Call(cx, thisValue, callable,
66758 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66759 aRv.NoteJSContextException(cx);
66760 return;
66761 }
66762}
66763
66764void
66765TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue25(const Nullable<DoubleOrUTF8String>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66766{
66767 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue25", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66768 if (aRv.Failed()) {
66769 return;
66770 }
66771 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66771); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66771; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66772 BindingCallContext& cx = s.GetCallContext();
66773
66774 JS::Rooted<JS::Value> rval(cx);
66775 JS::RootedVector<JS::Value> argv(cx);
66776 if (!argv.resize(1)) {
66777 // That threw an exception on the JSContext, and our CallSetup will do
66778 // the right thing with that.
66779 return;
66780 }
66781 unsigned argc = 1;
66782
66783 do {
66784 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66785 if (arg.IsNull()) {
66786 argv[0].setNull();
66787 break;
66788 }
66789 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66790 aRv.Throw(NS_ERROR_UNEXPECTED);
66791 return;
66792 }
66793 break;
66794 } while (false);
66795
66796 JS::Rooted<JS::Value> callable(cx);
66797 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66798 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66799 !InitIds(cx, atomsCache)) ||
66800 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue25_id, &callable)) {
66801 aRv.Throw(NS_ERROR_UNEXPECTED);
66802 return;
66803 }
66804 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66805 if (!JS::Call(cx, thisValue, callable,
66806 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66807 aRv.NoteJSContextException(cx);
66808 return;
66809 }
66810}
66811
66812void
66813TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue26(const Nullable<DoubleOrUTF8String>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66814{
66815 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue26", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66816 if (aRv.Failed()) {
66817 return;
66818 }
66819 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66819); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66819; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66820 BindingCallContext& cx = s.GetCallContext();
66821
66822 JS::Rooted<JS::Value> rval(cx);
66823 JS::RootedVector<JS::Value> argv(cx);
66824 if (!argv.resize(1)) {
66825 // That threw an exception on the JSContext, and our CallSetup will do
66826 // the right thing with that.
66827 return;
66828 }
66829 unsigned argc = 1;
66830
66831 do {
66832 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66833 if (arg.IsNull()) {
66834 argv[0].setNull();
66835 break;
66836 }
66837 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66838 aRv.Throw(NS_ERROR_UNEXPECTED);
66839 return;
66840 }
66841 break;
66842 } while (false);
66843
66844 JS::Rooted<JS::Value> callable(cx);
66845 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66846 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66847 !InitIds(cx, atomsCache)) ||
66848 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue26_id, &callable)) {
66849 aRv.Throw(NS_ERROR_UNEXPECTED);
66850 return;
66851 }
66852 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66853 if (!JS::Call(cx, thisValue, callable,
66854 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66855 aRv.NoteJSContextException(cx);
66856 return;
66857 }
66858}
66859
66860void
66861TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue27(const Nullable<DoubleOrUTF8String>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66862{
66863 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue27", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66864 if (aRv.Failed()) {
66865 return;
66866 }
66867 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66867); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66867; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66868 BindingCallContext& cx = s.GetCallContext();
66869
66870 JS::Rooted<JS::Value> rval(cx);
66871 JS::RootedVector<JS::Value> argv(cx);
66872 if (!argv.resize(1)) {
66873 // That threw an exception on the JSContext, and our CallSetup will do
66874 // the right thing with that.
66875 return;
66876 }
66877 unsigned argc = 1;
66878
66879 do {
66880 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66881 if (arg.IsNull()) {
66882 argv[0].setNull();
66883 break;
66884 }
66885 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66886 aRv.Throw(NS_ERROR_UNEXPECTED);
66887 return;
66888 }
66889 break;
66890 } while (false);
66891
66892 JS::Rooted<JS::Value> callable(cx);
66893 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66894 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66895 !InitIds(cx, atomsCache)) ||
66896 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue27_id, &callable)) {
66897 aRv.Throw(NS_ERROR_UNEXPECTED);
66898 return;
66899 }
66900 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66901 if (!JS::Call(cx, thisValue, callable,
66902 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66903 aRv.NoteJSContextException(cx);
66904 return;
66905 }
66906}
66907
66908void
66909TestJSImplInterfaceJSImpl::PassNullableUnionWithDefaultValue28(const Nullable<DoubleOrUTF8String>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66910{
66911 CallSetup s(this, aRv, "TestJSImplInterface.passNullableUnionWithDefaultValue28", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66912 if (aRv.Failed()) {
66913 return;
66914 }
66915 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66915); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66915; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66916 BindingCallContext& cx = s.GetCallContext();
66917
66918 JS::Rooted<JS::Value> rval(cx);
66919 JS::RootedVector<JS::Value> argv(cx);
66920 if (!argv.resize(1)) {
66921 // That threw an exception on the JSContext, and our CallSetup will do
66922 // the right thing with that.
66923 return;
66924 }
66925 unsigned argc = 1;
66926
66927 do {
66928 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
66929 if (arg.IsNull()) {
66930 argv[0].setNull();
66931 break;
66932 }
66933 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
66934 aRv.Throw(NS_ERROR_UNEXPECTED);
66935 return;
66936 }
66937 break;
66938 } while (false);
66939
66940 JS::Rooted<JS::Value> callable(cx);
66941 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
66942 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
66943 !InitIds(cx, atomsCache)) ||
66944 !GetCallableProperty(cx, atomsCache->passNullableUnionWithDefaultValue28_id, &callable)) {
66945 aRv.Throw(NS_ERROR_UNEXPECTED);
66946 return;
66947 }
66948 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
66949 if (!JS::Call(cx, thisValue, callable,
66950 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
66951 aRv.NoteJSContextException(cx);
66952 return;
66953 }
66954}
66955
66956void
66957TestJSImplInterfaceJSImpl::PassSequenceOfUnions(const Sequence<OwningCanvasPatternOrCanvasGradient>& arg, ErrorResult& aRv, JS::Realm* aRealm)
66958{
66959 CallSetup s(this, aRv, "TestJSImplInterface.passSequenceOfUnions", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
66960 if (aRv.Failed()) {
66961 return;
66962 }
66963 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 66963); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 66963; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
66964 BindingCallContext& cx = s.GetCallContext();
66965
66966 JS::Rooted<JS::Value> rval(cx);
66967 JS::RootedVector<JS::Value> argv(cx);
66968 if (!argv.resize(1)) {
66969 // That threw an exception on the JSContext, and our CallSetup will do
66970 // the right thing with that.
66971 return;
66972 }
66973 unsigned argc = 1;
66974
66975 do {
66976
66977 uint32_t length = arg.Length();
66978 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
66979 if (!returnArray) {
66980 aRv.Throw(NS_ERROR_UNEXPECTED);
66981 return;
66982 }
66983 // Scope for 'tmp'
66984 {
66985 JS::Rooted<JS::Value> tmp(cx);
66986 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
66987 // Control block to let us common up the JS_DefineElement calls when there
66988 // are different ways to succeed at wrapping the object.
66989 do {
66990 if (!arg[sequenceIdx0].ToJSVal(cx, returnArray, &tmp)) {
66991 aRv.Throw(NS_ERROR_UNEXPECTED);
66992 return;
66993 }
66994 break;
66995 } while (false);
66996 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
66997 JSPROP_ENUMERATE)) {
66998 aRv.Throw(NS_ERROR_UNEXPECTED);
66999 return;
67000 }
67001 }
67002 }
67003 argv[0].setObject(*returnArray);
67004 break;
67005 } while (false);
67006
67007 JS::Rooted<JS::Value> callable(cx);
67008 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67009 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67010 !InitIds(cx, atomsCache)) ||
67011 !GetCallableProperty(cx, atomsCache->passSequenceOfUnions_id, &callable)) {
67012 aRv.Throw(NS_ERROR_UNEXPECTED);
67013 return;
67014 }
67015 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67016 if (!JS::Call(cx, thisValue, callable,
67017 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
67018 aRv.NoteJSContextException(cx);
67019 return;
67020 }
67021}
67022
67023void
67024TestJSImplInterfaceJSImpl::PassSequenceOfUnions2(const Sequence<OwningObjectOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
67025{
67026 CallSetup s(this, aRv, "TestJSImplInterface.passSequenceOfUnions2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67027 if (aRv.Failed()) {
67028 return;
67029 }
67030 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67030); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67030; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67031 BindingCallContext& cx = s.GetCallContext();
67032
67033 JS::Rooted<JS::Value> rval(cx);
67034 JS::RootedVector<JS::Value> argv(cx);
67035 if (!argv.resize(1)) {
67036 // That threw an exception on the JSContext, and our CallSetup will do
67037 // the right thing with that.
67038 return;
67039 }
67040 unsigned argc = 1;
67041
67042 do {
67043
67044 uint32_t length = arg.Length();
67045 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
67046 if (!returnArray) {
67047 aRv.Throw(NS_ERROR_UNEXPECTED);
67048 return;
67049 }
67050 // Scope for 'tmp'
67051 {
67052 JS::Rooted<JS::Value> tmp(cx);
67053 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
67054 // Control block to let us common up the JS_DefineElement calls when there
67055 // are different ways to succeed at wrapping the object.
67056 do {
67057 if (!arg[sequenceIdx0].ToJSVal(cx, returnArray, &tmp)) {
67058 aRv.Throw(NS_ERROR_UNEXPECTED);
67059 return;
67060 }
67061 break;
67062 } while (false);
67063 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
67064 JSPROP_ENUMERATE)) {
67065 aRv.Throw(NS_ERROR_UNEXPECTED);
67066 return;
67067 }
67068 }
67069 }
67070 argv[0].setObject(*returnArray);
67071 break;
67072 } while (false);
67073
67074 JS::Rooted<JS::Value> callable(cx);
67075 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67076 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67077 !InitIds(cx, atomsCache)) ||
67078 !GetCallableProperty(cx, atomsCache->passSequenceOfUnions2_id, &callable)) {
67079 aRv.Throw(NS_ERROR_UNEXPECTED);
67080 return;
67081 }
67082 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67083 if (!JS::Call(cx, thisValue, callable,
67084 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
67085 aRv.NoteJSContextException(cx);
67086 return;
67087 }
67088}
67089
67090void
67091TestJSImplInterfaceJSImpl::PassVariadicUnion(const nsTArray<OwningCanvasPatternOrCanvasGradient>& arg, ErrorResult& aRv, JS::Realm* aRealm)
67092{
67093 CallSetup s(this, aRv, "TestJSImplInterface.passVariadicUnion", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67094 if (aRv.Failed()) {
67095 return;
67096 }
67097 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67097); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67097; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67098 BindingCallContext& cx = s.GetCallContext();
67099
67100 JS::Rooted<JS::Value> rval(cx);
67101 JS::RootedVector<JS::Value> argv(cx);
67102 if (!argv.resize((1 - 1) + arg.Length())) {
67103 // That threw an exception on the JSContext, and our CallSetup will do
67104 // the right thing with that.
67105 return;
67106 }
67107 unsigned argc = (1 - 1) + arg.Length();
67108
67109 do {
67110 for (uint32_t idx = 0; idx < arg.Length(); ++idx) {
67111 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
67112 if (!arg[idx].ToJSVal(cx, callbackObj, argv[0 + idx])) {
67113 aRv.Throw(NS_ERROR_UNEXPECTED);
67114 return;
67115 }
67116 continue;
67117 }
67118 break;
67119 } while (false);
67120
67121 JS::Rooted<JS::Value> callable(cx);
67122 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67123 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67124 !InitIds(cx, atomsCache)) ||
67125 !GetCallableProperty(cx, atomsCache->passVariadicUnion_id, &callable)) {
67126 aRv.Throw(NS_ERROR_UNEXPECTED);
67127 return;
67128 }
67129 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67130 if (!JS::Call(cx, thisValue, callable,
67131 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
67132 aRv.NoteJSContextException(cx);
67133 return;
67134 }
67135}
67136
67137void
67138TestJSImplInterfaceJSImpl::PassSequenceOfNullableUnions(const Sequence<Nullable<OwningCanvasPatternOrCanvasGradient>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
67139{
67140 CallSetup s(this, aRv, "TestJSImplInterface.passSequenceOfNullableUnions", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67141 if (aRv.Failed()) {
67142 return;
67143 }
67144 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67144); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67144; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67145 BindingCallContext& cx = s.GetCallContext();
67146
67147 JS::Rooted<JS::Value> rval(cx);
67148 JS::RootedVector<JS::Value> argv(cx);
67149 if (!argv.resize(1)) {
67150 // That threw an exception on the JSContext, and our CallSetup will do
67151 // the right thing with that.
67152 return;
67153 }
67154 unsigned argc = 1;
67155
67156 do {
67157
67158 uint32_t length = arg.Length();
67159 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
67160 if (!returnArray) {
67161 aRv.Throw(NS_ERROR_UNEXPECTED);
67162 return;
67163 }
67164 // Scope for 'tmp'
67165 {
67166 JS::Rooted<JS::Value> tmp(cx);
67167 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
67168 // Control block to let us common up the JS_DefineElement calls when there
67169 // are different ways to succeed at wrapping the object.
67170 do {
67171 if (arg[sequenceIdx0].IsNull()) {
67172 tmp.setNull();
67173 break;
67174 }
67175 if (!arg[sequenceIdx0].Value().ToJSVal(cx, returnArray, &tmp)) {
67176 aRv.Throw(NS_ERROR_UNEXPECTED);
67177 return;
67178 }
67179 break;
67180 } while (false);
67181 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
67182 JSPROP_ENUMERATE)) {
67183 aRv.Throw(NS_ERROR_UNEXPECTED);
67184 return;
67185 }
67186 }
67187 }
67188 argv[0].setObject(*returnArray);
67189 break;
67190 } while (false);
67191
67192 JS::Rooted<JS::Value> callable(cx);
67193 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67194 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67195 !InitIds(cx, atomsCache)) ||
67196 !GetCallableProperty(cx, atomsCache->passSequenceOfNullableUnions_id, &callable)) {
67197 aRv.Throw(NS_ERROR_UNEXPECTED);
67198 return;
67199 }
67200 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67201 if (!JS::Call(cx, thisValue, callable,
67202 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
67203 aRv.NoteJSContextException(cx);
67204 return;
67205 }
67206}
67207
67208void
67209TestJSImplInterfaceJSImpl::PassVariadicNullableUnion(const nsTArray<Nullable<OwningCanvasPatternOrCanvasGradient>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
67210{
67211 CallSetup s(this, aRv, "TestJSImplInterface.passVariadicNullableUnion", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67212 if (aRv.Failed()) {
67213 return;
67214 }
67215 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67215); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67215; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67216 BindingCallContext& cx = s.GetCallContext();
67217
67218 JS::Rooted<JS::Value> rval(cx);
67219 JS::RootedVector<JS::Value> argv(cx);
67220 if (!argv.resize((1 - 1) + arg.Length())) {
67221 // That threw an exception on the JSContext, and our CallSetup will do
67222 // the right thing with that.
67223 return;
67224 }
67225 unsigned argc = (1 - 1) + arg.Length();
67226
67227 do {
67228 for (uint32_t idx = 0; idx < arg.Length(); ++idx) {
67229 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
67230 if (arg[idx].IsNull()) {
67231 argv[0 + idx].setNull();
67232 continue;
67233 }
67234 if (!arg[idx].Value().ToJSVal(cx, callbackObj, argv[0 + idx])) {
67235 aRv.Throw(NS_ERROR_UNEXPECTED);
67236 return;
67237 }
67238 continue;
67239 }
67240 break;
67241 } while (false);
67242
67243 JS::Rooted<JS::Value> callable(cx);
67244 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67245 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67246 !InitIds(cx, atomsCache)) ||
67247 !GetCallableProperty(cx, atomsCache->passVariadicNullableUnion_id, &callable)) {
67248 aRv.Throw(NS_ERROR_UNEXPECTED);
67249 return;
67250 }
67251 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67252 if (!JS::Call(cx, thisValue, callable,
67253 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
67254 aRv.NoteJSContextException(cx);
67255 return;
67256 }
67257}
67258
67259void
67260TestJSImplInterfaceJSImpl::PassRecordOfUnions(const Record<nsString, OwningCanvasPatternOrCanvasGradient>& arg, ErrorResult& aRv, JS::Realm* aRealm)
67261{
67262 CallSetup s(this, aRv, "TestJSImplInterface.passRecordOfUnions", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67263 if (aRv.Failed()) {
67264 return;
67265 }
67266 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67266); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67266; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67267 BindingCallContext& cx = s.GetCallContext();
67268
67269 JS::Rooted<JS::Value> rval(cx);
67270 JS::RootedVector<JS::Value> argv(cx);
67271 if (!argv.resize(1)) {
67272 // That threw an exception on the JSContext, and our CallSetup will do
67273 // the right thing with that.
67274 return;
67275 }
67276 unsigned argc = 1;
67277
67278 do {
67279
67280 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
67281 if (!returnObj) {
67282 aRv.Throw(NS_ERROR_UNEXPECTED);
67283 return;
67284 }
67285 // Scope for 'tmp'
67286 {
67287 JS::Rooted<JS::Value> tmp(cx);
67288 for (auto& entry : arg.Entries()) {
67289 auto& recordValue0 = entry.mValue;
67290 // Control block to let us common up the JS_DefineUCProperty calls when there
67291 // are different ways to succeed at wrapping the value.
67292 do {
67293 if (!recordValue0.ToJSVal(cx, returnObj, &tmp)) {
67294 aRv.Throw(NS_ERROR_UNEXPECTED);
67295 return;
67296 }
67297 break;
67298 } while (false);
67299 if (!JS_DefineUCProperty(cx, returnObj,
67300 entry.mKey.BeginReading(),
67301 entry.mKey.Length(), tmp,
67302 JSPROP_ENUMERATE)) {
67303 aRv.Throw(NS_ERROR_UNEXPECTED);
67304 return;
67305 }
67306 }
67307 }
67308 argv[0].setObject(*returnObj);
67309 break;
67310 } while (false);
67311
67312 JS::Rooted<JS::Value> callable(cx);
67313 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67314 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67315 !InitIds(cx, atomsCache)) ||
67316 !GetCallableProperty(cx, atomsCache->passRecordOfUnions_id, &callable)) {
67317 aRv.Throw(NS_ERROR_UNEXPECTED);
67318 return;
67319 }
67320 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67321 if (!JS::Call(cx, thisValue, callable,
67322 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
67323 aRv.NoteJSContextException(cx);
67324 return;
67325 }
67326}
67327
67328void
67329TestJSImplInterfaceJSImpl::ReceiveUnion(OwningCanvasPatternOrCanvasGradient& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
67330{
67331 CallSetup s(this, aRv, "TestJSImplInterface.receiveUnion", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67332 if (aRv.Failed()) {
67333 return;
67334 }
67335 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67335); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67335; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67336 BindingCallContext& cx = s.GetCallContext();
67337
67338 JS::Rooted<JS::Value> rval(cx);
67339
67340 JS::Rooted<JS::Value> callable(cx);
67341 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67342 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67343 !InitIds(cx, atomsCache)) ||
67344 !GetCallableProperty(cx, atomsCache->receiveUnion_id, &callable)) {
67345 aRv.Throw(NS_ERROR_UNEXPECTED);
67346 return;
67347 }
67348 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67349 if (!JS::Call(cx, thisValue, callable,
67350 JS::HandleValueArray::empty(), &rval)) {
67351 aRv.NoteJSContextException(cx);
67352 return;
67353 }
67354 OwningCanvasPatternOrCanvasGradient& rvalDecl(aRetVal);
67355 if (!rvalDecl.Init(cx, rval, "Return value of TestJSImplInterface.receiveUnion", false)) {
67356 aRv.Throw(NS_ERROR_UNEXPECTED);
67357 return;
67358 }
67359}
67360
67361void
67362TestJSImplInterfaceJSImpl::ReceiveUnion2(OwningObjectOrLong& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
67363{
67364 CallSetup s(this, aRv, "TestJSImplInterface.receiveUnion2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67365 if (aRv.Failed()) {
67366 return;
67367 }
67368 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67368); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67368; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67369 BindingCallContext& cx = s.GetCallContext();
67370
67371 JS::Rooted<JS::Value> rval(cx);
67372
67373 JS::Rooted<JS::Value> callable(cx);
67374 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67375 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67376 !InitIds(cx, atomsCache)) ||
67377 !GetCallableProperty(cx, atomsCache->receiveUnion2_id, &callable)) {
67378 aRv.Throw(NS_ERROR_UNEXPECTED);
67379 return;
67380 }
67381 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67382 if (!JS::Call(cx, thisValue, callable,
67383 JS::HandleValueArray::empty(), &rval)) {
67384 aRv.NoteJSContextException(cx);
67385 return;
67386 }
67387 OwningObjectOrLong& rvalDecl(aRetVal);
67388 if (!rvalDecl.Init(cx, rval, "Return value of TestJSImplInterface.receiveUnion2", false)) {
67389 aRv.Throw(NS_ERROR_UNEXPECTED);
67390 return;
67391 }
67392}
67393
67394void
67395TestJSImplInterfaceJSImpl::ReceiveUnionContainingNull(OwningCanvasPatternOrNullOrCanvasGradient& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
67396{
67397 CallSetup s(this, aRv, "TestJSImplInterface.receiveUnionContainingNull", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67398 if (aRv.Failed()) {
67399 return;
67400 }
67401 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67401); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67401; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67402 BindingCallContext& cx = s.GetCallContext();
67403
67404 JS::Rooted<JS::Value> rval(cx);
67405
67406 JS::Rooted<JS::Value> callable(cx);
67407 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67408 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67409 !InitIds(cx, atomsCache)) ||
67410 !GetCallableProperty(cx, atomsCache->receiveUnionContainingNull_id, &callable)) {
67411 aRv.Throw(NS_ERROR_UNEXPECTED);
67412 return;
67413 }
67414 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67415 if (!JS::Call(cx, thisValue, callable,
67416 JS::HandleValueArray::empty(), &rval)) {
67417 aRv.NoteJSContextException(cx);
67418 return;
67419 }
67420 OwningCanvasPatternOrNullOrCanvasGradient& rvalDecl(aRetVal);
67421 if (!rvalDecl.Init(cx, rval, "Return value of TestJSImplInterface.receiveUnionContainingNull", false)) {
67422 aRv.Throw(NS_ERROR_UNEXPECTED);
67423 return;
67424 }
67425}
67426
67427void
67428TestJSImplInterfaceJSImpl::ReceiveNullableUnion(Nullable<OwningCanvasPatternOrCanvasGradient>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
67429{
67430 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableUnion", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67431 if (aRv.Failed()) {
67432 return;
67433 }
67434 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67434); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67434; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67435 BindingCallContext& cx = s.GetCallContext();
67436
67437 JS::Rooted<JS::Value> rval(cx);
67438
67439 JS::Rooted<JS::Value> callable(cx);
67440 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67441 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67442 !InitIds(cx, atomsCache)) ||
67443 !GetCallableProperty(cx, atomsCache->receiveNullableUnion_id, &callable)) {
67444 aRv.Throw(NS_ERROR_UNEXPECTED);
67445 return;
67446 }
67447 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67448 if (!JS::Call(cx, thisValue, callable,
67449 JS::HandleValueArray::empty(), &rval)) {
67450 aRv.NoteJSContextException(cx);
67451 return;
67452 }
67453 Nullable<OwningCanvasPatternOrCanvasGradient >& rvalDecl(aRetVal);
67454 if (rval.isNullOrUndefined()) {
67455 rvalDecl.SetNull();
67456 } else {
67457 if (!rvalDecl.SetValue().Init(cx, rval, "Return value of TestJSImplInterface.receiveNullableUnion", false)) {
67458 aRv.Throw(NS_ERROR_UNEXPECTED);
67459 return;
67460 }
67461 }
67462}
67463
67464void
67465TestJSImplInterfaceJSImpl::ReceiveNullableUnion2(Nullable<OwningObjectOrLong>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
67466{
67467 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableUnion2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67468 if (aRv.Failed()) {
67469 return;
67470 }
67471 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67471); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67471; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67472 BindingCallContext& cx = s.GetCallContext();
67473
67474 JS::Rooted<JS::Value> rval(cx);
67475
67476 JS::Rooted<JS::Value> callable(cx);
67477 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67478 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67479 !InitIds(cx, atomsCache)) ||
67480 !GetCallableProperty(cx, atomsCache->receiveNullableUnion2_id, &callable)) {
67481 aRv.Throw(NS_ERROR_UNEXPECTED);
67482 return;
67483 }
67484 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67485 if (!JS::Call(cx, thisValue, callable,
67486 JS::HandleValueArray::empty(), &rval)) {
67487 aRv.NoteJSContextException(cx);
67488 return;
67489 }
67490 Nullable<OwningObjectOrLong >& rvalDecl(aRetVal);
67491 if (rval.isNullOrUndefined()) {
67492 rvalDecl.SetNull();
67493 } else {
67494 if (!rvalDecl.SetValue().Init(cx, rval, "Return value of TestJSImplInterface.receiveNullableUnion2", false)) {
67495 aRv.Throw(NS_ERROR_UNEXPECTED);
67496 return;
67497 }
67498 }
67499}
67500
67501void
67502TestJSImplInterfaceJSImpl::PassPromise(Promise& arg, ErrorResult& aRv, JS::Realm* aRealm)
67503{
67504 CallSetup s(this, aRv, "TestJSImplInterface.passPromise", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67505 if (aRv.Failed()) {
67506 return;
67507 }
67508 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67508); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67508; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67509 BindingCallContext& cx = s.GetCallContext();
67510
67511 JS::Rooted<JS::Value> rval(cx);
67512 JS::RootedVector<JS::Value> argv(cx);
67513 if (!argv.resize(1)) {
67514 // That threw an exception on the JSContext, and our CallSetup will do
67515 // the right thing with that.
67516 return;
67517 }
67518 unsigned argc = 1;
67519
67520 do {
67521 if (!ToJSValue(cx, arg, argv[0])) {
67522 aRv.Throw(NS_ERROR_UNEXPECTED);
67523 return;
67524 }
67525 break;
67526 } while (false);
67527
67528 JS::Rooted<JS::Value> callable(cx);
67529 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67530 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67531 !InitIds(cx, atomsCache)) ||
67532 !GetCallableProperty(cx, atomsCache->passPromise_id, &callable)) {
67533 aRv.Throw(NS_ERROR_UNEXPECTED);
67534 return;
67535 }
67536 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67537 if (!JS::Call(cx, thisValue, callable,
67538 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
67539 aRv.NoteJSContextException(cx);
67540 return;
67541 }
67542}
67543
67544void
67545TestJSImplInterfaceJSImpl::PassOptionalPromise(const Optional<OwningNonNull<Promise>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
67546{
67547 CallSetup s(this, aRv, "TestJSImplInterface.passOptionalPromise", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67548 if (aRv.Failed()) {
67549 return;
67550 }
67551 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67551); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67551; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67552 BindingCallContext& cx = s.GetCallContext();
67553
67554 JS::Rooted<JS::Value> rval(cx);
67555 JS::RootedVector<JS::Value> argv(cx);
67556 if (!argv.resize(1)) {
67557 // That threw an exception on the JSContext, and our CallSetup will do
67558 // the right thing with that.
67559 return;
67560 }
67561 unsigned argc = 1;
67562
67563 do {
67564 if (arg.WasPassed()) {
67565 if (!ToJSValue(cx, arg.Value(), argv[0])) {
67566 aRv.Throw(NS_ERROR_UNEXPECTED);
67567 return;
67568 }
67569 break;
67570 } else if (argc == 1) {
67571 // This is our current trailing argument; reduce argc
67572 --argc;
67573 } else {
67574 argv[0].setUndefined();
67575 }
67576 } while (false);
67577
67578 JS::Rooted<JS::Value> callable(cx);
67579 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67580 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67581 !InitIds(cx, atomsCache)) ||
67582 !GetCallableProperty(cx, atomsCache->passOptionalPromise_id, &callable)) {
67583 aRv.Throw(NS_ERROR_UNEXPECTED);
67584 return;
67585 }
67586 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67587 if (!JS::Call(cx, thisValue, callable,
67588 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
67589 aRv.NoteJSContextException(cx);
67590 return;
67591 }
67592}
67593
67594void
67595TestJSImplInterfaceJSImpl::PassPromiseSequence(const Sequence<OwningNonNull<Promise>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
67596{
67597 CallSetup s(this, aRv, "TestJSImplInterface.passPromiseSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67598 if (aRv.Failed()) {
67599 return;
67600 }
67601 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67601); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67601; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67602 BindingCallContext& cx = s.GetCallContext();
67603
67604 JS::Rooted<JS::Value> rval(cx);
67605 JS::RootedVector<JS::Value> argv(cx);
67606 if (!argv.resize(1)) {
67607 // That threw an exception on the JSContext, and our CallSetup will do
67608 // the right thing with that.
67609 return;
67610 }
67611 unsigned argc = 1;
67612
67613 do {
67614
67615 uint32_t length = arg.Length();
67616 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
67617 if (!returnArray) {
67618 aRv.Throw(NS_ERROR_UNEXPECTED);
67619 return;
67620 }
67621 // Scope for 'tmp'
67622 {
67623 JS::Rooted<JS::Value> tmp(cx);
67624 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
67625 // Control block to let us common up the JS_DefineElement calls when there
67626 // are different ways to succeed at wrapping the object.
67627 do {
67628 if (!ToJSValue(cx, arg[sequenceIdx0], &tmp)) {
67629 aRv.Throw(NS_ERROR_UNEXPECTED);
67630 return;
67631 }
67632 break;
67633 } while (false);
67634 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
67635 JSPROP_ENUMERATE)) {
67636 aRv.Throw(NS_ERROR_UNEXPECTED);
67637 return;
67638 }
67639 }
67640 }
67641 argv[0].setObject(*returnArray);
67642 break;
67643 } while (false);
67644
67645 JS::Rooted<JS::Value> callable(cx);
67646 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67647 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67648 !InitIds(cx, atomsCache)) ||
67649 !GetCallableProperty(cx, atomsCache->passPromiseSequence_id, &callable)) {
67650 aRv.Throw(NS_ERROR_UNEXPECTED);
67651 return;
67652 }
67653 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67654 if (!JS::Call(cx, thisValue, callable,
67655 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
67656 aRv.NoteJSContextException(cx);
67657 return;
67658 }
67659}
67660
67661already_AddRefed<Promise>
67662TestJSImplInterfaceJSImpl::ReceivePromise(ErrorResult& aRv, JS::Realm* aRealm)
67663{
67664 CallSetup s(this, aRv, "TestJSImplInterface.receivePromise", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67665 if (aRv.Failed()) {
67666 return nullptr;
67667 }
67668 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67668); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67668; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67669 BindingCallContext& cx = s.GetCallContext();
67670
67671 JS::Rooted<JS::Value> rval(cx);
67672
67673 JS::Rooted<JS::Value> callable(cx);
67674 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67675 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67676 !InitIds(cx, atomsCache)) ||
67677 !GetCallableProperty(cx, atomsCache->receivePromise_id, &callable)) {
67678 aRv.Throw(NS_ERROR_UNEXPECTED);
67679 return nullptr;
67680 }
67681 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67682 if (!JS::Call(cx, thisValue, callable,
67683 JS::HandleValueArray::empty(), &rval)) {
67684 aRv.NoteJSContextException(cx);
67685 return nullptr;
67686 }
67687 RefPtr<Promise> rvalDecl;
67688 { // Scope for our GlobalObject, FastErrorResult, JSAutoRealm,
67689 // etc.
67690
67691 JS::Rooted<JSObject*> globalObj(cx);
67692 if (!rval.isObject()) {
67693 aRv.ThrowTypeError<MSG_NOT_OBJECT>("return value of TestJSImplInterface.receivePromise");
67694 return nullptr;
67695 }
67696 JSObject* unwrappedVal = js::CheckedUnwrapStatic(&rval.toObject());
67697 if (!unwrappedVal) {
67698 // A slight lie, but not much of one, for a dead object wrapper.
67699 aRv.ThrowTypeError<MSG_NOT_OBJECT>("return value of TestJSImplInterface.receivePromise");
67700 return nullptr;
67701 }
67702 globalObj = JS::GetNonCCWObjectGlobal(unwrappedVal);
67703 JSAutoRealm ar(cx, globalObj);
67704 GlobalObject promiseGlobal(cx, globalObj);
67705 if (promiseGlobal.Failed()) {
67706 aRv.Throw(NS_ERROR_UNEXPECTED);
67707 return nullptr;
67708 }
67709
67710 JS::Rooted<JS::Value> valueToResolve(cx, rval);
67711 if (!JS_WrapValue(cx, &valueToResolve)) {
67712 aRv.Throw(NS_ERROR_UNEXPECTED);
67713 return nullptr;
67714 }
67715 binding_detail::FastErrorResult promiseRv;
67716 nsCOMPtr<nsIGlobalObject> global =
67717 do_QueryInterface(promiseGlobal.GetAsSupports());
67718 if (!global) {
67719 promiseRv.Throw(NS_ERROR_UNEXPECTED);
67720 MOZ_ALWAYS_TRUE(promiseRv.MaybeSetPendingException(cx))do { if ((__builtin_expect(!!(promiseRv.MaybeSetPendingException
(cx)), 1))) { } else { do { static_assert( mozilla::detail::AssertionConditionType
<decltype(false)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("false" " (" "promiseRv.MaybeSetPendingException(cx)"
")", "../TestJSImplGenBinding.cpp", 67720); AnnotateMozCrashReason
("MOZ_DIAGNOSTIC_ASSERT" "(" "false" ") (" "promiseRv.MaybeSetPendingException(cx)"
")"); do { *((volatile int*)__null) = 67720; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); } } while
(false)
;
67721 aRv.Throw(NS_ERROR_UNEXPECTED);
67722 return nullptr;
67723 }
67724 rvalDecl = Promise::Resolve(global, cx, valueToResolve,
67725 promiseRv);
67726 if (promiseRv.MaybeSetPendingException(cx)) {
67727 aRv.Throw(NS_ERROR_UNEXPECTED);
67728 return nullptr;
67729 }
67730 }
67731 return rvalDecl.forget();
67732}
67733
67734already_AddRefed<Promise>
67735TestJSImplInterfaceJSImpl::ReceiveAddrefedPromise(ErrorResult& aRv, JS::Realm* aRealm)
67736{
67737 CallSetup s(this, aRv, "TestJSImplInterface.receiveAddrefedPromise", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67738 if (aRv.Failed()) {
67739 return nullptr;
67740 }
67741 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67741); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67741; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67742 BindingCallContext& cx = s.GetCallContext();
67743
67744 JS::Rooted<JS::Value> rval(cx);
67745
67746 JS::Rooted<JS::Value> callable(cx);
67747 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67748 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67749 !InitIds(cx, atomsCache)) ||
67750 !GetCallableProperty(cx, atomsCache->receiveAddrefedPromise_id, &callable)) {
67751 aRv.Throw(NS_ERROR_UNEXPECTED);
67752 return nullptr;
67753 }
67754 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67755 if (!JS::Call(cx, thisValue, callable,
67756 JS::HandleValueArray::empty(), &rval)) {
67757 aRv.NoteJSContextException(cx);
67758 return nullptr;
67759 }
67760 RefPtr<Promise> rvalDecl;
67761 { // Scope for our GlobalObject, FastErrorResult, JSAutoRealm,
67762 // etc.
67763
67764 JS::Rooted<JSObject*> globalObj(cx);
67765 if (!rval.isObject()) {
67766 aRv.ThrowTypeError<MSG_NOT_OBJECT>("return value of TestJSImplInterface.receiveAddrefedPromise");
67767 return nullptr;
67768 }
67769 JSObject* unwrappedVal = js::CheckedUnwrapStatic(&rval.toObject());
67770 if (!unwrappedVal) {
67771 // A slight lie, but not much of one, for a dead object wrapper.
67772 aRv.ThrowTypeError<MSG_NOT_OBJECT>("return value of TestJSImplInterface.receiveAddrefedPromise");
67773 return nullptr;
67774 }
67775 globalObj = JS::GetNonCCWObjectGlobal(unwrappedVal);
67776 JSAutoRealm ar(cx, globalObj);
67777 GlobalObject promiseGlobal(cx, globalObj);
67778 if (promiseGlobal.Failed()) {
67779 aRv.Throw(NS_ERROR_UNEXPECTED);
67780 return nullptr;
67781 }
67782
67783 JS::Rooted<JS::Value> valueToResolve(cx, rval);
67784 if (!JS_WrapValue(cx, &valueToResolve)) {
67785 aRv.Throw(NS_ERROR_UNEXPECTED);
67786 return nullptr;
67787 }
67788 binding_detail::FastErrorResult promiseRv;
67789 nsCOMPtr<nsIGlobalObject> global =
67790 do_QueryInterface(promiseGlobal.GetAsSupports());
67791 if (!global) {
67792 promiseRv.Throw(NS_ERROR_UNEXPECTED);
67793 MOZ_ALWAYS_TRUE(promiseRv.MaybeSetPendingException(cx))do { if ((__builtin_expect(!!(promiseRv.MaybeSetPendingException
(cx)), 1))) { } else { do { static_assert( mozilla::detail::AssertionConditionType
<decltype(false)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(false))), 0))) { do { } while
(false); MOZ_ReportAssertionFailure("false" " (" "promiseRv.MaybeSetPendingException(cx)"
")", "../TestJSImplGenBinding.cpp", 67793); AnnotateMozCrashReason
("MOZ_DIAGNOSTIC_ASSERT" "(" "false" ") (" "promiseRv.MaybeSetPendingException(cx)"
")"); do { *((volatile int*)__null) = 67793; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); } } while
(false)
;
67794 aRv.Throw(NS_ERROR_UNEXPECTED);
67795 return nullptr;
67796 }
67797 rvalDecl = Promise::Resolve(global, cx, valueToResolve,
67798 promiseRv);
67799 if (promiseRv.MaybeSetPendingException(cx)) {
67800 aRv.Throw(NS_ERROR_UNEXPECTED);
67801 return nullptr;
67802 }
67803 }
67804 return rvalDecl.forget();
67805}
67806
67807void
67808TestJSImplInterfaceJSImpl::MethodRenamedTo(ErrorResult& aRv, JS::Realm* aRealm)
67809{
67810 CallSetup s(this, aRv, "TestJSImplInterface.methodRenamedFrom", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67811 if (aRv.Failed()) {
67812 return;
67813 }
67814 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67814); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67814; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67815 BindingCallContext& cx = s.GetCallContext();
67816
67817 JS::Rooted<JS::Value> rval(cx);
67818
67819 JS::Rooted<JS::Value> callable(cx);
67820 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67821 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67822 !InitIds(cx, atomsCache)) ||
67823 !GetCallableProperty(cx, atomsCache->methodRenamedTo_id, &callable)) {
67824 aRv.Throw(NS_ERROR_UNEXPECTED);
67825 return;
67826 }
67827 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67828 if (!JS::Call(cx, thisValue, callable,
67829 JS::HandleValueArray::empty(), &rval)) {
67830 aRv.NoteJSContextException(cx);
67831 return;
67832 }
67833}
67834
67835void
67836TestJSImplInterfaceJSImpl::MethodRenamedTo(int8_t argument, ErrorResult& aRv, JS::Realm* aRealm)
67837{
67838 CallSetup s(this, aRv, "TestJSImplInterface.methodRenamedFrom", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67839 if (aRv.Failed()) {
67840 return;
67841 }
67842 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67842); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67842; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67843 BindingCallContext& cx = s.GetCallContext();
67844
67845 JS::Rooted<JS::Value> rval(cx);
67846 JS::RootedVector<JS::Value> argv(cx);
67847 if (!argv.resize(1)) {
67848 // That threw an exception on the JSContext, and our CallSetup will do
67849 // the right thing with that.
67850 return;
67851 }
67852 unsigned argc = 1;
67853
67854 do {
67855 argv[0].setInt32(int32_t(argument));
67856 break;
67857 } while (false);
67858
67859 JS::Rooted<JS::Value> callable(cx);
67860 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67861 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67862 !InitIds(cx, atomsCache)) ||
67863 !GetCallableProperty(cx, atomsCache->methodRenamedTo_id, &callable)) {
67864 aRv.Throw(NS_ERROR_UNEXPECTED);
67865 return;
67866 }
67867 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67868 if (!JS::Call(cx, thisValue, callable,
67869 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
67870 aRv.NoteJSContextException(cx);
67871 return;
67872 }
67873}
67874
67875void
67876TestJSImplInterfaceJSImpl::PassDictionary(const Dict& x, ErrorResult& aRv, JS::Realm* aRealm)
67877{
67878 CallSetup s(this, aRv, "TestJSImplInterface.passDictionary", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67879 if (aRv.Failed()) {
67880 return;
67881 }
67882 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67882); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67882; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67883 BindingCallContext& cx = s.GetCallContext();
67884
67885 JS::Rooted<JS::Value> rval(cx);
67886 JS::RootedVector<JS::Value> argv(cx);
67887 if (!argv.resize(1)) {
67888 // That threw an exception on the JSContext, and our CallSetup will do
67889 // the right thing with that.
67890 return;
67891 }
67892 unsigned argc = 1;
67893
67894 do {
67895 if (!x.ToObjectInternal(cx, argv[0])) {
67896 aRv.Throw(NS_ERROR_UNEXPECTED);
67897 return;
67898 }
67899 break;
67900 } while (false);
67901
67902 JS::Rooted<JS::Value> callable(cx);
67903 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67904 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67905 !InitIds(cx, atomsCache)) ||
67906 !GetCallableProperty(cx, atomsCache->passDictionary_id, &callable)) {
67907 aRv.Throw(NS_ERROR_UNEXPECTED);
67908 return;
67909 }
67910 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67911 if (!JS::Call(cx, thisValue, callable,
67912 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
67913 aRv.NoteJSContextException(cx);
67914 return;
67915 }
67916}
67917
67918void
67919TestJSImplInterfaceJSImpl::PassDictionary2(const Dict& x, ErrorResult& aRv, JS::Realm* aRealm)
67920{
67921 CallSetup s(this, aRv, "TestJSImplInterface.passDictionary2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67922 if (aRv.Failed()) {
67923 return;
67924 }
67925 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67925); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67925; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67926 BindingCallContext& cx = s.GetCallContext();
67927
67928 JS::Rooted<JS::Value> rval(cx);
67929 JS::RootedVector<JS::Value> argv(cx);
67930 if (!argv.resize(1)) {
67931 // That threw an exception on the JSContext, and our CallSetup will do
67932 // the right thing with that.
67933 return;
67934 }
67935 unsigned argc = 1;
67936
67937 do {
67938 if (!x.ToObjectInternal(cx, argv[0])) {
67939 aRv.Throw(NS_ERROR_UNEXPECTED);
67940 return;
67941 }
67942 break;
67943 } while (false);
67944
67945 JS::Rooted<JS::Value> callable(cx);
67946 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67947 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67948 !InitIds(cx, atomsCache)) ||
67949 !GetCallableProperty(cx, atomsCache->passDictionary2_id, &callable)) {
67950 aRv.Throw(NS_ERROR_UNEXPECTED);
67951 return;
67952 }
67953 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67954 if (!JS::Call(cx, thisValue, callable,
67955 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
67956 aRv.NoteJSContextException(cx);
67957 return;
67958 }
67959}
67960
67961void
67962TestJSImplInterfaceJSImpl::ReceiveDictionary(Dict& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
67963{
67964 CallSetup s(this, aRv, "TestJSImplInterface.receiveDictionary", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67965 if (aRv.Failed()) {
67966 return;
67967 }
67968 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 67968); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 67968; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
67969 BindingCallContext& cx = s.GetCallContext();
67970
67971 JS::Rooted<JS::Value> rval(cx);
67972
67973 JS::Rooted<JS::Value> callable(cx);
67974 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
67975 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
67976 !InitIds(cx, atomsCache)) ||
67977 !GetCallableProperty(cx, atomsCache->receiveDictionary_id, &callable)) {
67978 aRv.Throw(NS_ERROR_UNEXPECTED);
67979 return;
67980 }
67981 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
67982 if (!JS::Call(cx, thisValue, callable,
67983 JS::HandleValueArray::empty(), &rval)) {
67984 aRv.NoteJSContextException(cx);
67985 return;
67986 }
67987 Dict& rvalDecl(aRetVal);
67988 if (!rvalDecl.Init(cx, rval, "Return value of TestJSImplInterface.receiveDictionary", false)) {
67989 aRv.Throw(NS_ERROR_UNEXPECTED);
67990 return;
67991 }
67992}
67993
67994void
67995TestJSImplInterfaceJSImpl::ReceiveNullableDictionary(Nullable<Dict>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
67996{
67997 CallSetup s(this, aRv, "TestJSImplInterface.receiveNullableDictionary", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
67998 if (aRv.Failed()) {
67999 return;
68000 }
68001 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68001); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68001; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68002 BindingCallContext& cx = s.GetCallContext();
68003
68004 JS::Rooted<JS::Value> rval(cx);
68005
68006 JS::Rooted<JS::Value> callable(cx);
68007 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68008 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68009 !InitIds(cx, atomsCache)) ||
68010 !GetCallableProperty(cx, atomsCache->receiveNullableDictionary_id, &callable)) {
68011 aRv.Throw(NS_ERROR_UNEXPECTED);
68012 return;
68013 }
68014 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68015 if (!JS::Call(cx, thisValue, callable,
68016 JS::HandleValueArray::empty(), &rval)) {
68017 aRv.NoteJSContextException(cx);
68018 return;
68019 }
68020 Nullable<Dict>& rvalDecl(aRetVal);
68021 if (rval.isNullOrUndefined()) {
68022 rvalDecl.SetNull();
68023 } else {
68024 if (!rvalDecl.SetValue().Init(cx, rval, "Return value of TestJSImplInterface.receiveNullableDictionary", false)) {
68025 aRv.Throw(NS_ERROR_UNEXPECTED);
68026 return;
68027 }
68028 }
68029}
68030
68031void
68032TestJSImplInterfaceJSImpl::PassOtherDictionary(const GrandparentDict& x, ErrorResult& aRv, JS::Realm* aRealm)
68033{
68034 CallSetup s(this, aRv, "TestJSImplInterface.passOtherDictionary", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68035 if (aRv.Failed()) {
68036 return;
68037 }
68038 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68038); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68038; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68039 BindingCallContext& cx = s.GetCallContext();
68040
68041 JS::Rooted<JS::Value> rval(cx);
68042 JS::RootedVector<JS::Value> argv(cx);
68043 if (!argv.resize(1)) {
68044 // That threw an exception on the JSContext, and our CallSetup will do
68045 // the right thing with that.
68046 return;
68047 }
68048 unsigned argc = 1;
68049
68050 do {
68051 if (!x.ToObjectInternal(cx, argv[0])) {
68052 aRv.Throw(NS_ERROR_UNEXPECTED);
68053 return;
68054 }
68055 break;
68056 } while (false);
68057
68058 JS::Rooted<JS::Value> callable(cx);
68059 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68060 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68061 !InitIds(cx, atomsCache)) ||
68062 !GetCallableProperty(cx, atomsCache->passOtherDictionary_id, &callable)) {
68063 aRv.Throw(NS_ERROR_UNEXPECTED);
68064 return;
68065 }
68066 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68067 if (!JS::Call(cx, thisValue, callable,
68068 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68069 aRv.NoteJSContextException(cx);
68070 return;
68071 }
68072}
68073
68074void
68075TestJSImplInterfaceJSImpl::PassSequenceOfDictionaries(const Sequence<Dict>& x, ErrorResult& aRv, JS::Realm* aRealm)
68076{
68077 CallSetup s(this, aRv, "TestJSImplInterface.passSequenceOfDictionaries", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68078 if (aRv.Failed()) {
68079 return;
68080 }
68081 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68081); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68081; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68082 BindingCallContext& cx = s.GetCallContext();
68083
68084 JS::Rooted<JS::Value> rval(cx);
68085 JS::RootedVector<JS::Value> argv(cx);
68086 if (!argv.resize(1)) {
68087 // That threw an exception on the JSContext, and our CallSetup will do
68088 // the right thing with that.
68089 return;
68090 }
68091 unsigned argc = 1;
68092
68093 do {
68094
68095 uint32_t length = x.Length();
68096 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
68097 if (!returnArray) {
68098 aRv.Throw(NS_ERROR_UNEXPECTED);
68099 return;
68100 }
68101 // Scope for 'tmp'
68102 {
68103 JS::Rooted<JS::Value> tmp(cx);
68104 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
68105 // Control block to let us common up the JS_DefineElement calls when there
68106 // are different ways to succeed at wrapping the object.
68107 do {
68108 if (!x[sequenceIdx0].ToObjectInternal(cx, &tmp)) {
68109 aRv.Throw(NS_ERROR_UNEXPECTED);
68110 return;
68111 }
68112 break;
68113 } while (false);
68114 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
68115 JSPROP_ENUMERATE)) {
68116 aRv.Throw(NS_ERROR_UNEXPECTED);
68117 return;
68118 }
68119 }
68120 }
68121 argv[0].setObject(*returnArray);
68122 break;
68123 } while (false);
68124
68125 JS::Rooted<JS::Value> callable(cx);
68126 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68127 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68128 !InitIds(cx, atomsCache)) ||
68129 !GetCallableProperty(cx, atomsCache->passSequenceOfDictionaries_id, &callable)) {
68130 aRv.Throw(NS_ERROR_UNEXPECTED);
68131 return;
68132 }
68133 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68134 if (!JS::Call(cx, thisValue, callable,
68135 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68136 aRv.NoteJSContextException(cx);
68137 return;
68138 }
68139}
68140
68141void
68142TestJSImplInterfaceJSImpl::PassRecordOfDictionaries(const Record<nsString, GrandparentDict>& x, ErrorResult& aRv, JS::Realm* aRealm)
68143{
68144 CallSetup s(this, aRv, "TestJSImplInterface.passRecordOfDictionaries", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68145 if (aRv.Failed()) {
68146 return;
68147 }
68148 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68148); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68148; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68149 BindingCallContext& cx = s.GetCallContext();
68150
68151 JS::Rooted<JS::Value> rval(cx);
68152 JS::RootedVector<JS::Value> argv(cx);
68153 if (!argv.resize(1)) {
68154 // That threw an exception on the JSContext, and our CallSetup will do
68155 // the right thing with that.
68156 return;
68157 }
68158 unsigned argc = 1;
68159
68160 do {
68161
68162 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
68163 if (!returnObj) {
68164 aRv.Throw(NS_ERROR_UNEXPECTED);
68165 return;
68166 }
68167 // Scope for 'tmp'
68168 {
68169 JS::Rooted<JS::Value> tmp(cx);
68170 for (auto& entry : x.Entries()) {
68171 auto& recordValue0 = entry.mValue;
68172 // Control block to let us common up the JS_DefineUCProperty calls when there
68173 // are different ways to succeed at wrapping the value.
68174 do {
68175 if (!recordValue0.ToObjectInternal(cx, &tmp)) {
68176 aRv.Throw(NS_ERROR_UNEXPECTED);
68177 return;
68178 }
68179 break;
68180 } while (false);
68181 if (!JS_DefineUCProperty(cx, returnObj,
68182 entry.mKey.BeginReading(),
68183 entry.mKey.Length(), tmp,
68184 JSPROP_ENUMERATE)) {
68185 aRv.Throw(NS_ERROR_UNEXPECTED);
68186 return;
68187 }
68188 }
68189 }
68190 argv[0].setObject(*returnObj);
68191 break;
68192 } while (false);
68193
68194 JS::Rooted<JS::Value> callable(cx);
68195 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68196 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68197 !InitIds(cx, atomsCache)) ||
68198 !GetCallableProperty(cx, atomsCache->passRecordOfDictionaries_id, &callable)) {
68199 aRv.Throw(NS_ERROR_UNEXPECTED);
68200 return;
68201 }
68202 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68203 if (!JS::Call(cx, thisValue, callable,
68204 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68205 aRv.NoteJSContextException(cx);
68206 return;
68207 }
68208}
68209
68210void
68211TestJSImplInterfaceJSImpl::PassDictionaryOrLong(const Dict& x, ErrorResult& aRv, JS::Realm* aRealm)
68212{
68213 CallSetup s(this, aRv, "TestJSImplInterface.passDictionaryOrLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68214 if (aRv.Failed()) {
68215 return;
68216 }
68217 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68217); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68217; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68218 BindingCallContext& cx = s.GetCallContext();
68219
68220 JS::Rooted<JS::Value> rval(cx);
68221 JS::RootedVector<JS::Value> argv(cx);
68222 if (!argv.resize(1)) {
68223 // That threw an exception on the JSContext, and our CallSetup will do
68224 // the right thing with that.
68225 return;
68226 }
68227 unsigned argc = 1;
68228
68229 do {
68230 if (!x.ToObjectInternal(cx, argv[0])) {
68231 aRv.Throw(NS_ERROR_UNEXPECTED);
68232 return;
68233 }
68234 break;
68235 } while (false);
68236
68237 JS::Rooted<JS::Value> callable(cx);
68238 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68239 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68240 !InitIds(cx, atomsCache)) ||
68241 !GetCallableProperty(cx, atomsCache->passDictionaryOrLong_id, &callable)) {
68242 aRv.Throw(NS_ERROR_UNEXPECTED);
68243 return;
68244 }
68245 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68246 if (!JS::Call(cx, thisValue, callable,
68247 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68248 aRv.NoteJSContextException(cx);
68249 return;
68250 }
68251}
68252
68253void
68254TestJSImplInterfaceJSImpl::PassDictionaryOrLong(int32_t x, ErrorResult& aRv, JS::Realm* aRealm)
68255{
68256 CallSetup s(this, aRv, "TestJSImplInterface.passDictionaryOrLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68257 if (aRv.Failed()) {
68258 return;
68259 }
68260 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68260); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68260; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68261 BindingCallContext& cx = s.GetCallContext();
68262
68263 JS::Rooted<JS::Value> rval(cx);
68264 JS::RootedVector<JS::Value> argv(cx);
68265 if (!argv.resize(1)) {
68266 // That threw an exception on the JSContext, and our CallSetup will do
68267 // the right thing with that.
68268 return;
68269 }
68270 unsigned argc = 1;
68271
68272 do {
68273 argv[0].setInt32(int32_t(x));
68274 break;
68275 } while (false);
68276
68277 JS::Rooted<JS::Value> callable(cx);
68278 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68279 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68280 !InitIds(cx, atomsCache)) ||
68281 !GetCallableProperty(cx, atomsCache->passDictionaryOrLong_id, &callable)) {
68282 aRv.Throw(NS_ERROR_UNEXPECTED);
68283 return;
68284 }
68285 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68286 if (!JS::Call(cx, thisValue, callable,
68287 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68288 aRv.NoteJSContextException(cx);
68289 return;
68290 }
68291}
68292
68293void
68294TestJSImplInterfaceJSImpl::PassDictContainingDict(const DictContainingDict& arg, ErrorResult& aRv, JS::Realm* aRealm)
68295{
68296 CallSetup s(this, aRv, "TestJSImplInterface.passDictContainingDict", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68297 if (aRv.Failed()) {
68298 return;
68299 }
68300 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68300); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68300; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68301 BindingCallContext& cx = s.GetCallContext();
68302
68303 JS::Rooted<JS::Value> rval(cx);
68304 JS::RootedVector<JS::Value> argv(cx);
68305 if (!argv.resize(1)) {
68306 // That threw an exception on the JSContext, and our CallSetup will do
68307 // the right thing with that.
68308 return;
68309 }
68310 unsigned argc = 1;
68311
68312 do {
68313 if (!arg.ToObjectInternal(cx, argv[0])) {
68314 aRv.Throw(NS_ERROR_UNEXPECTED);
68315 return;
68316 }
68317 break;
68318 } while (false);
68319
68320 JS::Rooted<JS::Value> callable(cx);
68321 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68322 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68323 !InitIds(cx, atomsCache)) ||
68324 !GetCallableProperty(cx, atomsCache->passDictContainingDict_id, &callable)) {
68325 aRv.Throw(NS_ERROR_UNEXPECTED);
68326 return;
68327 }
68328 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68329 if (!JS::Call(cx, thisValue, callable,
68330 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68331 aRv.NoteJSContextException(cx);
68332 return;
68333 }
68334}
68335
68336void
68337TestJSImplInterfaceJSImpl::PassDictContainingSequence(const DictContainingSequence& arg, ErrorResult& aRv, JS::Realm* aRealm)
68338{
68339 CallSetup s(this, aRv, "TestJSImplInterface.passDictContainingSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68340 if (aRv.Failed()) {
68341 return;
68342 }
68343 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68343); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68343; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68344 BindingCallContext& cx = s.GetCallContext();
68345
68346 JS::Rooted<JS::Value> rval(cx);
68347 JS::RootedVector<JS::Value> argv(cx);
68348 if (!argv.resize(1)) {
68349 // That threw an exception on the JSContext, and our CallSetup will do
68350 // the right thing with that.
68351 return;
68352 }
68353 unsigned argc = 1;
68354
68355 do {
68356 if (!arg.ToObjectInternal(cx, argv[0])) {
68357 aRv.Throw(NS_ERROR_UNEXPECTED);
68358 return;
68359 }
68360 break;
68361 } while (false);
68362
68363 JS::Rooted<JS::Value> callable(cx);
68364 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68365 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68366 !InitIds(cx, atomsCache)) ||
68367 !GetCallableProperty(cx, atomsCache->passDictContainingSequence_id, &callable)) {
68368 aRv.Throw(NS_ERROR_UNEXPECTED);
68369 return;
68370 }
68371 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68372 if (!JS::Call(cx, thisValue, callable,
68373 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68374 aRv.NoteJSContextException(cx);
68375 return;
68376 }
68377}
68378
68379void
68380TestJSImplInterfaceJSImpl::ReceiveDictContainingSequence(DictContainingSequence& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
68381{
68382 CallSetup s(this, aRv, "TestJSImplInterface.receiveDictContainingSequence", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68383 if (aRv.Failed()) {
68384 return;
68385 }
68386 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68386); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68386; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68387 BindingCallContext& cx = s.GetCallContext();
68388
68389 JS::Rooted<JS::Value> rval(cx);
68390
68391 JS::Rooted<JS::Value> callable(cx);
68392 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68393 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68394 !InitIds(cx, atomsCache)) ||
68395 !GetCallableProperty(cx, atomsCache->receiveDictContainingSequence_id, &callable)) {
68396 aRv.Throw(NS_ERROR_UNEXPECTED);
68397 return;
68398 }
68399 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68400 if (!JS::Call(cx, thisValue, callable,
68401 JS::HandleValueArray::empty(), &rval)) {
68402 aRv.NoteJSContextException(cx);
68403 return;
68404 }
68405 DictContainingSequence& rvalDecl(aRetVal);
68406 if (!rvalDecl.Init(cx, rval, "Return value of TestJSImplInterface.receiveDictContainingSequence", false)) {
68407 aRv.Throw(NS_ERROR_UNEXPECTED);
68408 return;
68409 }
68410}
68411
68412void
68413TestJSImplInterfaceJSImpl::PassVariadicDictionary(const nsTArray<Dict>& arg, ErrorResult& aRv, JS::Realm* aRealm)
68414{
68415 CallSetup s(this, aRv, "TestJSImplInterface.passVariadicDictionary", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68416 if (aRv.Failed()) {
68417 return;
68418 }
68419 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68419); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68419; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68420 BindingCallContext& cx = s.GetCallContext();
68421
68422 JS::Rooted<JS::Value> rval(cx);
68423 JS::RootedVector<JS::Value> argv(cx);
68424 if (!argv.resize((1 - 1) + arg.Length())) {
68425 // That threw an exception on the JSContext, and our CallSetup will do
68426 // the right thing with that.
68427 return;
68428 }
68429 unsigned argc = (1 - 1) + arg.Length();
68430
68431 do {
68432 for (uint32_t idx = 0; idx < arg.Length(); ++idx) {
68433 if (!arg[idx].ToObjectInternal(cx, argv[0 + idx])) {
68434 aRv.Throw(NS_ERROR_UNEXPECTED);
68435 return;
68436 }
68437 continue;
68438 }
68439 break;
68440 } while (false);
68441
68442 JS::Rooted<JS::Value> callable(cx);
68443 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68444 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68445 !InitIds(cx, atomsCache)) ||
68446 !GetCallableProperty(cx, atomsCache->passVariadicDictionary_id, &callable)) {
68447 aRv.Throw(NS_ERROR_UNEXPECTED);
68448 return;
68449 }
68450 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68451 if (!JS::Call(cx, thisValue, callable,
68452 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68453 aRv.NoteJSContextException(cx);
68454 return;
68455 }
68456}
68457
68458void
68459TestJSImplInterfaceJSImpl::DontEnforceRangeOrClamp(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
68460{
68461 CallSetup s(this, aRv, "TestJSImplInterface.dontEnforceRangeOrClamp", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68462 if (aRv.Failed()) {
68463 return;
68464 }
68465 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68465); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68465; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68466 BindingCallContext& cx = s.GetCallContext();
68467
68468 JS::Rooted<JS::Value> rval(cx);
68469 JS::RootedVector<JS::Value> argv(cx);
68470 if (!argv.resize(1)) {
68471 // That threw an exception on the JSContext, and our CallSetup will do
68472 // the right thing with that.
68473 return;
68474 }
68475 unsigned argc = 1;
68476
68477 do {
68478 argv[0].setInt32(int32_t(arg));
68479 break;
68480 } while (false);
68481
68482 JS::Rooted<JS::Value> callable(cx);
68483 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68484 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68485 !InitIds(cx, atomsCache)) ||
68486 !GetCallableProperty(cx, atomsCache->dontEnforceRangeOrClamp_id, &callable)) {
68487 aRv.Throw(NS_ERROR_UNEXPECTED);
68488 return;
68489 }
68490 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68491 if (!JS::Call(cx, thisValue, callable,
68492 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68493 aRv.NoteJSContextException(cx);
68494 return;
68495 }
68496}
68497
68498void
68499TestJSImplInterfaceJSImpl::DoEnforceRange(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
68500{
68501 CallSetup s(this, aRv, "TestJSImplInterface.doEnforceRange", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68502 if (aRv.Failed()) {
68503 return;
68504 }
68505 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68505); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68505; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68506 BindingCallContext& cx = s.GetCallContext();
68507
68508 JS::Rooted<JS::Value> rval(cx);
68509 JS::RootedVector<JS::Value> argv(cx);
68510 if (!argv.resize(1)) {
68511 // That threw an exception on the JSContext, and our CallSetup will do
68512 // the right thing with that.
68513 return;
68514 }
68515 unsigned argc = 1;
68516
68517 do {
68518 argv[0].setInt32(int32_t(arg));
68519 break;
68520 } while (false);
68521
68522 JS::Rooted<JS::Value> callable(cx);
68523 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68524 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68525 !InitIds(cx, atomsCache)) ||
68526 !GetCallableProperty(cx, atomsCache->doEnforceRange_id, &callable)) {
68527 aRv.Throw(NS_ERROR_UNEXPECTED);
68528 return;
68529 }
68530 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68531 if (!JS::Call(cx, thisValue, callable,
68532 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68533 aRv.NoteJSContextException(cx);
68534 return;
68535 }
68536}
68537
68538void
68539TestJSImplInterfaceJSImpl::DoEnforceRangeNullable(const Nullable<int8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
68540{
68541 CallSetup s(this, aRv, "TestJSImplInterface.doEnforceRangeNullable", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68542 if (aRv.Failed()) {
68543 return;
68544 }
68545 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68545); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68545; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68546 BindingCallContext& cx = s.GetCallContext();
68547
68548 JS::Rooted<JS::Value> rval(cx);
68549 JS::RootedVector<JS::Value> argv(cx);
68550 if (!argv.resize(1)) {
68551 // That threw an exception on the JSContext, and our CallSetup will do
68552 // the right thing with that.
68553 return;
68554 }
68555 unsigned argc = 1;
68556
68557 do {
68558 if (arg.IsNull()) {
68559 argv[0].setNull();
68560 break;
68561 }
68562 argv[0].setInt32(int32_t(arg.Value()));
68563 break;
68564 } while (false);
68565
68566 JS::Rooted<JS::Value> callable(cx);
68567 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68568 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68569 !InitIds(cx, atomsCache)) ||
68570 !GetCallableProperty(cx, atomsCache->doEnforceRangeNullable_id, &callable)) {
68571 aRv.Throw(NS_ERROR_UNEXPECTED);
68572 return;
68573 }
68574 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68575 if (!JS::Call(cx, thisValue, callable,
68576 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68577 aRv.NoteJSContextException(cx);
68578 return;
68579 }
68580}
68581
68582void
68583TestJSImplInterfaceJSImpl::DoClamp(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
68584{
68585 CallSetup s(this, aRv, "TestJSImplInterface.doClamp", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68586 if (aRv.Failed()) {
68587 return;
68588 }
68589 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68589); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68589; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68590 BindingCallContext& cx = s.GetCallContext();
68591
68592 JS::Rooted<JS::Value> rval(cx);
68593 JS::RootedVector<JS::Value> argv(cx);
68594 if (!argv.resize(1)) {
68595 // That threw an exception on the JSContext, and our CallSetup will do
68596 // the right thing with that.
68597 return;
68598 }
68599 unsigned argc = 1;
68600
68601 do {
68602 argv[0].setInt32(int32_t(arg));
68603 break;
68604 } while (false);
68605
68606 JS::Rooted<JS::Value> callable(cx);
68607 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68608 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68609 !InitIds(cx, atomsCache)) ||
68610 !GetCallableProperty(cx, atomsCache->doClamp_id, &callable)) {
68611 aRv.Throw(NS_ERROR_UNEXPECTED);
68612 return;
68613 }
68614 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68615 if (!JS::Call(cx, thisValue, callable,
68616 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68617 aRv.NoteJSContextException(cx);
68618 return;
68619 }
68620}
68621
68622void
68623TestJSImplInterfaceJSImpl::DoClampNullable(const Nullable<int8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
68624{
68625 CallSetup s(this, aRv, "TestJSImplInterface.doClampNullable", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68626 if (aRv.Failed()) {
68627 return;
68628 }
68629 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68629); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68629; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68630 BindingCallContext& cx = s.GetCallContext();
68631
68632 JS::Rooted<JS::Value> rval(cx);
68633 JS::RootedVector<JS::Value> argv(cx);
68634 if (!argv.resize(1)) {
68635 // That threw an exception on the JSContext, and our CallSetup will do
68636 // the right thing with that.
68637 return;
68638 }
68639 unsigned argc = 1;
68640
68641 do {
68642 if (arg.IsNull()) {
68643 argv[0].setNull();
68644 break;
68645 }
68646 argv[0].setInt32(int32_t(arg.Value()));
68647 break;
68648 } while (false);
68649
68650 JS::Rooted<JS::Value> callable(cx);
68651 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68652 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68653 !InitIds(cx, atomsCache)) ||
68654 !GetCallableProperty(cx, atomsCache->doClampNullable_id, &callable)) {
68655 aRv.Throw(NS_ERROR_UNEXPECTED);
68656 return;
68657 }
68658 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68659 if (!JS::Call(cx, thisValue, callable,
68660 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68661 aRv.NoteJSContextException(cx);
68662 return;
68663 }
68664}
68665
68666void
68667TestJSImplInterfaceJSImpl::ExerciseTypedefInterfaces1(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
68668{
68669 CallSetup s(this, aRv, "TestJSImplInterface.exerciseTypedefInterfaces1", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68670 if (aRv.Failed()) {
68671 return;
68672 }
68673 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68673); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68673; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68674 BindingCallContext& cx = s.GetCallContext();
68675
68676 JS::Rooted<JS::Value> rval(cx);
68677 JS::RootedVector<JS::Value> argv(cx);
68678 if (!argv.resize(1)) {
68679 // That threw an exception on the JSContext, and our CallSetup will do
68680 // the right thing with that.
68681 return;
68682 }
68683 unsigned argc = 1;
68684
68685 do {
68686 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
68687 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 68687); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 68687; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68688 aRv.Throw(NS_ERROR_UNEXPECTED);
68689 return;
68690 }
68691 break;
68692 } while (false);
68693
68694 JS::Rooted<JS::Value> callable(cx);
68695 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68696 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68697 !InitIds(cx, atomsCache)) ||
68698 !GetCallableProperty(cx, atomsCache->exerciseTypedefInterfaces1_id, &callable)) {
68699 aRv.Throw(NS_ERROR_UNEXPECTED);
68700 return;
68701 }
68702 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68703 if (!JS::Call(cx, thisValue, callable,
68704 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68705 aRv.NoteJSContextException(cx);
68706 return;
68707 }
68708}
68709
68710already_AddRefed<TestJSImplInterface>
68711TestJSImplInterfaceJSImpl::ExerciseTypedefInterfaces2(TestJSImplInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
68712{
68713 CallSetup s(this, aRv, "TestJSImplInterface.exerciseTypedefInterfaces2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68714 if (aRv.Failed()) {
68715 return nullptr;
68716 }
68717 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68717); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68717; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68718 BindingCallContext& cx = s.GetCallContext();
68719
68720 JS::Rooted<JS::Value> rval(cx);
68721 JS::RootedVector<JS::Value> argv(cx);
68722 if (!argv.resize(1)) {
68723 // That threw an exception on the JSContext, and our CallSetup will do
68724 // the right thing with that.
68725 return nullptr;
68726 }
68727 unsigned argc = 1;
68728
68729 do {
68730 if (!arg) {
68731 argv[0].setNull();
68732 break;
68733 }
68734 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
68735 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 68735); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 68735; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68736 aRv.Throw(NS_ERROR_UNEXPECTED);
68737 return nullptr;
68738 }
68739 break;
68740 } while (false);
68741
68742 JS::Rooted<JS::Value> callable(cx);
68743 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68744 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68745 !InitIds(cx, atomsCache)) ||
68746 !GetCallableProperty(cx, atomsCache->exerciseTypedefInterfaces2_id, &callable)) {
68747 aRv.Throw(NS_ERROR_UNEXPECTED);
68748 return nullptr;
68749 }
68750 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68751 if (!JS::Call(cx, thisValue, callable,
68752 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68753 aRv.NoteJSContextException(cx);
68754 return nullptr;
68755 }
68756 RefPtr<mozilla::dom::TestJSImplInterface> rvalDecl;
68757 if (rval.isObject()) {
68758 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
68759 {
68760 // Our JSContext should be in the right global to do unwrapping in.
68761 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(rval, rvalDecl, cx);
68762 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
68763 // Be careful to not wrap random DOM objects here, even if
68764 // they're wrapped in opaque security wrappers for some reason.
68765 // XXXbz Wish we could check for a JS-implemented object
68766 // that already has a content reflection...
68767 if (!IsDOMObject(js::UncheckedUnwrap(&rval.toObject()))) {
68768 nsCOMPtr<nsIGlobalObject> contentGlobal;
68769 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
68770 if (!callback ||
68771 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
68772 aRv.Throw(NS_ERROR_UNEXPECTED);
68773 return nullptr;
68774 }
68775 JS::Rooted<JSObject*> jsImplSourceObj(cx, &rval.toObject());
68776 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 68777); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 68777; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
68777 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 68777); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 68777; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
68778 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
68779 rvalDecl = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
68780 } else {
68781 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.exerciseTypedefInterfaces2", "TestJSImplInterface");
68782 aRv.Throw(NS_ERROR_UNEXPECTED);
68783 return nullptr;
68784 }
68785 }
68786 }
68787 } else {
68788 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.exerciseTypedefInterfaces2");
68789 aRv.Throw(NS_ERROR_UNEXPECTED);
68790 return nullptr;
68791 }
68792 return rvalDecl.forget();
68793}
68794
68795void
68796TestJSImplInterfaceJSImpl::ExerciseTypedefInterfaces3(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
68797{
68798 CallSetup s(this, aRv, "TestJSImplInterface.exerciseTypedefInterfaces3", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68799 if (aRv.Failed()) {
68800 return;
68801 }
68802 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68802); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68802; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68803 BindingCallContext& cx = s.GetCallContext();
68804
68805 JS::Rooted<JS::Value> rval(cx);
68806 JS::RootedVector<JS::Value> argv(cx);
68807 if (!argv.resize(1)) {
68808 // That threw an exception on the JSContext, and our CallSetup will do
68809 // the right thing with that.
68810 return;
68811 }
68812 unsigned argc = 1;
68813
68814 do {
68815 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
68816 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 68816); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 68816; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68817 aRv.Throw(NS_ERROR_UNEXPECTED);
68818 return;
68819 }
68820 break;
68821 } while (false);
68822
68823 JS::Rooted<JS::Value> callable(cx);
68824 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68825 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68826 !InitIds(cx, atomsCache)) ||
68827 !GetCallableProperty(cx, atomsCache->exerciseTypedefInterfaces3_id, &callable)) {
68828 aRv.Throw(NS_ERROR_UNEXPECTED);
68829 return;
68830 }
68831 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68832 if (!JS::Call(cx, thisValue, callable,
68833 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68834 aRv.NoteJSContextException(cx);
68835 return;
68836 }
68837}
68838
68839int8_t
68840TestJSImplInterfaceJSImpl::DeprecatedMethod(ErrorResult& aRv, JS::Realm* aRealm)
68841{
68842 CallSetup s(this, aRv, "TestJSImplInterface.deprecatedMethod", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68843 if (aRv.Failed()) {
68844 return int8_t(0);
68845 }
68846 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68846); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68846; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68847 BindingCallContext& cx = s.GetCallContext();
68848
68849 JS::Rooted<JS::Value> rval(cx);
68850
68851 JS::Rooted<JS::Value> callable(cx);
68852 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68853 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68854 !InitIds(cx, atomsCache)) ||
68855 !GetCallableProperty(cx, atomsCache->deprecatedMethod_id, &callable)) {
68856 aRv.Throw(NS_ERROR_UNEXPECTED);
68857 return int8_t(0);
68858 }
68859 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68860 if (!JS::Call(cx, thisValue, callable,
68861 JS::HandleValueArray::empty(), &rval)) {
68862 aRv.NoteJSContextException(cx);
68863 return int8_t(0);
68864 }
68865 int8_t rvalDecl;
68866 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.deprecatedMethod", &rvalDecl)) {
68867 aRv.Throw(NS_ERROR_UNEXPECTED);
68868 return int8_t(0);
68869 }
68870 return rvalDecl;
68871}
68872
68873void
68874TestJSImplInterfaceJSImpl::DeprecatedMethodWithContext(JS::Handle<JS::Value> arg, ErrorResult& aRv, JS::Realm* aRealm)
68875{
68876 CallSetup s(this, aRv, "TestJSImplInterface.deprecatedMethodWithContext", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68877 if (aRv.Failed()) {
68878 return;
68879 }
68880 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68880); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68880; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68881 BindingCallContext& cx = s.GetCallContext();
68882
68883 JS::Rooted<JS::Value> rval(cx);
68884 JS::RootedVector<JS::Value> argv(cx);
68885 if (!argv.resize(1)) {
68886 // That threw an exception on the JSContext, and our CallSetup will do
68887 // the right thing with that.
68888 return;
68889 }
68890 unsigned argc = 1;
68891
68892 do {
68893 JS::ExposeValueToActiveJS(arg);
68894 argv[0].set(arg);
68895 if (!MaybeWrapValue(cx, argv[0])) {
68896 aRv.Throw(NS_ERROR_UNEXPECTED);
68897 return;
68898 }
68899 break;
68900 } while (false);
68901
68902 JS::Rooted<JS::Value> callable(cx);
68903 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68904 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68905 !InitIds(cx, atomsCache)) ||
68906 !GetCallableProperty(cx, atomsCache->deprecatedMethodWithContext_id, &callable)) {
68907 aRv.Throw(NS_ERROR_UNEXPECTED);
68908 return;
68909 }
68910 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68911 if (!JS::Call(cx, thisValue, callable,
68912 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68913 aRv.NoteJSContextException(cx);
68914 return;
68915 }
68916}
68917
68918bool
68919TestJSImplInterfaceJSImpl::Overload1(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
68920{
68921 CallSetup s(this, aRv, "TestJSImplInterface.overload1", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68922 if (aRv.Failed()) {
68923 return bool(0);
68924 }
68925 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68925); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68925; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68926 BindingCallContext& cx = s.GetCallContext();
68927
68928 JS::Rooted<JS::Value> rval(cx);
68929 JS::RootedVector<JS::Value> argv(cx);
68930 if (!argv.resize(1)) {
68931 // That threw an exception on the JSContext, and our CallSetup will do
68932 // the right thing with that.
68933 return bool(0);
68934 }
68935 unsigned argc = 1;
68936
68937 do {
68938 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
68939 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 68939); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 68939; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68940 aRv.Throw(NS_ERROR_UNEXPECTED);
68941 return bool(0);
68942 }
68943 break;
68944 } while (false);
68945
68946 JS::Rooted<JS::Value> callable(cx);
68947 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
68948 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
68949 !InitIds(cx, atomsCache)) ||
68950 !GetCallableProperty(cx, atomsCache->overload1_id, &callable)) {
68951 aRv.Throw(NS_ERROR_UNEXPECTED);
68952 return bool(0);
68953 }
68954 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
68955 if (!JS::Call(cx, thisValue, callable,
68956 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
68957 aRv.NoteJSContextException(cx);
68958 return bool(0);
68959 }
68960 bool rvalDecl;
68961 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.overload1", &rvalDecl)) {
68962 aRv.Throw(NS_ERROR_UNEXPECTED);
68963 return bool(0);
68964 }
68965 return rvalDecl;
68966}
68967
68968already_AddRefed<TestJSImplInterface>
68969TestJSImplInterfaceJSImpl::Overload1(const nsAString& strs, TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
68970{
68971 CallSetup s(this, aRv, "TestJSImplInterface.overload1", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
68972 if (aRv.Failed()) {
68973 return nullptr;
68974 }
68975 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 68975); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 68975; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68976 BindingCallContext& cx = s.GetCallContext();
68977
68978 JS::Rooted<JS::Value> rval(cx);
68979 JS::RootedVector<JS::Value> argv(cx);
68980 if (!argv.resize(2)) {
68981 // That threw an exception on the JSContext, and our CallSetup will do
68982 // the right thing with that.
68983 return nullptr;
68984 }
68985 unsigned argc = 2;
68986
68987 do {
68988 if (!GetOrCreateDOMReflector(cx, arg, argv[1])) {
68989 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 68989); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 68989; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
68990 aRv.Throw(NS_ERROR_UNEXPECTED);
68991 return nullptr;
68992 }
68993 break;
68994 } while (false);
68995
68996 do {
68997 if (!xpc::NonVoidStringToJsval(cx, strs, argv[0])) {
68998 aRv.Throw(NS_ERROR_UNEXPECTED);
68999 return nullptr;
69000 }
69001 break;
69002 } while (false);
69003
69004 JS::Rooted<JS::Value> callable(cx);
69005 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69006 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69007 !InitIds(cx, atomsCache)) ||
69008 !GetCallableProperty(cx, atomsCache->overload1_id, &callable)) {
69009 aRv.Throw(NS_ERROR_UNEXPECTED);
69010 return nullptr;
69011 }
69012 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69013 if (!JS::Call(cx, thisValue, callable,
69014 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69015 aRv.NoteJSContextException(cx);
69016 return nullptr;
69017 }
69018 RefPtr<mozilla::dom::TestJSImplInterface> rvalDecl;
69019 if (rval.isObject()) {
69020 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
69021 {
69022 // Our JSContext should be in the right global to do unwrapping in.
69023 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(rval, rvalDecl, cx);
69024 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
69025 // Be careful to not wrap random DOM objects here, even if
69026 // they're wrapped in opaque security wrappers for some reason.
69027 // XXXbz Wish we could check for a JS-implemented object
69028 // that already has a content reflection...
69029 if (!IsDOMObject(js::UncheckedUnwrap(&rval.toObject()))) {
69030 nsCOMPtr<nsIGlobalObject> contentGlobal;
69031 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
69032 if (!callback ||
69033 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
69034 aRv.Throw(NS_ERROR_UNEXPECTED);
69035 return nullptr;
69036 }
69037 JS::Rooted<JSObject*> jsImplSourceObj(cx, &rval.toObject());
69038 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 69039); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 69039; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
69039 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 69039); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 69039; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
69040 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
69041 rvalDecl = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
69042 } else {
69043 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.overload1", "TestJSImplInterface");
69044 aRv.Throw(NS_ERROR_UNEXPECTED);
69045 return nullptr;
69046 }
69047 }
69048 }
69049 } else {
69050 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.overload1");
69051 aRv.Throw(NS_ERROR_UNEXPECTED);
69052 return nullptr;
69053 }
69054 return rvalDecl.forget();
69055}
69056
69057void
69058TestJSImplInterfaceJSImpl::Overload2(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
69059{
69060 CallSetup s(this, aRv, "TestJSImplInterface.overload2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69061 if (aRv.Failed()) {
69062 return;
69063 }
69064 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69064); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69064; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69065 BindingCallContext& cx = s.GetCallContext();
69066
69067 JS::Rooted<JS::Value> rval(cx);
69068 JS::RootedVector<JS::Value> argv(cx);
69069 if (!argv.resize(1)) {
69070 // That threw an exception on the JSContext, and our CallSetup will do
69071 // the right thing with that.
69072 return;
69073 }
69074 unsigned argc = 1;
69075
69076 do {
69077 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
69078 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 69078); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 69078; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69079 aRv.Throw(NS_ERROR_UNEXPECTED);
69080 return;
69081 }
69082 break;
69083 } while (false);
69084
69085 JS::Rooted<JS::Value> callable(cx);
69086 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69087 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69088 !InitIds(cx, atomsCache)) ||
69089 !GetCallableProperty(cx, atomsCache->overload2_id, &callable)) {
69090 aRv.Throw(NS_ERROR_UNEXPECTED);
69091 return;
69092 }
69093 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69094 if (!JS::Call(cx, thisValue, callable,
69095 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69096 aRv.NoteJSContextException(cx);
69097 return;
69098 }
69099}
69100
69101void
69102TestJSImplInterfaceJSImpl::Overload2(const Dict& arg, ErrorResult& aRv, JS::Realm* aRealm)
69103{
69104 CallSetup s(this, aRv, "TestJSImplInterface.overload2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69105 if (aRv.Failed()) {
69106 return;
69107 }
69108 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69108); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69108; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69109 BindingCallContext& cx = s.GetCallContext();
69110
69111 JS::Rooted<JS::Value> rval(cx);
69112 JS::RootedVector<JS::Value> argv(cx);
69113 if (!argv.resize(1)) {
69114 // That threw an exception on the JSContext, and our CallSetup will do
69115 // the right thing with that.
69116 return;
69117 }
69118 unsigned argc = 1;
69119
69120 do {
69121 if (!arg.ToObjectInternal(cx, argv[0])) {
69122 aRv.Throw(NS_ERROR_UNEXPECTED);
69123 return;
69124 }
69125 break;
69126 } while (false);
69127
69128 JS::Rooted<JS::Value> callable(cx);
69129 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69130 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69131 !InitIds(cx, atomsCache)) ||
69132 !GetCallableProperty(cx, atomsCache->overload2_id, &callable)) {
69133 aRv.Throw(NS_ERROR_UNEXPECTED);
69134 return;
69135 }
69136 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69137 if (!JS::Call(cx, thisValue, callable,
69138 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69139 aRv.NoteJSContextException(cx);
69140 return;
69141 }
69142}
69143
69144void
69145TestJSImplInterfaceJSImpl::Overload2(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
69146{
69147 CallSetup s(this, aRv, "TestJSImplInterface.overload2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69148 if (aRv.Failed()) {
69149 return;
69150 }
69151 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69151); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69151; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69152 BindingCallContext& cx = s.GetCallContext();
69153
69154 JS::Rooted<JS::Value> rval(cx);
69155 JS::RootedVector<JS::Value> argv(cx);
69156 if (!argv.resize(1)) {
69157 // That threw an exception on the JSContext, and our CallSetup will do
69158 // the right thing with that.
69159 return;
69160 }
69161 unsigned argc = 1;
69162
69163 do {
69164 argv[0].setBoolean(arg);
69165 break;
69166 } while (false);
69167
69168 JS::Rooted<JS::Value> callable(cx);
69169 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69170 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69171 !InitIds(cx, atomsCache)) ||
69172 !GetCallableProperty(cx, atomsCache->overload2_id, &callable)) {
69173 aRv.Throw(NS_ERROR_UNEXPECTED);
69174 return;
69175 }
69176 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69177 if (!JS::Call(cx, thisValue, callable,
69178 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69179 aRv.NoteJSContextException(cx);
69180 return;
69181 }
69182}
69183
69184void
69185TestJSImplInterfaceJSImpl::Overload2(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
69186{
69187 CallSetup s(this, aRv, "TestJSImplInterface.overload2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69188 if (aRv.Failed()) {
69189 return;
69190 }
69191 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69191); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69191; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69192 BindingCallContext& cx = s.GetCallContext();
69193
69194 JS::Rooted<JS::Value> rval(cx);
69195 JS::RootedVector<JS::Value> argv(cx);
69196 if (!argv.resize(1)) {
69197 // That threw an exception on the JSContext, and our CallSetup will do
69198 // the right thing with that.
69199 return;
69200 }
69201 unsigned argc = 1;
69202
69203 do {
69204 if (!xpc::NonVoidStringToJsval(cx, arg, argv[0])) {
69205 aRv.Throw(NS_ERROR_UNEXPECTED);
69206 return;
69207 }
69208 break;
69209 } while (false);
69210
69211 JS::Rooted<JS::Value> callable(cx);
69212 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69213 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69214 !InitIds(cx, atomsCache)) ||
69215 !GetCallableProperty(cx, atomsCache->overload2_id, &callable)) {
69216 aRv.Throw(NS_ERROR_UNEXPECTED);
69217 return;
69218 }
69219 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69220 if (!JS::Call(cx, thisValue, callable,
69221 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69222 aRv.NoteJSContextException(cx);
69223 return;
69224 }
69225}
69226
69227void
69228TestJSImplInterfaceJSImpl::Overload3(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
69229{
69230 CallSetup s(this, aRv, "TestJSImplInterface.overload3", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69231 if (aRv.Failed()) {
69232 return;
69233 }
69234 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69234); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69234; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69235 BindingCallContext& cx = s.GetCallContext();
69236
69237 JS::Rooted<JS::Value> rval(cx);
69238 JS::RootedVector<JS::Value> argv(cx);
69239 if (!argv.resize(1)) {
69240 // That threw an exception on the JSContext, and our CallSetup will do
69241 // the right thing with that.
69242 return;
69243 }
69244 unsigned argc = 1;
69245
69246 do {
69247 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
69248 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 69248); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 69248; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69249 aRv.Throw(NS_ERROR_UNEXPECTED);
69250 return;
69251 }
69252 break;
69253 } while (false);
69254
69255 JS::Rooted<JS::Value> callable(cx);
69256 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69257 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69258 !InitIds(cx, atomsCache)) ||
69259 !GetCallableProperty(cx, atomsCache->overload3_id, &callable)) {
69260 aRv.Throw(NS_ERROR_UNEXPECTED);
69261 return;
69262 }
69263 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69264 if (!JS::Call(cx, thisValue, callable,
69265 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69266 aRv.NoteJSContextException(cx);
69267 return;
69268 }
69269}
69270
69271void
69272TestJSImplInterfaceJSImpl::Overload3(MyTestCallback& arg, ErrorResult& aRv, JS::Realm* aRealm)
69273{
69274 CallSetup s(this, aRv, "TestJSImplInterface.overload3", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69275 if (aRv.Failed()) {
69276 return;
69277 }
69278 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69278); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69278; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69279 BindingCallContext& cx = s.GetCallContext();
69280
69281 JS::Rooted<JS::Value> rval(cx);
69282 JS::RootedVector<JS::Value> argv(cx);
69283 if (!argv.resize(1)) {
69284 // That threw an exception on the JSContext, and our CallSetup will do
69285 // the right thing with that.
69286 return;
69287 }
69288 unsigned argc = 1;
69289
69290 do {
69291 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg));
69292 if (!MaybeWrapObjectValue(cx, argv[0])) {
69293 aRv.Throw(NS_ERROR_UNEXPECTED);
69294 return;
69295 }
69296 break;
69297 } while (false);
69298
69299 JS::Rooted<JS::Value> callable(cx);
69300 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69301 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69302 !InitIds(cx, atomsCache)) ||
69303 !GetCallableProperty(cx, atomsCache->overload3_id, &callable)) {
69304 aRv.Throw(NS_ERROR_UNEXPECTED);
69305 return;
69306 }
69307 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69308 if (!JS::Call(cx, thisValue, callable,
69309 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69310 aRv.NoteJSContextException(cx);
69311 return;
69312 }
69313}
69314
69315void
69316TestJSImplInterfaceJSImpl::Overload3(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
69317{
69318 CallSetup s(this, aRv, "TestJSImplInterface.overload3", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69319 if (aRv.Failed()) {
69320 return;
69321 }
69322 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69322); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69322; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69323 BindingCallContext& cx = s.GetCallContext();
69324
69325 JS::Rooted<JS::Value> rval(cx);
69326 JS::RootedVector<JS::Value> argv(cx);
69327 if (!argv.resize(1)) {
69328 // That threw an exception on the JSContext, and our CallSetup will do
69329 // the right thing with that.
69330 return;
69331 }
69332 unsigned argc = 1;
69333
69334 do {
69335 argv[0].setBoolean(arg);
69336 break;
69337 } while (false);
69338
69339 JS::Rooted<JS::Value> callable(cx);
69340 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69341 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69342 !InitIds(cx, atomsCache)) ||
69343 !GetCallableProperty(cx, atomsCache->overload3_id, &callable)) {
69344 aRv.Throw(NS_ERROR_UNEXPECTED);
69345 return;
69346 }
69347 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69348 if (!JS::Call(cx, thisValue, callable,
69349 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69350 aRv.NoteJSContextException(cx);
69351 return;
69352 }
69353}
69354
69355void
69356TestJSImplInterfaceJSImpl::Overload4(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
69357{
69358 CallSetup s(this, aRv, "TestJSImplInterface.overload4", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69359 if (aRv.Failed()) {
69360 return;
69361 }
69362 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69362); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69362; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69363 BindingCallContext& cx = s.GetCallContext();
69364
69365 JS::Rooted<JS::Value> rval(cx);
69366 JS::RootedVector<JS::Value> argv(cx);
69367 if (!argv.resize(1)) {
69368 // That threw an exception on the JSContext, and our CallSetup will do
69369 // the right thing with that.
69370 return;
69371 }
69372 unsigned argc = 1;
69373
69374 do {
69375 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
69376 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 69376); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 69376; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69377 aRv.Throw(NS_ERROR_UNEXPECTED);
69378 return;
69379 }
69380 break;
69381 } while (false);
69382
69383 JS::Rooted<JS::Value> callable(cx);
69384 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69385 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69386 !InitIds(cx, atomsCache)) ||
69387 !GetCallableProperty(cx, atomsCache->overload4_id, &callable)) {
69388 aRv.Throw(NS_ERROR_UNEXPECTED);
69389 return;
69390 }
69391 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69392 if (!JS::Call(cx, thisValue, callable,
69393 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69394 aRv.NoteJSContextException(cx);
69395 return;
69396 }
69397}
69398
69399void
69400TestJSImplInterfaceJSImpl::Overload4(TestCallbackInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
69401{
69402 CallSetup s(this, aRv, "TestJSImplInterface.overload4", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69403 if (aRv.Failed()) {
69404 return;
69405 }
69406 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69406); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69406; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69407 BindingCallContext& cx = s.GetCallContext();
69408
69409 JS::Rooted<JS::Value> rval(cx);
69410 JS::RootedVector<JS::Value> argv(cx);
69411 if (!argv.resize(1)) {
69412 // That threw an exception on the JSContext, and our CallSetup will do
69413 // the right thing with that.
69414 return;
69415 }
69416 unsigned argc = 1;
69417
69418 do {
69419 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg));
69420 if (!MaybeWrapObjectValue(cx, argv[0])) {
69421 aRv.Throw(NS_ERROR_UNEXPECTED);
69422 return;
69423 }
69424 break;
69425 } while (false);
69426
69427 JS::Rooted<JS::Value> callable(cx);
69428 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69429 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69430 !InitIds(cx, atomsCache)) ||
69431 !GetCallableProperty(cx, atomsCache->overload4_id, &callable)) {
69432 aRv.Throw(NS_ERROR_UNEXPECTED);
69433 return;
69434 }
69435 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69436 if (!JS::Call(cx, thisValue, callable,
69437 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69438 aRv.NoteJSContextException(cx);
69439 return;
69440 }
69441}
69442
69443void
69444TestJSImplInterfaceJSImpl::Overload4(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
69445{
69446 CallSetup s(this, aRv, "TestJSImplInterface.overload4", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69447 if (aRv.Failed()) {
69448 return;
69449 }
69450 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69450); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69450; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69451 BindingCallContext& cx = s.GetCallContext();
69452
69453 JS::Rooted<JS::Value> rval(cx);
69454 JS::RootedVector<JS::Value> argv(cx);
69455 if (!argv.resize(1)) {
69456 // That threw an exception on the JSContext, and our CallSetup will do
69457 // the right thing with that.
69458 return;
69459 }
69460 unsigned argc = 1;
69461
69462 do {
69463 if (!xpc::NonVoidStringToJsval(cx, arg, argv[0])) {
69464 aRv.Throw(NS_ERROR_UNEXPECTED);
69465 return;
69466 }
69467 break;
69468 } while (false);
69469
69470 JS::Rooted<JS::Value> callable(cx);
69471 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69472 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69473 !InitIds(cx, atomsCache)) ||
69474 !GetCallableProperty(cx, atomsCache->overload4_id, &callable)) {
69475 aRv.Throw(NS_ERROR_UNEXPECTED);
69476 return;
69477 }
69478 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69479 if (!JS::Call(cx, thisValue, callable,
69480 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69481 aRv.NoteJSContextException(cx);
69482 return;
69483 }
69484}
69485
69486void
69487TestJSImplInterfaceJSImpl::Overload5(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
69488{
69489 CallSetup s(this, aRv, "TestJSImplInterface.overload5", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69490 if (aRv.Failed()) {
69491 return;
69492 }
69493 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69493); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69493; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69494 BindingCallContext& cx = s.GetCallContext();
69495
69496 JS::Rooted<JS::Value> rval(cx);
69497 JS::RootedVector<JS::Value> argv(cx);
69498 if (!argv.resize(1)) {
69499 // That threw an exception on the JSContext, and our CallSetup will do
69500 // the right thing with that.
69501 return;
69502 }
69503 unsigned argc = 1;
69504
69505 do {
69506 argv[0].setInt32(int32_t(arg));
69507 break;
69508 } while (false);
69509
69510 JS::Rooted<JS::Value> callable(cx);
69511 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69512 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69513 !InitIds(cx, atomsCache)) ||
69514 !GetCallableProperty(cx, atomsCache->overload5_id, &callable)) {
69515 aRv.Throw(NS_ERROR_UNEXPECTED);
69516 return;
69517 }
69518 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69519 if (!JS::Call(cx, thisValue, callable,
69520 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69521 aRv.NoteJSContextException(cx);
69522 return;
69523 }
69524}
69525
69526void
69527TestJSImplInterfaceJSImpl::Overload5(MyTestEnum arg, ErrorResult& aRv, JS::Realm* aRealm)
69528{
69529 CallSetup s(this, aRv, "TestJSImplInterface.overload5", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69530 if (aRv.Failed()) {
69531 return;
69532 }
69533 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69533); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69533; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69534 BindingCallContext& cx = s.GetCallContext();
69535
69536 JS::Rooted<JS::Value> rval(cx);
69537 JS::RootedVector<JS::Value> argv(cx);
69538 if (!argv.resize(1)) {
69539 // That threw an exception on the JSContext, and our CallSetup will do
69540 // the right thing with that.
69541 return;
69542 }
69543 unsigned argc = 1;
69544
69545 do {
69546 if (!ToJSValue(cx, arg, argv[0])) {
69547 aRv.Throw(NS_ERROR_UNEXPECTED);
69548 return;
69549 }
69550 break;
69551 } while (false);
69552
69553 JS::Rooted<JS::Value> callable(cx);
69554 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69555 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69556 !InitIds(cx, atomsCache)) ||
69557 !GetCallableProperty(cx, atomsCache->overload5_id, &callable)) {
69558 aRv.Throw(NS_ERROR_UNEXPECTED);
69559 return;
69560 }
69561 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69562 if (!JS::Call(cx, thisValue, callable,
69563 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69564 aRv.NoteJSContextException(cx);
69565 return;
69566 }
69567}
69568
69569void
69570TestJSImplInterfaceJSImpl::Overload6(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
69571{
69572 CallSetup s(this, aRv, "TestJSImplInterface.overload6", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69573 if (aRv.Failed()) {
69574 return;
69575 }
69576 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69576); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69576; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69577 BindingCallContext& cx = s.GetCallContext();
69578
69579 JS::Rooted<JS::Value> rval(cx);
69580 JS::RootedVector<JS::Value> argv(cx);
69581 if (!argv.resize(1)) {
69582 // That threw an exception on the JSContext, and our CallSetup will do
69583 // the right thing with that.
69584 return;
69585 }
69586 unsigned argc = 1;
69587
69588 do {
69589 argv[0].setInt32(int32_t(arg));
69590 break;
69591 } while (false);
69592
69593 JS::Rooted<JS::Value> callable(cx);
69594 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69595 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69596 !InitIds(cx, atomsCache)) ||
69597 !GetCallableProperty(cx, atomsCache->overload6_id, &callable)) {
69598 aRv.Throw(NS_ERROR_UNEXPECTED);
69599 return;
69600 }
69601 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69602 if (!JS::Call(cx, thisValue, callable,
69603 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69604 aRv.NoteJSContextException(cx);
69605 return;
69606 }
69607}
69608
69609void
69610TestJSImplInterfaceJSImpl::Overload6(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
69611{
69612 CallSetup s(this, aRv, "TestJSImplInterface.overload6", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69613 if (aRv.Failed()) {
69614 return;
69615 }
69616 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69616); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69616; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69617 BindingCallContext& cx = s.GetCallContext();
69618
69619 JS::Rooted<JS::Value> rval(cx);
69620 JS::RootedVector<JS::Value> argv(cx);
69621 if (!argv.resize(1)) {
69622 // That threw an exception on the JSContext, and our CallSetup will do
69623 // the right thing with that.
69624 return;
69625 }
69626 unsigned argc = 1;
69627
69628 do {
69629 argv[0].setBoolean(arg);
69630 break;
69631 } while (false);
69632
69633 JS::Rooted<JS::Value> callable(cx);
69634 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69635 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69636 !InitIds(cx, atomsCache)) ||
69637 !GetCallableProperty(cx, atomsCache->overload6_id, &callable)) {
69638 aRv.Throw(NS_ERROR_UNEXPECTED);
69639 return;
69640 }
69641 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69642 if (!JS::Call(cx, thisValue, callable,
69643 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69644 aRv.NoteJSContextException(cx);
69645 return;
69646 }
69647}
69648
69649void
69650TestJSImplInterfaceJSImpl::Overload7(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
69651{
69652 CallSetup s(this, aRv, "TestJSImplInterface.overload7", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69653 if (aRv.Failed()) {
69654 return;
69655 }
69656 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69656); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69656; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69657 BindingCallContext& cx = s.GetCallContext();
69658
69659 JS::Rooted<JS::Value> rval(cx);
69660 JS::RootedVector<JS::Value> argv(cx);
69661 if (!argv.resize(1)) {
69662 // That threw an exception on the JSContext, and our CallSetup will do
69663 // the right thing with that.
69664 return;
69665 }
69666 unsigned argc = 1;
69667
69668 do {
69669 argv[0].setInt32(int32_t(arg));
69670 break;
69671 } while (false);
69672
69673 JS::Rooted<JS::Value> callable(cx);
69674 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69675 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69676 !InitIds(cx, atomsCache)) ||
69677 !GetCallableProperty(cx, atomsCache->overload7_id, &callable)) {
69678 aRv.Throw(NS_ERROR_UNEXPECTED);
69679 return;
69680 }
69681 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69682 if (!JS::Call(cx, thisValue, callable,
69683 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69684 aRv.NoteJSContextException(cx);
69685 return;
69686 }
69687}
69688
69689void
69690TestJSImplInterfaceJSImpl::Overload7(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
69691{
69692 CallSetup s(this, aRv, "TestJSImplInterface.overload7", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69693 if (aRv.Failed()) {
69694 return;
69695 }
69696 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69696); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69696; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69697 BindingCallContext& cx = s.GetCallContext();
69698
69699 JS::Rooted<JS::Value> rval(cx);
69700 JS::RootedVector<JS::Value> argv(cx);
69701 if (!argv.resize(1)) {
69702 // That threw an exception on the JSContext, and our CallSetup will do
69703 // the right thing with that.
69704 return;
69705 }
69706 unsigned argc = 1;
69707
69708 do {
69709 argv[0].setBoolean(arg);
69710 break;
69711 } while (false);
69712
69713 JS::Rooted<JS::Value> callable(cx);
69714 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69715 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69716 !InitIds(cx, atomsCache)) ||
69717 !GetCallableProperty(cx, atomsCache->overload7_id, &callable)) {
69718 aRv.Throw(NS_ERROR_UNEXPECTED);
69719 return;
69720 }
69721 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69722 if (!JS::Call(cx, thisValue, callable,
69723 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69724 aRv.NoteJSContextException(cx);
69725 return;
69726 }
69727}
69728
69729void
69730TestJSImplInterfaceJSImpl::Overload7(const nsCString& arg, ErrorResult& aRv, JS::Realm* aRealm)
69731{
69732 CallSetup s(this, aRv, "TestJSImplInterface.overload7", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69733 if (aRv.Failed()) {
69734 return;
69735 }
69736 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69736); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69736; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69737 BindingCallContext& cx = s.GetCallContext();
69738
69739 JS::Rooted<JS::Value> rval(cx);
69740 JS::RootedVector<JS::Value> argv(cx);
69741 if (!argv.resize(1)) {
69742 // That threw an exception on the JSContext, and our CallSetup will do
69743 // the right thing with that.
69744 return;
69745 }
69746 unsigned argc = 1;
69747
69748 do {
69749 if (!NonVoidByteStringToJsval(cx, arg, argv[0])) {
69750 aRv.Throw(NS_ERROR_UNEXPECTED);
69751 return;
69752 }
69753 break;
69754 } while (false);
69755
69756 JS::Rooted<JS::Value> callable(cx);
69757 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69758 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69759 !InitIds(cx, atomsCache)) ||
69760 !GetCallableProperty(cx, atomsCache->overload7_id, &callable)) {
69761 aRv.Throw(NS_ERROR_UNEXPECTED);
69762 return;
69763 }
69764 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69765 if (!JS::Call(cx, thisValue, callable,
69766 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69767 aRv.NoteJSContextException(cx);
69768 return;
69769 }
69770}
69771
69772void
69773TestJSImplInterfaceJSImpl::Overload8(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
69774{
69775 CallSetup s(this, aRv, "TestJSImplInterface.overload8", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69776 if (aRv.Failed()) {
69777 return;
69778 }
69779 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69779); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69779; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69780 BindingCallContext& cx = s.GetCallContext();
69781
69782 JS::Rooted<JS::Value> rval(cx);
69783 JS::RootedVector<JS::Value> argv(cx);
69784 if (!argv.resize(1)) {
69785 // That threw an exception on the JSContext, and our CallSetup will do
69786 // the right thing with that.
69787 return;
69788 }
69789 unsigned argc = 1;
69790
69791 do {
69792 argv[0].setInt32(int32_t(arg));
69793 break;
69794 } while (false);
69795
69796 JS::Rooted<JS::Value> callable(cx);
69797 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69798 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69799 !InitIds(cx, atomsCache)) ||
69800 !GetCallableProperty(cx, atomsCache->overload8_id, &callable)) {
69801 aRv.Throw(NS_ERROR_UNEXPECTED);
69802 return;
69803 }
69804 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69805 if (!JS::Call(cx, thisValue, callable,
69806 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69807 aRv.NoteJSContextException(cx);
69808 return;
69809 }
69810}
69811
69812void
69813TestJSImplInterfaceJSImpl::Overload8(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
69814{
69815 CallSetup s(this, aRv, "TestJSImplInterface.overload8", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69816 if (aRv.Failed()) {
69817 return;
69818 }
69819 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69819); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69819; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69820 BindingCallContext& cx = s.GetCallContext();
69821
69822 JS::Rooted<JS::Value> rval(cx);
69823 JS::RootedVector<JS::Value> argv(cx);
69824 if (!argv.resize(1)) {
69825 // That threw an exception on the JSContext, and our CallSetup will do
69826 // the right thing with that.
69827 return;
69828 }
69829 unsigned argc = 1;
69830
69831 do {
69832 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
69833 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 69833); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 69833; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69834 aRv.Throw(NS_ERROR_UNEXPECTED);
69835 return;
69836 }
69837 break;
69838 } while (false);
69839
69840 JS::Rooted<JS::Value> callable(cx);
69841 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69842 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69843 !InitIds(cx, atomsCache)) ||
69844 !GetCallableProperty(cx, atomsCache->overload8_id, &callable)) {
69845 aRv.Throw(NS_ERROR_UNEXPECTED);
69846 return;
69847 }
69848 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69849 if (!JS::Call(cx, thisValue, callable,
69850 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69851 aRv.NoteJSContextException(cx);
69852 return;
69853 }
69854}
69855
69856void
69857TestJSImplInterfaceJSImpl::Overload9(const Nullable<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
69858{
69859 CallSetup s(this, aRv, "TestJSImplInterface.overload9", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69860 if (aRv.Failed()) {
69861 return;
69862 }
69863 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69863); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69863; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69864 BindingCallContext& cx = s.GetCallContext();
69865
69866 JS::Rooted<JS::Value> rval(cx);
69867 JS::RootedVector<JS::Value> argv(cx);
69868 if (!argv.resize(1)) {
69869 // That threw an exception on the JSContext, and our CallSetup will do
69870 // the right thing with that.
69871 return;
69872 }
69873 unsigned argc = 1;
69874
69875 do {
69876 if (arg.IsNull()) {
69877 argv[0].setNull();
69878 break;
69879 }
69880 argv[0].setInt32(int32_t(arg.Value()));
69881 break;
69882 } while (false);
69883
69884 JS::Rooted<JS::Value> callable(cx);
69885 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69886 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69887 !InitIds(cx, atomsCache)) ||
69888 !GetCallableProperty(cx, atomsCache->overload9_id, &callable)) {
69889 aRv.Throw(NS_ERROR_UNEXPECTED);
69890 return;
69891 }
69892 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69893 if (!JS::Call(cx, thisValue, callable,
69894 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69895 aRv.NoteJSContextException(cx);
69896 return;
69897 }
69898}
69899
69900void
69901TestJSImplInterfaceJSImpl::Overload9(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
69902{
69903 CallSetup s(this, aRv, "TestJSImplInterface.overload9", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69904 if (aRv.Failed()) {
69905 return;
69906 }
69907 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69907); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69907; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69908 BindingCallContext& cx = s.GetCallContext();
69909
69910 JS::Rooted<JS::Value> rval(cx);
69911 JS::RootedVector<JS::Value> argv(cx);
69912 if (!argv.resize(1)) {
69913 // That threw an exception on the JSContext, and our CallSetup will do
69914 // the right thing with that.
69915 return;
69916 }
69917 unsigned argc = 1;
69918
69919 do {
69920 if (!xpc::NonVoidStringToJsval(cx, arg, argv[0])) {
69921 aRv.Throw(NS_ERROR_UNEXPECTED);
69922 return;
69923 }
69924 break;
69925 } while (false);
69926
69927 JS::Rooted<JS::Value> callable(cx);
69928 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69929 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69930 !InitIds(cx, atomsCache)) ||
69931 !GetCallableProperty(cx, atomsCache->overload9_id, &callable)) {
69932 aRv.Throw(NS_ERROR_UNEXPECTED);
69933 return;
69934 }
69935 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69936 if (!JS::Call(cx, thisValue, callable,
69937 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69938 aRv.NoteJSContextException(cx);
69939 return;
69940 }
69941}
69942
69943void
69944TestJSImplInterfaceJSImpl::Overload10(const Nullable<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
69945{
69946 CallSetup s(this, aRv, "TestJSImplInterface.overload10", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69947 if (aRv.Failed()) {
69948 return;
69949 }
69950 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69950); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69950; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69951 BindingCallContext& cx = s.GetCallContext();
69952
69953 JS::Rooted<JS::Value> rval(cx);
69954 JS::RootedVector<JS::Value> argv(cx);
69955 if (!argv.resize(1)) {
69956 // That threw an exception on the JSContext, and our CallSetup will do
69957 // the right thing with that.
69958 return;
69959 }
69960 unsigned argc = 1;
69961
69962 do {
69963 if (arg.IsNull()) {
69964 argv[0].setNull();
69965 break;
69966 }
69967 argv[0].setInt32(int32_t(arg.Value()));
69968 break;
69969 } while (false);
69970
69971 JS::Rooted<JS::Value> callable(cx);
69972 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
69973 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
69974 !InitIds(cx, atomsCache)) ||
69975 !GetCallableProperty(cx, atomsCache->overload10_id, &callable)) {
69976 aRv.Throw(NS_ERROR_UNEXPECTED);
69977 return;
69978 }
69979 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
69980 if (!JS::Call(cx, thisValue, callable,
69981 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
69982 aRv.NoteJSContextException(cx);
69983 return;
69984 }
69985}
69986
69987void
69988TestJSImplInterfaceJSImpl::Overload10(JS::Handle<JSObject*> arg, ErrorResult& aRv, JS::Realm* aRealm)
69989{
69990 CallSetup s(this, aRv, "TestJSImplInterface.overload10", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
69991 if (aRv.Failed()) {
69992 return;
69993 }
69994 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 69994); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 69994; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
69995 BindingCallContext& cx = s.GetCallContext();
69996
69997 JS::Rooted<JS::Value> rval(cx);
69998 JS::RootedVector<JS::Value> argv(cx);
69999 if (!argv.resize(1)) {
70000 // That threw an exception on the JSContext, and our CallSetup will do
70001 // the right thing with that.
70002 return;
70003 }
70004 unsigned argc = 1;
70005
70006 do {
70007 JS::ExposeObjectToActiveJS(arg);
70008 argv[0].setObject(*arg);
70009 if (!MaybeWrapObjectValue(cx, argv[0])) {
70010 aRv.Throw(NS_ERROR_UNEXPECTED);
70011 return;
70012 }
70013 break;
70014 } while (false);
70015
70016 JS::Rooted<JS::Value> callable(cx);
70017 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70018 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70019 !InitIds(cx, atomsCache)) ||
70020 !GetCallableProperty(cx, atomsCache->overload10_id, &callable)) {
70021 aRv.Throw(NS_ERROR_UNEXPECTED);
70022 return;
70023 }
70024 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70025 if (!JS::Call(cx, thisValue, callable,
70026 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70027 aRv.NoteJSContextException(cx);
70028 return;
70029 }
70030}
70031
70032void
70033TestJSImplInterfaceJSImpl::Overload11(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
70034{
70035 CallSetup s(this, aRv, "TestJSImplInterface.overload11", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70036 if (aRv.Failed()) {
70037 return;
70038 }
70039 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70039); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70039; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70040 BindingCallContext& cx = s.GetCallContext();
70041
70042 JS::Rooted<JS::Value> rval(cx);
70043 JS::RootedVector<JS::Value> argv(cx);
70044 if (!argv.resize(1)) {
70045 // That threw an exception on the JSContext, and our CallSetup will do
70046 // the right thing with that.
70047 return;
70048 }
70049 unsigned argc = 1;
70050
70051 do {
70052 argv[0].setInt32(int32_t(arg));
70053 break;
70054 } while (false);
70055
70056 JS::Rooted<JS::Value> callable(cx);
70057 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70058 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70059 !InitIds(cx, atomsCache)) ||
70060 !GetCallableProperty(cx, atomsCache->overload11_id, &callable)) {
70061 aRv.Throw(NS_ERROR_UNEXPECTED);
70062 return;
70063 }
70064 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70065 if (!JS::Call(cx, thisValue, callable,
70066 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70067 aRv.NoteJSContextException(cx);
70068 return;
70069 }
70070}
70071
70072void
70073TestJSImplInterfaceJSImpl::Overload11(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
70074{
70075 CallSetup s(this, aRv, "TestJSImplInterface.overload11", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70076 if (aRv.Failed()) {
70077 return;
70078 }
70079 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70079); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70079; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70080 BindingCallContext& cx = s.GetCallContext();
70081
70082 JS::Rooted<JS::Value> rval(cx);
70083 JS::RootedVector<JS::Value> argv(cx);
70084 if (!argv.resize(1)) {
70085 // That threw an exception on the JSContext, and our CallSetup will do
70086 // the right thing with that.
70087 return;
70088 }
70089 unsigned argc = 1;
70090
70091 do {
70092 if (!xpc::StringToJsval(cx, arg, argv[0])) {
70093 aRv.Throw(NS_ERROR_UNEXPECTED);
70094 return;
70095 }
70096 break;
70097 } while (false);
70098
70099 JS::Rooted<JS::Value> callable(cx);
70100 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70101 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70102 !InitIds(cx, atomsCache)) ||
70103 !GetCallableProperty(cx, atomsCache->overload11_id, &callable)) {
70104 aRv.Throw(NS_ERROR_UNEXPECTED);
70105 return;
70106 }
70107 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70108 if (!JS::Call(cx, thisValue, callable,
70109 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70110 aRv.NoteJSContextException(cx);
70111 return;
70112 }
70113}
70114
70115void
70116TestJSImplInterfaceJSImpl::Overload12(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
70117{
70118 CallSetup s(this, aRv, "TestJSImplInterface.overload12", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70119 if (aRv.Failed()) {
70120 return;
70121 }
70122 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70122); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70122; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70123 BindingCallContext& cx = s.GetCallContext();
70124
70125 JS::Rooted<JS::Value> rval(cx);
70126 JS::RootedVector<JS::Value> argv(cx);
70127 if (!argv.resize(1)) {
70128 // That threw an exception on the JSContext, and our CallSetup will do
70129 // the right thing with that.
70130 return;
70131 }
70132 unsigned argc = 1;
70133
70134 do {
70135 argv[0].setInt32(int32_t(arg));
70136 break;
70137 } while (false);
70138
70139 JS::Rooted<JS::Value> callable(cx);
70140 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70141 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70142 !InitIds(cx, atomsCache)) ||
70143 !GetCallableProperty(cx, atomsCache->overload12_id, &callable)) {
70144 aRv.Throw(NS_ERROR_UNEXPECTED);
70145 return;
70146 }
70147 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70148 if (!JS::Call(cx, thisValue, callable,
70149 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70150 aRv.NoteJSContextException(cx);
70151 return;
70152 }
70153}
70154
70155void
70156TestJSImplInterfaceJSImpl::Overload12(const Nullable<bool>& arg, ErrorResult& aRv, JS::Realm* aRealm)
70157{
70158 CallSetup s(this, aRv, "TestJSImplInterface.overload12", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70159 if (aRv.Failed()) {
70160 return;
70161 }
70162 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70162); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70162; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70163 BindingCallContext& cx = s.GetCallContext();
70164
70165 JS::Rooted<JS::Value> rval(cx);
70166 JS::RootedVector<JS::Value> argv(cx);
70167 if (!argv.resize(1)) {
70168 // That threw an exception on the JSContext, and our CallSetup will do
70169 // the right thing with that.
70170 return;
70171 }
70172 unsigned argc = 1;
70173
70174 do {
70175 if (arg.IsNull()) {
70176 argv[0].setNull();
70177 break;
70178 }
70179 argv[0].setBoolean(arg.Value());
70180 break;
70181 } while (false);
70182
70183 JS::Rooted<JS::Value> callable(cx);
70184 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70185 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70186 !InitIds(cx, atomsCache)) ||
70187 !GetCallableProperty(cx, atomsCache->overload12_id, &callable)) {
70188 aRv.Throw(NS_ERROR_UNEXPECTED);
70189 return;
70190 }
70191 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70192 if (!JS::Call(cx, thisValue, callable,
70193 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70194 aRv.NoteJSContextException(cx);
70195 return;
70196 }
70197}
70198
70199void
70200TestJSImplInterfaceJSImpl::Overload13(const Nullable<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
70201{
70202 CallSetup s(this, aRv, "TestJSImplInterface.overload13", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70203 if (aRv.Failed()) {
70204 return;
70205 }
70206 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70206); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70206; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70207 BindingCallContext& cx = s.GetCallContext();
70208
70209 JS::Rooted<JS::Value> rval(cx);
70210 JS::RootedVector<JS::Value> argv(cx);
70211 if (!argv.resize(1)) {
70212 // That threw an exception on the JSContext, and our CallSetup will do
70213 // the right thing with that.
70214 return;
70215 }
70216 unsigned argc = 1;
70217
70218 do {
70219 if (arg.IsNull()) {
70220 argv[0].setNull();
70221 break;
70222 }
70223 argv[0].setInt32(int32_t(arg.Value()));
70224 break;
70225 } while (false);
70226
70227 JS::Rooted<JS::Value> callable(cx);
70228 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70229 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70230 !InitIds(cx, atomsCache)) ||
70231 !GetCallableProperty(cx, atomsCache->overload13_id, &callable)) {
70232 aRv.Throw(NS_ERROR_UNEXPECTED);
70233 return;
70234 }
70235 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70236 if (!JS::Call(cx, thisValue, callable,
70237 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70238 aRv.NoteJSContextException(cx);
70239 return;
70240 }
70241}
70242
70243void
70244TestJSImplInterfaceJSImpl::Overload13(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
70245{
70246 CallSetup s(this, aRv, "TestJSImplInterface.overload13", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70247 if (aRv.Failed()) {
70248 return;
70249 }
70250 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70250); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70250; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70251 BindingCallContext& cx = s.GetCallContext();
70252
70253 JS::Rooted<JS::Value> rval(cx);
70254 JS::RootedVector<JS::Value> argv(cx);
70255 if (!argv.resize(1)) {
70256 // That threw an exception on the JSContext, and our CallSetup will do
70257 // the right thing with that.
70258 return;
70259 }
70260 unsigned argc = 1;
70261
70262 do {
70263 argv[0].setBoolean(arg);
70264 break;
70265 } while (false);
70266
70267 JS::Rooted<JS::Value> callable(cx);
70268 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70269 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70270 !InitIds(cx, atomsCache)) ||
70271 !GetCallableProperty(cx, atomsCache->overload13_id, &callable)) {
70272 aRv.Throw(NS_ERROR_UNEXPECTED);
70273 return;
70274 }
70275 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70276 if (!JS::Call(cx, thisValue, callable,
70277 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70278 aRv.NoteJSContextException(cx);
70279 return;
70280 }
70281}
70282
70283void
70284TestJSImplInterfaceJSImpl::Overload14(const Optional<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
70285{
70286 CallSetup s(this, aRv, "TestJSImplInterface.overload14", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70287 if (aRv.Failed()) {
70288 return;
70289 }
70290 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70290); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70290; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70291 BindingCallContext& cx = s.GetCallContext();
70292
70293 JS::Rooted<JS::Value> rval(cx);
70294 JS::RootedVector<JS::Value> argv(cx);
70295 if (!argv.resize(1)) {
70296 // That threw an exception on the JSContext, and our CallSetup will do
70297 // the right thing with that.
70298 return;
70299 }
70300 unsigned argc = 1;
70301
70302 do {
70303 if (arg.WasPassed()) {
70304 argv[0].setInt32(int32_t(arg.Value()));
70305 break;
70306 } else if (argc == 1) {
70307 // This is our current trailing argument; reduce argc
70308 --argc;
70309 } else {
70310 argv[0].setUndefined();
70311 }
70312 } while (false);
70313
70314 JS::Rooted<JS::Value> callable(cx);
70315 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70316 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70317 !InitIds(cx, atomsCache)) ||
70318 !GetCallableProperty(cx, atomsCache->overload14_id, &callable)) {
70319 aRv.Throw(NS_ERROR_UNEXPECTED);
70320 return;
70321 }
70322 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70323 if (!JS::Call(cx, thisValue, callable,
70324 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70325 aRv.NoteJSContextException(cx);
70326 return;
70327 }
70328}
70329
70330void
70331TestJSImplInterfaceJSImpl::Overload14(TestInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
70332{
70333 CallSetup s(this, aRv, "TestJSImplInterface.overload14", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70334 if (aRv.Failed()) {
70335 return;
70336 }
70337 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70337); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70337; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70338 BindingCallContext& cx = s.GetCallContext();
70339
70340 JS::Rooted<JS::Value> rval(cx);
70341 JS::RootedVector<JS::Value> argv(cx);
70342 if (!argv.resize(1)) {
70343 // That threw an exception on the JSContext, and our CallSetup will do
70344 // the right thing with that.
70345 return;
70346 }
70347 unsigned argc = 1;
70348
70349 do {
70350 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
70351 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 70351); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 70351; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70352 aRv.Throw(NS_ERROR_UNEXPECTED);
70353 return;
70354 }
70355 break;
70356 } while (false);
70357
70358 JS::Rooted<JS::Value> callable(cx);
70359 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70360 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70361 !InitIds(cx, atomsCache)) ||
70362 !GetCallableProperty(cx, atomsCache->overload14_id, &callable)) {
70363 aRv.Throw(NS_ERROR_UNEXPECTED);
70364 return;
70365 }
70366 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70367 if (!JS::Call(cx, thisValue, callable,
70368 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70369 aRv.NoteJSContextException(cx);
70370 return;
70371 }
70372}
70373
70374void
70375TestJSImplInterfaceJSImpl::Overload15(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
70376{
70377 CallSetup s(this, aRv, "TestJSImplInterface.overload15", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70378 if (aRv.Failed()) {
70379 return;
70380 }
70381 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70381); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70381; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70382 BindingCallContext& cx = s.GetCallContext();
70383
70384 JS::Rooted<JS::Value> rval(cx);
70385 JS::RootedVector<JS::Value> argv(cx);
70386 if (!argv.resize(1)) {
70387 // That threw an exception on the JSContext, and our CallSetup will do
70388 // the right thing with that.
70389 return;
70390 }
70391 unsigned argc = 1;
70392
70393 do {
70394 argv[0].setInt32(int32_t(arg));
70395 break;
70396 } while (false);
70397
70398 JS::Rooted<JS::Value> callable(cx);
70399 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70400 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70401 !InitIds(cx, atomsCache)) ||
70402 !GetCallableProperty(cx, atomsCache->overload15_id, &callable)) {
70403 aRv.Throw(NS_ERROR_UNEXPECTED);
70404 return;
70405 }
70406 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70407 if (!JS::Call(cx, thisValue, callable,
70408 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70409 aRv.NoteJSContextException(cx);
70410 return;
70411 }
70412}
70413
70414void
70415TestJSImplInterfaceJSImpl::Overload15(const Optional<NonNull<TestInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
70416{
70417 CallSetup s(this, aRv, "TestJSImplInterface.overload15", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70418 if (aRv.Failed()) {
70419 return;
70420 }
70421 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70421); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70421; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70422 BindingCallContext& cx = s.GetCallContext();
70423
70424 JS::Rooted<JS::Value> rval(cx);
70425 JS::RootedVector<JS::Value> argv(cx);
70426 if (!argv.resize(1)) {
70427 // That threw an exception on the JSContext, and our CallSetup will do
70428 // the right thing with that.
70429 return;
70430 }
70431 unsigned argc = 1;
70432
70433 do {
70434 if (arg.WasPassed()) {
70435 if (!GetOrCreateDOMReflector(cx, arg.Value(), argv[0])) {
70436 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 70436); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 70436; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70437 aRv.Throw(NS_ERROR_UNEXPECTED);
70438 return;
70439 }
70440 break;
70441 } else if (argc == 1) {
70442 // This is our current trailing argument; reduce argc
70443 --argc;
70444 } else {
70445 argv[0].setUndefined();
70446 }
70447 } while (false);
70448
70449 JS::Rooted<JS::Value> callable(cx);
70450 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70451 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70452 !InitIds(cx, atomsCache)) ||
70453 !GetCallableProperty(cx, atomsCache->overload15_id, &callable)) {
70454 aRv.Throw(NS_ERROR_UNEXPECTED);
70455 return;
70456 }
70457 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70458 if (!JS::Call(cx, thisValue, callable,
70459 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70460 aRv.NoteJSContextException(cx);
70461 return;
70462 }
70463}
70464
70465void
70466TestJSImplInterfaceJSImpl::Overload16(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
70467{
70468 CallSetup s(this, aRv, "TestJSImplInterface.overload16", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70469 if (aRv.Failed()) {
70470 return;
70471 }
70472 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70472); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70472; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70473 BindingCallContext& cx = s.GetCallContext();
70474
70475 JS::Rooted<JS::Value> rval(cx);
70476 JS::RootedVector<JS::Value> argv(cx);
70477 if (!argv.resize(1)) {
70478 // That threw an exception on the JSContext, and our CallSetup will do
70479 // the right thing with that.
70480 return;
70481 }
70482 unsigned argc = 1;
70483
70484 do {
70485 argv[0].setInt32(int32_t(arg));
70486 break;
70487 } while (false);
70488
70489 JS::Rooted<JS::Value> callable(cx);
70490 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70491 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70492 !InitIds(cx, atomsCache)) ||
70493 !GetCallableProperty(cx, atomsCache->overload16_id, &callable)) {
70494 aRv.Throw(NS_ERROR_UNEXPECTED);
70495 return;
70496 }
70497 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70498 if (!JS::Call(cx, thisValue, callable,
70499 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70500 aRv.NoteJSContextException(cx);
70501 return;
70502 }
70503}
70504
70505void
70506TestJSImplInterfaceJSImpl::Overload16(const Optional<TestInterface*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
70507{
70508 CallSetup s(this, aRv, "TestJSImplInterface.overload16", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70509 if (aRv.Failed()) {
70510 return;
70511 }
70512 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70512); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70512; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70513 BindingCallContext& cx = s.GetCallContext();
70514
70515 JS::Rooted<JS::Value> rval(cx);
70516 JS::RootedVector<JS::Value> argv(cx);
70517 if (!argv.resize(1)) {
70518 // That threw an exception on the JSContext, and our CallSetup will do
70519 // the right thing with that.
70520 return;
70521 }
70522 unsigned argc = 1;
70523
70524 do {
70525 if (arg.WasPassed()) {
70526 if (!arg.Value()) {
70527 argv[0].setNull();
70528 break;
70529 }
70530 if (!GetOrCreateDOMReflector(cx, arg.Value(), argv[0])) {
70531 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 70531); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 70531; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70532 aRv.Throw(NS_ERROR_UNEXPECTED);
70533 return;
70534 }
70535 break;
70536 } else if (argc == 1) {
70537 // This is our current trailing argument; reduce argc
70538 --argc;
70539 } else {
70540 argv[0].setUndefined();
70541 }
70542 } while (false);
70543
70544 JS::Rooted<JS::Value> callable(cx);
70545 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70546 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70547 !InitIds(cx, atomsCache)) ||
70548 !GetCallableProperty(cx, atomsCache->overload16_id, &callable)) {
70549 aRv.Throw(NS_ERROR_UNEXPECTED);
70550 return;
70551 }
70552 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70553 if (!JS::Call(cx, thisValue, callable,
70554 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70555 aRv.NoteJSContextException(cx);
70556 return;
70557 }
70558}
70559
70560void
70561TestJSImplInterfaceJSImpl::Overload17(const Sequence<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
70562{
70563 CallSetup s(this, aRv, "TestJSImplInterface.overload17", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70564 if (aRv.Failed()) {
70565 return;
70566 }
70567 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70567); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70567; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70568 BindingCallContext& cx = s.GetCallContext();
70569
70570 JS::Rooted<JS::Value> rval(cx);
70571 JS::RootedVector<JS::Value> argv(cx);
70572 if (!argv.resize(1)) {
70573 // That threw an exception on the JSContext, and our CallSetup will do
70574 // the right thing with that.
70575 return;
70576 }
70577 unsigned argc = 1;
70578
70579 do {
70580
70581 uint32_t length = arg.Length();
70582 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
70583 if (!returnArray) {
70584 aRv.Throw(NS_ERROR_UNEXPECTED);
70585 return;
70586 }
70587 // Scope for 'tmp'
70588 {
70589 JS::Rooted<JS::Value> tmp(cx);
70590 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
70591 // Control block to let us common up the JS_DefineElement calls when there
70592 // are different ways to succeed at wrapping the object.
70593 do {
70594 tmp.setInt32(int32_t(arg[sequenceIdx0]));
70595 break;
70596 } while (false);
70597 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
70598 JSPROP_ENUMERATE)) {
70599 aRv.Throw(NS_ERROR_UNEXPECTED);
70600 return;
70601 }
70602 }
70603 }
70604 argv[0].setObject(*returnArray);
70605 break;
70606 } while (false);
70607
70608 JS::Rooted<JS::Value> callable(cx);
70609 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70610 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70611 !InitIds(cx, atomsCache)) ||
70612 !GetCallableProperty(cx, atomsCache->overload17_id, &callable)) {
70613 aRv.Throw(NS_ERROR_UNEXPECTED);
70614 return;
70615 }
70616 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70617 if (!JS::Call(cx, thisValue, callable,
70618 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70619 aRv.NoteJSContextException(cx);
70620 return;
70621 }
70622}
70623
70624void
70625TestJSImplInterfaceJSImpl::Overload17(const Record<nsString, int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
70626{
70627 CallSetup s(this, aRv, "TestJSImplInterface.overload17", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70628 if (aRv.Failed()) {
70629 return;
70630 }
70631 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70631); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70631; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70632 BindingCallContext& cx = s.GetCallContext();
70633
70634 JS::Rooted<JS::Value> rval(cx);
70635 JS::RootedVector<JS::Value> argv(cx);
70636 if (!argv.resize(1)) {
70637 // That threw an exception on the JSContext, and our CallSetup will do
70638 // the right thing with that.
70639 return;
70640 }
70641 unsigned argc = 1;
70642
70643 do {
70644
70645 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
70646 if (!returnObj) {
70647 aRv.Throw(NS_ERROR_UNEXPECTED);
70648 return;
70649 }
70650 // Scope for 'tmp'
70651 {
70652 JS::Rooted<JS::Value> tmp(cx);
70653 for (auto& entry : arg.Entries()) {
70654 auto& recordValue0 = entry.mValue;
70655 // Control block to let us common up the JS_DefineUCProperty calls when there
70656 // are different ways to succeed at wrapping the value.
70657 do {
70658 tmp.setInt32(int32_t(recordValue0));
70659 break;
70660 } while (false);
70661 if (!JS_DefineUCProperty(cx, returnObj,
70662 entry.mKey.BeginReading(),
70663 entry.mKey.Length(), tmp,
70664 JSPROP_ENUMERATE)) {
70665 aRv.Throw(NS_ERROR_UNEXPECTED);
70666 return;
70667 }
70668 }
70669 }
70670 argv[0].setObject(*returnObj);
70671 break;
70672 } while (false);
70673
70674 JS::Rooted<JS::Value> callable(cx);
70675 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70676 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70677 !InitIds(cx, atomsCache)) ||
70678 !GetCallableProperty(cx, atomsCache->overload17_id, &callable)) {
70679 aRv.Throw(NS_ERROR_UNEXPECTED);
70680 return;
70681 }
70682 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70683 if (!JS::Call(cx, thisValue, callable,
70684 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70685 aRv.NoteJSContextException(cx);
70686 return;
70687 }
70688}
70689
70690void
70691TestJSImplInterfaceJSImpl::Overload18(const Record<nsString, nsString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
70692{
70693 CallSetup s(this, aRv, "TestJSImplInterface.overload18", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70694 if (aRv.Failed()) {
70695 return;
70696 }
70697 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70697); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70697; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70698 BindingCallContext& cx = s.GetCallContext();
70699
70700 JS::Rooted<JS::Value> rval(cx);
70701 JS::RootedVector<JS::Value> argv(cx);
70702 if (!argv.resize(1)) {
70703 // That threw an exception on the JSContext, and our CallSetup will do
70704 // the right thing with that.
70705 return;
70706 }
70707 unsigned argc = 1;
70708
70709 do {
70710
70711 JS::Rooted<JSObject*> returnObj(cx, JS_NewPlainObject(cx));
70712 if (!returnObj) {
70713 aRv.Throw(NS_ERROR_UNEXPECTED);
70714 return;
70715 }
70716 // Scope for 'tmp'
70717 {
70718 JS::Rooted<JS::Value> tmp(cx);
70719 for (auto& entry : arg.Entries()) {
70720 auto& recordValue0 = entry.mValue;
70721 // Control block to let us common up the JS_DefineUCProperty calls when there
70722 // are different ways to succeed at wrapping the value.
70723 do {
70724 if (!xpc::NonVoidStringToJsval(cx, recordValue0, &tmp)) {
70725 aRv.Throw(NS_ERROR_UNEXPECTED);
70726 return;
70727 }
70728 break;
70729 } while (false);
70730 if (!JS_DefineUCProperty(cx, returnObj,
70731 entry.mKey.BeginReading(),
70732 entry.mKey.Length(), tmp,
70733 JSPROP_ENUMERATE)) {
70734 aRv.Throw(NS_ERROR_UNEXPECTED);
70735 return;
70736 }
70737 }
70738 }
70739 argv[0].setObject(*returnObj);
70740 break;
70741 } while (false);
70742
70743 JS::Rooted<JS::Value> callable(cx);
70744 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70745 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70746 !InitIds(cx, atomsCache)) ||
70747 !GetCallableProperty(cx, atomsCache->overload18_id, &callable)) {
70748 aRv.Throw(NS_ERROR_UNEXPECTED);
70749 return;
70750 }
70751 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70752 if (!JS::Call(cx, thisValue, callable,
70753 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70754 aRv.NoteJSContextException(cx);
70755 return;
70756 }
70757}
70758
70759void
70760TestJSImplInterfaceJSImpl::Overload18(const Sequence<nsString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
70761{
70762 CallSetup s(this, aRv, "TestJSImplInterface.overload18", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70763 if (aRv.Failed()) {
70764 return;
70765 }
70766 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70766); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70766; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70767 BindingCallContext& cx = s.GetCallContext();
70768
70769 JS::Rooted<JS::Value> rval(cx);
70770 JS::RootedVector<JS::Value> argv(cx);
70771 if (!argv.resize(1)) {
70772 // That threw an exception on the JSContext, and our CallSetup will do
70773 // the right thing with that.
70774 return;
70775 }
70776 unsigned argc = 1;
70777
70778 do {
70779
70780 uint32_t length = arg.Length();
70781 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
70782 if (!returnArray) {
70783 aRv.Throw(NS_ERROR_UNEXPECTED);
70784 return;
70785 }
70786 // Scope for 'tmp'
70787 {
70788 JS::Rooted<JS::Value> tmp(cx);
70789 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
70790 // Control block to let us common up the JS_DefineElement calls when there
70791 // are different ways to succeed at wrapping the object.
70792 do {
70793 if (!xpc::NonVoidStringToJsval(cx, arg[sequenceIdx0], &tmp)) {
70794 aRv.Throw(NS_ERROR_UNEXPECTED);
70795 return;
70796 }
70797 break;
70798 } while (false);
70799 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
70800 JSPROP_ENUMERATE)) {
70801 aRv.Throw(NS_ERROR_UNEXPECTED);
70802 return;
70803 }
70804 }
70805 }
70806 argv[0].setObject(*returnArray);
70807 break;
70808 } while (false);
70809
70810 JS::Rooted<JS::Value> callable(cx);
70811 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70812 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70813 !InitIds(cx, atomsCache)) ||
70814 !GetCallableProperty(cx, atomsCache->overload18_id, &callable)) {
70815 aRv.Throw(NS_ERROR_UNEXPECTED);
70816 return;
70817 }
70818 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70819 if (!JS::Call(cx, thisValue, callable,
70820 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70821 aRv.NoteJSContextException(cx);
70822 return;
70823 }
70824}
70825
70826void
70827TestJSImplInterfaceJSImpl::Overload19(const Sequence<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
70828{
70829 CallSetup s(this, aRv, "TestJSImplInterface.overload19", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70830 if (aRv.Failed()) {
70831 return;
70832 }
70833 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70833); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70833; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70834 BindingCallContext& cx = s.GetCallContext();
70835
70836 JS::Rooted<JS::Value> rval(cx);
70837 JS::RootedVector<JS::Value> argv(cx);
70838 if (!argv.resize(1)) {
70839 // That threw an exception on the JSContext, and our CallSetup will do
70840 // the right thing with that.
70841 return;
70842 }
70843 unsigned argc = 1;
70844
70845 do {
70846
70847 uint32_t length = arg.Length();
70848 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
70849 if (!returnArray) {
70850 aRv.Throw(NS_ERROR_UNEXPECTED);
70851 return;
70852 }
70853 // Scope for 'tmp'
70854 {
70855 JS::Rooted<JS::Value> tmp(cx);
70856 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
70857 // Control block to let us common up the JS_DefineElement calls when there
70858 // are different ways to succeed at wrapping the object.
70859 do {
70860 tmp.setInt32(int32_t(arg[sequenceIdx0]));
70861 break;
70862 } while (false);
70863 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
70864 JSPROP_ENUMERATE)) {
70865 aRv.Throw(NS_ERROR_UNEXPECTED);
70866 return;
70867 }
70868 }
70869 }
70870 argv[0].setObject(*returnArray);
70871 break;
70872 } while (false);
70873
70874 JS::Rooted<JS::Value> callable(cx);
70875 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70876 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70877 !InitIds(cx, atomsCache)) ||
70878 !GetCallableProperty(cx, atomsCache->overload19_id, &callable)) {
70879 aRv.Throw(NS_ERROR_UNEXPECTED);
70880 return;
70881 }
70882 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70883 if (!JS::Call(cx, thisValue, callable,
70884 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70885 aRv.NoteJSContextException(cx);
70886 return;
70887 }
70888}
70889
70890void
70891TestJSImplInterfaceJSImpl::Overload19(const Dict& arg, ErrorResult& aRv, JS::Realm* aRealm)
70892{
70893 CallSetup s(this, aRv, "TestJSImplInterface.overload19", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70894 if (aRv.Failed()) {
70895 return;
70896 }
70897 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70897); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70897; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70898 BindingCallContext& cx = s.GetCallContext();
70899
70900 JS::Rooted<JS::Value> rval(cx);
70901 JS::RootedVector<JS::Value> argv(cx);
70902 if (!argv.resize(1)) {
70903 // That threw an exception on the JSContext, and our CallSetup will do
70904 // the right thing with that.
70905 return;
70906 }
70907 unsigned argc = 1;
70908
70909 do {
70910 if (!arg.ToObjectInternal(cx, argv[0])) {
70911 aRv.Throw(NS_ERROR_UNEXPECTED);
70912 return;
70913 }
70914 break;
70915 } while (false);
70916
70917 JS::Rooted<JS::Value> callable(cx);
70918 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70919 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70920 !InitIds(cx, atomsCache)) ||
70921 !GetCallableProperty(cx, atomsCache->overload19_id, &callable)) {
70922 aRv.Throw(NS_ERROR_UNEXPECTED);
70923 return;
70924 }
70925 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70926 if (!JS::Call(cx, thisValue, callable,
70927 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70928 aRv.NoteJSContextException(cx);
70929 return;
70930 }
70931}
70932
70933void
70934TestJSImplInterfaceJSImpl::Overload20(const Dict& arg, ErrorResult& aRv, JS::Realm* aRealm)
70935{
70936 CallSetup s(this, aRv, "TestJSImplInterface.overload20", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70937 if (aRv.Failed()) {
70938 return;
70939 }
70940 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70940); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70940; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70941 BindingCallContext& cx = s.GetCallContext();
70942
70943 JS::Rooted<JS::Value> rval(cx);
70944 JS::RootedVector<JS::Value> argv(cx);
70945 if (!argv.resize(1)) {
70946 // That threw an exception on the JSContext, and our CallSetup will do
70947 // the right thing with that.
70948 return;
70949 }
70950 unsigned argc = 1;
70951
70952 do {
70953 if (!arg.ToObjectInternal(cx, argv[0])) {
70954 aRv.Throw(NS_ERROR_UNEXPECTED);
70955 return;
70956 }
70957 break;
70958 } while (false);
70959
70960 JS::Rooted<JS::Value> callable(cx);
70961 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
70962 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
70963 !InitIds(cx, atomsCache)) ||
70964 !GetCallableProperty(cx, atomsCache->overload20_id, &callable)) {
70965 aRv.Throw(NS_ERROR_UNEXPECTED);
70966 return;
70967 }
70968 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
70969 if (!JS::Call(cx, thisValue, callable,
70970 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
70971 aRv.NoteJSContextException(cx);
70972 return;
70973 }
70974}
70975
70976void
70977TestJSImplInterfaceJSImpl::Overload20(const Sequence<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
70978{
70979 CallSetup s(this, aRv, "TestJSImplInterface.overload20", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
70980 if (aRv.Failed()) {
70981 return;
70982 }
70983 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 70983); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 70983; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
70984 BindingCallContext& cx = s.GetCallContext();
70985
70986 JS::Rooted<JS::Value> rval(cx);
70987 JS::RootedVector<JS::Value> argv(cx);
70988 if (!argv.resize(1)) {
70989 // That threw an exception on the JSContext, and our CallSetup will do
70990 // the right thing with that.
70991 return;
70992 }
70993 unsigned argc = 1;
70994
70995 do {
70996
70997 uint32_t length = arg.Length();
70998 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
70999 if (!returnArray) {
71000 aRv.Throw(NS_ERROR_UNEXPECTED);
71001 return;
71002 }
71003 // Scope for 'tmp'
71004 {
71005 JS::Rooted<JS::Value> tmp(cx);
71006 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
71007 // Control block to let us common up the JS_DefineElement calls when there
71008 // are different ways to succeed at wrapping the object.
71009 do {
71010 tmp.setInt32(int32_t(arg[sequenceIdx0]));
71011 break;
71012 } while (false);
71013 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
71014 JSPROP_ENUMERATE)) {
71015 aRv.Throw(NS_ERROR_UNEXPECTED);
71016 return;
71017 }
71018 }
71019 }
71020 argv[0].setObject(*returnArray);
71021 break;
71022 } while (false);
71023
71024 JS::Rooted<JS::Value> callable(cx);
71025 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71026 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71027 !InitIds(cx, atomsCache)) ||
71028 !GetCallableProperty(cx, atomsCache->overload20_id, &callable)) {
71029 aRv.Throw(NS_ERROR_UNEXPECTED);
71030 return;
71031 }
71032 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71033 if (!JS::Call(cx, thisValue, callable,
71034 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
71035 aRv.NoteJSContextException(cx);
71036 return;
71037 }
71038}
71039
71040void
71041TestJSImplInterfaceJSImpl::PassVariadicThirdArg(const nsAString& arg1, int32_t arg2, const nsTArray<OwningNonNull<TestJSImplInterface>>& arg3, ErrorResult& aRv, JS::Realm* aRealm)
71042{
71043 CallSetup s(this, aRv, "TestJSImplInterface.passVariadicThirdArg", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71044 if (aRv.Failed()) {
71045 return;
71046 }
71047 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71047); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71047; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71048 BindingCallContext& cx = s.GetCallContext();
71049
71050 JS::Rooted<JS::Value> rval(cx);
71051 JS::RootedVector<JS::Value> argv(cx);
71052 if (!argv.resize((3 - 1) + arg3.Length())) {
71053 // That threw an exception on the JSContext, and our CallSetup will do
71054 // the right thing with that.
71055 return;
71056 }
71057 unsigned argc = (3 - 1) + arg3.Length();
71058
71059 do {
71060 for (uint32_t idx = 0; idx < arg3.Length(); ++idx) {
71061 if (!GetOrCreateDOMReflector(cx, arg3[idx], argv[2 + idx])) {
71062 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 71062); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 71062; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71063 aRv.Throw(NS_ERROR_UNEXPECTED);
71064 return;
71065 }
71066 continue;
71067 }
71068 break;
71069 } while (false);
71070
71071 do {
71072 argv[1].setInt32(int32_t(arg2));
71073 break;
71074 } while (false);
71075
71076 do {
71077 if (!xpc::NonVoidStringToJsval(cx, arg1, argv[0])) {
71078 aRv.Throw(NS_ERROR_UNEXPECTED);
71079 return;
71080 }
71081 break;
71082 } while (false);
71083
71084 JS::Rooted<JS::Value> callable(cx);
71085 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71086 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71087 !InitIds(cx, atomsCache)) ||
71088 !GetCallableProperty(cx, atomsCache->passVariadicThirdArg_id, &callable)) {
71089 aRv.Throw(NS_ERROR_UNEXPECTED);
71090 return;
71091 }
71092 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71093 if (!JS::Call(cx, thisValue, callable,
71094 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
71095 aRv.NoteJSContextException(cx);
71096 return;
71097 }
71098}
71099
71100void
71101TestJSImplInterfaceJSImpl::Prefable10(ErrorResult& aRv, JS::Realm* aRealm)
71102{
71103 CallSetup s(this, aRv, "TestJSImplInterface.prefable10", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71104 if (aRv.Failed()) {
71105 return;
71106 }
71107 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71107); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71107; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71108 BindingCallContext& cx = s.GetCallContext();
71109
71110 JS::Rooted<JS::Value> rval(cx);
71111
71112 JS::Rooted<JS::Value> callable(cx);
71113 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71114 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71115 !InitIds(cx, atomsCache)) ||
71116 !GetCallableProperty(cx, atomsCache->prefable10_id, &callable)) {
71117 aRv.Throw(NS_ERROR_UNEXPECTED);
71118 return;
71119 }
71120 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71121 if (!JS::Call(cx, thisValue, callable,
71122 JS::HandleValueArray::empty(), &rval)) {
71123 aRv.NoteJSContextException(cx);
71124 return;
71125 }
71126}
71127
71128void
71129TestJSImplInterfaceJSImpl::Prefable11(ErrorResult& aRv, JS::Realm* aRealm)
71130{
71131 CallSetup s(this, aRv, "TestJSImplInterface.prefable11", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71132 if (aRv.Failed()) {
71133 return;
71134 }
71135 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71135); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71135; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71136 BindingCallContext& cx = s.GetCallContext();
71137
71138 JS::Rooted<JS::Value> rval(cx);
71139
71140 JS::Rooted<JS::Value> callable(cx);
71141 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71142 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71143 !InitIds(cx, atomsCache)) ||
71144 !GetCallableProperty(cx, atomsCache->prefable11_id, &callable)) {
71145 aRv.Throw(NS_ERROR_UNEXPECTED);
71146 return;
71147 }
71148 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71149 if (!JS::Call(cx, thisValue, callable,
71150 JS::HandleValueArray::empty(), &rval)) {
71151 aRv.NoteJSContextException(cx);
71152 return;
71153 }
71154}
71155
71156void
71157TestJSImplInterfaceJSImpl::Prefable13(ErrorResult& aRv, JS::Realm* aRealm)
71158{
71159 CallSetup s(this, aRv, "TestJSImplInterface.prefable13", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71160 if (aRv.Failed()) {
71161 return;
71162 }
71163 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71163); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71163; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71164 BindingCallContext& cx = s.GetCallContext();
71165
71166 JS::Rooted<JS::Value> rval(cx);
71167
71168 JS::Rooted<JS::Value> callable(cx);
71169 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71170 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71171 !InitIds(cx, atomsCache)) ||
71172 !GetCallableProperty(cx, atomsCache->prefable13_id, &callable)) {
71173 aRv.Throw(NS_ERROR_UNEXPECTED);
71174 return;
71175 }
71176 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71177 if (!JS::Call(cx, thisValue, callable,
71178 JS::HandleValueArray::empty(), &rval)) {
71179 aRv.NoteJSContextException(cx);
71180 return;
71181 }
71182}
71183
71184void
71185TestJSImplInterfaceJSImpl::Prefable17(ErrorResult& aRv, JS::Realm* aRealm)
71186{
71187 CallSetup s(this, aRv, "TestJSImplInterface.prefable17", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71188 if (aRv.Failed()) {
71189 return;
71190 }
71191 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71191); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71191; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71192 BindingCallContext& cx = s.GetCallContext();
71193
71194 JS::Rooted<JS::Value> rval(cx);
71195
71196 JS::Rooted<JS::Value> callable(cx);
71197 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71198 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71199 !InitIds(cx, atomsCache)) ||
71200 !GetCallableProperty(cx, atomsCache->prefable17_id, &callable)) {
71201 aRv.Throw(NS_ERROR_UNEXPECTED);
71202 return;
71203 }
71204 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71205 if (!JS::Call(cx, thisValue, callable,
71206 JS::HandleValueArray::empty(), &rval)) {
71207 aRv.NoteJSContextException(cx);
71208 return;
71209 }
71210}
71211
71212void
71213TestJSImplInterfaceJSImpl::Prefable18(ErrorResult& aRv, JS::Realm* aRealm)
71214{
71215 CallSetup s(this, aRv, "TestJSImplInterface.prefable18", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71216 if (aRv.Failed()) {
71217 return;
71218 }
71219 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71219); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71219; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71220 BindingCallContext& cx = s.GetCallContext();
71221
71222 JS::Rooted<JS::Value> rval(cx);
71223
71224 JS::Rooted<JS::Value> callable(cx);
71225 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71226 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71227 !InitIds(cx, atomsCache)) ||
71228 !GetCallableProperty(cx, atomsCache->prefable18_id, &callable)) {
71229 aRv.Throw(NS_ERROR_UNEXPECTED);
71230 return;
71231 }
71232 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71233 if (!JS::Call(cx, thisValue, callable,
71234 JS::HandleValueArray::empty(), &rval)) {
71235 aRv.NoteJSContextException(cx);
71236 return;
71237 }
71238}
71239
71240void
71241TestJSImplInterfaceJSImpl::Prefable19(ErrorResult& aRv, JS::Realm* aRealm)
71242{
71243 CallSetup s(this, aRv, "TestJSImplInterface.prefable19", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71244 if (aRv.Failed()) {
71245 return;
71246 }
71247 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71247); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71247; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71248 BindingCallContext& cx = s.GetCallContext();
71249
71250 JS::Rooted<JS::Value> rval(cx);
71251
71252 JS::Rooted<JS::Value> callable(cx);
71253 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71254 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71255 !InitIds(cx, atomsCache)) ||
71256 !GetCallableProperty(cx, atomsCache->prefable19_id, &callable)) {
71257 aRv.Throw(NS_ERROR_UNEXPECTED);
71258 return;
71259 }
71260 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71261 if (!JS::Call(cx, thisValue, callable,
71262 JS::HandleValueArray::empty(), &rval)) {
71263 aRv.NoteJSContextException(cx);
71264 return;
71265 }
71266}
71267
71268void
71269TestJSImplInterfaceJSImpl::Prefable20(ErrorResult& aRv, JS::Realm* aRealm)
71270{
71271 CallSetup s(this, aRv, "TestJSImplInterface.prefable20", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71272 if (aRv.Failed()) {
71273 return;
71274 }
71275 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71275); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71275; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71276 BindingCallContext& cx = s.GetCallContext();
71277
71278 JS::Rooted<JS::Value> rval(cx);
71279
71280 JS::Rooted<JS::Value> callable(cx);
71281 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71282 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71283 !InitIds(cx, atomsCache)) ||
71284 !GetCallableProperty(cx, atomsCache->prefable20_id, &callable)) {
71285 aRv.Throw(NS_ERROR_UNEXPECTED);
71286 return;
71287 }
71288 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71289 if (!JS::Call(cx, thisValue, callable,
71290 JS::HandleValueArray::empty(), &rval)) {
71291 aRv.NoteJSContextException(cx);
71292 return;
71293 }
71294}
71295
71296void
71297TestJSImplInterfaceJSImpl::ConditionalOnSecureContext5(ErrorResult& aRv, JS::Realm* aRealm)
71298{
71299 CallSetup s(this, aRv, "TestJSImplInterface.conditionalOnSecureContext5", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71300 if (aRv.Failed()) {
71301 return;
71302 }
71303 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71303); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71303; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71304 BindingCallContext& cx = s.GetCallContext();
71305
71306 JS::Rooted<JS::Value> rval(cx);
71307
71308 JS::Rooted<JS::Value> callable(cx);
71309 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71310 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71311 !InitIds(cx, atomsCache)) ||
71312 !GetCallableProperty(cx, atomsCache->conditionalOnSecureContext5_id, &callable)) {
71313 aRv.Throw(NS_ERROR_UNEXPECTED);
71314 return;
71315 }
71316 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71317 if (!JS::Call(cx, thisValue, callable,
71318 JS::HandleValueArray::empty(), &rval)) {
71319 aRv.NoteJSContextException(cx);
71320 return;
71321 }
71322}
71323
71324void
71325TestJSImplInterfaceJSImpl::ConditionalOnSecureContext6(ErrorResult& aRv, JS::Realm* aRealm)
71326{
71327 CallSetup s(this, aRv, "TestJSImplInterface.conditionalOnSecureContext6", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71328 if (aRv.Failed()) {
71329 return;
71330 }
71331 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71331); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71331; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71332 BindingCallContext& cx = s.GetCallContext();
71333
71334 JS::Rooted<JS::Value> rval(cx);
71335
71336 JS::Rooted<JS::Value> callable(cx);
71337 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71338 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71339 !InitIds(cx, atomsCache)) ||
71340 !GetCallableProperty(cx, atomsCache->conditionalOnSecureContext6_id, &callable)) {
71341 aRv.Throw(NS_ERROR_UNEXPECTED);
71342 return;
71343 }
71344 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71345 if (!JS::Call(cx, thisValue, callable,
71346 JS::HandleValueArray::empty(), &rval)) {
71347 aRv.NoteJSContextException(cx);
71348 return;
71349 }
71350}
71351
71352void
71353TestJSImplInterfaceJSImpl::ConditionalOnSecureContext7(ErrorResult& aRv, JS::Realm* aRealm)
71354{
71355 CallSetup s(this, aRv, "TestJSImplInterface.conditionalOnSecureContext7", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71356 if (aRv.Failed()) {
71357 return;
71358 }
71359 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71359); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71359; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71360 BindingCallContext& cx = s.GetCallContext();
71361
71362 JS::Rooted<JS::Value> rval(cx);
71363
71364 JS::Rooted<JS::Value> callable(cx);
71365 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71366 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71367 !InitIds(cx, atomsCache)) ||
71368 !GetCallableProperty(cx, atomsCache->conditionalOnSecureContext7_id, &callable)) {
71369 aRv.Throw(NS_ERROR_UNEXPECTED);
71370 return;
71371 }
71372 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71373 if (!JS::Call(cx, thisValue, callable,
71374 JS::HandleValueArray::empty(), &rval)) {
71375 aRv.NoteJSContextException(cx);
71376 return;
71377 }
71378}
71379
71380void
71381TestJSImplInterfaceJSImpl::ConditionalOnSecureContext8(ErrorResult& aRv, JS::Realm* aRealm)
71382{
71383 CallSetup s(this, aRv, "TestJSImplInterface.conditionalOnSecureContext8", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71384 if (aRv.Failed()) {
71385 return;
71386 }
71387 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71387); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71387; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71388 BindingCallContext& cx = s.GetCallContext();
71389
71390 JS::Rooted<JS::Value> rval(cx);
71391
71392 JS::Rooted<JS::Value> callable(cx);
71393 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71394 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71395 !InitIds(cx, atomsCache)) ||
71396 !GetCallableProperty(cx, atomsCache->conditionalOnSecureContext8_id, &callable)) {
71397 aRv.Throw(NS_ERROR_UNEXPECTED);
71398 return;
71399 }
71400 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71401 if (!JS::Call(cx, thisValue, callable,
71402 JS::HandleValueArray::empty(), &rval)) {
71403 aRv.NoteJSContextException(cx);
71404 return;
71405 }
71406}
71407
71408void
71409TestJSImplInterfaceJSImpl::PassRenamedInterface(nsRenamedInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
71410{
71411 CallSetup s(this, aRv, "TestJSImplInterface.passRenamedInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71412 if (aRv.Failed()) {
71413 return;
71414 }
71415 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71415); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71415; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71416 BindingCallContext& cx = s.GetCallContext();
71417
71418 JS::Rooted<JS::Value> rval(cx);
71419 JS::RootedVector<JS::Value> argv(cx);
71420 if (!argv.resize(1)) {
71421 // That threw an exception on the JSContext, and our CallSetup will do
71422 // the right thing with that.
71423 return;
71424 }
71425 unsigned argc = 1;
71426
71427 do {
71428 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
71429 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 71429); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 71429; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71430 aRv.Throw(NS_ERROR_UNEXPECTED);
71431 return;
71432 }
71433 break;
71434 } while (false);
71435
71436 JS::Rooted<JS::Value> callable(cx);
71437 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71438 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71439 !InitIds(cx, atomsCache)) ||
71440 !GetCallableProperty(cx, atomsCache->passRenamedInterface_id, &callable)) {
71441 aRv.Throw(NS_ERROR_UNEXPECTED);
71442 return;
71443 }
71444 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71445 if (!JS::Call(cx, thisValue, callable,
71446 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
71447 aRv.NoteJSContextException(cx);
71448 return;
71449 }
71450}
71451
71452void
71453TestJSImplInterfaceJSImpl::ThrowingMethod(ErrorResult& aRv, JS::Realm* aRealm)
71454{
71455 CallSetup s(this, aRv, "TestJSImplInterface.throwingMethod", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71456 if (aRv.Failed()) {
71457 return;
71458 }
71459 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71459); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71459; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71460 BindingCallContext& cx = s.GetCallContext();
71461
71462 JS::Rooted<JS::Value> rval(cx);
71463
71464 JS::Rooted<JS::Value> callable(cx);
71465 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71466 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71467 !InitIds(cx, atomsCache)) ||
71468 !GetCallableProperty(cx, atomsCache->throwingMethod_id, &callable)) {
71469 aRv.Throw(NS_ERROR_UNEXPECTED);
71470 return;
71471 }
71472 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71473 if (!JS::Call(cx, thisValue, callable,
71474 JS::HandleValueArray::empty(), &rval)) {
71475 aRv.NoteJSContextException(cx);
71476 return;
71477 }
71478}
71479
71480void
71481TestJSImplInterfaceJSImpl::CanOOMMethod(ErrorResult& aRv, JS::Realm* aRealm)
71482{
71483 CallSetup s(this, aRv, "TestJSImplInterface.canOOMMethod", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71484 if (aRv.Failed()) {
71485 return;
71486 }
71487 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71487); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71487; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71488 BindingCallContext& cx = s.GetCallContext();
71489
71490 JS::Rooted<JS::Value> rval(cx);
71491
71492 JS::Rooted<JS::Value> callable(cx);
71493 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71494 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71495 !InitIds(cx, atomsCache)) ||
71496 !GetCallableProperty(cx, atomsCache->canOOMMethod_id, &callable)) {
71497 aRv.Throw(NS_ERROR_UNEXPECTED);
71498 return;
71499 }
71500 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71501 if (!JS::Call(cx, thisValue, callable,
71502 JS::HandleValueArray::empty(), &rval)) {
71503 aRv.NoteJSContextException(cx);
71504 return;
71505 }
71506}
71507
71508void
71509TestJSImplInterfaceJSImpl::CeReactionsMethod(ErrorResult& aRv, JS::Realm* aRealm)
71510{
71511 CallSetup s(this, aRv, "TestJSImplInterface.ceReactionsMethod", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71512 if (aRv.Failed()) {
71513 return;
71514 }
71515 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71515); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71515; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71516 BindingCallContext& cx = s.GetCallContext();
71517
71518 JS::Rooted<JS::Value> rval(cx);
71519
71520 JS::Rooted<JS::Value> callable(cx);
71521 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71522 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71523 !InitIds(cx, atomsCache)) ||
71524 !GetCallableProperty(cx, atomsCache->ceReactionsMethod_id, &callable)) {
71525 aRv.Throw(NS_ERROR_UNEXPECTED);
71526 return;
71527 }
71528 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71529 if (!JS::Call(cx, thisValue, callable,
71530 JS::HandleValueArray::empty(), &rval)) {
71531 aRv.NoteJSContextException(cx);
71532 return;
71533 }
71534}
71535
71536void
71537TestJSImplInterfaceJSImpl::CeReactionsMethodOverload(ErrorResult& aRv, JS::Realm* aRealm)
71538{
71539 CallSetup s(this, aRv, "TestJSImplInterface.ceReactionsMethodOverload", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71540 if (aRv.Failed()) {
71541 return;
71542 }
71543 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71543); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71543; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71544 BindingCallContext& cx = s.GetCallContext();
71545
71546 JS::Rooted<JS::Value> rval(cx);
71547
71548 JS::Rooted<JS::Value> callable(cx);
71549 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71550 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71551 !InitIds(cx, atomsCache)) ||
71552 !GetCallableProperty(cx, atomsCache->ceReactionsMethodOverload_id, &callable)) {
71553 aRv.Throw(NS_ERROR_UNEXPECTED);
71554 return;
71555 }
71556 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71557 if (!JS::Call(cx, thisValue, callable,
71558 JS::HandleValueArray::empty(), &rval)) {
71559 aRv.NoteJSContextException(cx);
71560 return;
71561 }
71562}
71563
71564void
71565TestJSImplInterfaceJSImpl::CeReactionsMethodOverload(const nsAString& bar, ErrorResult& aRv, JS::Realm* aRealm)
71566{
71567 CallSetup s(this, aRv, "TestJSImplInterface.ceReactionsMethodOverload", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71568 if (aRv.Failed()) {
71569 return;
71570 }
71571 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71571); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71571; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71572 BindingCallContext& cx = s.GetCallContext();
71573
71574 JS::Rooted<JS::Value> rval(cx);
71575 JS::RootedVector<JS::Value> argv(cx);
71576 if (!argv.resize(1)) {
71577 // That threw an exception on the JSContext, and our CallSetup will do
71578 // the right thing with that.
71579 return;
71580 }
71581 unsigned argc = 1;
71582
71583 do {
71584 if (!xpc::NonVoidStringToJsval(cx, bar, argv[0])) {
71585 aRv.Throw(NS_ERROR_UNEXPECTED);
71586 return;
71587 }
71588 break;
71589 } while (false);
71590
71591 JS::Rooted<JS::Value> callable(cx);
71592 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71593 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71594 !InitIds(cx, atomsCache)) ||
71595 !GetCallableProperty(cx, atomsCache->ceReactionsMethodOverload_id, &callable)) {
71596 aRv.Throw(NS_ERROR_UNEXPECTED);
71597 return;
71598 }
71599 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71600 if (!JS::Call(cx, thisValue, callable,
71601 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
71602 aRv.NoteJSContextException(cx);
71603 return;
71604 }
71605}
71606
71607void
71608TestJSImplInterfaceJSImpl::PassArgsWithDefaults(const Optional<int32_t>& arg1, TestInterface* arg2, const Dict& arg3, double arg4, const Optional<float>& arg5, ErrorResult& aRv, JS::Realm* aRealm)
71609{
71610 CallSetup s(this, aRv, "TestJSImplInterface.passArgsWithDefaults", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71611 if (aRv.Failed()) {
71612 return;
71613 }
71614 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71614); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71614; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71615 BindingCallContext& cx = s.GetCallContext();
71616
71617 JS::Rooted<JS::Value> rval(cx);
71618 JS::RootedVector<JS::Value> argv(cx);
71619 if (!argv.resize(5)) {
71620 // That threw an exception on the JSContext, and our CallSetup will do
71621 // the right thing with that.
71622 return;
71623 }
71624 unsigned argc = 5;
71625
71626 do {
71627 if (arg5.WasPassed()) {
71628 argv[4].set(JS_NumberValue(double(arg5.Value())));
71629 break;
71630 } else if (argc == 5) {
71631 // This is our current trailing argument; reduce argc
71632 --argc;
71633 } else {
71634 argv[4].setUndefined();
71635 }
71636 } while (false);
71637
71638 do {
71639 argv[3].set(JS_NumberValue(double(arg4)));
71640 break;
71641 } while (false);
71642
71643 do {
71644 if (!arg3.ToObjectInternal(cx, argv[2])) {
71645 aRv.Throw(NS_ERROR_UNEXPECTED);
71646 return;
71647 }
71648 break;
71649 } while (false);
71650
71651 do {
71652 if (!arg2) {
71653 argv[1].setNull();
71654 break;
71655 }
71656 if (!GetOrCreateDOMReflector(cx, arg2, argv[1])) {
71657 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 71657); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 71657; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71658 aRv.Throw(NS_ERROR_UNEXPECTED);
71659 return;
71660 }
71661 break;
71662 } while (false);
71663
71664 do {
71665 if (arg1.WasPassed()) {
71666 argv[0].setInt32(int32_t(arg1.Value()));
71667 break;
71668 } else if (argc == 1) {
71669 // This is our current trailing argument; reduce argc
71670 --argc;
71671 } else {
71672 argv[0].setUndefined();
71673 }
71674 } while (false);
71675
71676 JS::Rooted<JS::Value> callable(cx);
71677 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71678 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71679 !InitIds(cx, atomsCache)) ||
71680 !GetCallableProperty(cx, atomsCache->passArgsWithDefaults_id, &callable)) {
71681 aRv.Throw(NS_ERROR_UNEXPECTED);
71682 return;
71683 }
71684 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71685 if (!JS::Call(cx, thisValue, callable,
71686 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
71687 aRv.NoteJSContextException(cx);
71688 return;
71689 }
71690}
71691
71692void
71693TestJSImplInterfaceJSImpl::ToJSON(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
71694{
71695 CallSetup s(this, aRv, "TestJSImplInterface.toJSON", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71696 if (aRv.Failed()) {
71697 return;
71698 }
71699 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71699); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71699; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71700 BindingCallContext& cx = s.GetCallContext();
71701
71702 JS::Rooted<JS::Value> rval(cx);
71703
71704 JS::Rooted<JS::Value> callable(cx);
71705 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71706 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71707 !InitIds(cx, atomsCache)) ||
71708 !GetCallableProperty(cx, atomsCache->toJSON_id, &callable)) {
71709 aRv.Throw(NS_ERROR_UNEXPECTED);
71710 return;
71711 }
71712 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71713 if (!JS::Call(cx, thisValue, callable,
71714 JS::HandleValueArray::empty(), &rval)) {
71715 aRv.NoteJSContextException(cx);
71716 return;
71717 }
71718 JS::Rooted<JSObject*> rvalDecl(cx);
71719 if (rval.isObject()) {
71720#ifdef __clang__1
71721#pragma clang diagnostic push
71722#pragma clang diagnostic ignored "-Wunreachable-code"
71723#pragma clang diagnostic ignored "-Wunreachable-code-return"
71724#endif // __clang__
71725 if ((false) && !CallerSubsumes(rval)) {
71726 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("return value of TestJSImplInterface.toJSON");
71727 aRv.Throw(NS_ERROR_UNEXPECTED);
71728 return;
71729 }
71730#ifdef __clang__1
71731#pragma clang diagnostic pop
71732#endif // __clang__
71733 rvalDecl = &rval.toObject();
71734 } else {
71735 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.toJSON");
71736 aRv.Throw(NS_ERROR_UNEXPECTED);
71737 return;
71738 }
71739 aRetVal.set(rvalDecl);
71740}
71741
71742void
71743TestJSImplInterfaceJSImpl::Dashed_method(ErrorResult& aRv, JS::Realm* aRealm)
71744{
71745 CallSetup s(this, aRv, "TestJSImplInterface.dashed-method", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71746 if (aRv.Failed()) {
71747 return;
71748 }
71749 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71749); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71749; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71750 BindingCallContext& cx = s.GetCallContext();
71751
71752 JS::Rooted<JS::Value> rval(cx);
71753
71754 JS::Rooted<JS::Value> callable(cx);
71755 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71756 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71757 !InitIds(cx, atomsCache)) ||
71758 !GetCallableProperty(cx, atomsCache->dashed_method_id, &callable)) {
71759 aRv.Throw(NS_ERROR_UNEXPECTED);
71760 return;
71761 }
71762 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71763 if (!JS::Call(cx, thisValue, callable,
71764 JS::HandleValueArray::empty(), &rval)) {
71765 aRv.NoteJSContextException(cx);
71766 return;
71767 }
71768}
71769
71770void
71771TestJSImplInterfaceJSImpl::NonEnumerableMethod(ErrorResult& aRv, JS::Realm* aRealm)
71772{
71773 CallSetup s(this, aRv, "TestJSImplInterface.nonEnumerableMethod", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71774 if (aRv.Failed()) {
71775 return;
71776 }
71777 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71777); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71777; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71778 BindingCallContext& cx = s.GetCallContext();
71779
71780 JS::Rooted<JS::Value> rval(cx);
71781
71782 JS::Rooted<JS::Value> callable(cx);
71783 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71784 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71785 !InitIds(cx, atomsCache)) ||
71786 !GetCallableProperty(cx, atomsCache->nonEnumerableMethod_id, &callable)) {
71787 aRv.Throw(NS_ERROR_UNEXPECTED);
71788 return;
71789 }
71790 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71791 if (!JS::Call(cx, thisValue, callable,
71792 JS::HandleValueArray::empty(), &rval)) {
71793 aRv.NoteJSContextException(cx);
71794 return;
71795 }
71796}
71797
71798void
71799TestJSImplInterfaceJSImpl::PassAllowSharedArrayBufferViewTypedef(const ArrayBufferView& foo, ErrorResult& aRv, JS::Realm* aRealm)
71800{
71801 CallSetup s(this, aRv, "TestJSImplInterface.passAllowSharedArrayBufferViewTypedef", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71802 if (aRv.Failed()) {
71803 return;
71804 }
71805 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71805); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71805; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71806 BindingCallContext& cx = s.GetCallContext();
71807
71808 JS::Rooted<JS::Value> rval(cx);
71809 JS::RootedVector<JS::Value> argv(cx);
71810 if (!argv.resize(1)) {
71811 // That threw an exception on the JSContext, and our CallSetup will do
71812 // the right thing with that.
71813 return;
71814 }
71815 unsigned argc = 1;
71816
71817 do {
71818 argv[0].setObject(*foo.Obj());
71819 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
71820 aRv.Throw(NS_ERROR_UNEXPECTED);
71821 return;
71822 }
71823 break;
71824 } while (false);
71825
71826 JS::Rooted<JS::Value> callable(cx);
71827 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71828 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71829 !InitIds(cx, atomsCache)) ||
71830 !GetCallableProperty(cx, atomsCache->passAllowSharedArrayBufferViewTypedef_id, &callable)) {
71831 aRv.Throw(NS_ERROR_UNEXPECTED);
71832 return;
71833 }
71834 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71835 if (!JS::Call(cx, thisValue, callable,
71836 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
71837 aRv.NoteJSContextException(cx);
71838 return;
71839 }
71840}
71841
71842void
71843TestJSImplInterfaceJSImpl::PassAllowSharedArrayBufferView(const ArrayBufferView& foo, ErrorResult& aRv, JS::Realm* aRealm)
71844{
71845 CallSetup s(this, aRv, "TestJSImplInterface.passAllowSharedArrayBufferView", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71846 if (aRv.Failed()) {
71847 return;
71848 }
71849 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71849); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71849; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71850 BindingCallContext& cx = s.GetCallContext();
71851
71852 JS::Rooted<JS::Value> rval(cx);
71853 JS::RootedVector<JS::Value> argv(cx);
71854 if (!argv.resize(1)) {
71855 // That threw an exception on the JSContext, and our CallSetup will do
71856 // the right thing with that.
71857 return;
71858 }
71859 unsigned argc = 1;
71860
71861 do {
71862 argv[0].setObject(*foo.Obj());
71863 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
71864 aRv.Throw(NS_ERROR_UNEXPECTED);
71865 return;
71866 }
71867 break;
71868 } while (false);
71869
71870 JS::Rooted<JS::Value> callable(cx);
71871 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71872 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71873 !InitIds(cx, atomsCache)) ||
71874 !GetCallableProperty(cx, atomsCache->passAllowSharedArrayBufferView_id, &callable)) {
71875 aRv.Throw(NS_ERROR_UNEXPECTED);
71876 return;
71877 }
71878 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71879 if (!JS::Call(cx, thisValue, callable,
71880 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
71881 aRv.NoteJSContextException(cx);
71882 return;
71883 }
71884}
71885
71886void
71887TestJSImplInterfaceJSImpl::PassAllowSharedNullableArrayBufferView(const Nullable<ArrayBufferView>& foo, ErrorResult& aRv, JS::Realm* aRealm)
71888{
71889 CallSetup s(this, aRv, "TestJSImplInterface.passAllowSharedNullableArrayBufferView", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71890 if (aRv.Failed()) {
71891 return;
71892 }
71893 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71893); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71893; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71894 BindingCallContext& cx = s.GetCallContext();
71895
71896 JS::Rooted<JS::Value> rval(cx);
71897 JS::RootedVector<JS::Value> argv(cx);
71898 if (!argv.resize(1)) {
71899 // That threw an exception on the JSContext, and our CallSetup will do
71900 // the right thing with that.
71901 return;
71902 }
71903 unsigned argc = 1;
71904
71905 do {
71906 if (foo.IsNull()) {
71907 argv[0].setNull();
71908 break;
71909 }
71910 argv[0].setObject(*foo.Value().Obj());
71911 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
71912 aRv.Throw(NS_ERROR_UNEXPECTED);
71913 return;
71914 }
71915 break;
71916 } while (false);
71917
71918 JS::Rooted<JS::Value> callable(cx);
71919 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71920 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71921 !InitIds(cx, atomsCache)) ||
71922 !GetCallableProperty(cx, atomsCache->passAllowSharedNullableArrayBufferView_id, &callable)) {
71923 aRv.Throw(NS_ERROR_UNEXPECTED);
71924 return;
71925 }
71926 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71927 if (!JS::Call(cx, thisValue, callable,
71928 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
71929 aRv.NoteJSContextException(cx);
71930 return;
71931 }
71932}
71933
71934void
71935TestJSImplInterfaceJSImpl::PassAllowSharedArrayBuffer(const ArrayBuffer& foo, ErrorResult& aRv, JS::Realm* aRealm)
71936{
71937 CallSetup s(this, aRv, "TestJSImplInterface.passAllowSharedArrayBuffer", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71938 if (aRv.Failed()) {
71939 return;
71940 }
71941 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71941); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71941; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71942 BindingCallContext& cx = s.GetCallContext();
71943
71944 JS::Rooted<JS::Value> rval(cx);
71945 JS::RootedVector<JS::Value> argv(cx);
71946 if (!argv.resize(1)) {
71947 // That threw an exception on the JSContext, and our CallSetup will do
71948 // the right thing with that.
71949 return;
71950 }
71951 unsigned argc = 1;
71952
71953 do {
71954 argv[0].setObject(*foo.Obj());
71955 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
71956 aRv.Throw(NS_ERROR_UNEXPECTED);
71957 return;
71958 }
71959 break;
71960 } while (false);
71961
71962 JS::Rooted<JS::Value> callable(cx);
71963 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
71964 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
71965 !InitIds(cx, atomsCache)) ||
71966 !GetCallableProperty(cx, atomsCache->passAllowSharedArrayBuffer_id, &callable)) {
71967 aRv.Throw(NS_ERROR_UNEXPECTED);
71968 return;
71969 }
71970 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
71971 if (!JS::Call(cx, thisValue, callable,
71972 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
71973 aRv.NoteJSContextException(cx);
71974 return;
71975 }
71976}
71977
71978void
71979TestJSImplInterfaceJSImpl::PassAllowSharedNullableArrayBuffer(const Nullable<ArrayBuffer>& foo, ErrorResult& aRv, JS::Realm* aRealm)
71980{
71981 CallSetup s(this, aRv, "TestJSImplInterface.passAllowSharedNullableArrayBuffer", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
71982 if (aRv.Failed()) {
71983 return;
71984 }
71985 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 71985); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 71985; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
71986 BindingCallContext& cx = s.GetCallContext();
71987
71988 JS::Rooted<JS::Value> rval(cx);
71989 JS::RootedVector<JS::Value> argv(cx);
71990 if (!argv.resize(1)) {
71991 // That threw an exception on the JSContext, and our CallSetup will do
71992 // the right thing with that.
71993 return;
71994 }
71995 unsigned argc = 1;
71996
71997 do {
71998 if (foo.IsNull()) {
71999 argv[0].setNull();
72000 break;
72001 }
72002 argv[0].setObject(*foo.Value().Obj());
72003 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
72004 aRv.Throw(NS_ERROR_UNEXPECTED);
72005 return;
72006 }
72007 break;
72008 } while (false);
72009
72010 JS::Rooted<JS::Value> callable(cx);
72011 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
72012 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
72013 !InitIds(cx, atomsCache)) ||
72014 !GetCallableProperty(cx, atomsCache->passAllowSharedNullableArrayBuffer_id, &callable)) {
72015 aRv.Throw(NS_ERROR_UNEXPECTED);
72016 return;
72017 }
72018 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
72019 if (!JS::Call(cx, thisValue, callable,
72020 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
72021 aRv.NoteJSContextException(cx);
72022 return;
72023 }
72024}
72025
72026void
72027TestJSImplInterfaceJSImpl::PassUnionArrayBuffer(const StringOrArrayBuffer& foo, ErrorResult& aRv, JS::Realm* aRealm)
72028{
72029 CallSetup s(this, aRv, "TestJSImplInterface.passUnionArrayBuffer", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
72030 if (aRv.Failed()) {
72031 return;
72032 }
72033 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 72033); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 72033; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
72034 BindingCallContext& cx = s.GetCallContext();
72035
72036 JS::Rooted<JS::Value> rval(cx);
72037 JS::RootedVector<JS::Value> argv(cx);
72038 if (!argv.resize(1)) {
72039 // That threw an exception on the JSContext, and our CallSetup will do
72040 // the right thing with that.
72041 return;
72042 }
72043 unsigned argc = 1;
72044
72045 do {
72046 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
72047 if (!foo.ToJSVal(cx, callbackObj, argv[0])) {
72048 aRv.Throw(NS_ERROR_UNEXPECTED);
72049 return;
72050 }
72051 break;
72052 } while (false);
72053
72054 JS::Rooted<JS::Value> callable(cx);
72055 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
72056 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
72057 !InitIds(cx, atomsCache)) ||
72058 !GetCallableProperty(cx, atomsCache->passUnionArrayBuffer_id, &callable)) {
72059 aRv.Throw(NS_ERROR_UNEXPECTED);
72060 return;
72061 }
72062 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
72063 if (!JS::Call(cx, thisValue, callable,
72064 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
72065 aRv.NoteJSContextException(cx);
72066 return;
72067 }
72068}
72069
72070void
72071TestJSImplInterfaceJSImpl::PassUnionAllowSharedArrayBuffer(const StringOrMaybeSharedArrayBuffer& foo, ErrorResult& aRv, JS::Realm* aRealm)
72072{
72073 CallSetup s(this, aRv, "TestJSImplInterface.passUnionAllowSharedArrayBuffer", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
72074 if (aRv.Failed()) {
72075 return;
72076 }
72077 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 72077); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 72077; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
72078 BindingCallContext& cx = s.GetCallContext();
72079
72080 JS::Rooted<JS::Value> rval(cx);
72081 JS::RootedVector<JS::Value> argv(cx);
72082 if (!argv.resize(1)) {
72083 // That threw an exception on the JSContext, and our CallSetup will do
72084 // the right thing with that.
72085 return;
72086 }
72087 unsigned argc = 1;
72088
72089 do {
72090 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
72091 if (!foo.ToJSVal(cx, callbackObj, argv[0])) {
72092 aRv.Throw(NS_ERROR_UNEXPECTED);
72093 return;
72094 }
72095 break;
72096 } while (false);
72097
72098 JS::Rooted<JS::Value> callable(cx);
72099 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
72100 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
72101 !InitIds(cx, atomsCache)) ||
72102 !GetCallableProperty(cx, atomsCache->passUnionAllowSharedArrayBuffer_id, &callable)) {
72103 aRv.Throw(NS_ERROR_UNEXPECTED);
72104 return;
72105 }
72106 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
72107 if (!JS::Call(cx, thisValue, callable,
72108 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
72109 aRv.NoteJSContextException(cx);
72110 return;
72111 }
72112}
72113
72114void
72115TestJSImplInterfaceJSImpl::__Init(const nsAString& str, uint32_t num, const Nullable<bool>& boolArg, TestInterface* iface, int32_t arg1, const DictForConstructor& dict, JS::Handle<JS::Value> any1, JS::Handle<JSObject*> obj1, JS::Handle<JSObject*> obj2, const Sequence<Dict>& seq, JS::Handle<JS::Value> any2, const Optional<JS::Handle<JSObject*>>& obj3, const Optional<JS::Handle<JSObject*>>& obj4, const Uint8Array& typedArr, const ArrayBuffer& arrayBuf, ErrorResult& aRv, JS::Realm* aRealm)
72116{
72117 CallSetup s(this, aRv, "__init", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
72118 if (aRv.Failed()) {
72119 return;
72120 }
72121 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 72121); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 72121; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
72122 BindingCallContext& cx = s.GetCallContext();
72123
72124 JS::Rooted<JS::Value> rval(cx);
72125 JS::RootedVector<JS::Value> argv(cx);
72126 if (!argv.resize(15)) {
72127 // That threw an exception on the JSContext, and our CallSetup will do
72128 // the right thing with that.
72129 return;
72130 }
72131 unsigned argc = 15;
72132
72133 do {
72134 argv[14].setObject(*arrayBuf.Obj());
72135 if (!MaybeWrapNonDOMObjectValue(cx, argv[14])) {
72136 aRv.Throw(NS_ERROR_UNEXPECTED);
72137 return;
72138 }
72139 break;
72140 } while (false);
72141
72142 do {
72143 argv[13].setObject(*typedArr.Obj());
72144 if (!MaybeWrapNonDOMObjectValue(cx, argv[13])) {
72145 aRv.Throw(NS_ERROR_UNEXPECTED);
72146 return;
72147 }
72148 break;
72149 } while (false);
72150
72151 do {
72152 if (obj4.WasPassed()) {
72153 if (obj4.Value()) {
72154 JS::ExposeObjectToActiveJS(obj4.Value());
72155 }
72156 argv[12].setObjectOrNull(obj4.Value());
72157 if (!MaybeWrapObjectOrNullValue(cx, argv[12])) {
72158 aRv.Throw(NS_ERROR_UNEXPECTED);
72159 return;
72160 }
72161 break;
72162 } else if (argc == 13) {
72163 // This is our current trailing argument; reduce argc
72164 --argc;
72165 } else {
72166 argv[12].setUndefined();
72167 }
72168 } while (false);
72169
72170 do {
72171 if (obj3.WasPassed()) {
72172 JS::ExposeObjectToActiveJS(obj3.Value());
72173 argv[11].setObject(*obj3.Value());
72174 if (!MaybeWrapObjectValue(cx, argv[11])) {
72175 aRv.Throw(NS_ERROR_UNEXPECTED);
72176 return;
72177 }
72178 break;
72179 } else if (argc == 12) {
72180 // This is our current trailing argument; reduce argc
72181 --argc;
72182 } else {
72183 argv[11].setUndefined();
72184 }
72185 } while (false);
72186
72187 do {
72188 JS::ExposeValueToActiveJS(any2);
72189 argv[10].set(any2);
72190 if (!MaybeWrapValue(cx, argv[10])) {
72191 aRv.Throw(NS_ERROR_UNEXPECTED);
72192 return;
72193 }
72194 break;
72195 } while (false);
72196
72197 do {
72198
72199 uint32_t length = seq.Length();
72200 JS::Rooted<JSObject*> returnArray(cx, JS::NewArrayObject(cx, length));
72201 if (!returnArray) {
72202 aRv.Throw(NS_ERROR_UNEXPECTED);
72203 return;
72204 }
72205 // Scope for 'tmp'
72206 {
72207 JS::Rooted<JS::Value> tmp(cx);
72208 for (uint32_t sequenceIdx0 = 0; sequenceIdx0 < length; ++sequenceIdx0) {
72209 // Control block to let us common up the JS_DefineElement calls when there
72210 // are different ways to succeed at wrapping the object.
72211 do {
72212 if (!seq[sequenceIdx0].ToObjectInternal(cx, &tmp)) {
72213 aRv.Throw(NS_ERROR_UNEXPECTED);
72214 return;
72215 }
72216 break;
72217 } while (false);
72218 if (!JS_DefineElement(cx, returnArray, sequenceIdx0, tmp,
72219 JSPROP_ENUMERATE)) {
72220 aRv.Throw(NS_ERROR_UNEXPECTED);
72221 return;
72222 }
72223 }
72224 }
72225 argv[9].setObject(*returnArray);
72226 break;
72227 } while (false);
72228
72229 do {
72230 if (obj2) {
72231 JS::ExposeObjectToActiveJS(obj2);
72232 }
72233 argv[8].setObjectOrNull(obj2);
72234 if (!MaybeWrapObjectOrNullValue(cx, argv[8])) {
72235 aRv.Throw(NS_ERROR_UNEXPECTED);
72236 return;
72237 }
72238 break;
72239 } while (false);
72240
72241 do {
72242 JS::ExposeObjectToActiveJS(obj1);
72243 argv[7].setObject(*obj1);
72244 if (!MaybeWrapObjectValue(cx, argv[7])) {
72245 aRv.Throw(NS_ERROR_UNEXPECTED);
72246 return;
72247 }
72248 break;
72249 } while (false);
72250
72251 do {
72252 JS::ExposeValueToActiveJS(any1);
72253 argv[6].set(any1);
72254 if (!MaybeWrapValue(cx, argv[6])) {
72255 aRv.Throw(NS_ERROR_UNEXPECTED);
72256 return;
72257 }
72258 break;
72259 } while (false);
72260
72261 do {
72262 if (!dict.ToObjectInternal(cx, argv[5])) {
72263 aRv.Throw(NS_ERROR_UNEXPECTED);
72264 return;
72265 }
72266 break;
72267 } while (false);
72268
72269 do {
72270 argv[4].setInt32(int32_t(arg1));
72271 break;
72272 } while (false);
72273
72274 do {
72275 if (!iface) {
72276 argv[3].setNull();
72277 break;
72278 }
72279 if (!GetOrCreateDOMReflector(cx, iface, argv[3])) {
72280 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 72280); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 72280; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
72281 aRv.Throw(NS_ERROR_UNEXPECTED);
72282 return;
72283 }
72284 break;
72285 } while (false);
72286
72287 do {
72288 if (boolArg.IsNull()) {
72289 argv[2].setNull();
72290 break;
72291 }
72292 argv[2].setBoolean(boolArg.Value());
72293 break;
72294 } while (false);
72295
72296 do {
72297 argv[1].setNumber(num);
72298 break;
72299 } while (false);
72300
72301 do {
72302 if (!xpc::NonVoidStringToJsval(cx, str, argv[0])) {
72303 aRv.Throw(NS_ERROR_UNEXPECTED);
72304 return;
72305 }
72306 break;
72307 } while (false);
72308
72309 JS::Rooted<JS::Value> callable(cx);
72310 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
72311 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
72312 !InitIds(cx, atomsCache)) ||
72313 !GetCallableProperty(cx, atomsCache->__init_id, &callable)) {
72314 aRv.Throw(NS_ERROR_UNEXPECTED);
72315 return;
72316 }
72317 JS::Rooted<JS::Value> thisValue(cx, JS::ObjectValue(*mCallback));
72318 if (!JS::Call(cx, thisValue, callable,
72319 JS::HandleValueArray::subarray(argv, 0, argc), &rval)) {
72320 aRv.NoteJSContextException(cx);
72321 return;
72322 }
72323}
72324
72325bool
72326TestJSImplInterfaceJSImpl::InitIds(JSContext* cx, TestJSImplInterfaceAtoms* atomsCache)
72327{
72328 MOZ_ASSERT(reinterpret_cast<jsid*>(atomsCache)->isVoid())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(reinterpret_cast<jsid*>(atomsCache)->isVoid
())>::isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(reinterpret_cast<jsid*>(atomsCache)->isVoid
()))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("reinterpret_cast<jsid*>(atomsCache)->isVoid()", "../TestJSImplGenBinding.cpp"
, 72328); AnnotateMozCrashReason("MOZ_ASSERT" "(" "reinterpret_cast<jsid*>(atomsCache)->isVoid()"
")"); do { *((volatile int*)__null) = 72328; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
72329
72330 // Initialize these in reverse order so that any failure leaves the first one
72331 // uninitialized.
72332 if (!atomsCache->__init_id.init(cx, "__init") ||
72333 !atomsCache->passUnionAllowSharedArrayBuffer_id.init(cx, "passUnionAllowSharedArrayBuffer") ||
72334 !atomsCache->passUnionArrayBuffer_id.init(cx, "passUnionArrayBuffer") ||
72335 !atomsCache->passAllowSharedNullableArrayBuffer_id.init(cx, "passAllowSharedNullableArrayBuffer") ||
72336 !atomsCache->passAllowSharedArrayBuffer_id.init(cx, "passAllowSharedArrayBuffer") ||
72337 !atomsCache->passAllowSharedNullableArrayBufferView_id.init(cx, "passAllowSharedNullableArrayBufferView") ||
72338 !atomsCache->passAllowSharedArrayBufferView_id.init(cx, "passAllowSharedArrayBufferView") ||
72339 !atomsCache->passAllowSharedArrayBufferViewTypedef_id.init(cx, "passAllowSharedArrayBufferViewTypedef") ||
72340 !atomsCache->allowSharedNullableArrayBuffer_id.init(cx, "allowSharedNullableArrayBuffer") ||
72341 !atomsCache->allowSharedArrayBuffer_id.init(cx, "allowSharedArrayBuffer") ||
72342 !atomsCache->allowSharedNullableArrayBufferView_id.init(cx, "allowSharedNullableArrayBufferView") ||
72343 !atomsCache->allowSharedArrayBufferView_id.init(cx, "allowSharedArrayBufferView") ||
72344 !atomsCache->allowSharedArrayBufferViewTypedef_id.init(cx, "allowSharedArrayBufferViewTypedef") ||
72345 !atomsCache->nonEnumerableMethod_id.init(cx, "nonEnumerableMethod") ||
72346 !atomsCache->nonEnumerableAttr_id.init(cx, "nonEnumerableAttr") ||
72347 !atomsCache->dashed_method_id.init(cx, "dashed-method") ||
72348 !atomsCache->dashed_attribute_id.init(cx, "dashed-attribute") ||
72349 !atomsCache->toJSON_id.init(cx, "toJSON") ||
72350 !atomsCache->toJSONShouldSkipThis3_id.init(cx, "toJSONShouldSkipThis3") ||
72351 !atomsCache->toJSONShouldSkipThis2_id.init(cx, "toJSONShouldSkipThis2") ||
72352 !atomsCache->toJSONShouldSkipThis_id.init(cx, "toJSONShouldSkipThis") ||
72353 !atomsCache->passArgsWithDefaults_id.init(cx, "passArgsWithDefaults") ||
72354 !atomsCache->ceReactionsAttr_id.init(cx, "ceReactionsAttr") ||
72355 !atomsCache->ceReactionsMethodOverload_id.init(cx, "ceReactionsMethodOverload") ||
72356 !atomsCache->ceReactionsMethod_id.init(cx, "ceReactionsMethod") ||
72357 !atomsCache->canOOMSetterAttr_id.init(cx, "canOOMSetterAttr") ||
72358 !atomsCache->canOOMGetterAttr_id.init(cx, "canOOMGetterAttr") ||
72359 !atomsCache->canOOMAttr_id.init(cx, "canOOMAttr") ||
72360 !atomsCache->canOOMMethod_id.init(cx, "canOOMMethod") ||
72361 !atomsCache->throwingSetterAttr_id.init(cx, "throwingSetterAttr") ||
72362 !atomsCache->throwingGetterAttr_id.init(cx, "throwingGetterAttr") ||
72363 !atomsCache->throwingAttr_id.init(cx, "throwingAttr") ||
72364 !atomsCache->throwingMethod_id.init(cx, "throwingMethod") ||
72365 !atomsCache->putForwardsAttr3_id.init(cx, "putForwardsAttr3") ||
72366 !atomsCache->putForwardsAttr2_id.init(cx, "putForwardsAttr2") ||
72367 !atomsCache->putForwardsAttr_id.init(cx, "putForwardsAttr") ||
72368 !atomsCache->passRenamedInterface_id.init(cx, "passRenamedInterface") ||
72369 !atomsCache->attrWithLenientThis_id.init(cx, "attrWithLenientThis") ||
72370 !atomsCache->conditionalOnSecureContext8_id.init(cx, "conditionalOnSecureContext8") ||
72371 !atomsCache->conditionalOnSecureContext7_id.init(cx, "conditionalOnSecureContext7") ||
72372 !atomsCache->conditionalOnSecureContext6_id.init(cx, "conditionalOnSecureContext6") ||
72373 !atomsCache->conditionalOnSecureContext5_id.init(cx, "conditionalOnSecureContext5") ||
72374 !atomsCache->conditionalOnSecureContext4_id.init(cx, "conditionalOnSecureContext4") ||
72375 !atomsCache->conditionalOnSecureContext3_id.init(cx, "conditionalOnSecureContext3") ||
72376 !atomsCache->conditionalOnSecureContext2_id.init(cx, "conditionalOnSecureContext2") ||
72377 !atomsCache->conditionalOnSecureContext1_id.init(cx, "conditionalOnSecureContext1") ||
72378 !atomsCache->prefable20_id.init(cx, "prefable20") ||
72379 !atomsCache->prefable19_id.init(cx, "prefable19") ||
72380 !atomsCache->prefable18_id.init(cx, "prefable18") ||
72381 !atomsCache->prefable17_id.init(cx, "prefable17") ||
72382 !atomsCache->prefable16_id.init(cx, "prefable16") ||
72383 !atomsCache->prefable15_id.init(cx, "prefable15") ||
72384 !atomsCache->prefable14_id.init(cx, "prefable14") ||
72385 !atomsCache->prefable13_id.init(cx, "prefable13") ||
72386 !atomsCache->prefable12_id.init(cx, "prefable12") ||
72387 !atomsCache->prefable11_id.init(cx, "prefable11") ||
72388 !atomsCache->prefable10_id.init(cx, "prefable10") ||
72389 !atomsCache->prefable9_id.init(cx, "prefable9") ||
72390 !atomsCache->prefable8_id.init(cx, "prefable8") ||
72391 !atomsCache->prefable7_id.init(cx, "prefable7") ||
72392 !atomsCache->prefable6_id.init(cx, "prefable6") ||
72393 !atomsCache->prefable5_id.init(cx, "prefable5") ||
72394 !atomsCache->prefable4_id.init(cx, "prefable4") ||
72395 !atomsCache->prefable3_id.init(cx, "prefable3") ||
72396 !atomsCache->prefable2_id.init(cx, "prefable2") ||
72397 !atomsCache->prefable1_id.init(cx, "prefable1") ||
72398 !atomsCache->passVariadicThirdArg_id.init(cx, "passVariadicThirdArg") ||
72399 !atomsCache->overload20_id.init(cx, "overload20") ||
72400 !atomsCache->overload19_id.init(cx, "overload19") ||
72401 !atomsCache->overload18_id.init(cx, "overload18") ||
72402 !atomsCache->overload17_id.init(cx, "overload17") ||
72403 !atomsCache->overload16_id.init(cx, "overload16") ||
72404 !atomsCache->overload15_id.init(cx, "overload15") ||
72405 !atomsCache->overload14_id.init(cx, "overload14") ||
72406 !atomsCache->overload13_id.init(cx, "overload13") ||
72407 !atomsCache->overload12_id.init(cx, "overload12") ||
72408 !atomsCache->overload11_id.init(cx, "overload11") ||
72409 !atomsCache->overload10_id.init(cx, "overload10") ||
72410 !atomsCache->overload9_id.init(cx, "overload9") ||
72411 !atomsCache->overload8_id.init(cx, "overload8") ||
72412 !atomsCache->overload7_id.init(cx, "overload7") ||
72413 !atomsCache->overload6_id.init(cx, "overload6") ||
72414 !atomsCache->overload5_id.init(cx, "overload5") ||
72415 !atomsCache->overload4_id.init(cx, "overload4") ||
72416 !atomsCache->overload3_id.init(cx, "overload3") ||
72417 !atomsCache->overload2_id.init(cx, "overload2") ||
72418 !atomsCache->overload1_id.init(cx, "overload1") ||
72419 !atomsCache->deprecatedMethodWithContext_id.init(cx, "deprecatedMethodWithContext") ||
72420 !atomsCache->deprecatedMethod_id.init(cx, "deprecatedMethod") ||
72421 !atomsCache->deprecatedAttribute_id.init(cx, "deprecatedAttribute") ||
72422 !atomsCache->exerciseTypedefInterfaces3_id.init(cx, "exerciseTypedefInterfaces3") ||
72423 !atomsCache->exerciseTypedefInterfaces2_id.init(cx, "exerciseTypedefInterfaces2") ||
72424 !atomsCache->exerciseTypedefInterfaces1_id.init(cx, "exerciseTypedefInterfaces1") ||
72425 !atomsCache->clampedByteNullable_id.init(cx, "clampedByteNullable") ||
72426 !atomsCache->clampedByte_id.init(cx, "clampedByte") ||
72427 !atomsCache->enforcedByteNullable_id.init(cx, "enforcedByteNullable") ||
72428 !atomsCache->enforcedByte_id.init(cx, "enforcedByte") ||
72429 !atomsCache->doClampNullable_id.init(cx, "doClampNullable") ||
72430 !atomsCache->doClamp_id.init(cx, "doClamp") ||
72431 !atomsCache->doEnforceRangeNullable_id.init(cx, "doEnforceRangeNullable") ||
72432 !atomsCache->doEnforceRange_id.init(cx, "doEnforceRange") ||
72433 !atomsCache->dontEnforceRangeOrClamp_id.init(cx, "dontEnforceRangeOrClamp") ||
72434 !atomsCache->passVariadicDictionary_id.init(cx, "passVariadicDictionary") ||
72435 !atomsCache->receiveDictContainingSequence_id.init(cx, "receiveDictContainingSequence") ||
72436 !atomsCache->passDictContainingSequence_id.init(cx, "passDictContainingSequence") ||
72437 !atomsCache->passDictContainingDict_id.init(cx, "passDictContainingDict") ||
72438 !atomsCache->passDictionaryOrLong_id.init(cx, "passDictionaryOrLong") ||
72439 !atomsCache->passRecordOfDictionaries_id.init(cx, "passRecordOfDictionaries") ||
72440 !atomsCache->passSequenceOfDictionaries_id.init(cx, "passSequenceOfDictionaries") ||
72441 !atomsCache->passOtherDictionary_id.init(cx, "passOtherDictionary") ||
72442 !atomsCache->receiveNullableDictionary_id.init(cx, "receiveNullableDictionary") ||
72443 !atomsCache->receiveDictionary_id.init(cx, "receiveDictionary") ||
72444 !atomsCache->passDictionary2_id.init(cx, "passDictionary2") ||
72445 !atomsCache->passDictionary_id.init(cx, "passDictionary") ||
72446 !atomsCache->attributeRenamedTo_id.init(cx, "attributeRenamedTo") ||
72447 !atomsCache->attributeGetterRenamedTo_id.init(cx, "attributeGetterRenamedTo") ||
72448 !atomsCache->methodRenamedTo_id.init(cx, "methodRenamedTo") ||
72449 !atomsCache->receiveAddrefedPromise_id.init(cx, "receiveAddrefedPromise") ||
72450 !atomsCache->receivePromise_id.init(cx, "receivePromise") ||
72451 !atomsCache->passPromiseSequence_id.init(cx, "passPromiseSequence") ||
72452 !atomsCache->passOptionalPromise_id.init(cx, "passOptionalPromise") ||
72453 !atomsCache->passPromise_id.init(cx, "passPromise") ||
72454 !atomsCache->writableNullableUnion_id.init(cx, "writableNullableUnion") ||
72455 !atomsCache->writableUnionContainingNull_id.init(cx, "writableUnionContainingNull") ||
72456 !atomsCache->writableUnion_id.init(cx, "writableUnion") ||
72457 !atomsCache->receiveNullableUnion2_id.init(cx, "receiveNullableUnion2") ||
72458 !atomsCache->receiveNullableUnion_id.init(cx, "receiveNullableUnion") ||
72459 !atomsCache->receiveUnionContainingNull_id.init(cx, "receiveUnionContainingNull") ||
72460 !atomsCache->receiveUnion2_id.init(cx, "receiveUnion2") ||
72461 !atomsCache->receiveUnion_id.init(cx, "receiveUnion") ||
72462 !atomsCache->passRecordOfUnions_id.init(cx, "passRecordOfUnions") ||
72463 !atomsCache->passVariadicNullableUnion_id.init(cx, "passVariadicNullableUnion") ||
72464 !atomsCache->passSequenceOfNullableUnions_id.init(cx, "passSequenceOfNullableUnions") ||
72465 !atomsCache->passVariadicUnion_id.init(cx, "passVariadicUnion") ||
72466 !atomsCache->passSequenceOfUnions2_id.init(cx, "passSequenceOfUnions2") ||
72467 !atomsCache->passSequenceOfUnions_id.init(cx, "passSequenceOfUnions") ||
72468 !atomsCache->passNullableUnionWithDefaultValue28_id.init(cx, "passNullableUnionWithDefaultValue28") ||
72469 !atomsCache->passNullableUnionWithDefaultValue27_id.init(cx, "passNullableUnionWithDefaultValue27") ||
72470 !atomsCache->passNullableUnionWithDefaultValue26_id.init(cx, "passNullableUnionWithDefaultValue26") ||
72471 !atomsCache->passNullableUnionWithDefaultValue25_id.init(cx, "passNullableUnionWithDefaultValue25") ||
72472 !atomsCache->passNullableUnionWithDefaultValue24_id.init(cx, "passNullableUnionWithDefaultValue24") ||
72473 !atomsCache->passNullableUnionWithDefaultValue23_id.init(cx, "passNullableUnionWithDefaultValue23") ||
72474 !atomsCache->passNullableUnionWithDefaultValue22_id.init(cx, "passNullableUnionWithDefaultValue22") ||
72475 !atomsCache->passNullableUnionWithDefaultValue21_id.init(cx, "passNullableUnionWithDefaultValue21") ||
72476 !atomsCache->passNullableUnionWithDefaultValue20_id.init(cx, "passNullableUnionWithDefaultValue20") ||
72477 !atomsCache->passNullableUnionWithDefaultValue19_id.init(cx, "passNullableUnionWithDefaultValue19") ||
72478 !atomsCache->passNullableUnionWithDefaultValue18_id.init(cx, "passNullableUnionWithDefaultValue18") ||
72479 !atomsCache->passNullableUnionWithDefaultValue17_id.init(cx, "passNullableUnionWithDefaultValue17") ||
72480 !atomsCache->passNullableUnionWithDefaultValue16_id.init(cx, "passNullableUnionWithDefaultValue16") ||
72481 !atomsCache->passNullableUnionWithDefaultValue15_id.init(cx, "passNullableUnionWithDefaultValue15") ||
72482 !atomsCache->passNullableUnionWithDefaultValue14_id.init(cx, "passNullableUnionWithDefaultValue14") ||
72483 !atomsCache->passNullableUnionWithDefaultValue13_id.init(cx, "passNullableUnionWithDefaultValue13") ||
72484 !atomsCache->passNullableUnionWithDefaultValue12_id.init(cx, "passNullableUnionWithDefaultValue12") ||
72485 !atomsCache->passNullableUnionWithDefaultValue11_id.init(cx, "passNullableUnionWithDefaultValue11") ||
72486 !atomsCache->passNullableUnionWithDefaultValue10_id.init(cx, "passNullableUnionWithDefaultValue10") ||
72487 !atomsCache->passNullableUnionWithDefaultValue9_id.init(cx, "passNullableUnionWithDefaultValue9") ||
72488 !atomsCache->passNullableUnionWithDefaultValue8_id.init(cx, "passNullableUnionWithDefaultValue8") ||
72489 !atomsCache->passNullableUnionWithDefaultValue7_id.init(cx, "passNullableUnionWithDefaultValue7") ||
72490 !atomsCache->passNullableUnionWithDefaultValue6_id.init(cx, "passNullableUnionWithDefaultValue6") ||
72491 !atomsCache->passNullableUnionWithDefaultValue5_id.init(cx, "passNullableUnionWithDefaultValue5") ||
72492 !atomsCache->passNullableUnionWithDefaultValue4_id.init(cx, "passNullableUnionWithDefaultValue4") ||
72493 !atomsCache->passNullableUnionWithDefaultValue3_id.init(cx, "passNullableUnionWithDefaultValue3") ||
72494 !atomsCache->passNullableUnionWithDefaultValue2_id.init(cx, "passNullableUnionWithDefaultValue2") ||
72495 !atomsCache->passNullableUnionWithDefaultValue1_id.init(cx, "passNullableUnionWithDefaultValue1") ||
72496 !atomsCache->passUnionWithDefaultValue25_id.init(cx, "passUnionWithDefaultValue25") ||
72497 !atomsCache->passUnionWithDefaultValue24_id.init(cx, "passUnionWithDefaultValue24") ||
72498 !atomsCache->passUnionWithDefaultValue23_id.init(cx, "passUnionWithDefaultValue23") ||
72499 !atomsCache->passUnionWithDefaultValue22_id.init(cx, "passUnionWithDefaultValue22") ||
72500 !atomsCache->passUnionWithDefaultValue21_id.init(cx, "passUnionWithDefaultValue21") ||
72501 !atomsCache->passUnionWithDefaultValue20_id.init(cx, "passUnionWithDefaultValue20") ||
72502 !atomsCache->passUnionWithDefaultValue19_id.init(cx, "passUnionWithDefaultValue19") ||
72503 !atomsCache->passUnionWithDefaultValue18_id.init(cx, "passUnionWithDefaultValue18") ||
72504 !atomsCache->passUnionWithDefaultValue17_id.init(cx, "passUnionWithDefaultValue17") ||
72505 !atomsCache->passUnionWithDefaultValue16_id.init(cx, "passUnionWithDefaultValue16") ||
72506 !atomsCache->passUnionWithDefaultValue15_id.init(cx, "passUnionWithDefaultValue15") ||
72507 !atomsCache->passUnionWithDefaultValue14_id.init(cx, "passUnionWithDefaultValue14") ||
72508 !atomsCache->passUnionWithDefaultValue13_id.init(cx, "passUnionWithDefaultValue13") ||
72509 !atomsCache->passUnionWithDefaultValue12_id.init(cx, "passUnionWithDefaultValue12") ||
72510 !atomsCache->passUnionWithDefaultValue11_id.init(cx, "passUnionWithDefaultValue11") ||
72511 !atomsCache->passUnionWithDefaultValue10_id.init(cx, "passUnionWithDefaultValue10") ||
72512 !atomsCache->passUnionWithDefaultValue9_id.init(cx, "passUnionWithDefaultValue9") ||
72513 !atomsCache->passUnionWithDefaultValue8_id.init(cx, "passUnionWithDefaultValue8") ||
72514 !atomsCache->passUnionWithDefaultValue7_id.init(cx, "passUnionWithDefaultValue7") ||
72515 !atomsCache->passUnionWithDefaultValue6_id.init(cx, "passUnionWithDefaultValue6") ||
72516 !atomsCache->passUnionWithDefaultValue5_id.init(cx, "passUnionWithDefaultValue5") ||
72517 !atomsCache->passUnionWithDefaultValue4_id.init(cx, "passUnionWithDefaultValue4") ||
72518 !atomsCache->passUnionWithDefaultValue3_id.init(cx, "passUnionWithDefaultValue3") ||
72519 !atomsCache->passUnionWithDefaultValue2_id.init(cx, "passUnionWithDefaultValue2") ||
72520 !atomsCache->passUnionWithDefaultValue1_id.init(cx, "passUnionWithDefaultValue1") ||
72521 !atomsCache->passUnionWithObject_id.init(cx, "passUnionWithObject") ||
72522 !atomsCache->passUnionWithEnum_id.init(cx, "passUnionWithEnum") ||
72523 !atomsCache->passUnionWithString_id.init(cx, "passUnionWithString") ||
72524 !atomsCache->passUnionWithTypedArraysOrNull_id.init(cx, "passUnionWithTypedArraysOrNull") ||
72525 !atomsCache->passUnionWithTypedArrays_id.init(cx, "passUnionWithTypedArrays") ||
72526 !atomsCache->passUnionWithArrayBufferOrNull_id.init(cx, "passUnionWithArrayBufferOrNull") ||
72527 !atomsCache->passUnionWithArrayBuffer_id.init(cx, "passUnionWithArrayBuffer") ||
72528 !atomsCache->passOptionalNullableUnionWithDefaultValue_id.init(cx, "passOptionalNullableUnionWithDefaultValue") ||
72529 !atomsCache->passOptionalNullableUnion_id.init(cx, "passOptionalNullableUnion") ||
72530 !atomsCache->passOptionalUnion_id.init(cx, "passOptionalUnion") ||
72531 !atomsCache->passNullableUnion_id.init(cx, "passNullableUnion") ||
72532 !atomsCache->passUnionWithNullable_id.init(cx, "passUnionWithNullable") ||
72533 !atomsCache->passUnionWithSVS_id.init(cx, "passUnionWithSVS") ||
72534 !atomsCache->passUnionWithSequenceAndRecord_id.init(cx, "passUnionWithSequenceAndRecord") ||
72535 !atomsCache->passUnionWithRecordAndSequence_id.init(cx, "passUnionWithRecordAndSequence") ||
72536 !atomsCache->passUnionWithRecord_id.init(cx, "passUnionWithRecord") ||
72537 !atomsCache->passUnionWithUTF8String_id.init(cx, "passUnionWithUTF8String") ||
72538 !atomsCache->passUnionWithByteString_id.init(cx, "passUnionWithByteString") ||
72539 !atomsCache->passUnionWithCallback_id.init(cx, "passUnionWithCallback") ||
72540 !atomsCache->passUnion28_id.init(cx, "passUnion28") ||
72541 !atomsCache->passUnion27_id.init(cx, "passUnion27") ||
72542 !atomsCache->passUnion26_id.init(cx, "passUnion26") ||
72543 !atomsCache->passUnion25_id.init(cx, "passUnion25") ||
72544 !atomsCache->passUnion24_id.init(cx, "passUnion24") ||
72545 !atomsCache->passUnion23_id.init(cx, "passUnion23") ||
72546 !atomsCache->passUnion22_id.init(cx, "passUnion22") ||
72547 !atomsCache->passUnion21_id.init(cx, "passUnion21") ||
72548 !atomsCache->passUnion20_id.init(cx, "passUnion20") ||
72549 !atomsCache->passUnion19_id.init(cx, "passUnion19") ||
72550 !atomsCache->passUnion18_id.init(cx, "passUnion18") ||
72551 !atomsCache->passUnion17_id.init(cx, "passUnion17") ||
72552 !atomsCache->passUnion16_id.init(cx, "passUnion16") ||
72553 !atomsCache->passUnion15_id.init(cx, "passUnion15") ||
72554 !atomsCache->passUnion14_id.init(cx, "passUnion14") ||
72555 !atomsCache->passUnion13_id.init(cx, "passUnion13") ||
72556 !atomsCache->passUnion12_id.init(cx, "passUnion12") ||
72557 !atomsCache->passUnion11_id.init(cx, "passUnion11") ||
72558 !atomsCache->passUnion10_id.init(cx, "passUnion10") ||
72559 !atomsCache->passUnion9_id.init(cx, "passUnion9") ||
72560 !atomsCache->passUnion8_id.init(cx, "passUnion8") ||
72561 !atomsCache->passUnion7_id.init(cx, "passUnion7") ||
72562 !atomsCache->passUnion6_id.init(cx, "passUnion6") ||
72563 !atomsCache->passUnion5_id.init(cx, "passUnion5") ||
72564 !atomsCache->passUnion4_id.init(cx, "passUnion4") ||
72565 !atomsCache->passUnion3_id.init(cx, "passUnion3") ||
72566 !atomsCache->passUnion2_id.init(cx, "passUnion2") ||
72567 !atomsCache->passUnion_id.init(cx, "passUnion") ||
72568 !atomsCache->receiveNullableObject_id.init(cx, "receiveNullableObject") ||
72569 !atomsCache->receiveObject_id.init(cx, "receiveObject") ||
72570 !atomsCache->passRecordOfObject_id.init(cx, "passRecordOfObject") ||
72571 !atomsCache->passOptionalNullableSequenceOfNullableSequenceOfNullableObject_id.init(cx, "passOptionalNullableSequenceOfNullableSequenceOfNullableObject") ||
72572 !atomsCache->passOptionalNullableSequenceOfNullableSequenceOfObject_id.init(cx, "passOptionalNullableSequenceOfNullableSequenceOfObject") ||
72573 !atomsCache->passNullableSequenceOfObject_id.init(cx, "passNullableSequenceOfObject") ||
72574 !atomsCache->passSequenceOfNullableObject_id.init(cx, "passSequenceOfNullableObject") ||
72575 !atomsCache->passSequenceOfObject_id.init(cx, "passSequenceOfObject") ||
72576 !atomsCache->passOptionalNullableObjectWithDefaultValue_id.init(cx, "passOptionalNullableObjectWithDefaultValue") ||
72577 !atomsCache->passOptionalNullableObject_id.init(cx, "passOptionalNullableObject") ||
72578 !atomsCache->passOptionalObject_id.init(cx, "passOptionalObject") ||
72579 !atomsCache->passVariadicNullableObject_id.init(cx, "passVariadicNullableObject") ||
72580 !atomsCache->passNullableObject_id.init(cx, "passNullableObject") ||
72581 !atomsCache->passVariadicObject_id.init(cx, "passVariadicObject") ||
72582 !atomsCache->passObject_id.init(cx, "passObject") ||
72583 !atomsCache->receiveAny_id.init(cx, "receiveAny") ||
72584 !atomsCache->passOptionalNullableSequenceOfNullableRecordOfAny_id.init(cx, "passOptionalNullableSequenceOfNullableRecordOfAny") ||
72585 !atomsCache->passOptionalNullableRecordOfNullableSequenceOfAny_id.init(cx, "passOptionalNullableRecordOfNullableSequenceOfAny") ||
72586 !atomsCache->passOptionalNullableRecordOfNullableRecordOfAny_id.init(cx, "passOptionalNullableRecordOfNullableRecordOfAny") ||
72587 !atomsCache->passNullableRecordOfNullableRecordOfAny_id.init(cx, "passNullableRecordOfNullableRecordOfAny") ||
72588 !atomsCache->passRecordOfNullableRecordOfAny_id.init(cx, "passRecordOfNullableRecordOfAny") ||
72589 !atomsCache->passRecordOfRecordOfAny_id.init(cx, "passRecordOfRecordOfAny") ||
72590 !atomsCache->passOptionalRecordOfAnyWithDefaultValue_id.init(cx, "passOptionalRecordOfAnyWithDefaultValue") ||
72591 !atomsCache->passOptionalNullableRecordOfAny_id.init(cx, "passOptionalNullableRecordOfAny") ||
72592 !atomsCache->passOptionalRecordOfAny_id.init(cx, "passOptionalRecordOfAny") ||
72593 !atomsCache->passNullableRecordOfAny_id.init(cx, "passNullableRecordOfAny") ||
72594 !atomsCache->passRecordOfAny_id.init(cx, "passRecordOfAny") ||
72595 !atomsCache->passOptionalNullableSequenceOfNullableSequenceOfAny_id.init(cx, "passOptionalNullableSequenceOfNullableSequenceOfAny") ||
72596 !atomsCache->passNullableSequenceOfNullableSequenceOfAny_id.init(cx, "passNullableSequenceOfNullableSequenceOfAny") ||
72597 !atomsCache->passSequenceOfNullableSequenceOfAny_id.init(cx, "passSequenceOfNullableSequenceOfAny") ||
72598 !atomsCache->passSequenceOfSequenceOfAny_id.init(cx, "passSequenceOfSequenceOfAny") ||
72599 !atomsCache->passOptionalSequenceOfAnyWithDefaultValue_id.init(cx, "passOptionalSequenceOfAnyWithDefaultValue") ||
72600 !atomsCache->passOptionalNullableSequenceOfAny_id.init(cx, "passOptionalNullableSequenceOfAny") ||
72601 !atomsCache->passOptionalSequenceOfAny_id.init(cx, "passOptionalSequenceOfAny") ||
72602 !atomsCache->passNullableSequenceOfAny_id.init(cx, "passNullableSequenceOfAny") ||
72603 !atomsCache->passSequenceOfAny_id.init(cx, "passSequenceOfAny") ||
72604 !atomsCache->passAnyDefaultNull_id.init(cx, "passAnyDefaultNull") ||
72605 !atomsCache->passOptionalAny_id.init(cx, "passOptionalAny") ||
72606 !atomsCache->passVariadicAny_id.init(cx, "passVariadicAny") ||
72607 !atomsCache->passAny_id.init(cx, "passAny") ||
72608 !atomsCache->passOptionalNullableTreatAsNullCallbackWithDefaultValue_id.init(cx, "passOptionalNullableTreatAsNullCallbackWithDefaultValue") ||
72609 !atomsCache->receiveNullableCallback_id.init(cx, "receiveNullableCallback") ||
72610 !atomsCache->receiveCallback_id.init(cx, "receiveCallback") ||
72611 !atomsCache->passOptionalNullableCallbackWithDefaultValue_id.init(cx, "passOptionalNullableCallbackWithDefaultValue") ||
72612 !atomsCache->passOptionalNullableCallback_id.init(cx, "passOptionalNullableCallback") ||
72613 !atomsCache->passOptionalCallback_id.init(cx, "passOptionalCallback") ||
72614 !atomsCache->passNullableCallback_id.init(cx, "passNullableCallback") ||
72615 !atomsCache->passCallback_id.init(cx, "passCallback") ||
72616 !atomsCache->readonlyEnumAttribute_id.init(cx, "readonlyEnumAttribute") ||
72617 !atomsCache->enumAttribute_id.init(cx, "enumAttribute") ||
72618 !atomsCache->receiveNullableEnum_id.init(cx, "receiveNullableEnum") ||
72619 !atomsCache->receiveEnum_id.init(cx, "receiveEnum") ||
72620 !atomsCache->passOptionalNullableEnumWithDefaultValue2_id.init(cx, "passOptionalNullableEnumWithDefaultValue2") ||
72621 !atomsCache->passOptionalNullableEnumWithDefaultValue_id.init(cx, "passOptionalNullableEnumWithDefaultValue") ||
72622 !atomsCache->passOptionalNullableEnum_id.init(cx, "passOptionalNullableEnum") ||
72623 !atomsCache->passEnumWithDefault_id.init(cx, "passEnumWithDefault") ||
72624 !atomsCache->passOptionalEnum_id.init(cx, "passOptionalEnum") ||
72625 !atomsCache->passNullableEnum_id.init(cx, "passNullableEnum") ||
72626 !atomsCache->passEnum_id.init(cx, "passEnum") ||
72627 !atomsCache->jsStringAttr_id.init(cx, "jsStringAttr") ||
72628 !atomsCache->readonlyJSStringAttr_id.init(cx, "readonlyJSStringAttr") ||
72629 !atomsCache->receiveJSString_id.init(cx, "receiveJSString") ||
72630 !atomsCache->passOptionalJSStringWithDefaultValue_id.init(cx, "passOptionalJSStringWithDefaultValue") ||
72631 !atomsCache->passJSString_id.init(cx, "passJSString") ||
72632 !atomsCache->receiveSVS_id.init(cx, "receiveSVS") ||
72633 !atomsCache->passVariadicSVS_id.init(cx, "passVariadicSVS") ||
72634 !atomsCache->passOptionalNullableSVSWithDefaultValue_id.init(cx, "passOptionalNullableSVSWithDefaultValue") ||
72635 !atomsCache->passOptionalNullableSVS_id.init(cx, "passOptionalNullableSVS") ||
72636 !atomsCache->passOptionalSVSWithDefaultValue_id.init(cx, "passOptionalSVSWithDefaultValue") ||
72637 !atomsCache->passOptionalSVS_id.init(cx, "passOptionalSVS") ||
72638 !atomsCache->passNullableSVS_id.init(cx, "passNullableSVS") ||
72639 !atomsCache->passSVS_id.init(cx, "passSVS") ||
72640 !atomsCache->passOptionalUnionUTF8StringWithDefaultValue_id.init(cx, "passOptionalUnionUTF8StringWithDefaultValue") ||
72641 !atomsCache->passOptionalUnionUTF8String_id.init(cx, "passOptionalUnionUTF8String") ||
72642 !atomsCache->passUnionUTF8String_id.init(cx, "passUnionUTF8String") ||
72643 !atomsCache->passVariadicUTF8String_id.init(cx, "passVariadicUTF8String") ||
72644 !atomsCache->passOptionalNullableUTF8StringWithDefaultValue_id.init(cx, "passOptionalNullableUTF8StringWithDefaultValue") ||
72645 !atomsCache->passOptionalNullableUTF8String_id.init(cx, "passOptionalNullableUTF8String") ||
72646 !atomsCache->passOptionalUTF8StringWithDefaultValue_id.init(cx, "passOptionalUTF8StringWithDefaultValue") ||
72647 !atomsCache->passOptionalUTF8String_id.init(cx, "passOptionalUTF8String") ||
72648 !atomsCache->passNullableUTF8String_id.init(cx, "passNullableUTF8String") ||
72649 !atomsCache->passUTF8String_id.init(cx, "passUTF8String") ||
72650 !atomsCache->passOptionalUnionByteStringWithDefaultValue_id.init(cx, "passOptionalUnionByteStringWithDefaultValue") ||
72651 !atomsCache->passOptionalUnionByteString_id.init(cx, "passOptionalUnionByteString") ||
72652 !atomsCache->passUnionByteString_id.init(cx, "passUnionByteString") ||
72653 !atomsCache->passVariadicByteString_id.init(cx, "passVariadicByteString") ||
72654 !atomsCache->passOptionalNullableByteStringWithDefaultValue_id.init(cx, "passOptionalNullableByteStringWithDefaultValue") ||
72655 !atomsCache->passOptionalNullableByteString_id.init(cx, "passOptionalNullableByteString") ||
72656 !atomsCache->passOptionalByteStringWithDefaultValue_id.init(cx, "passOptionalByteStringWithDefaultValue") ||
72657 !atomsCache->passOptionalByteString_id.init(cx, "passOptionalByteString") ||
72658 !atomsCache->passNullableByteString_id.init(cx, "passNullableByteString") ||
72659 !atomsCache->passByteString_id.init(cx, "passByteString") ||
72660 !atomsCache->passVariadicString_id.init(cx, "passVariadicString") ||
72661 !atomsCache->passOptionalNullableStringWithDefaultValue_id.init(cx, "passOptionalNullableStringWithDefaultValue") ||
72662 !atomsCache->passOptionalNullableString_id.init(cx, "passOptionalNullableString") ||
72663 !atomsCache->passOptionalStringWithDefaultValue_id.init(cx, "passOptionalStringWithDefaultValue") ||
72664 !atomsCache->passOptionalString_id.init(cx, "passOptionalString") ||
72665 !atomsCache->passNullableString_id.init(cx, "passNullableString") ||
72666 !atomsCache->passString_id.init(cx, "passString") ||
72667 !atomsCache->uint8ArrayAttr_id.init(cx, "uint8ArrayAttr") ||
72668 !atomsCache->receiveUint8Array_id.init(cx, "receiveUint8Array") ||
72669 !atomsCache->passVariadicNullableTypedArray_id.init(cx, "passVariadicNullableTypedArray") ||
72670 !atomsCache->passVariadicTypedArray_id.init(cx, "passVariadicTypedArray") ||
72671 !atomsCache->passRecordOfNullableArrayBuffers_id.init(cx, "passRecordOfNullableArrayBuffers") ||
72672 !atomsCache->passRecordOfArrayBuffers_id.init(cx, "passRecordOfArrayBuffers") ||
72673 !atomsCache->passSequenceOfNullableArrayBuffers_id.init(cx, "passSequenceOfNullableArrayBuffers") ||
72674 !atomsCache->passSequenceOfArrayBuffers_id.init(cx, "passSequenceOfArrayBuffers") ||
72675 !atomsCache->passFloat64Array_id.init(cx, "passFloat64Array") ||
72676 !atomsCache->passFloat32Array_id.init(cx, "passFloat32Array") ||
72677 !atomsCache->passUint8ClampedArray_id.init(cx, "passUint8ClampedArray") ||
72678 !atomsCache->passUint32Array_id.init(cx, "passUint32Array") ||
72679 !atomsCache->passUint16Array_id.init(cx, "passUint16Array") ||
72680 !atomsCache->passUint8Array_id.init(cx, "passUint8Array") ||
72681 !atomsCache->passInt32Array_id.init(cx, "passInt32Array") ||
72682 !atomsCache->passInt16Array_id.init(cx, "passInt16Array") ||
72683 !atomsCache->passInt8Array_id.init(cx, "passInt8Array") ||
72684 !atomsCache->passArrayBufferView_id.init(cx, "passArrayBufferView") ||
72685 !atomsCache->passOptionalNullableArrayBufferWithDefaultValue_id.init(cx, "passOptionalNullableArrayBufferWithDefaultValue") ||
72686 !atomsCache->passOptionalNullableArrayBuffer_id.init(cx, "passOptionalNullableArrayBuffer") ||
72687 !atomsCache->passOptionalArrayBuffer_id.init(cx, "passOptionalArrayBuffer") ||
72688 !atomsCache->passNullableArrayBuffer_id.init(cx, "passNullableArrayBuffer") ||
72689 !atomsCache->passArrayBuffer_id.init(cx, "passArrayBuffer") ||
72690 !atomsCache->receiveAnyRecord_id.init(cx, "receiveAnyRecord") ||
72691 !atomsCache->receiveNullableRecordOfNullableInts_id.init(cx, "receiveNullableRecordOfNullableInts") ||
72692 !atomsCache->receiveRecordOfNullableInts_id.init(cx, "receiveRecordOfNullableInts") ||
72693 !atomsCache->receiveNullableRecord_id.init(cx, "receiveNullableRecord") ||
72694 !atomsCache->receiveRecord_id.init(cx, "receiveRecord") ||
72695 !atomsCache->passRecordOfRecords_id.init(cx, "passRecordOfRecords") ||
72696 !atomsCache->passUTF8StringRecord_id.init(cx, "passUTF8StringRecord") ||
72697 !atomsCache->passByteStringRecord_id.init(cx, "passByteStringRecord") ||
72698 !atomsCache->passStringRecord_id.init(cx, "passStringRecord") ||
72699 !atomsCache->passNullableExternalInterfaceRecord_id.init(cx, "passNullableExternalInterfaceRecord") ||
72700 !atomsCache->passExternalInterfaceRecord_id.init(cx, "passExternalInterfaceRecord") ||
72701 !atomsCache->passOptionalObjectRecord_id.init(cx, "passOptionalObjectRecord") ||
72702 !atomsCache->passOptionalNullableRecordWithDefaultValue_id.init(cx, "passOptionalNullableRecordWithDefaultValue") ||
72703 !atomsCache->passOptionalNullableRecord_id.init(cx, "passOptionalNullableRecord") ||
72704 !atomsCache->passOptionalRecord_id.init(cx, "passOptionalRecord") ||
72705 !atomsCache->passNullableCastableObjectNullableRecord_id.init(cx, "passNullableCastableObjectNullableRecord") ||
72706 !atomsCache->passCastableObjectNullableRecord_id.init(cx, "passCastableObjectNullableRecord") ||
72707 !atomsCache->passNullableCastableObjectRecord_id.init(cx, "passNullableCastableObjectRecord") ||
72708 !atomsCache->passCastableObjectRecord_id.init(cx, "passCastableObjectRecord") ||
72709 !atomsCache->passOptionalNullableRecordOfNullableInts_id.init(cx, "passOptionalNullableRecordOfNullableInts") ||
72710 !atomsCache->passOptionalRecordOfNullableInts_id.init(cx, "passOptionalRecordOfNullableInts") ||
72711 !atomsCache->passRecordOfNullableInts_id.init(cx, "passRecordOfNullableInts") ||
72712 !atomsCache->passNullableRecord_id.init(cx, "passNullableRecord") ||
72713 !atomsCache->passRecord_id.init(cx, "passRecord") ||
72714 !atomsCache->passSequenceOfSequencesOfSequences_id.init(cx, "passSequenceOfSequencesOfSequences") ||
72715 !atomsCache->passSequenceOfSequences_id.init(cx, "passSequenceOfSequences") ||
72716 !atomsCache->receiveNullableObjectSequence_id.init(cx, "receiveNullableObjectSequence") ||
72717 !atomsCache->receiveObjectSequence_id.init(cx, "receiveObjectSequence") ||
72718 !atomsCache->receiveNullableAnySequence_id.init(cx, "receiveNullableAnySequence") ||
72719 !atomsCache->receiveAnySequence_id.init(cx, "receiveAnySequence") ||
72720 !atomsCache->receiveUTF8StringSequence_id.init(cx, "receiveUTF8StringSequence") ||
72721 !atomsCache->receiveByteStringSequence_id.init(cx, "receiveByteStringSequence") ||
72722 !atomsCache->receiveStringSequence_id.init(cx, "receiveStringSequence") ||
72723 !atomsCache->passNullableExternalInterfaceSequence_id.init(cx, "passNullableExternalInterfaceSequence") ||
72724 !atomsCache->passExternalInterfaceSequence_id.init(cx, "passExternalInterfaceSequence") ||
72725 !atomsCache->passOptionalObjectSequence_id.init(cx, "passOptionalObjectSequence") ||
72726 !atomsCache->passOptionalNullableSequenceWithDefaultValue2_id.init(cx, "passOptionalNullableSequenceWithDefaultValue2") ||
72727 !atomsCache->passOptionalNullableSequenceWithDefaultValue_id.init(cx, "passOptionalNullableSequenceWithDefaultValue") ||
72728 !atomsCache->passOptionalNullableSequence_id.init(cx, "passOptionalNullableSequence") ||
72729 !atomsCache->passOptionalSequenceWithDefaultValue_id.init(cx, "passOptionalSequenceWithDefaultValue") ||
72730 !atomsCache->passOptionalSequence_id.init(cx, "passOptionalSequence") ||
72731 !atomsCache->passNullableCastableObjectNullableSequence_id.init(cx, "passNullableCastableObjectNullableSequence") ||
72732 !atomsCache->passCastableObjectNullableSequence_id.init(cx, "passCastableObjectNullableSequence") ||
72733 !atomsCache->passNullableCastableObjectSequence_id.init(cx, "passNullableCastableObjectSequence") ||
72734 !atomsCache->passCastableObjectSequence_id.init(cx, "passCastableObjectSequence") ||
72735 !atomsCache->receiveWeakNullableCastableObjectNullableSequence_id.init(cx, "receiveWeakNullableCastableObjectNullableSequence") ||
72736 !atomsCache->receiveWeakCastableObjectNullableSequence_id.init(cx, "receiveWeakCastableObjectNullableSequence") ||
72737 !atomsCache->receiveWeakNullableCastableObjectSequence_id.init(cx, "receiveWeakNullableCastableObjectSequence") ||
72738 !atomsCache->receiveWeakCastableObjectSequence_id.init(cx, "receiveWeakCastableObjectSequence") ||
72739 !atomsCache->receiveNullableCastableObjectNullableSequence_id.init(cx, "receiveNullableCastableObjectNullableSequence") ||
72740 !atomsCache->receiveCastableObjectNullableSequence_id.init(cx, "receiveCastableObjectNullableSequence") ||
72741 !atomsCache->receiveNullableCallbackObjectSequence_id.init(cx, "receiveNullableCallbackObjectSequence") ||
72742 !atomsCache->receiveNullableCastableObjectSequence_id.init(cx, "receiveNullableCastableObjectSequence") ||
72743 !atomsCache->receiveCallbackObjectSequence_id.init(cx, "receiveCallbackObjectSequence") ||
72744 !atomsCache->receiveCastableObjectSequence_id.init(cx, "receiveCastableObjectSequence") ||
72745 !atomsCache->passOptionalNullableSequenceOfNullableInts_id.init(cx, "passOptionalNullableSequenceOfNullableInts") ||
72746 !atomsCache->passOptionalSequenceOfNullableInts_id.init(cx, "passOptionalSequenceOfNullableInts") ||
72747 !atomsCache->passSequenceOfNullableInts_id.init(cx, "passSequenceOfNullableInts") ||
72748 !atomsCache->passNullableSequence_id.init(cx, "passNullableSequence") ||
72749 !atomsCache->passSequence_id.init(cx, "passSequence") ||
72750 !atomsCache->receiveNullableSequenceOfNullableInts_id.init(cx, "receiveNullableSequenceOfNullableInts") ||
72751 !atomsCache->receiveSequenceOfNullableInts_id.init(cx, "receiveSequenceOfNullableInts") ||
72752 !atomsCache->receiveNullableSequence_id.init(cx, "receiveNullableSequence") ||
72753 !atomsCache->receiveSequence_id.init(cx, "receiveSequence") ||
72754 !atomsCache->passOptionalCallbackInterfaceWithDefault_id.init(cx, "passOptionalCallbackInterfaceWithDefault") ||
72755 !atomsCache->passOptionalNonNullCallbackInterface_id.init(cx, "passOptionalNonNullCallbackInterface") ||
72756 !atomsCache->passOptionalCallbackInterface_id.init(cx, "passOptionalCallbackInterface") ||
72757 !atomsCache->nullableCallbackInterface_id.init(cx, "nullableCallbackInterface") ||
72758 !atomsCache->nonNullCallbackInterface_id.init(cx, "nonNullCallbackInterface") ||
72759 !atomsCache->passNullableCallbackInterface_id.init(cx, "passNullableCallbackInterface") ||
72760 !atomsCache->passCallbackInterface_id.init(cx, "passCallbackInterface") ||
72761 !atomsCache->receiveWeakNullableCallbackInterface_id.init(cx, "receiveWeakNullableCallbackInterface") ||
72762 !atomsCache->receiveWeakCallbackInterface_id.init(cx, "receiveWeakCallbackInterface") ||
72763 !atomsCache->receiveNullableCallbackInterface_id.init(cx, "receiveNullableCallbackInterface") ||
72764 !atomsCache->receiveCallbackInterface_id.init(cx, "receiveCallbackInterface") ||
72765 !atomsCache->passOptionalExternalWithDefault_id.init(cx, "passOptionalExternalWithDefault") ||
72766 !atomsCache->passOptionalNonNullExternal_id.init(cx, "passOptionalNonNullExternal") ||
72767 !atomsCache->passOptionalExternal_id.init(cx, "passOptionalExternal") ||
72768 !atomsCache->nullableExternal_id.init(cx, "nullableExternal") ||
72769 !atomsCache->nonNullExternal_id.init(cx, "nonNullExternal") ||
72770 !atomsCache->passNullableExternal_id.init(cx, "passNullableExternal") ||
72771 !atomsCache->passExternal_id.init(cx, "passExternal") ||
72772 !atomsCache->receiveWeakNullableExternal_id.init(cx, "receiveWeakNullableExternal") ||
72773 !atomsCache->receiveWeakExternal_id.init(cx, "receiveWeakExternal") ||
72774 !atomsCache->receiveNullableExternal_id.init(cx, "receiveNullableExternal") ||
72775 !atomsCache->receiveExternal_id.init(cx, "receiveExternal") ||
72776 !atomsCache->receiveNullableNonWrapperCacheInterfaceNullableSequence_id.init(cx, "receiveNullableNonWrapperCacheInterfaceNullableSequence") ||
72777 !atomsCache->receiveNonWrapperCacheInterfaceNullableSequence_id.init(cx, "receiveNonWrapperCacheInterfaceNullableSequence") ||
72778 !atomsCache->receiveNullableNonWrapperCacheInterfaceSequence_id.init(cx, "receiveNullableNonWrapperCacheInterfaceSequence") ||
72779 !atomsCache->receiveNonWrapperCacheInterfaceSequence_id.init(cx, "receiveNonWrapperCacheInterfaceSequence") ||
72780 !atomsCache->receiveNullableNonWrapperCacheInterface_id.init(cx, "receiveNullableNonWrapperCacheInterface") ||
72781 !atomsCache->receiveNonWrapperCacheInterface_id.init(cx, "receiveNonWrapperCacheInterface") ||
72782 !atomsCache->passOptionalSelfWithDefault_id.init(cx, "passOptionalSelfWithDefault") ||
72783 !atomsCache->passOptionalNonNullSelf_id.init(cx, "passOptionalNonNullSelf") ||
72784 !atomsCache->passOptionalSelf_id.init(cx, "passOptionalSelf") ||
72785 !atomsCache->nullableSelf_id.init(cx, "nullableSelf") ||
72786 !atomsCache->nonNullSelf_id.init(cx, "nonNullSelf") ||
72787 !atomsCache->passNullableSelf_id.init(cx, "passNullableSelf") ||
72788 !atomsCache->passSelf_id.init(cx, "passSelf") ||
72789 !atomsCache->receiveWeakNullableSelf_id.init(cx, "receiveWeakNullableSelf") ||
72790 !atomsCache->receiveWeakSelf_id.init(cx, "receiveWeakSelf") ||
72791 !atomsCache->receiveNullableSelf_id.init(cx, "receiveNullableSelf") ||
72792 !atomsCache->receiveSelf_id.init(cx, "receiveSelf") ||
72793 !atomsCache->lenientDoubleAttr_id.init(cx, "lenientDoubleAttr") ||
72794 !atomsCache->lenientFloatAttr_id.init(cx, "lenientFloatAttr") ||
72795 !atomsCache->passLenientFloat_id.init(cx, "passLenientFloat") ||
72796 !atomsCache->passFloat_id.init(cx, "passFloat") ||
72797 !atomsCache->writableNullableUnrestrictedDouble_id.init(cx, "writableNullableUnrestrictedDouble") ||
72798 !atomsCache->writableNullableDouble_id.init(cx, "writableNullableDouble") ||
72799 !atomsCache->writableUnrestrictedDouble_id.init(cx, "writableUnrestrictedDouble") ||
72800 !atomsCache->writableDouble_id.init(cx, "writableDouble") ||
72801 !atomsCache->writableNullableUnrestrictedFloat_id.init(cx, "writableNullableUnrestrictedFloat") ||
72802 !atomsCache->writableNullableFloat_id.init(cx, "writableNullableFloat") ||
72803 !atomsCache->writableUnrestrictedFloat_id.init(cx, "writableUnrestrictedFloat") ||
72804 !atomsCache->writableFloat_id.init(cx, "writableFloat") ||
72805 !atomsCache->passOptionalUnsignedLongLongWithDefault_id.init(cx, "passOptionalUnsignedLongLongWithDefault") ||
72806 !atomsCache->passOptionalUnsignedLongLong_id.init(cx, "passOptionalUnsignedLongLong") ||
72807 !atomsCache->receiveUnsignedLongLong_id.init(cx, "receiveUnsignedLongLong") ||
72808 !atomsCache->passUnsignedLongLong_id.init(cx, "passUnsignedLongLong") ||
72809 !atomsCache->writableUnsignedLongLong_id.init(cx, "writableUnsignedLongLong") ||
72810 !atomsCache->readonlyUnsignedLongLong_id.init(cx, "readonlyUnsignedLongLong") ||
72811 !atomsCache->passOptionalUnsignedLongWithDefault_id.init(cx, "passOptionalUnsignedLongWithDefault") ||
72812 !atomsCache->passOptionalUnsignedLong_id.init(cx, "passOptionalUnsignedLong") ||
72813 !atomsCache->receiveUnsignedLong_id.init(cx, "receiveUnsignedLong") ||
72814 !atomsCache->passUnsignedLong_id.init(cx, "passUnsignedLong") ||
72815 !atomsCache->writableUnsignedLong_id.init(cx, "writableUnsignedLong") ||
72816 !atomsCache->readonlyUnsignedLong_id.init(cx, "readonlyUnsignedLong") ||
72817 !atomsCache->passOptionalUnsignedShortWithDefault_id.init(cx, "passOptionalUnsignedShortWithDefault") ||
72818 !atomsCache->passOptionalUnsignedShort_id.init(cx, "passOptionalUnsignedShort") ||
72819 !atomsCache->receiveUnsignedShort_id.init(cx, "receiveUnsignedShort") ||
72820 !atomsCache->passUnsignedShort_id.init(cx, "passUnsignedShort") ||
72821 !atomsCache->writableUnsignedShort_id.init(cx, "writableUnsignedShort") ||
72822 !atomsCache->readonlyUnsignedShort_id.init(cx, "readonlyUnsignedShort") ||
72823 !atomsCache->passOptionalOctetWithDefault_id.init(cx, "passOptionalOctetWithDefault") ||
72824 !atomsCache->passOptionalOctet_id.init(cx, "passOptionalOctet") ||
72825 !atomsCache->receiveOctet_id.init(cx, "receiveOctet") ||
72826 !atomsCache->passOctet_id.init(cx, "passOctet") ||
72827 !atomsCache->writableOctet_id.init(cx, "writableOctet") ||
72828 !atomsCache->readonlyOctet_id.init(cx, "readonlyOctet") ||
72829 !atomsCache->passOptionalLongLongWithDefault_id.init(cx, "passOptionalLongLongWithDefault") ||
72830 !atomsCache->passOptionalLongLong_id.init(cx, "passOptionalLongLong") ||
72831 !atomsCache->receiveLongLong_id.init(cx, "receiveLongLong") ||
72832 !atomsCache->passLongLong_id.init(cx, "passLongLong") ||
72833 !atomsCache->writableLongLong_id.init(cx, "writableLongLong") ||
72834 !atomsCache->readonlyLongLong_id.init(cx, "readonlyLongLong") ||
72835 !atomsCache->passOptionalLongWithDefault_id.init(cx, "passOptionalLongWithDefault") ||
72836 !atomsCache->passOptionalLong_id.init(cx, "passOptionalLong") ||
72837 !atomsCache->receiveLong_id.init(cx, "receiveLong") ||
72838 !atomsCache->passLong_id.init(cx, "passLong") ||
72839 !atomsCache->writableLong_id.init(cx, "writableLong") ||
72840 !atomsCache->readonlyLong_id.init(cx, "readonlyLong") ||
72841 !atomsCache->passOptionalShortWithDefault_id.init(cx, "passOptionalShortWithDefault") ||
72842 !atomsCache->passOptionalShort_id.init(cx, "passOptionalShort") ||
72843 !atomsCache->receiveShort_id.init(cx, "receiveShort") ||
72844 !atomsCache->passShort_id.init(cx, "passShort") ||
72845 !atomsCache->writableShort_id.init(cx, "writableShort") ||
72846 !atomsCache->readonlyShort_id.init(cx, "readonlyShort") ||
72847 !atomsCache->returnDeviceStateDependentByte_id.init(cx, "returnDeviceStateDependentByte") ||
72848 !atomsCache->returnConstantByte_id.init(cx, "returnConstantByte") ||
72849 !atomsCache->returnDOMDependentByte_id.init(cx, "returnDOMDependentByte") ||
72850 !atomsCache->returnByteSideEffectFree_id.init(cx, "returnByteSideEffectFree") ||
72851 !atomsCache->deviceStateDependentByte_id.init(cx, "deviceStateDependentByte") ||
72852 !atomsCache->constantByte_id.init(cx, "constantByte") ||
72853 !atomsCache->domDependentByte_id.init(cx, "domDependentByte") ||
72854 !atomsCache->sideEffectFreeByte_id.init(cx, "sideEffectFreeByte") ||
72855 !atomsCache->passVariadicByte_id.init(cx, "passVariadicByte") ||
72856 !atomsCache->passOptionalNullableByte_id.init(cx, "passOptionalNullableByte") ||
72857 !atomsCache->passNullableByte_id.init(cx, "passNullableByte") ||
72858 !atomsCache->passOptionalByteWithDefaultBeforeRequired_id.init(cx, "passOptionalByteWithDefaultBeforeRequired") ||
72859 !atomsCache->passOptionalByteWithDefault_id.init(cx, "passOptionalByteWithDefault") ||
72860 !atomsCache->passOptionalByteBeforeRequired_id.init(cx, "passOptionalByteBeforeRequired") ||
72861 !atomsCache->passOptionalByte_id.init(cx, "passOptionalByte") ||
72862 !atomsCache->receiveByte_id.init(cx, "receiveByte") ||
72863 !atomsCache->passByte_id.init(cx, "passByte") ||
72864 !atomsCache->writableByte_id.init(cx, "writableByte") ||
72865 !atomsCache->readonlyByte_id.init(cx, "readonlyByte")) {
72866 return false;
72867 }
72868 return true;
72869}
72870
72871
72872int8_t
72873TestJSImplInterfaceJSImpl::GetReadonlyByte(ErrorResult& aRv, JS::Realm* aRealm)
72874{
72875 CallSetup s(this, aRv, "TestJSImplInterface.readonlyByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
72876 if (aRv.Failed()) {
72877 return int8_t(0);
72878 }
72879 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 72879); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 72879; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
72880 BindingCallContext& cx = s.GetCallContext();
72881
72882 JS::Rooted<JS::Value> rval(cx);
72883
72884 JS::Rooted<JSObject *> callback(cx, mCallback);
72885 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
72886 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
72887 && !InitIds(cx, atomsCache)) ||
72888 !JS_GetPropertyById(cx, callback, atomsCache->readonlyByte_id, &rval)) {
72889 aRv.Throw(NS_ERROR_UNEXPECTED);
72890 return int8_t(0);
72891 }
72892 int8_t rvalDecl;
72893 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.readonlyByte", &rvalDecl)) {
72894 aRv.Throw(NS_ERROR_UNEXPECTED);
72895 return int8_t(0);
72896 }
72897 return rvalDecl;
72898}
72899
72900int8_t
72901TestJSImplInterfaceJSImpl::GetWritableByte(ErrorResult& aRv, JS::Realm* aRealm)
72902{
72903 CallSetup s(this, aRv, "TestJSImplInterface.writableByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
72904 if (aRv.Failed()) {
72905 return int8_t(0);
72906 }
72907 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 72907); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 72907; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
72908 BindingCallContext& cx = s.GetCallContext();
72909
72910 JS::Rooted<JS::Value> rval(cx);
72911
72912 JS::Rooted<JSObject *> callback(cx, mCallback);
72913 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
72914 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
72915 && !InitIds(cx, atomsCache)) ||
72916 !JS_GetPropertyById(cx, callback, atomsCache->writableByte_id, &rval)) {
72917 aRv.Throw(NS_ERROR_UNEXPECTED);
72918 return int8_t(0);
72919 }
72920 int8_t rvalDecl;
72921 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableByte", &rvalDecl)) {
72922 aRv.Throw(NS_ERROR_UNEXPECTED);
72923 return int8_t(0);
72924 }
72925 return rvalDecl;
72926}
72927
72928int8_t
72929TestJSImplInterfaceJSImpl::GetSideEffectFreeByte(ErrorResult& aRv, JS::Realm* aRealm)
72930{
72931 CallSetup s(this, aRv, "TestJSImplInterface.sideEffectFreeByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
72932 if (aRv.Failed()) {
72933 return int8_t(0);
72934 }
72935 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 72935); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 72935; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
72936 BindingCallContext& cx = s.GetCallContext();
72937
72938 JS::Rooted<JS::Value> rval(cx);
72939
72940 JS::Rooted<JSObject *> callback(cx, mCallback);
72941 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
72942 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
72943 && !InitIds(cx, atomsCache)) ||
72944 !JS_GetPropertyById(cx, callback, atomsCache->sideEffectFreeByte_id, &rval)) {
72945 aRv.Throw(NS_ERROR_UNEXPECTED);
72946 return int8_t(0);
72947 }
72948 int8_t rvalDecl;
72949 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.sideEffectFreeByte", &rvalDecl)) {
72950 aRv.Throw(NS_ERROR_UNEXPECTED);
72951 return int8_t(0);
72952 }
72953 return rvalDecl;
72954}
72955
72956int8_t
72957TestJSImplInterfaceJSImpl::GetDomDependentByte(ErrorResult& aRv, JS::Realm* aRealm)
72958{
72959 CallSetup s(this, aRv, "TestJSImplInterface.domDependentByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
72960 if (aRv.Failed()) {
72961 return int8_t(0);
72962 }
72963 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 72963); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 72963; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
72964 BindingCallContext& cx = s.GetCallContext();
72965
72966 JS::Rooted<JS::Value> rval(cx);
72967
72968 JS::Rooted<JSObject *> callback(cx, mCallback);
72969 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
72970 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
72971 && !InitIds(cx, atomsCache)) ||
72972 !JS_GetPropertyById(cx, callback, atomsCache->domDependentByte_id, &rval)) {
72973 aRv.Throw(NS_ERROR_UNEXPECTED);
72974 return int8_t(0);
72975 }
72976 int8_t rvalDecl;
72977 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.domDependentByte", &rvalDecl)) {
72978 aRv.Throw(NS_ERROR_UNEXPECTED);
72979 return int8_t(0);
72980 }
72981 return rvalDecl;
72982}
72983
72984int8_t
72985TestJSImplInterfaceJSImpl::GetConstantByte(ErrorResult& aRv, JS::Realm* aRealm)
72986{
72987 CallSetup s(this, aRv, "TestJSImplInterface.constantByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
72988 if (aRv.Failed()) {
72989 return int8_t(0);
72990 }
72991 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 72991); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 72991; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
72992 BindingCallContext& cx = s.GetCallContext();
72993
72994 JS::Rooted<JS::Value> rval(cx);
72995
72996 JS::Rooted<JSObject *> callback(cx, mCallback);
72997 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
72998 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
72999 && !InitIds(cx, atomsCache)) ||
73000 !JS_GetPropertyById(cx, callback, atomsCache->constantByte_id, &rval)) {
73001 aRv.Throw(NS_ERROR_UNEXPECTED);
73002 return int8_t(0);
73003 }
73004 int8_t rvalDecl;
73005 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.constantByte", &rvalDecl)) {
73006 aRv.Throw(NS_ERROR_UNEXPECTED);
73007 return int8_t(0);
73008 }
73009 return rvalDecl;
73010}
73011
73012int8_t
73013TestJSImplInterfaceJSImpl::GetDeviceStateDependentByte(ErrorResult& aRv, JS::Realm* aRealm)
73014{
73015 CallSetup s(this, aRv, "TestJSImplInterface.deviceStateDependentByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73016 if (aRv.Failed()) {
73017 return int8_t(0);
73018 }
73019 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73019); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73019; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73020 BindingCallContext& cx = s.GetCallContext();
73021
73022 JS::Rooted<JS::Value> rval(cx);
73023
73024 JS::Rooted<JSObject *> callback(cx, mCallback);
73025 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73026 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73027 && !InitIds(cx, atomsCache)) ||
73028 !JS_GetPropertyById(cx, callback, atomsCache->deviceStateDependentByte_id, &rval)) {
73029 aRv.Throw(NS_ERROR_UNEXPECTED);
73030 return int8_t(0);
73031 }
73032 int8_t rvalDecl;
73033 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.deviceStateDependentByte", &rvalDecl)) {
73034 aRv.Throw(NS_ERROR_UNEXPECTED);
73035 return int8_t(0);
73036 }
73037 return rvalDecl;
73038}
73039
73040int16_t
73041TestJSImplInterfaceJSImpl::GetReadonlyShort(ErrorResult& aRv, JS::Realm* aRealm)
73042{
73043 CallSetup s(this, aRv, "TestJSImplInterface.readonlyShort", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73044 if (aRv.Failed()) {
73045 return int16_t(0);
73046 }
73047 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73047); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73047; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73048 BindingCallContext& cx = s.GetCallContext();
73049
73050 JS::Rooted<JS::Value> rval(cx);
73051
73052 JS::Rooted<JSObject *> callback(cx, mCallback);
73053 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73054 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73055 && !InitIds(cx, atomsCache)) ||
73056 !JS_GetPropertyById(cx, callback, atomsCache->readonlyShort_id, &rval)) {
73057 aRv.Throw(NS_ERROR_UNEXPECTED);
73058 return int16_t(0);
73059 }
73060 int16_t rvalDecl;
73061 if (!ValueToPrimitive<int16_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.readonlyShort", &rvalDecl)) {
73062 aRv.Throw(NS_ERROR_UNEXPECTED);
73063 return int16_t(0);
73064 }
73065 return rvalDecl;
73066}
73067
73068int16_t
73069TestJSImplInterfaceJSImpl::GetWritableShort(ErrorResult& aRv, JS::Realm* aRealm)
73070{
73071 CallSetup s(this, aRv, "TestJSImplInterface.writableShort", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73072 if (aRv.Failed()) {
73073 return int16_t(0);
73074 }
73075 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73075); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73075; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73076 BindingCallContext& cx = s.GetCallContext();
73077
73078 JS::Rooted<JS::Value> rval(cx);
73079
73080 JS::Rooted<JSObject *> callback(cx, mCallback);
73081 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73082 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73083 && !InitIds(cx, atomsCache)) ||
73084 !JS_GetPropertyById(cx, callback, atomsCache->writableShort_id, &rval)) {
73085 aRv.Throw(NS_ERROR_UNEXPECTED);
73086 return int16_t(0);
73087 }
73088 int16_t rvalDecl;
73089 if (!ValueToPrimitive<int16_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableShort", &rvalDecl)) {
73090 aRv.Throw(NS_ERROR_UNEXPECTED);
73091 return int16_t(0);
73092 }
73093 return rvalDecl;
73094}
73095
73096int32_t
73097TestJSImplInterfaceJSImpl::GetReadonlyLong(ErrorResult& aRv, JS::Realm* aRealm)
73098{
73099 CallSetup s(this, aRv, "TestJSImplInterface.readonlyLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73100 if (aRv.Failed()) {
73101 return int32_t(0);
73102 }
73103 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73103); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73103; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73104 BindingCallContext& cx = s.GetCallContext();
73105
73106 JS::Rooted<JS::Value> rval(cx);
73107
73108 JS::Rooted<JSObject *> callback(cx, mCallback);
73109 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73110 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73111 && !InitIds(cx, atomsCache)) ||
73112 !JS_GetPropertyById(cx, callback, atomsCache->readonlyLong_id, &rval)) {
73113 aRv.Throw(NS_ERROR_UNEXPECTED);
73114 return int32_t(0);
73115 }
73116 int32_t rvalDecl;
73117 if (!ValueToPrimitive<int32_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.readonlyLong", &rvalDecl)) {
73118 aRv.Throw(NS_ERROR_UNEXPECTED);
73119 return int32_t(0);
73120 }
73121 return rvalDecl;
73122}
73123
73124int32_t
73125TestJSImplInterfaceJSImpl::GetWritableLong(ErrorResult& aRv, JS::Realm* aRealm)
73126{
73127 CallSetup s(this, aRv, "TestJSImplInterface.writableLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73128 if (aRv.Failed()) {
73129 return int32_t(0);
73130 }
73131 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73131); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73131; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73132 BindingCallContext& cx = s.GetCallContext();
73133
73134 JS::Rooted<JS::Value> rval(cx);
73135
73136 JS::Rooted<JSObject *> callback(cx, mCallback);
73137 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73138 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73139 && !InitIds(cx, atomsCache)) ||
73140 !JS_GetPropertyById(cx, callback, atomsCache->writableLong_id, &rval)) {
73141 aRv.Throw(NS_ERROR_UNEXPECTED);
73142 return int32_t(0);
73143 }
73144 int32_t rvalDecl;
73145 if (!ValueToPrimitive<int32_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableLong", &rvalDecl)) {
73146 aRv.Throw(NS_ERROR_UNEXPECTED);
73147 return int32_t(0);
73148 }
73149 return rvalDecl;
73150}
73151
73152int64_t
73153TestJSImplInterfaceJSImpl::GetReadonlyLongLong(ErrorResult& aRv, JS::Realm* aRealm)
73154{
73155 CallSetup s(this, aRv, "TestJSImplInterface.readonlyLongLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73156 if (aRv.Failed()) {
73157 return int64_t(0);
73158 }
73159 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73159); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73159; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73160 BindingCallContext& cx = s.GetCallContext();
73161
73162 JS::Rooted<JS::Value> rval(cx);
73163
73164 JS::Rooted<JSObject *> callback(cx, mCallback);
73165 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73166 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73167 && !InitIds(cx, atomsCache)) ||
73168 !JS_GetPropertyById(cx, callback, atomsCache->readonlyLongLong_id, &rval)) {
73169 aRv.Throw(NS_ERROR_UNEXPECTED);
73170 return int64_t(0);
73171 }
73172 int64_t rvalDecl;
73173 if (!ValueToPrimitive<int64_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.readonlyLongLong", &rvalDecl)) {
73174 aRv.Throw(NS_ERROR_UNEXPECTED);
73175 return int64_t(0);
73176 }
73177 return rvalDecl;
73178}
73179
73180int64_t
73181TestJSImplInterfaceJSImpl::GetWritableLongLong(ErrorResult& aRv, JS::Realm* aRealm)
73182{
73183 CallSetup s(this, aRv, "TestJSImplInterface.writableLongLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73184 if (aRv.Failed()) {
73185 return int64_t(0);
73186 }
73187 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73187); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73187; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73188 BindingCallContext& cx = s.GetCallContext();
73189
73190 JS::Rooted<JS::Value> rval(cx);
73191
73192 JS::Rooted<JSObject *> callback(cx, mCallback);
73193 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73194 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73195 && !InitIds(cx, atomsCache)) ||
73196 !JS_GetPropertyById(cx, callback, atomsCache->writableLongLong_id, &rval)) {
73197 aRv.Throw(NS_ERROR_UNEXPECTED);
73198 return int64_t(0);
73199 }
73200 int64_t rvalDecl;
73201 if (!ValueToPrimitive<int64_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableLongLong", &rvalDecl)) {
73202 aRv.Throw(NS_ERROR_UNEXPECTED);
73203 return int64_t(0);
73204 }
73205 return rvalDecl;
73206}
73207
73208uint8_t
73209TestJSImplInterfaceJSImpl::GetReadonlyOctet(ErrorResult& aRv, JS::Realm* aRealm)
73210{
73211 CallSetup s(this, aRv, "TestJSImplInterface.readonlyOctet", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73212 if (aRv.Failed()) {
73213 return uint8_t(0);
73214 }
73215 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73215); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73215; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73216 BindingCallContext& cx = s.GetCallContext();
73217
73218 JS::Rooted<JS::Value> rval(cx);
73219
73220 JS::Rooted<JSObject *> callback(cx, mCallback);
73221 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73222 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73223 && !InitIds(cx, atomsCache)) ||
73224 !JS_GetPropertyById(cx, callback, atomsCache->readonlyOctet_id, &rval)) {
73225 aRv.Throw(NS_ERROR_UNEXPECTED);
73226 return uint8_t(0);
73227 }
73228 uint8_t rvalDecl;
73229 if (!ValueToPrimitive<uint8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.readonlyOctet", &rvalDecl)) {
73230 aRv.Throw(NS_ERROR_UNEXPECTED);
73231 return uint8_t(0);
73232 }
73233 return rvalDecl;
73234}
73235
73236uint8_t
73237TestJSImplInterfaceJSImpl::GetWritableOctet(ErrorResult& aRv, JS::Realm* aRealm)
73238{
73239 CallSetup s(this, aRv, "TestJSImplInterface.writableOctet", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73240 if (aRv.Failed()) {
73241 return uint8_t(0);
73242 }
73243 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73243); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73243; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73244 BindingCallContext& cx = s.GetCallContext();
73245
73246 JS::Rooted<JS::Value> rval(cx);
73247
73248 JS::Rooted<JSObject *> callback(cx, mCallback);
73249 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73250 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73251 && !InitIds(cx, atomsCache)) ||
73252 !JS_GetPropertyById(cx, callback, atomsCache->writableOctet_id, &rval)) {
73253 aRv.Throw(NS_ERROR_UNEXPECTED);
73254 return uint8_t(0);
73255 }
73256 uint8_t rvalDecl;
73257 if (!ValueToPrimitive<uint8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableOctet", &rvalDecl)) {
73258 aRv.Throw(NS_ERROR_UNEXPECTED);
73259 return uint8_t(0);
73260 }
73261 return rvalDecl;
73262}
73263
73264uint16_t
73265TestJSImplInterfaceJSImpl::GetReadonlyUnsignedShort(ErrorResult& aRv, JS::Realm* aRealm)
73266{
73267 CallSetup s(this, aRv, "TestJSImplInterface.readonlyUnsignedShort", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73268 if (aRv.Failed()) {
73269 return uint16_t(0);
73270 }
73271 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73271); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73271; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73272 BindingCallContext& cx = s.GetCallContext();
73273
73274 JS::Rooted<JS::Value> rval(cx);
73275
73276 JS::Rooted<JSObject *> callback(cx, mCallback);
73277 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73278 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73279 && !InitIds(cx, atomsCache)) ||
73280 !JS_GetPropertyById(cx, callback, atomsCache->readonlyUnsignedShort_id, &rval)) {
73281 aRv.Throw(NS_ERROR_UNEXPECTED);
73282 return uint16_t(0);
73283 }
73284 uint16_t rvalDecl;
73285 if (!ValueToPrimitive<uint16_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.readonlyUnsignedShort", &rvalDecl)) {
73286 aRv.Throw(NS_ERROR_UNEXPECTED);
73287 return uint16_t(0);
73288 }
73289 return rvalDecl;
73290}
73291
73292uint16_t
73293TestJSImplInterfaceJSImpl::GetWritableUnsignedShort(ErrorResult& aRv, JS::Realm* aRealm)
73294{
73295 CallSetup s(this, aRv, "TestJSImplInterface.writableUnsignedShort", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73296 if (aRv.Failed()) {
73297 return uint16_t(0);
73298 }
73299 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73299); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73299; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73300 BindingCallContext& cx = s.GetCallContext();
73301
73302 JS::Rooted<JS::Value> rval(cx);
73303
73304 JS::Rooted<JSObject *> callback(cx, mCallback);
73305 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73306 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73307 && !InitIds(cx, atomsCache)) ||
73308 !JS_GetPropertyById(cx, callback, atomsCache->writableUnsignedShort_id, &rval)) {
73309 aRv.Throw(NS_ERROR_UNEXPECTED);
73310 return uint16_t(0);
73311 }
73312 uint16_t rvalDecl;
73313 if (!ValueToPrimitive<uint16_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableUnsignedShort", &rvalDecl)) {
73314 aRv.Throw(NS_ERROR_UNEXPECTED);
73315 return uint16_t(0);
73316 }
73317 return rvalDecl;
73318}
73319
73320uint32_t
73321TestJSImplInterfaceJSImpl::GetReadonlyUnsignedLong(ErrorResult& aRv, JS::Realm* aRealm)
73322{
73323 CallSetup s(this, aRv, "TestJSImplInterface.readonlyUnsignedLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73324 if (aRv.Failed()) {
73325 return uint32_t(0);
73326 }
73327 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73327); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73327; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73328 BindingCallContext& cx = s.GetCallContext();
73329
73330 JS::Rooted<JS::Value> rval(cx);
73331
73332 JS::Rooted<JSObject *> callback(cx, mCallback);
73333 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73334 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73335 && !InitIds(cx, atomsCache)) ||
73336 !JS_GetPropertyById(cx, callback, atomsCache->readonlyUnsignedLong_id, &rval)) {
73337 aRv.Throw(NS_ERROR_UNEXPECTED);
73338 return uint32_t(0);
73339 }
73340 uint32_t rvalDecl;
73341 if (!ValueToPrimitive<uint32_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.readonlyUnsignedLong", &rvalDecl)) {
73342 aRv.Throw(NS_ERROR_UNEXPECTED);
73343 return uint32_t(0);
73344 }
73345 return rvalDecl;
73346}
73347
73348uint32_t
73349TestJSImplInterfaceJSImpl::GetWritableUnsignedLong(ErrorResult& aRv, JS::Realm* aRealm)
73350{
73351 CallSetup s(this, aRv, "TestJSImplInterface.writableUnsignedLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73352 if (aRv.Failed()) {
73353 return uint32_t(0);
73354 }
73355 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73355); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73355; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73356 BindingCallContext& cx = s.GetCallContext();
73357
73358 JS::Rooted<JS::Value> rval(cx);
73359
73360 JS::Rooted<JSObject *> callback(cx, mCallback);
73361 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73362 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73363 && !InitIds(cx, atomsCache)) ||
73364 !JS_GetPropertyById(cx, callback, atomsCache->writableUnsignedLong_id, &rval)) {
73365 aRv.Throw(NS_ERROR_UNEXPECTED);
73366 return uint32_t(0);
73367 }
73368 uint32_t rvalDecl;
73369 if (!ValueToPrimitive<uint32_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableUnsignedLong", &rvalDecl)) {
73370 aRv.Throw(NS_ERROR_UNEXPECTED);
73371 return uint32_t(0);
73372 }
73373 return rvalDecl;
73374}
73375
73376uint64_t
73377TestJSImplInterfaceJSImpl::GetReadonlyUnsignedLongLong(ErrorResult& aRv, JS::Realm* aRealm)
73378{
73379 CallSetup s(this, aRv, "TestJSImplInterface.readonlyUnsignedLongLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73380 if (aRv.Failed()) {
73381 return uint64_t(0);
73382 }
73383 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73383); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73383; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73384 BindingCallContext& cx = s.GetCallContext();
73385
73386 JS::Rooted<JS::Value> rval(cx);
73387
73388 JS::Rooted<JSObject *> callback(cx, mCallback);
73389 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73390 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73391 && !InitIds(cx, atomsCache)) ||
73392 !JS_GetPropertyById(cx, callback, atomsCache->readonlyUnsignedLongLong_id, &rval)) {
73393 aRv.Throw(NS_ERROR_UNEXPECTED);
73394 return uint64_t(0);
73395 }
73396 uint64_t rvalDecl;
73397 if (!ValueToPrimitive<uint64_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.readonlyUnsignedLongLong", &rvalDecl)) {
73398 aRv.Throw(NS_ERROR_UNEXPECTED);
73399 return uint64_t(0);
73400 }
73401 return rvalDecl;
73402}
73403
73404uint64_t
73405TestJSImplInterfaceJSImpl::GetWritableUnsignedLongLong(ErrorResult& aRv, JS::Realm* aRealm)
73406{
73407 CallSetup s(this, aRv, "TestJSImplInterface.writableUnsignedLongLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73408 if (aRv.Failed()) {
73409 return uint64_t(0);
73410 }
73411 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73411); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73411; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73412 BindingCallContext& cx = s.GetCallContext();
73413
73414 JS::Rooted<JS::Value> rval(cx);
73415
73416 JS::Rooted<JSObject *> callback(cx, mCallback);
73417 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73418 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73419 && !InitIds(cx, atomsCache)) ||
73420 !JS_GetPropertyById(cx, callback, atomsCache->writableUnsignedLongLong_id, &rval)) {
73421 aRv.Throw(NS_ERROR_UNEXPECTED);
73422 return uint64_t(0);
73423 }
73424 uint64_t rvalDecl;
73425 if (!ValueToPrimitive<uint64_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableUnsignedLongLong", &rvalDecl)) {
73426 aRv.Throw(NS_ERROR_UNEXPECTED);
73427 return uint64_t(0);
73428 }
73429 return rvalDecl;
73430}
73431
73432float
73433TestJSImplInterfaceJSImpl::GetWritableFloat(ErrorResult& aRv, JS::Realm* aRealm)
73434{
73435 CallSetup s(this, aRv, "TestJSImplInterface.writableFloat", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73436 if (aRv.Failed()) {
73437 return float(0);
73438 }
73439 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73439); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73439; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73440 BindingCallContext& cx = s.GetCallContext();
73441
73442 JS::Rooted<JS::Value> rval(cx);
73443
73444 JS::Rooted<JSObject *> callback(cx, mCallback);
73445 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73446 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73447 && !InitIds(cx, atomsCache)) ||
73448 !JS_GetPropertyById(cx, callback, atomsCache->writableFloat_id, &rval)) {
73449 aRv.Throw(NS_ERROR_UNEXPECTED);
73450 return float(0);
73451 }
73452 float rvalDecl;
73453 if (!ValueToPrimitive<float, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableFloat", &rvalDecl)) {
73454 aRv.Throw(NS_ERROR_UNEXPECTED);
73455 return float(0);
73456 } else if (!std::isfinite(rvalDecl)) {
73457 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Return value of TestJSImplInterface.writableFloat");
73458 aRv.Throw(NS_ERROR_UNEXPECTED);
73459 return float(0);
73460 }
73461 return rvalDecl;
73462}
73463
73464float
73465TestJSImplInterfaceJSImpl::GetWritableUnrestrictedFloat(ErrorResult& aRv, JS::Realm* aRealm)
73466{
73467 CallSetup s(this, aRv, "TestJSImplInterface.writableUnrestrictedFloat", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73468 if (aRv.Failed()) {
73469 return float(0);
73470 }
73471 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73471); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73471; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73472 BindingCallContext& cx = s.GetCallContext();
73473
73474 JS::Rooted<JS::Value> rval(cx);
73475
73476 JS::Rooted<JSObject *> callback(cx, mCallback);
73477 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73478 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73479 && !InitIds(cx, atomsCache)) ||
73480 !JS_GetPropertyById(cx, callback, atomsCache->writableUnrestrictedFloat_id, &rval)) {
73481 aRv.Throw(NS_ERROR_UNEXPECTED);
73482 return float(0);
73483 }
73484 float rvalDecl;
73485 if (!ValueToPrimitive<float, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableUnrestrictedFloat", &rvalDecl)) {
73486 aRv.Throw(NS_ERROR_UNEXPECTED);
73487 return float(0);
73488 }
73489 return rvalDecl;
73490}
73491
73492Nullable<float>
73493TestJSImplInterfaceJSImpl::GetWritableNullableFloat(ErrorResult& aRv, JS::Realm* aRealm)
73494{
73495 CallSetup s(this, aRv, "TestJSImplInterface.writableNullableFloat", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73496 if (aRv.Failed()) {
73497 return Nullable<float>();
73498 }
73499 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73499); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73499; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73500 BindingCallContext& cx = s.GetCallContext();
73501
73502 JS::Rooted<JS::Value> rval(cx);
73503
73504 JS::Rooted<JSObject *> callback(cx, mCallback);
73505 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73506 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73507 && !InitIds(cx, atomsCache)) ||
73508 !JS_GetPropertyById(cx, callback, atomsCache->writableNullableFloat_id, &rval)) {
73509 aRv.Throw(NS_ERROR_UNEXPECTED);
73510 return Nullable<float>();
73511 }
73512 Nullable<float> rvalDecl;
73513 if (rval.isNullOrUndefined()) {
73514 rvalDecl.SetNull();
73515 } else if (!ValueToPrimitive<float, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableNullableFloat", &rvalDecl.SetValue())) {
73516 aRv.Throw(NS_ERROR_UNEXPECTED);
73517 return Nullable<float>();
73518 } else if (!std::isfinite(rvalDecl.Value())) {
73519 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Return value of TestJSImplInterface.writableNullableFloat");
73520 aRv.Throw(NS_ERROR_UNEXPECTED);
73521 return Nullable<float>();
73522 }
73523 return rvalDecl;
73524}
73525
73526Nullable<float>
73527TestJSImplInterfaceJSImpl::GetWritableNullableUnrestrictedFloat(ErrorResult& aRv, JS::Realm* aRealm)
73528{
73529 CallSetup s(this, aRv, "TestJSImplInterface.writableNullableUnrestrictedFloat", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73530 if (aRv.Failed()) {
73531 return Nullable<float>();
73532 }
73533 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73533); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73533; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73534 BindingCallContext& cx = s.GetCallContext();
73535
73536 JS::Rooted<JS::Value> rval(cx);
73537
73538 JS::Rooted<JSObject *> callback(cx, mCallback);
73539 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73540 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73541 && !InitIds(cx, atomsCache)) ||
73542 !JS_GetPropertyById(cx, callback, atomsCache->writableNullableUnrestrictedFloat_id, &rval)) {
73543 aRv.Throw(NS_ERROR_UNEXPECTED);
73544 return Nullable<float>();
73545 }
73546 Nullable<float> rvalDecl;
73547 if (rval.isNullOrUndefined()) {
73548 rvalDecl.SetNull();
73549 } else if (!ValueToPrimitive<float, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableNullableUnrestrictedFloat", &rvalDecl.SetValue())) {
73550 aRv.Throw(NS_ERROR_UNEXPECTED);
73551 return Nullable<float>();
73552 }
73553 return rvalDecl;
73554}
73555
73556double
73557TestJSImplInterfaceJSImpl::GetWritableDouble(ErrorResult& aRv, JS::Realm* aRealm)
73558{
73559 CallSetup s(this, aRv, "TestJSImplInterface.writableDouble", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73560 if (aRv.Failed()) {
73561 return double(0);
73562 }
73563 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73563); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73563; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73564 BindingCallContext& cx = s.GetCallContext();
73565
73566 JS::Rooted<JS::Value> rval(cx);
73567
73568 JS::Rooted<JSObject *> callback(cx, mCallback);
73569 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73570 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73571 && !InitIds(cx, atomsCache)) ||
73572 !JS_GetPropertyById(cx, callback, atomsCache->writableDouble_id, &rval)) {
73573 aRv.Throw(NS_ERROR_UNEXPECTED);
73574 return double(0);
73575 }
73576 double rvalDecl;
73577 if (!ValueToPrimitive<double, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableDouble", &rvalDecl)) {
73578 aRv.Throw(NS_ERROR_UNEXPECTED);
73579 return double(0);
73580 } else if (!std::isfinite(rvalDecl)) {
73581 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Return value of TestJSImplInterface.writableDouble");
73582 aRv.Throw(NS_ERROR_UNEXPECTED);
73583 return double(0);
73584 }
73585 return rvalDecl;
73586}
73587
73588double
73589TestJSImplInterfaceJSImpl::GetWritableUnrestrictedDouble(ErrorResult& aRv, JS::Realm* aRealm)
73590{
73591 CallSetup s(this, aRv, "TestJSImplInterface.writableUnrestrictedDouble", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73592 if (aRv.Failed()) {
73593 return double(0);
73594 }
73595 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73595); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73595; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73596 BindingCallContext& cx = s.GetCallContext();
73597
73598 JS::Rooted<JS::Value> rval(cx);
73599
73600 JS::Rooted<JSObject *> callback(cx, mCallback);
73601 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73602 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73603 && !InitIds(cx, atomsCache)) ||
73604 !JS_GetPropertyById(cx, callback, atomsCache->writableUnrestrictedDouble_id, &rval)) {
73605 aRv.Throw(NS_ERROR_UNEXPECTED);
73606 return double(0);
73607 }
73608 double rvalDecl;
73609 if (!ValueToPrimitive<double, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableUnrestrictedDouble", &rvalDecl)) {
73610 aRv.Throw(NS_ERROR_UNEXPECTED);
73611 return double(0);
73612 }
73613 return rvalDecl;
73614}
73615
73616Nullable<double>
73617TestJSImplInterfaceJSImpl::GetWritableNullableDouble(ErrorResult& aRv, JS::Realm* aRealm)
73618{
73619 CallSetup s(this, aRv, "TestJSImplInterface.writableNullableDouble", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73620 if (aRv.Failed()) {
73621 return Nullable<double>();
73622 }
73623 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73623); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73623; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73624 BindingCallContext& cx = s.GetCallContext();
73625
73626 JS::Rooted<JS::Value> rval(cx);
73627
73628 JS::Rooted<JSObject *> callback(cx, mCallback);
73629 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73630 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73631 && !InitIds(cx, atomsCache)) ||
73632 !JS_GetPropertyById(cx, callback, atomsCache->writableNullableDouble_id, &rval)) {
73633 aRv.Throw(NS_ERROR_UNEXPECTED);
73634 return Nullable<double>();
73635 }
73636 Nullable<double> rvalDecl;
73637 if (rval.isNullOrUndefined()) {
73638 rvalDecl.SetNull();
73639 } else if (!ValueToPrimitive<double, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableNullableDouble", &rvalDecl.SetValue())) {
73640 aRv.Throw(NS_ERROR_UNEXPECTED);
73641 return Nullable<double>();
73642 } else if (!std::isfinite(rvalDecl.Value())) {
73643 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Return value of TestJSImplInterface.writableNullableDouble");
73644 aRv.Throw(NS_ERROR_UNEXPECTED);
73645 return Nullable<double>();
73646 }
73647 return rvalDecl;
73648}
73649
73650Nullable<double>
73651TestJSImplInterfaceJSImpl::GetWritableNullableUnrestrictedDouble(ErrorResult& aRv, JS::Realm* aRealm)
73652{
73653 CallSetup s(this, aRv, "TestJSImplInterface.writableNullableUnrestrictedDouble", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73654 if (aRv.Failed()) {
73655 return Nullable<double>();
73656 }
73657 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73657); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73657; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73658 BindingCallContext& cx = s.GetCallContext();
73659
73660 JS::Rooted<JS::Value> rval(cx);
73661
73662 JS::Rooted<JSObject *> callback(cx, mCallback);
73663 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73664 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73665 && !InitIds(cx, atomsCache)) ||
73666 !JS_GetPropertyById(cx, callback, atomsCache->writableNullableUnrestrictedDouble_id, &rval)) {
73667 aRv.Throw(NS_ERROR_UNEXPECTED);
73668 return Nullable<double>();
73669 }
73670 Nullable<double> rvalDecl;
73671 if (rval.isNullOrUndefined()) {
73672 rvalDecl.SetNull();
73673 } else if (!ValueToPrimitive<double, eDefault>(cx, rval, "Return value of TestJSImplInterface.writableNullableUnrestrictedDouble", &rvalDecl.SetValue())) {
73674 aRv.Throw(NS_ERROR_UNEXPECTED);
73675 return Nullable<double>();
73676 }
73677 return rvalDecl;
73678}
73679
73680float
73681TestJSImplInterfaceJSImpl::GetLenientFloatAttr(ErrorResult& aRv, JS::Realm* aRealm)
73682{
73683 CallSetup s(this, aRv, "TestJSImplInterface.lenientFloatAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73684 if (aRv.Failed()) {
73685 return float(0);
73686 }
73687 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73687); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73687; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73688 BindingCallContext& cx = s.GetCallContext();
73689
73690 JS::Rooted<JS::Value> rval(cx);
73691
73692 JS::Rooted<JSObject *> callback(cx, mCallback);
73693 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73694 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73695 && !InitIds(cx, atomsCache)) ||
73696 !JS_GetPropertyById(cx, callback, atomsCache->lenientFloatAttr_id, &rval)) {
73697 aRv.Throw(NS_ERROR_UNEXPECTED);
73698 return float(0);
73699 }
73700 float rvalDecl;
73701 if (!ValueToPrimitive<float, eDefault>(cx, rval, "Return value of TestJSImplInterface.lenientFloatAttr", &rvalDecl)) {
73702 aRv.Throw(NS_ERROR_UNEXPECTED);
73703 return float(0);
73704 } else if (!std::isfinite(rvalDecl)) {
73705 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Return value of TestJSImplInterface.lenientFloatAttr");
73706 aRv.Throw(NS_ERROR_UNEXPECTED);
73707 return float(0);
73708 }
73709 return rvalDecl;
73710}
73711
73712double
73713TestJSImplInterfaceJSImpl::GetLenientDoubleAttr(ErrorResult& aRv, JS::Realm* aRealm)
73714{
73715 CallSetup s(this, aRv, "TestJSImplInterface.lenientDoubleAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73716 if (aRv.Failed()) {
73717 return double(0);
73718 }
73719 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73719); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73719; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73720 BindingCallContext& cx = s.GetCallContext();
73721
73722 JS::Rooted<JS::Value> rval(cx);
73723
73724 JS::Rooted<JSObject *> callback(cx, mCallback);
73725 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73726 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73727 && !InitIds(cx, atomsCache)) ||
73728 !JS_GetPropertyById(cx, callback, atomsCache->lenientDoubleAttr_id, &rval)) {
73729 aRv.Throw(NS_ERROR_UNEXPECTED);
73730 return double(0);
73731 }
73732 double rvalDecl;
73733 if (!ValueToPrimitive<double, eDefault>(cx, rval, "Return value of TestJSImplInterface.lenientDoubleAttr", &rvalDecl)) {
73734 aRv.Throw(NS_ERROR_UNEXPECTED);
73735 return double(0);
73736 } else if (!std::isfinite(rvalDecl)) {
73737 cx.ThrowErrorMessage<MSG_NOT_FINITE>("Return value of TestJSImplInterface.lenientDoubleAttr");
73738 aRv.Throw(NS_ERROR_UNEXPECTED);
73739 return double(0);
73740 }
73741 return rvalDecl;
73742}
73743
73744already_AddRefed<TestJSImplInterface>
73745TestJSImplInterfaceJSImpl::GetNonNullSelf(ErrorResult& aRv, JS::Realm* aRealm)
73746{
73747 CallSetup s(this, aRv, "TestJSImplInterface.nonNullSelf", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73748 if (aRv.Failed()) {
73749 return nullptr;
73750 }
73751 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73751); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73751; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73752 BindingCallContext& cx = s.GetCallContext();
73753
73754 JS::Rooted<JS::Value> rval(cx);
73755
73756 JS::Rooted<JSObject *> callback(cx, mCallback);
73757 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73758 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73759 && !InitIds(cx, atomsCache)) ||
73760 !JS_GetPropertyById(cx, callback, atomsCache->nonNullSelf_id, &rval)) {
73761 aRv.Throw(NS_ERROR_UNEXPECTED);
73762 return nullptr;
73763 }
73764 RefPtr<mozilla::dom::TestJSImplInterface> rvalDecl;
73765 if (rval.isObject()) {
73766 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
73767 {
73768 // Our JSContext should be in the right global to do unwrapping in.
73769 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(rval, rvalDecl, cx);
73770 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
73771 // Be careful to not wrap random DOM objects here, even if
73772 // they're wrapped in opaque security wrappers for some reason.
73773 // XXXbz Wish we could check for a JS-implemented object
73774 // that already has a content reflection...
73775 if (!IsDOMObject(js::UncheckedUnwrap(&rval.toObject()))) {
73776 nsCOMPtr<nsIGlobalObject> contentGlobal;
73777 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
73778 if (!callback ||
73779 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
73780 aRv.Throw(NS_ERROR_UNEXPECTED);
73781 return nullptr;
73782 }
73783 JS::Rooted<JSObject*> jsImplSourceObj(cx, &rval.toObject());
73784 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 73785); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 73785; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
73785 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 73785); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 73785; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
73786 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
73787 rvalDecl = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
73788 } else {
73789 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.nonNullSelf", "TestJSImplInterface");
73790 aRv.Throw(NS_ERROR_UNEXPECTED);
73791 return nullptr;
73792 }
73793 }
73794 }
73795 } else {
73796 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.nonNullSelf");
73797 aRv.Throw(NS_ERROR_UNEXPECTED);
73798 return nullptr;
73799 }
73800 return rvalDecl.forget();
73801}
73802
73803already_AddRefed<TestJSImplInterface>
73804TestJSImplInterfaceJSImpl::GetNullableSelf(ErrorResult& aRv, JS::Realm* aRealm)
73805{
73806 CallSetup s(this, aRv, "TestJSImplInterface.nullableSelf", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73807 if (aRv.Failed()) {
73808 return nullptr;
73809 }
73810 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73810); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73810; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73811 BindingCallContext& cx = s.GetCallContext();
73812
73813 JS::Rooted<JS::Value> rval(cx);
73814
73815 JS::Rooted<JSObject *> callback(cx, mCallback);
73816 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73817 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73818 && !InitIds(cx, atomsCache)) ||
73819 !JS_GetPropertyById(cx, callback, atomsCache->nullableSelf_id, &rval)) {
73820 aRv.Throw(NS_ERROR_UNEXPECTED);
73821 return nullptr;
73822 }
73823 RefPtr<mozilla::dom::TestJSImplInterface> rvalDecl;
73824 if (rval.isObject()) {
73825 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
73826 {
73827 // Our JSContext should be in the right global to do unwrapping in.
73828 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(rval, rvalDecl, cx);
73829 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
73830 // Be careful to not wrap random DOM objects here, even if
73831 // they're wrapped in opaque security wrappers for some reason.
73832 // XXXbz Wish we could check for a JS-implemented object
73833 // that already has a content reflection...
73834 if (!IsDOMObject(js::UncheckedUnwrap(&rval.toObject()))) {
73835 nsCOMPtr<nsIGlobalObject> contentGlobal;
73836 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
73837 if (!callback ||
73838 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
73839 aRv.Throw(NS_ERROR_UNEXPECTED);
73840 return nullptr;
73841 }
73842 JS::Rooted<JSObject*> jsImplSourceObj(cx, &rval.toObject());
73843 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 73844); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 73844; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
73844 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 73844); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 73844; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
73845 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
73846 rvalDecl = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
73847 } else {
73848 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.nullableSelf", "TestJSImplInterface");
73849 aRv.Throw(NS_ERROR_UNEXPECTED);
73850 return nullptr;
73851 }
73852 }
73853 }
73854 } else if (rval.isNullOrUndefined()) {
73855 rvalDecl = nullptr;
73856 } else {
73857 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.nullableSelf");
73858 aRv.Throw(NS_ERROR_UNEXPECTED);
73859 return nullptr;
73860 }
73861 return rvalDecl.forget();
73862}
73863
73864already_AddRefed<TestExternalInterface>
73865TestJSImplInterfaceJSImpl::GetNonNullExternal(ErrorResult& aRv, JS::Realm* aRealm)
73866{
73867 CallSetup s(this, aRv, "TestJSImplInterface.nonNullExternal", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73868 if (aRv.Failed()) {
73869 return nullptr;
73870 }
73871 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73871); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73871; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73872 BindingCallContext& cx = s.GetCallContext();
73873
73874 JS::Rooted<JS::Value> rval(cx);
73875
73876 JS::Rooted<JSObject *> callback(cx, mCallback);
73877 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73878 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73879 && !InitIds(cx, atomsCache)) ||
73880 !JS_GetPropertyById(cx, callback, atomsCache->nonNullExternal_id, &rval)) {
73881 aRv.Throw(NS_ERROR_UNEXPECTED);
73882 return nullptr;
73883 }
73884 RefPtr<mozilla::dom::TestExternalInterface> rvalDecl;
73885 if (rval.isObject()) {
73886 static_assert(IsRefcounted<mozilla::dom::TestExternalInterface>::value, "We can only store refcounted classes.");
73887 RefPtr<mozilla::dom::TestExternalInterface> rvalHolder;
73888 JS::Rooted<JSObject*> source(cx, &rval.toObject());
73889 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(rvalHolder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(rvalHolder
)))), 0)))
) {
73890 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.nonNullExternal", "TestExternalInterface");
73891 aRv.Throw(NS_ERROR_UNEXPECTED);
73892 return nullptr;
73893 }
73894 MOZ_ASSERT(rvalHolder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(rvalHolder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(rvalHolder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("rvalHolder", "../TestJSImplGenBinding.cpp"
, 73894); AnnotateMozCrashReason("MOZ_ASSERT" "(" "rvalHolder"
")"); do { *((volatile int*)__null) = 73894; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
73895 rvalDecl = rvalHolder;
73896 } else {
73897 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.nonNullExternal");
73898 aRv.Throw(NS_ERROR_UNEXPECTED);
73899 return nullptr;
73900 }
73901 return rvalDecl.forget();
73902}
73903
73904already_AddRefed<TestExternalInterface>
73905TestJSImplInterfaceJSImpl::GetNullableExternal(ErrorResult& aRv, JS::Realm* aRealm)
73906{
73907 CallSetup s(this, aRv, "TestJSImplInterface.nullableExternal", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73908 if (aRv.Failed()) {
73909 return nullptr;
73910 }
73911 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73911); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73911; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73912 BindingCallContext& cx = s.GetCallContext();
73913
73914 JS::Rooted<JS::Value> rval(cx);
73915
73916 JS::Rooted<JSObject *> callback(cx, mCallback);
73917 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73918 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73919 && !InitIds(cx, atomsCache)) ||
73920 !JS_GetPropertyById(cx, callback, atomsCache->nullableExternal_id, &rval)) {
73921 aRv.Throw(NS_ERROR_UNEXPECTED);
73922 return nullptr;
73923 }
73924 RefPtr<mozilla::dom::TestExternalInterface> rvalDecl;
73925 if (rval.isObject()) {
73926 static_assert(IsRefcounted<mozilla::dom::TestExternalInterface>::value, "We can only store refcounted classes.");
73927 RefPtr<mozilla::dom::TestExternalInterface> rvalHolder;
73928 JS::Rooted<JSObject*> source(cx, &rval.toObject());
73929 if (NS_FAILED(UnwrapArg<mozilla::dom::TestExternalInterface>(cx, source, getter_AddRefs(rvalHolder)))((bool)(__builtin_expect(!!(NS_FAILED_impl(UnwrapArg<mozilla
::dom::TestExternalInterface>(cx, source, getter_AddRefs(rvalHolder
)))), 0)))
) {
73930 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.nullableExternal", "TestExternalInterface");
73931 aRv.Throw(NS_ERROR_UNEXPECTED);
73932 return nullptr;
73933 }
73934 MOZ_ASSERT(rvalHolder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(rvalHolder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(rvalHolder))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("rvalHolder", "../TestJSImplGenBinding.cpp"
, 73934); AnnotateMozCrashReason("MOZ_ASSERT" "(" "rvalHolder"
")"); do { *((volatile int*)__null) = 73934; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
73935 rvalDecl = rvalHolder;
73936 } else if (rval.isNullOrUndefined()) {
73937 rvalDecl = nullptr;
73938 } else {
73939 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.nullableExternal");
73940 aRv.Throw(NS_ERROR_UNEXPECTED);
73941 return nullptr;
73942 }
73943 return rvalDecl.forget();
73944}
73945
73946already_AddRefed<TestCallbackInterface>
73947TestJSImplInterfaceJSImpl::GetNonNullCallbackInterface(ErrorResult& aRv, JS::Realm* aRealm)
73948{
73949 CallSetup s(this, aRv, "TestJSImplInterface.nonNullCallbackInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73950 if (aRv.Failed()) {
73951 return nullptr;
73952 }
73953 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73953); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73953; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73954 BindingCallContext& cx = s.GetCallContext();
73955
73956 JS::Rooted<JS::Value> rval(cx);
73957
73958 JS::Rooted<JSObject *> callback(cx, mCallback);
73959 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73960 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73961 && !InitIds(cx, atomsCache)) ||
73962 !JS_GetPropertyById(cx, callback, atomsCache->nonNullCallbackInterface_id, &rval)) {
73963 aRv.Throw(NS_ERROR_UNEXPECTED);
73964 return nullptr;
73965 }
73966 RefPtr<TestCallbackInterface> rvalDecl;
73967 if (rval.isObject()) {
73968 { // scope for tempRoot and tempGlobalRoot if needed
73969 JS::Rooted<JSObject*> tempRoot(cx, &rval.toObject());
73970 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
73971 rvalDecl = new TestCallbackInterface(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
73972 }
73973 } else {
73974 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.nonNullCallbackInterface");
73975 aRv.Throw(NS_ERROR_UNEXPECTED);
73976 return nullptr;
73977 }
73978 return rvalDecl.forget();
73979}
73980
73981already_AddRefed<TestCallbackInterface>
73982TestJSImplInterfaceJSImpl::GetNullableCallbackInterface(ErrorResult& aRv, JS::Realm* aRealm)
73983{
73984 CallSetup s(this, aRv, "TestJSImplInterface.nullableCallbackInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
73985 if (aRv.Failed()) {
73986 return nullptr;
73987 }
73988 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 73988); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 73988; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
73989 BindingCallContext& cx = s.GetCallContext();
73990
73991 JS::Rooted<JS::Value> rval(cx);
73992
73993 JS::Rooted<JSObject *> callback(cx, mCallback);
73994 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
73995 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
73996 && !InitIds(cx, atomsCache)) ||
73997 !JS_GetPropertyById(cx, callback, atomsCache->nullableCallbackInterface_id, &rval)) {
73998 aRv.Throw(NS_ERROR_UNEXPECTED);
73999 return nullptr;
74000 }
74001 RefPtr<TestCallbackInterface> rvalDecl;
74002 if (rval.isObject()) {
74003 { // scope for tempRoot and tempGlobalRoot if needed
74004 JS::Rooted<JSObject*> tempRoot(cx, &rval.toObject());
74005 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
74006 rvalDecl = new TestCallbackInterface(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
74007 }
74008 } else if (rval.isNullOrUndefined()) {
74009 rvalDecl = nullptr;
74010 } else {
74011 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.nullableCallbackInterface");
74012 aRv.Throw(NS_ERROR_UNEXPECTED);
74013 return nullptr;
74014 }
74015 return rvalDecl.forget();
74016}
74017
74018void
74019TestJSImplInterfaceJSImpl::GetUint8ArrayAttr(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
74020{
74021 CallSetup s(this, aRv, "TestJSImplInterface.uint8ArrayAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74022 if (aRv.Failed()) {
74023 return;
74024 }
74025 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74025); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74025; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74026 BindingCallContext& cx = s.GetCallContext();
74027
74028 JS::Rooted<JS::Value> rval(cx);
74029
74030 JS::Rooted<JSObject *> callback(cx, mCallback);
74031 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74032 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74033 && !InitIds(cx, atomsCache)) ||
74034 !JS_GetPropertyById(cx, callback, atomsCache->uint8ArrayAttr_id, &rval)) {
74035 aRv.Throw(NS_ERROR_UNEXPECTED);
74036 return;
74037 }
74038 RootedSpiderMonkeyInterface<Uint8Array> rvalDecl(cx);
74039 if (rval.isObject()) {
74040 if (!rvalDecl.Init(&rval.toObject())) {
74041 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.uint8ArrayAttr", "Uint8Array");
74042 aRv.Throw(NS_ERROR_UNEXPECTED);
74043 return;
74044 }
74045 if (JS::IsArrayBufferViewShared(rvalDecl.Obj())) {
74046 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_SHARED>("Return value of TestJSImplInterface.uint8ArrayAttr");
74047 aRv.Throw(NS_ERROR_UNEXPECTED);
74048 return;
74049 }
74050 if (JS::IsLargeArrayBufferView(rvalDecl.Obj())) {
74051 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Return value of TestJSImplInterface.uint8ArrayAttr");
74052 aRv.Throw(NS_ERROR_UNEXPECTED);
74053 return;
74054 }
74055 if (JS::IsResizableArrayBufferView(rvalDecl.Obj())) {
74056 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Return value of TestJSImplInterface.uint8ArrayAttr");
74057 aRv.Throw(NS_ERROR_UNEXPECTED);
74058 return;
74059 }
74060 } else {
74061 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.uint8ArrayAttr");
74062 aRv.Throw(NS_ERROR_UNEXPECTED);
74063 return;
74064 }
74065 aRetVal.set(rvalDecl.Obj());
74066}
74067
74068void
74069TestJSImplInterfaceJSImpl::GetReadonlyJSStringAttr(JS::MutableHandle<JSString*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
74070{
74071 CallSetup s(this, aRv, "TestJSImplInterface.readonlyJSStringAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74072 if (aRv.Failed()) {
74073 return;
74074 }
74075 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74075); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74075; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74076 BindingCallContext& cx = s.GetCallContext();
74077
74078 JS::Rooted<JS::Value> rval(cx);
74079
74080 JS::Rooted<JSObject *> callback(cx, mCallback);
74081 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74082 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74083 && !InitIds(cx, atomsCache)) ||
74084 !JS_GetPropertyById(cx, callback, atomsCache->readonlyJSStringAttr_id, &rval)) {
74085 aRv.Throw(NS_ERROR_UNEXPECTED);
74086 return;
74087 }
74088 JS::Rooted<JSString*> rvalDecl(cx);
74089 if (!(rvalDecl = ConvertJSValueToJSString(cx, rval))) {
74090 aRv.Throw(NS_ERROR_UNEXPECTED);
74091 return;
74092 }
74093 aRetVal.set(rvalDecl);
74094}
74095
74096void
74097TestJSImplInterfaceJSImpl::GetJsStringAttr(JS::MutableHandle<JSString*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
74098{
74099 CallSetup s(this, aRv, "TestJSImplInterface.jsStringAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74100 if (aRv.Failed()) {
74101 return;
74102 }
74103 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74103); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74103; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74104 BindingCallContext& cx = s.GetCallContext();
74105
74106 JS::Rooted<JS::Value> rval(cx);
74107
74108 JS::Rooted<JSObject *> callback(cx, mCallback);
74109 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74110 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74111 && !InitIds(cx, atomsCache)) ||
74112 !JS_GetPropertyById(cx, callback, atomsCache->jsStringAttr_id, &rval)) {
74113 aRv.Throw(NS_ERROR_UNEXPECTED);
74114 return;
74115 }
74116 JS::Rooted<JSString*> rvalDecl(cx);
74117 if (!(rvalDecl = ConvertJSValueToJSString(cx, rval))) {
74118 aRv.Throw(NS_ERROR_UNEXPECTED);
74119 return;
74120 }
74121 aRetVal.set(rvalDecl);
74122}
74123
74124MyTestEnum
74125TestJSImplInterfaceJSImpl::GetEnumAttribute(ErrorResult& aRv, JS::Realm* aRealm)
74126{
74127 CallSetup s(this, aRv, "TestJSImplInterface.enumAttribute", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74128 if (aRv.Failed()) {
74129 return MyTestEnum(0);
74130 }
74131 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74131); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74131; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74132 BindingCallContext& cx = s.GetCallContext();
74133
74134 JS::Rooted<JS::Value> rval(cx);
74135
74136 JS::Rooted<JSObject *> callback(cx, mCallback);
74137 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74138 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74139 && !InitIds(cx, atomsCache)) ||
74140 !JS_GetPropertyById(cx, callback, atomsCache->enumAttribute_id, &rval)) {
74141 aRv.Throw(NS_ERROR_UNEXPECTED);
74142 return MyTestEnum(0);
74143 }
74144 MyTestEnum rvalDecl;
74145 {
74146 int index;
74147 if (!binding_detail::FindEnumStringIndex<true>(cx, rval,
74148 binding_detail::EnumStrings<MyTestEnum>::Values,
74149 "MyTestEnum", "return value of TestJSImplInterface.enumAttribute",
74150 &index)) {
74151 aRv.Throw(NS_ERROR_UNEXPECTED);
74152 return MyTestEnum(0);
74153 }
74154 MOZ_ASSERT(index >= 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(index >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(index >= 0))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("index >= 0",
"../TestJSImplGenBinding.cpp", 74154); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 74154; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74155 rvalDecl = static_cast<MyTestEnum>(index);
74156 }
74157 return rvalDecl;
74158}
74159
74160MyTestEnum
74161TestJSImplInterfaceJSImpl::GetReadonlyEnumAttribute(ErrorResult& aRv, JS::Realm* aRealm)
74162{
74163 CallSetup s(this, aRv, "TestJSImplInterface.readonlyEnumAttribute", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74164 if (aRv.Failed()) {
74165 return MyTestEnum(0);
74166 }
74167 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74167); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74167; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74168 BindingCallContext& cx = s.GetCallContext();
74169
74170 JS::Rooted<JS::Value> rval(cx);
74171
74172 JS::Rooted<JSObject *> callback(cx, mCallback);
74173 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74174 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74175 && !InitIds(cx, atomsCache)) ||
74176 !JS_GetPropertyById(cx, callback, atomsCache->readonlyEnumAttribute_id, &rval)) {
74177 aRv.Throw(NS_ERROR_UNEXPECTED);
74178 return MyTestEnum(0);
74179 }
74180 MyTestEnum rvalDecl;
74181 {
74182 int index;
74183 if (!binding_detail::FindEnumStringIndex<true>(cx, rval,
74184 binding_detail::EnumStrings<MyTestEnum>::Values,
74185 "MyTestEnum", "return value of TestJSImplInterface.readonlyEnumAttribute",
74186 &index)) {
74187 aRv.Throw(NS_ERROR_UNEXPECTED);
74188 return MyTestEnum(0);
74189 }
74190 MOZ_ASSERT(index >= 0)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(index >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(index >= 0))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("index >= 0",
"../TestJSImplGenBinding.cpp", 74190); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "index >= 0" ")"); do { *((volatile int*
)__null) = 74190; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74191 rvalDecl = static_cast<MyTestEnum>(index);
74192 }
74193 return rvalDecl;
74194}
74195
74196void
74197TestJSImplInterfaceJSImpl::GetWritableUnion(OwningCanvasPatternOrCanvasGradient& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
74198{
74199 CallSetup s(this, aRv, "TestJSImplInterface.writableUnion", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74200 if (aRv.Failed()) {
74201 return;
74202 }
74203 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74203); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74203; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74204 BindingCallContext& cx = s.GetCallContext();
74205
74206 JS::Rooted<JS::Value> rval(cx);
74207
74208 JS::Rooted<JSObject *> callback(cx, mCallback);
74209 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74210 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74211 && !InitIds(cx, atomsCache)) ||
74212 !JS_GetPropertyById(cx, callback, atomsCache->writableUnion_id, &rval)) {
74213 aRv.Throw(NS_ERROR_UNEXPECTED);
74214 return;
74215 }
74216 OwningCanvasPatternOrCanvasGradient& rvalDecl(aRetVal);
74217 if (!rvalDecl.Init(cx, rval, "Return value of TestJSImplInterface.writableUnion", false)) {
74218 aRv.Throw(NS_ERROR_UNEXPECTED);
74219 return;
74220 }
74221}
74222
74223void
74224TestJSImplInterfaceJSImpl::GetWritableUnionContainingNull(OwningCanvasPatternOrNullOrCanvasGradient& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
74225{
74226 CallSetup s(this, aRv, "TestJSImplInterface.writableUnionContainingNull", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74227 if (aRv.Failed()) {
74228 return;
74229 }
74230 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74230); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74230; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74231 BindingCallContext& cx = s.GetCallContext();
74232
74233 JS::Rooted<JS::Value> rval(cx);
74234
74235 JS::Rooted<JSObject *> callback(cx, mCallback);
74236 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74237 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74238 && !InitIds(cx, atomsCache)) ||
74239 !JS_GetPropertyById(cx, callback, atomsCache->writableUnionContainingNull_id, &rval)) {
74240 aRv.Throw(NS_ERROR_UNEXPECTED);
74241 return;
74242 }
74243 OwningCanvasPatternOrNullOrCanvasGradient& rvalDecl(aRetVal);
74244 if (!rvalDecl.Init(cx, rval, "Return value of TestJSImplInterface.writableUnionContainingNull", false)) {
74245 aRv.Throw(NS_ERROR_UNEXPECTED);
74246 return;
74247 }
74248}
74249
74250void
74251TestJSImplInterfaceJSImpl::GetWritableNullableUnion(Nullable<OwningCanvasPatternOrCanvasGradient>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
74252{
74253 CallSetup s(this, aRv, "TestJSImplInterface.writableNullableUnion", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74254 if (aRv.Failed()) {
74255 return;
74256 }
74257 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74257); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74257; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74258 BindingCallContext& cx = s.GetCallContext();
74259
74260 JS::Rooted<JS::Value> rval(cx);
74261
74262 JS::Rooted<JSObject *> callback(cx, mCallback);
74263 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74264 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74265 && !InitIds(cx, atomsCache)) ||
74266 !JS_GetPropertyById(cx, callback, atomsCache->writableNullableUnion_id, &rval)) {
74267 aRv.Throw(NS_ERROR_UNEXPECTED);
74268 return;
74269 }
74270 Nullable<OwningCanvasPatternOrCanvasGradient >& rvalDecl(aRetVal);
74271 if (rval.isNullOrUndefined()) {
74272 rvalDecl.SetNull();
74273 } else {
74274 if (!rvalDecl.SetValue().Init(cx, rval, "Return value of TestJSImplInterface.writableNullableUnion", false)) {
74275 aRv.Throw(NS_ERROR_UNEXPECTED);
74276 return;
74277 }
74278 }
74279}
74280
74281int8_t
74282TestJSImplInterfaceJSImpl::GetAttributeGetterRenamedTo(ErrorResult& aRv, JS::Realm* aRealm)
74283{
74284 CallSetup s(this, aRv, "TestJSImplInterface.attributeGetterRenamedFrom", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74285 if (aRv.Failed()) {
74286 return int8_t(0);
74287 }
74288 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74288); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74288; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74289 BindingCallContext& cx = s.GetCallContext();
74290
74291 JS::Rooted<JS::Value> rval(cx);
74292
74293 JS::Rooted<JSObject *> callback(cx, mCallback);
74294 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74295 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74296 && !InitIds(cx, atomsCache)) ||
74297 !JS_GetPropertyById(cx, callback, atomsCache->attributeGetterRenamedTo_id, &rval)) {
74298 aRv.Throw(NS_ERROR_UNEXPECTED);
74299 return int8_t(0);
74300 }
74301 int8_t rvalDecl;
74302 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.attributeGetterRenamedFrom", &rvalDecl)) {
74303 aRv.Throw(NS_ERROR_UNEXPECTED);
74304 return int8_t(0);
74305 }
74306 return rvalDecl;
74307}
74308
74309int8_t
74310TestJSImplInterfaceJSImpl::GetAttributeRenamedTo(ErrorResult& aRv, JS::Realm* aRealm)
74311{
74312 CallSetup s(this, aRv, "TestJSImplInterface.attributeRenamedFrom", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74313 if (aRv.Failed()) {
74314 return int8_t(0);
74315 }
74316 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74316); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74316; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74317 BindingCallContext& cx = s.GetCallContext();
74318
74319 JS::Rooted<JS::Value> rval(cx);
74320
74321 JS::Rooted<JSObject *> callback(cx, mCallback);
74322 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74323 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74324 && !InitIds(cx, atomsCache)) ||
74325 !JS_GetPropertyById(cx, callback, atomsCache->attributeRenamedTo_id, &rval)) {
74326 aRv.Throw(NS_ERROR_UNEXPECTED);
74327 return int8_t(0);
74328 }
74329 int8_t rvalDecl;
74330 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.attributeRenamedFrom", &rvalDecl)) {
74331 aRv.Throw(NS_ERROR_UNEXPECTED);
74332 return int8_t(0);
74333 }
74334 return rvalDecl;
74335}
74336
74337int8_t
74338TestJSImplInterfaceJSImpl::GetEnforcedByte(ErrorResult& aRv, JS::Realm* aRealm)
74339{
74340 CallSetup s(this, aRv, "TestJSImplInterface.enforcedByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74341 if (aRv.Failed()) {
74342 return int8_t(0);
74343 }
74344 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74344); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74344; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74345 BindingCallContext& cx = s.GetCallContext();
74346
74347 JS::Rooted<JS::Value> rval(cx);
74348
74349 JS::Rooted<JSObject *> callback(cx, mCallback);
74350 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74351 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74352 && !InitIds(cx, atomsCache)) ||
74353 !JS_GetPropertyById(cx, callback, atomsCache->enforcedByte_id, &rval)) {
74354 aRv.Throw(NS_ERROR_UNEXPECTED);
74355 return int8_t(0);
74356 }
74357 int8_t rvalDecl;
74358 if (!ValueToPrimitive<int8_t, eEnforceRange>(cx, rval, "Return value of TestJSImplInterface.enforcedByte", &rvalDecl)) {
74359 aRv.Throw(NS_ERROR_UNEXPECTED);
74360 return int8_t(0);
74361 }
74362 return rvalDecl;
74363}
74364
74365Nullable<int8_t>
74366TestJSImplInterfaceJSImpl::GetEnforcedByteNullable(ErrorResult& aRv, JS::Realm* aRealm)
74367{
74368 CallSetup s(this, aRv, "TestJSImplInterface.enforcedByteNullable", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74369 if (aRv.Failed()) {
6
Taking false branch
74370 return Nullable<int8_t>();
74371 }
74372 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74372); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74372; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
7
Assuming the condition is false
8
Taking false branch
9
Loop condition is false. Exiting loop
74373 BindingCallContext& cx = s.GetCallContext();
74374
74375 JS::Rooted<JS::Value> rval(cx);
74376
74377 JS::Rooted<JSObject *> callback(cx, mCallback);
74378 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74379 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
10
Assuming the condition is false
12
Taking false branch
74380 && !InitIds(cx, atomsCache)) ||
74381 !JS_GetPropertyById(cx, callback, atomsCache->enforcedByteNullable_id, &rval)) {
11
Assuming the condition is false
74382 aRv.Throw(NS_ERROR_UNEXPECTED);
74383 return Nullable<int8_t>();
74384 }
74385 Nullable<int8_t> rvalDecl;
74386 if (rval.isNullOrUndefined()) {
13
Taking false branch
74387 rvalDecl.SetNull();
74388 } else if (!ValueToPrimitive<int8_t, eEnforceRange>(cx, rval, "Return value of TestJSImplInterface.enforcedByteNullable", &rvalDecl.SetValue())) {
14
Calling 'ValueToPrimitive<signed char, mozilla::dom::eEnforceRange, mozilla::dom::BindingCallContext>'
74389 aRv.Throw(NS_ERROR_UNEXPECTED);
74390 return Nullable<int8_t>();
74391 }
74392 return rvalDecl;
74393}
74394
74395int8_t
74396TestJSImplInterfaceJSImpl::GetClampedByte(ErrorResult& aRv, JS::Realm* aRealm)
74397{
74398 CallSetup s(this, aRv, "TestJSImplInterface.clampedByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74399 if (aRv.Failed()) {
74400 return int8_t(0);
74401 }
74402 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74402); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74402; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74403 BindingCallContext& cx = s.GetCallContext();
74404
74405 JS::Rooted<JS::Value> rval(cx);
74406
74407 JS::Rooted<JSObject *> callback(cx, mCallback);
74408 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74409 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74410 && !InitIds(cx, atomsCache)) ||
74411 !JS_GetPropertyById(cx, callback, atomsCache->clampedByte_id, &rval)) {
74412 aRv.Throw(NS_ERROR_UNEXPECTED);
74413 return int8_t(0);
74414 }
74415 int8_t rvalDecl;
74416 if (!ValueToPrimitive<int8_t, eClamp>(cx, rval, "Return value of TestJSImplInterface.clampedByte", &rvalDecl)) {
74417 aRv.Throw(NS_ERROR_UNEXPECTED);
74418 return int8_t(0);
74419 }
74420 return rvalDecl;
74421}
74422
74423Nullable<int8_t>
74424TestJSImplInterfaceJSImpl::GetClampedByteNullable(ErrorResult& aRv, JS::Realm* aRealm)
74425{
74426 CallSetup s(this, aRv, "TestJSImplInterface.clampedByteNullable", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74427 if (aRv.Failed()) {
74428 return Nullable<int8_t>();
74429 }
74430 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74430); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74430; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74431 BindingCallContext& cx = s.GetCallContext();
74432
74433 JS::Rooted<JS::Value> rval(cx);
74434
74435 JS::Rooted<JSObject *> callback(cx, mCallback);
74436 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74437 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74438 && !InitIds(cx, atomsCache)) ||
74439 !JS_GetPropertyById(cx, callback, atomsCache->clampedByteNullable_id, &rval)) {
74440 aRv.Throw(NS_ERROR_UNEXPECTED);
74441 return Nullable<int8_t>();
74442 }
74443 Nullable<int8_t> rvalDecl;
74444 if (rval.isNullOrUndefined()) {
74445 rvalDecl.SetNull();
74446 } else if (!ValueToPrimitive<int8_t, eClamp>(cx, rval, "Return value of TestJSImplInterface.clampedByteNullable", &rvalDecl.SetValue())) {
74447 aRv.Throw(NS_ERROR_UNEXPECTED);
74448 return Nullable<int8_t>();
74449 }
74450 return rvalDecl;
74451}
74452
74453int8_t
74454TestJSImplInterfaceJSImpl::GetDeprecatedAttribute(ErrorResult& aRv, JS::Realm* aRealm)
74455{
74456 CallSetup s(this, aRv, "TestJSImplInterface.deprecatedAttribute", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74457 if (aRv.Failed()) {
74458 return int8_t(0);
74459 }
74460 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74460); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74460; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74461 BindingCallContext& cx = s.GetCallContext();
74462
74463 JS::Rooted<JS::Value> rval(cx);
74464
74465 JS::Rooted<JSObject *> callback(cx, mCallback);
74466 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74467 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74468 && !InitIds(cx, atomsCache)) ||
74469 !JS_GetPropertyById(cx, callback, atomsCache->deprecatedAttribute_id, &rval)) {
74470 aRv.Throw(NS_ERROR_UNEXPECTED);
74471 return int8_t(0);
74472 }
74473 int8_t rvalDecl;
74474 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.deprecatedAttribute", &rvalDecl)) {
74475 aRv.Throw(NS_ERROR_UNEXPECTED);
74476 return int8_t(0);
74477 }
74478 return rvalDecl;
74479}
74480
74481bool
74482TestJSImplInterfaceJSImpl::GetPrefable1(ErrorResult& aRv, JS::Realm* aRealm)
74483{
74484 CallSetup s(this, aRv, "TestJSImplInterface.prefable1", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74485 if (aRv.Failed()) {
74486 return bool(0);
74487 }
74488 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74488); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74488; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74489 BindingCallContext& cx = s.GetCallContext();
74490
74491 JS::Rooted<JS::Value> rval(cx);
74492
74493 JS::Rooted<JSObject *> callback(cx, mCallback);
74494 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74495 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74496 && !InitIds(cx, atomsCache)) ||
74497 !JS_GetPropertyById(cx, callback, atomsCache->prefable1_id, &rval)) {
74498 aRv.Throw(NS_ERROR_UNEXPECTED);
74499 return bool(0);
74500 }
74501 bool rvalDecl;
74502 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.prefable1", &rvalDecl)) {
74503 aRv.Throw(NS_ERROR_UNEXPECTED);
74504 return bool(0);
74505 }
74506 return rvalDecl;
74507}
74508
74509bool
74510TestJSImplInterfaceJSImpl::GetPrefable2(ErrorResult& aRv, JS::Realm* aRealm)
74511{
74512 CallSetup s(this, aRv, "TestJSImplInterface.prefable2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74513 if (aRv.Failed()) {
74514 return bool(0);
74515 }
74516 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74516); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74516; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74517 BindingCallContext& cx = s.GetCallContext();
74518
74519 JS::Rooted<JS::Value> rval(cx);
74520
74521 JS::Rooted<JSObject *> callback(cx, mCallback);
74522 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74523 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74524 && !InitIds(cx, atomsCache)) ||
74525 !JS_GetPropertyById(cx, callback, atomsCache->prefable2_id, &rval)) {
74526 aRv.Throw(NS_ERROR_UNEXPECTED);
74527 return bool(0);
74528 }
74529 bool rvalDecl;
74530 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.prefable2", &rvalDecl)) {
74531 aRv.Throw(NS_ERROR_UNEXPECTED);
74532 return bool(0);
74533 }
74534 return rvalDecl;
74535}
74536
74537bool
74538TestJSImplInterfaceJSImpl::GetPrefable3(ErrorResult& aRv, JS::Realm* aRealm)
74539{
74540 CallSetup s(this, aRv, "TestJSImplInterface.prefable3", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74541 if (aRv.Failed()) {
74542 return bool(0);
74543 }
74544 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74544); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74544; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74545 BindingCallContext& cx = s.GetCallContext();
74546
74547 JS::Rooted<JS::Value> rval(cx);
74548
74549 JS::Rooted<JSObject *> callback(cx, mCallback);
74550 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74551 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74552 && !InitIds(cx, atomsCache)) ||
74553 !JS_GetPropertyById(cx, callback, atomsCache->prefable3_id, &rval)) {
74554 aRv.Throw(NS_ERROR_UNEXPECTED);
74555 return bool(0);
74556 }
74557 bool rvalDecl;
74558 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.prefable3", &rvalDecl)) {
74559 aRv.Throw(NS_ERROR_UNEXPECTED);
74560 return bool(0);
74561 }
74562 return rvalDecl;
74563}
74564
74565bool
74566TestJSImplInterfaceJSImpl::GetPrefable4(ErrorResult& aRv, JS::Realm* aRealm)
74567{
74568 CallSetup s(this, aRv, "TestJSImplInterface.prefable4", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74569 if (aRv.Failed()) {
74570 return bool(0);
74571 }
74572 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74572); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74572; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74573 BindingCallContext& cx = s.GetCallContext();
74574
74575 JS::Rooted<JS::Value> rval(cx);
74576
74577 JS::Rooted<JSObject *> callback(cx, mCallback);
74578 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74579 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74580 && !InitIds(cx, atomsCache)) ||
74581 !JS_GetPropertyById(cx, callback, atomsCache->prefable4_id, &rval)) {
74582 aRv.Throw(NS_ERROR_UNEXPECTED);
74583 return bool(0);
74584 }
74585 bool rvalDecl;
74586 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.prefable4", &rvalDecl)) {
74587 aRv.Throw(NS_ERROR_UNEXPECTED);
74588 return bool(0);
74589 }
74590 return rvalDecl;
74591}
74592
74593bool
74594TestJSImplInterfaceJSImpl::GetPrefable5(ErrorResult& aRv, JS::Realm* aRealm)
74595{
74596 CallSetup s(this, aRv, "TestJSImplInterface.prefable5", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74597 if (aRv.Failed()) {
74598 return bool(0);
74599 }
74600 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74600); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74600; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74601 BindingCallContext& cx = s.GetCallContext();
74602
74603 JS::Rooted<JS::Value> rval(cx);
74604
74605 JS::Rooted<JSObject *> callback(cx, mCallback);
74606 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74607 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74608 && !InitIds(cx, atomsCache)) ||
74609 !JS_GetPropertyById(cx, callback, atomsCache->prefable5_id, &rval)) {
74610 aRv.Throw(NS_ERROR_UNEXPECTED);
74611 return bool(0);
74612 }
74613 bool rvalDecl;
74614 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.prefable5", &rvalDecl)) {
74615 aRv.Throw(NS_ERROR_UNEXPECTED);
74616 return bool(0);
74617 }
74618 return rvalDecl;
74619}
74620
74621bool
74622TestJSImplInterfaceJSImpl::GetPrefable6(ErrorResult& aRv, JS::Realm* aRealm)
74623{
74624 CallSetup s(this, aRv, "TestJSImplInterface.prefable6", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74625 if (aRv.Failed()) {
74626 return bool(0);
74627 }
74628 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74628); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74628; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74629 BindingCallContext& cx = s.GetCallContext();
74630
74631 JS::Rooted<JS::Value> rval(cx);
74632
74633 JS::Rooted<JSObject *> callback(cx, mCallback);
74634 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74635 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74636 && !InitIds(cx, atomsCache)) ||
74637 !JS_GetPropertyById(cx, callback, atomsCache->prefable6_id, &rval)) {
74638 aRv.Throw(NS_ERROR_UNEXPECTED);
74639 return bool(0);
74640 }
74641 bool rvalDecl;
74642 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.prefable6", &rvalDecl)) {
74643 aRv.Throw(NS_ERROR_UNEXPECTED);
74644 return bool(0);
74645 }
74646 return rvalDecl;
74647}
74648
74649bool
74650TestJSImplInterfaceJSImpl::GetPrefable7(ErrorResult& aRv, JS::Realm* aRealm)
74651{
74652 CallSetup s(this, aRv, "TestJSImplInterface.prefable7", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74653 if (aRv.Failed()) {
74654 return bool(0);
74655 }
74656 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74656); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74656; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74657 BindingCallContext& cx = s.GetCallContext();
74658
74659 JS::Rooted<JS::Value> rval(cx);
74660
74661 JS::Rooted<JSObject *> callback(cx, mCallback);
74662 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74663 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74664 && !InitIds(cx, atomsCache)) ||
74665 !JS_GetPropertyById(cx, callback, atomsCache->prefable7_id, &rval)) {
74666 aRv.Throw(NS_ERROR_UNEXPECTED);
74667 return bool(0);
74668 }
74669 bool rvalDecl;
74670 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.prefable7", &rvalDecl)) {
74671 aRv.Throw(NS_ERROR_UNEXPECTED);
74672 return bool(0);
74673 }
74674 return rvalDecl;
74675}
74676
74677bool
74678TestJSImplInterfaceJSImpl::GetPrefable8(ErrorResult& aRv, JS::Realm* aRealm)
74679{
74680 CallSetup s(this, aRv, "TestJSImplInterface.prefable8", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74681 if (aRv.Failed()) {
74682 return bool(0);
74683 }
74684 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74684); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74684; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74685 BindingCallContext& cx = s.GetCallContext();
74686
74687 JS::Rooted<JS::Value> rval(cx);
74688
74689 JS::Rooted<JSObject *> callback(cx, mCallback);
74690 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74691 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74692 && !InitIds(cx, atomsCache)) ||
74693 !JS_GetPropertyById(cx, callback, atomsCache->prefable8_id, &rval)) {
74694 aRv.Throw(NS_ERROR_UNEXPECTED);
74695 return bool(0);
74696 }
74697 bool rvalDecl;
74698 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.prefable8", &rvalDecl)) {
74699 aRv.Throw(NS_ERROR_UNEXPECTED);
74700 return bool(0);
74701 }
74702 return rvalDecl;
74703}
74704
74705bool
74706TestJSImplInterfaceJSImpl::GetPrefable9(ErrorResult& aRv, JS::Realm* aRealm)
74707{
74708 CallSetup s(this, aRv, "TestJSImplInterface.prefable9", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74709 if (aRv.Failed()) {
74710 return bool(0);
74711 }
74712 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74712); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74712; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74713 BindingCallContext& cx = s.GetCallContext();
74714
74715 JS::Rooted<JS::Value> rval(cx);
74716
74717 JS::Rooted<JSObject *> callback(cx, mCallback);
74718 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74719 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74720 && !InitIds(cx, atomsCache)) ||
74721 !JS_GetPropertyById(cx, callback, atomsCache->prefable9_id, &rval)) {
74722 aRv.Throw(NS_ERROR_UNEXPECTED);
74723 return bool(0);
74724 }
74725 bool rvalDecl;
74726 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.prefable9", &rvalDecl)) {
74727 aRv.Throw(NS_ERROR_UNEXPECTED);
74728 return bool(0);
74729 }
74730 return rvalDecl;
74731}
74732
74733bool
74734TestJSImplInterfaceJSImpl::GetPrefable12(ErrorResult& aRv, JS::Realm* aRealm)
74735{
74736 CallSetup s(this, aRv, "TestJSImplInterface.prefable12", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74737 if (aRv.Failed()) {
74738 return bool(0);
74739 }
74740 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74740); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74740; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74741 BindingCallContext& cx = s.GetCallContext();
74742
74743 JS::Rooted<JS::Value> rval(cx);
74744
74745 JS::Rooted<JSObject *> callback(cx, mCallback);
74746 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74747 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74748 && !InitIds(cx, atomsCache)) ||
74749 !JS_GetPropertyById(cx, callback, atomsCache->prefable12_id, &rval)) {
74750 aRv.Throw(NS_ERROR_UNEXPECTED);
74751 return bool(0);
74752 }
74753 bool rvalDecl;
74754 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.prefable12", &rvalDecl)) {
74755 aRv.Throw(NS_ERROR_UNEXPECTED);
74756 return bool(0);
74757 }
74758 return rvalDecl;
74759}
74760
74761bool
74762TestJSImplInterfaceJSImpl::GetPrefable14(ErrorResult& aRv, JS::Realm* aRealm)
74763{
74764 CallSetup s(this, aRv, "TestJSImplInterface.prefable14", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74765 if (aRv.Failed()) {
74766 return bool(0);
74767 }
74768 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74768); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74768; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74769 BindingCallContext& cx = s.GetCallContext();
74770
74771 JS::Rooted<JS::Value> rval(cx);
74772
74773 JS::Rooted<JSObject *> callback(cx, mCallback);
74774 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74775 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74776 && !InitIds(cx, atomsCache)) ||
74777 !JS_GetPropertyById(cx, callback, atomsCache->prefable14_id, &rval)) {
74778 aRv.Throw(NS_ERROR_UNEXPECTED);
74779 return bool(0);
74780 }
74781 bool rvalDecl;
74782 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.prefable14", &rvalDecl)) {
74783 aRv.Throw(NS_ERROR_UNEXPECTED);
74784 return bool(0);
74785 }
74786 return rvalDecl;
74787}
74788
74789bool
74790TestJSImplInterfaceJSImpl::GetPrefable15(ErrorResult& aRv, JS::Realm* aRealm)
74791{
74792 CallSetup s(this, aRv, "TestJSImplInterface.prefable15", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74793 if (aRv.Failed()) {
74794 return bool(0);
74795 }
74796 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74796); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74796; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74797 BindingCallContext& cx = s.GetCallContext();
74798
74799 JS::Rooted<JS::Value> rval(cx);
74800
74801 JS::Rooted<JSObject *> callback(cx, mCallback);
74802 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74803 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74804 && !InitIds(cx, atomsCache)) ||
74805 !JS_GetPropertyById(cx, callback, atomsCache->prefable15_id, &rval)) {
74806 aRv.Throw(NS_ERROR_UNEXPECTED);
74807 return bool(0);
74808 }
74809 bool rvalDecl;
74810 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.prefable15", &rvalDecl)) {
74811 aRv.Throw(NS_ERROR_UNEXPECTED);
74812 return bool(0);
74813 }
74814 return rvalDecl;
74815}
74816
74817bool
74818TestJSImplInterfaceJSImpl::GetPrefable16(ErrorResult& aRv, JS::Realm* aRealm)
74819{
74820 CallSetup s(this, aRv, "TestJSImplInterface.prefable16", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74821 if (aRv.Failed()) {
74822 return bool(0);
74823 }
74824 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74824); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74824; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74825 BindingCallContext& cx = s.GetCallContext();
74826
74827 JS::Rooted<JS::Value> rval(cx);
74828
74829 JS::Rooted<JSObject *> callback(cx, mCallback);
74830 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74831 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74832 && !InitIds(cx, atomsCache)) ||
74833 !JS_GetPropertyById(cx, callback, atomsCache->prefable16_id, &rval)) {
74834 aRv.Throw(NS_ERROR_UNEXPECTED);
74835 return bool(0);
74836 }
74837 bool rvalDecl;
74838 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.prefable16", &rvalDecl)) {
74839 aRv.Throw(NS_ERROR_UNEXPECTED);
74840 return bool(0);
74841 }
74842 return rvalDecl;
74843}
74844
74845bool
74846TestJSImplInterfaceJSImpl::GetConditionalOnSecureContext1(ErrorResult& aRv, JS::Realm* aRealm)
74847{
74848 CallSetup s(this, aRv, "TestJSImplInterface.conditionalOnSecureContext1", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74849 if (aRv.Failed()) {
74850 return bool(0);
74851 }
74852 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74852); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74852; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74853 BindingCallContext& cx = s.GetCallContext();
74854
74855 JS::Rooted<JS::Value> rval(cx);
74856
74857 JS::Rooted<JSObject *> callback(cx, mCallback);
74858 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74859 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74860 && !InitIds(cx, atomsCache)) ||
74861 !JS_GetPropertyById(cx, callback, atomsCache->conditionalOnSecureContext1_id, &rval)) {
74862 aRv.Throw(NS_ERROR_UNEXPECTED);
74863 return bool(0);
74864 }
74865 bool rvalDecl;
74866 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.conditionalOnSecureContext1", &rvalDecl)) {
74867 aRv.Throw(NS_ERROR_UNEXPECTED);
74868 return bool(0);
74869 }
74870 return rvalDecl;
74871}
74872
74873bool
74874TestJSImplInterfaceJSImpl::GetConditionalOnSecureContext2(ErrorResult& aRv, JS::Realm* aRealm)
74875{
74876 CallSetup s(this, aRv, "TestJSImplInterface.conditionalOnSecureContext2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74877 if (aRv.Failed()) {
74878 return bool(0);
74879 }
74880 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74880); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74880; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74881 BindingCallContext& cx = s.GetCallContext();
74882
74883 JS::Rooted<JS::Value> rval(cx);
74884
74885 JS::Rooted<JSObject *> callback(cx, mCallback);
74886 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74887 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74888 && !InitIds(cx, atomsCache)) ||
74889 !JS_GetPropertyById(cx, callback, atomsCache->conditionalOnSecureContext2_id, &rval)) {
74890 aRv.Throw(NS_ERROR_UNEXPECTED);
74891 return bool(0);
74892 }
74893 bool rvalDecl;
74894 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.conditionalOnSecureContext2", &rvalDecl)) {
74895 aRv.Throw(NS_ERROR_UNEXPECTED);
74896 return bool(0);
74897 }
74898 return rvalDecl;
74899}
74900
74901bool
74902TestJSImplInterfaceJSImpl::GetConditionalOnSecureContext3(ErrorResult& aRv, JS::Realm* aRealm)
74903{
74904 CallSetup s(this, aRv, "TestJSImplInterface.conditionalOnSecureContext3", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74905 if (aRv.Failed()) {
74906 return bool(0);
74907 }
74908 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74908); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74908; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74909 BindingCallContext& cx = s.GetCallContext();
74910
74911 JS::Rooted<JS::Value> rval(cx);
74912
74913 JS::Rooted<JSObject *> callback(cx, mCallback);
74914 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74915 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74916 && !InitIds(cx, atomsCache)) ||
74917 !JS_GetPropertyById(cx, callback, atomsCache->conditionalOnSecureContext3_id, &rval)) {
74918 aRv.Throw(NS_ERROR_UNEXPECTED);
74919 return bool(0);
74920 }
74921 bool rvalDecl;
74922 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.conditionalOnSecureContext3", &rvalDecl)) {
74923 aRv.Throw(NS_ERROR_UNEXPECTED);
74924 return bool(0);
74925 }
74926 return rvalDecl;
74927}
74928
74929bool
74930TestJSImplInterfaceJSImpl::GetConditionalOnSecureContext4(ErrorResult& aRv, JS::Realm* aRealm)
74931{
74932 CallSetup s(this, aRv, "TestJSImplInterface.conditionalOnSecureContext4", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74933 if (aRv.Failed()) {
74934 return bool(0);
74935 }
74936 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74936); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74936; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74937 BindingCallContext& cx = s.GetCallContext();
74938
74939 JS::Rooted<JS::Value> rval(cx);
74940
74941 JS::Rooted<JSObject *> callback(cx, mCallback);
74942 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74943 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74944 && !InitIds(cx, atomsCache)) ||
74945 !JS_GetPropertyById(cx, callback, atomsCache->conditionalOnSecureContext4_id, &rval)) {
74946 aRv.Throw(NS_ERROR_UNEXPECTED);
74947 return bool(0);
74948 }
74949 bool rvalDecl;
74950 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.conditionalOnSecureContext4", &rvalDecl)) {
74951 aRv.Throw(NS_ERROR_UNEXPECTED);
74952 return bool(0);
74953 }
74954 return rvalDecl;
74955}
74956
74957int32_t
74958TestJSImplInterfaceJSImpl::GetAttrWithLenientThis(ErrorResult& aRv, JS::Realm* aRealm)
74959{
74960 CallSetup s(this, aRv, "TestJSImplInterface.attrWithLenientThis", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74961 if (aRv.Failed()) {
74962 return int32_t(0);
74963 }
74964 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74964); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74964; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74965 BindingCallContext& cx = s.GetCallContext();
74966
74967 JS::Rooted<JS::Value> rval(cx);
74968
74969 JS::Rooted<JSObject *> callback(cx, mCallback);
74970 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74971 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
74972 && !InitIds(cx, atomsCache)) ||
74973 !JS_GetPropertyById(cx, callback, atomsCache->attrWithLenientThis_id, &rval)) {
74974 aRv.Throw(NS_ERROR_UNEXPECTED);
74975 return int32_t(0);
74976 }
74977 int32_t rvalDecl;
74978 if (!ValueToPrimitive<int32_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.attrWithLenientThis", &rvalDecl)) {
74979 aRv.Throw(NS_ERROR_UNEXPECTED);
74980 return int32_t(0);
74981 }
74982 return rvalDecl;
74983}
74984
74985already_AddRefed<TestJSImplInterface>
74986TestJSImplInterfaceJSImpl::GetPutForwardsAttr(ErrorResult& aRv, JS::Realm* aRealm)
74987{
74988 CallSetup s(this, aRv, "TestJSImplInterface.putForwardsAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
74989 if (aRv.Failed()) {
74990 return nullptr;
74991 }
74992 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 74992); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 74992; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
74993 BindingCallContext& cx = s.GetCallContext();
74994
74995 JS::Rooted<JS::Value> rval(cx);
74996
74997 JS::Rooted<JSObject *> callback(cx, mCallback);
74998 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
74999 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75000 && !InitIds(cx, atomsCache)) ||
75001 !JS_GetPropertyById(cx, callback, atomsCache->putForwardsAttr_id, &rval)) {
75002 aRv.Throw(NS_ERROR_UNEXPECTED);
75003 return nullptr;
75004 }
75005 RefPtr<mozilla::dom::TestJSImplInterface> rvalDecl;
75006 if (rval.isObject()) {
75007 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
75008 {
75009 // Our JSContext should be in the right global to do unwrapping in.
75010 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(rval, rvalDecl, cx);
75011 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
75012 // Be careful to not wrap random DOM objects here, even if
75013 // they're wrapped in opaque security wrappers for some reason.
75014 // XXXbz Wish we could check for a JS-implemented object
75015 // that already has a content reflection...
75016 if (!IsDOMObject(js::UncheckedUnwrap(&rval.toObject()))) {
75017 nsCOMPtr<nsIGlobalObject> contentGlobal;
75018 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
75019 if (!callback ||
75020 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
75021 aRv.Throw(NS_ERROR_UNEXPECTED);
75022 return nullptr;
75023 }
75024 JS::Rooted<JSObject*> jsImplSourceObj(cx, &rval.toObject());
75025 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 75026); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 75026; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
75026 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 75026); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 75026; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
75027 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
75028 rvalDecl = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
75029 } else {
75030 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.putForwardsAttr", "TestJSImplInterface");
75031 aRv.Throw(NS_ERROR_UNEXPECTED);
75032 return nullptr;
75033 }
75034 }
75035 }
75036 } else {
75037 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.putForwardsAttr");
75038 aRv.Throw(NS_ERROR_UNEXPECTED);
75039 return nullptr;
75040 }
75041 return rvalDecl.forget();
75042}
75043
75044already_AddRefed<TestJSImplInterface>
75045TestJSImplInterfaceJSImpl::GetPutForwardsAttr2(ErrorResult& aRv, JS::Realm* aRealm)
75046{
75047 CallSetup s(this, aRv, "TestJSImplInterface.putForwardsAttr2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75048 if (aRv.Failed()) {
75049 return nullptr;
75050 }
75051 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75051); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75051; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75052 BindingCallContext& cx = s.GetCallContext();
75053
75054 JS::Rooted<JS::Value> rval(cx);
75055
75056 JS::Rooted<JSObject *> callback(cx, mCallback);
75057 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75058 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75059 && !InitIds(cx, atomsCache)) ||
75060 !JS_GetPropertyById(cx, callback, atomsCache->putForwardsAttr2_id, &rval)) {
75061 aRv.Throw(NS_ERROR_UNEXPECTED);
75062 return nullptr;
75063 }
75064 RefPtr<mozilla::dom::TestJSImplInterface> rvalDecl;
75065 if (rval.isObject()) {
75066 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
75067 {
75068 // Our JSContext should be in the right global to do unwrapping in.
75069 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(rval, rvalDecl, cx);
75070 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
75071 // Be careful to not wrap random DOM objects here, even if
75072 // they're wrapped in opaque security wrappers for some reason.
75073 // XXXbz Wish we could check for a JS-implemented object
75074 // that already has a content reflection...
75075 if (!IsDOMObject(js::UncheckedUnwrap(&rval.toObject()))) {
75076 nsCOMPtr<nsIGlobalObject> contentGlobal;
75077 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
75078 if (!callback ||
75079 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
75080 aRv.Throw(NS_ERROR_UNEXPECTED);
75081 return nullptr;
75082 }
75083 JS::Rooted<JSObject*> jsImplSourceObj(cx, &rval.toObject());
75084 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 75085); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 75085; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
75085 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 75085); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 75085; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
75086 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
75087 rvalDecl = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
75088 } else {
75089 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.putForwardsAttr2", "TestJSImplInterface");
75090 aRv.Throw(NS_ERROR_UNEXPECTED);
75091 return nullptr;
75092 }
75093 }
75094 }
75095 } else {
75096 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.putForwardsAttr2");
75097 aRv.Throw(NS_ERROR_UNEXPECTED);
75098 return nullptr;
75099 }
75100 return rvalDecl.forget();
75101}
75102
75103already_AddRefed<TestJSImplInterface>
75104TestJSImplInterfaceJSImpl::GetPutForwardsAttr3(ErrorResult& aRv, JS::Realm* aRealm)
75105{
75106 CallSetup s(this, aRv, "TestJSImplInterface.putForwardsAttr3", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75107 if (aRv.Failed()) {
75108 return nullptr;
75109 }
75110 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75110); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75110; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75111 BindingCallContext& cx = s.GetCallContext();
75112
75113 JS::Rooted<JS::Value> rval(cx);
75114
75115 JS::Rooted<JSObject *> callback(cx, mCallback);
75116 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75117 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75118 && !InitIds(cx, atomsCache)) ||
75119 !JS_GetPropertyById(cx, callback, atomsCache->putForwardsAttr3_id, &rval)) {
75120 aRv.Throw(NS_ERROR_UNEXPECTED);
75121 return nullptr;
75122 }
75123 RefPtr<mozilla::dom::TestJSImplInterface> rvalDecl;
75124 if (rval.isObject()) {
75125 static_assert(IsRefcounted<mozilla::dom::TestJSImplInterface>::value, "We can only store refcounted classes.");
75126 {
75127 // Our JSContext should be in the right global to do unwrapping in.
75128 nsresult rv = UnwrapObject<prototypes::id::TestJSImplInterface, mozilla::dom::TestJSImplInterface>(rval, rvalDecl, cx);
75129 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
75130 // Be careful to not wrap random DOM objects here, even if
75131 // they're wrapped in opaque security wrappers for some reason.
75132 // XXXbz Wish we could check for a JS-implemented object
75133 // that already has a content reflection...
75134 if (!IsDOMObject(js::UncheckedUnwrap(&rval.toObject()))) {
75135 nsCOMPtr<nsIGlobalObject> contentGlobal;
75136 JS::Rooted<JSObject*> callback(cx, CallbackOrNull());
75137 if (!callback ||
75138 !GetContentGlobalForJSImplementedObject(cx, callback, getter_AddRefs(contentGlobal))) {
75139 aRv.Throw(NS_ERROR_UNEXPECTED);
75140 return nullptr;
75141 }
75142 JS::Rooted<JSObject*> jsImplSourceObj(cx, &rval.toObject());
75143 MOZ_RELEASE_ASSERT(!js::IsWrapper(jsImplSourceObj),do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 75144); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 75144; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
75144 "Don't return JS implementations from other compartments")do { static_assert( mozilla::detail::AssertionConditionType<
decltype(!js::IsWrapper(jsImplSourceObj))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!js::IsWrapper(jsImplSourceObj
)))), 0))) { do { } while (false); MOZ_ReportAssertionFailure
("!js::IsWrapper(jsImplSourceObj)" " (" "Don't return JS implementations from other compartments"
")", "../TestJSImplGenBinding.cpp", 75144); AnnotateMozCrashReason
("MOZ_RELEASE_ASSERT" "(" "!js::IsWrapper(jsImplSourceObj)" ") ("
"Don't return JS implementations from other compartments" ")"
); do { *((volatile int*)__null) = 75144; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
75145 JS::Rooted<JSObject*> jsImplSourceGlobal(cx, JS::GetNonCCWObjectGlobal(jsImplSourceObj));
75146 rvalDecl = new mozilla::dom::TestJSImplInterface(jsImplSourceObj, jsImplSourceGlobal, contentGlobal);
75147 } else {
75148 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.putForwardsAttr3", "TestJSImplInterface");
75149 aRv.Throw(NS_ERROR_UNEXPECTED);
75150 return nullptr;
75151 }
75152 }
75153 }
75154 } else {
75155 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.putForwardsAttr3");
75156 aRv.Throw(NS_ERROR_UNEXPECTED);
75157 return nullptr;
75158 }
75159 return rvalDecl.forget();
75160}
75161
75162bool
75163TestJSImplInterfaceJSImpl::GetThrowingAttr(ErrorResult& aRv, JS::Realm* aRealm)
75164{
75165 CallSetup s(this, aRv, "TestJSImplInterface.throwingAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75166 if (aRv.Failed()) {
75167 return bool(0);
75168 }
75169 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75169); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75169; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75170 BindingCallContext& cx = s.GetCallContext();
75171
75172 JS::Rooted<JS::Value> rval(cx);
75173
75174 JS::Rooted<JSObject *> callback(cx, mCallback);
75175 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75176 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75177 && !InitIds(cx, atomsCache)) ||
75178 !JS_GetPropertyById(cx, callback, atomsCache->throwingAttr_id, &rval)) {
75179 aRv.Throw(NS_ERROR_UNEXPECTED);
75180 return bool(0);
75181 }
75182 bool rvalDecl;
75183 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.throwingAttr", &rvalDecl)) {
75184 aRv.Throw(NS_ERROR_UNEXPECTED);
75185 return bool(0);
75186 }
75187 return rvalDecl;
75188}
75189
75190bool
75191TestJSImplInterfaceJSImpl::GetThrowingGetterAttr(ErrorResult& aRv, JS::Realm* aRealm)
75192{
75193 CallSetup s(this, aRv, "TestJSImplInterface.throwingGetterAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75194 if (aRv.Failed()) {
75195 return bool(0);
75196 }
75197 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75197); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75197; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75198 BindingCallContext& cx = s.GetCallContext();
75199
75200 JS::Rooted<JS::Value> rval(cx);
75201
75202 JS::Rooted<JSObject *> callback(cx, mCallback);
75203 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75204 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75205 && !InitIds(cx, atomsCache)) ||
75206 !JS_GetPropertyById(cx, callback, atomsCache->throwingGetterAttr_id, &rval)) {
75207 aRv.Throw(NS_ERROR_UNEXPECTED);
75208 return bool(0);
75209 }
75210 bool rvalDecl;
75211 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.throwingGetterAttr", &rvalDecl)) {
75212 aRv.Throw(NS_ERROR_UNEXPECTED);
75213 return bool(0);
75214 }
75215 return rvalDecl;
75216}
75217
75218bool
75219TestJSImplInterfaceJSImpl::GetThrowingSetterAttr(ErrorResult& aRv, JS::Realm* aRealm)
75220{
75221 CallSetup s(this, aRv, "TestJSImplInterface.throwingSetterAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75222 if (aRv.Failed()) {
75223 return bool(0);
75224 }
75225 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75225); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75225; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75226 BindingCallContext& cx = s.GetCallContext();
75227
75228 JS::Rooted<JS::Value> rval(cx);
75229
75230 JS::Rooted<JSObject *> callback(cx, mCallback);
75231 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75232 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75233 && !InitIds(cx, atomsCache)) ||
75234 !JS_GetPropertyById(cx, callback, atomsCache->throwingSetterAttr_id, &rval)) {
75235 aRv.Throw(NS_ERROR_UNEXPECTED);
75236 return bool(0);
75237 }
75238 bool rvalDecl;
75239 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.throwingSetterAttr", &rvalDecl)) {
75240 aRv.Throw(NS_ERROR_UNEXPECTED);
75241 return bool(0);
75242 }
75243 return rvalDecl;
75244}
75245
75246bool
75247TestJSImplInterfaceJSImpl::GetCanOOMAttr(ErrorResult& aRv, JS::Realm* aRealm)
75248{
75249 CallSetup s(this, aRv, "TestJSImplInterface.canOOMAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75250 if (aRv.Failed()) {
75251 return bool(0);
75252 }
75253 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75253); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75253; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75254 BindingCallContext& cx = s.GetCallContext();
75255
75256 JS::Rooted<JS::Value> rval(cx);
75257
75258 JS::Rooted<JSObject *> callback(cx, mCallback);
75259 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75260 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75261 && !InitIds(cx, atomsCache)) ||
75262 !JS_GetPropertyById(cx, callback, atomsCache->canOOMAttr_id, &rval)) {
75263 aRv.Throw(NS_ERROR_UNEXPECTED);
75264 return bool(0);
75265 }
75266 bool rvalDecl;
75267 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.canOOMAttr", &rvalDecl)) {
75268 aRv.Throw(NS_ERROR_UNEXPECTED);
75269 return bool(0);
75270 }
75271 return rvalDecl;
75272}
75273
75274bool
75275TestJSImplInterfaceJSImpl::GetCanOOMGetterAttr(ErrorResult& aRv, JS::Realm* aRealm)
75276{
75277 CallSetup s(this, aRv, "TestJSImplInterface.canOOMGetterAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75278 if (aRv.Failed()) {
75279 return bool(0);
75280 }
75281 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75281); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75281; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75282 BindingCallContext& cx = s.GetCallContext();
75283
75284 JS::Rooted<JS::Value> rval(cx);
75285
75286 JS::Rooted<JSObject *> callback(cx, mCallback);
75287 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75288 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75289 && !InitIds(cx, atomsCache)) ||
75290 !JS_GetPropertyById(cx, callback, atomsCache->canOOMGetterAttr_id, &rval)) {
75291 aRv.Throw(NS_ERROR_UNEXPECTED);
75292 return bool(0);
75293 }
75294 bool rvalDecl;
75295 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.canOOMGetterAttr", &rvalDecl)) {
75296 aRv.Throw(NS_ERROR_UNEXPECTED);
75297 return bool(0);
75298 }
75299 return rvalDecl;
75300}
75301
75302bool
75303TestJSImplInterfaceJSImpl::GetCanOOMSetterAttr(ErrorResult& aRv, JS::Realm* aRealm)
75304{
75305 CallSetup s(this, aRv, "TestJSImplInterface.canOOMSetterAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75306 if (aRv.Failed()) {
75307 return bool(0);
75308 }
75309 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75309); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75309; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75310 BindingCallContext& cx = s.GetCallContext();
75311
75312 JS::Rooted<JS::Value> rval(cx);
75313
75314 JS::Rooted<JSObject *> callback(cx, mCallback);
75315 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75316 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75317 && !InitIds(cx, atomsCache)) ||
75318 !JS_GetPropertyById(cx, callback, atomsCache->canOOMSetterAttr_id, &rval)) {
75319 aRv.Throw(NS_ERROR_UNEXPECTED);
75320 return bool(0);
75321 }
75322 bool rvalDecl;
75323 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.canOOMSetterAttr", &rvalDecl)) {
75324 aRv.Throw(NS_ERROR_UNEXPECTED);
75325 return bool(0);
75326 }
75327 return rvalDecl;
75328}
75329
75330bool
75331TestJSImplInterfaceJSImpl::GetCeReactionsAttr(ErrorResult& aRv, JS::Realm* aRealm)
75332{
75333 CallSetup s(this, aRv, "TestJSImplInterface.ceReactionsAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75334 if (aRv.Failed()) {
75335 return bool(0);
75336 }
75337 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75337); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75337; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75338 BindingCallContext& cx = s.GetCallContext();
75339
75340 JS::Rooted<JS::Value> rval(cx);
75341
75342 JS::Rooted<JSObject *> callback(cx, mCallback);
75343 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75344 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75345 && !InitIds(cx, atomsCache)) ||
75346 !JS_GetPropertyById(cx, callback, atomsCache->ceReactionsAttr_id, &rval)) {
75347 aRv.Throw(NS_ERROR_UNEXPECTED);
75348 return bool(0);
75349 }
75350 bool rvalDecl;
75351 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.ceReactionsAttr", &rvalDecl)) {
75352 aRv.Throw(NS_ERROR_UNEXPECTED);
75353 return bool(0);
75354 }
75355 return rvalDecl;
75356}
75357
75358void
75359TestJSImplInterfaceJSImpl::GetToJSONShouldSkipThis(JS::MutableHandle<JS::Value> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
75360{
75361 CallSetup s(this, aRv, "TestJSImplInterface.toJSONShouldSkipThis", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75362 if (aRv.Failed()) {
75363 return;
75364 }
75365 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75365); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75365; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75366 BindingCallContext& cx = s.GetCallContext();
75367
75368 JS::Rooted<JS::Value> rval(cx);
75369
75370 JS::Rooted<JSObject *> callback(cx, mCallback);
75371 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75372 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75373 && !InitIds(cx, atomsCache)) ||
75374 !JS_GetPropertyById(cx, callback, atomsCache->toJSONShouldSkipThis_id, &rval)) {
75375 aRv.Throw(NS_ERROR_UNEXPECTED);
75376 return;
75377 }
75378 JS::Rooted<JS::Value> rvalDecl(cx);
75379#ifdef __clang__1
75380#pragma clang diagnostic push
75381#pragma clang diagnostic ignored "-Wunreachable-code"
75382#pragma clang diagnostic ignored "-Wunreachable-code-return"
75383#endif // __clang__
75384 if ((false) && !CallerSubsumes(rval)) {
75385 cx.ThrowErrorMessage<MSG_PERMISSION_DENIED_TO_PASS_ARG>("return value of TestJSImplInterface.toJSONShouldSkipThis");
75386 aRv.Throw(NS_ERROR_UNEXPECTED);
75387 return;
75388 }
75389#ifdef __clang__1
75390#pragma clang diagnostic pop
75391#endif // __clang__
75392 rvalDecl = rval;
75393 aRetVal.set(rvalDecl);
75394}
75395
75396already_AddRefed<TestParentInterface>
75397TestJSImplInterfaceJSImpl::GetToJSONShouldSkipThis2(ErrorResult& aRv, JS::Realm* aRealm)
75398{
75399 CallSetup s(this, aRv, "TestJSImplInterface.toJSONShouldSkipThis2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75400 if (aRv.Failed()) {
75401 return nullptr;
75402 }
75403 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75403); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75403; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75404 BindingCallContext& cx = s.GetCallContext();
75405
75406 JS::Rooted<JS::Value> rval(cx);
75407
75408 JS::Rooted<JSObject *> callback(cx, mCallback);
75409 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75410 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75411 && !InitIds(cx, atomsCache)) ||
75412 !JS_GetPropertyById(cx, callback, atomsCache->toJSONShouldSkipThis2_id, &rval)) {
75413 aRv.Throw(NS_ERROR_UNEXPECTED);
75414 return nullptr;
75415 }
75416 RefPtr<mozilla::dom::TestParentInterface> rvalDecl;
75417 if (rval.isObject()) {
75418 static_assert(IsRefcounted<mozilla::dom::TestParentInterface>::value, "We can only store refcounted classes.");
75419 {
75420 // Our JSContext should be in the right global to do unwrapping in.
75421 nsresult rv = UnwrapObject<prototypes::id::TestParentInterface, mozilla::dom::TestParentInterface>(rval, rvalDecl, cx);
75422 if (NS_FAILED(rv)((bool)(__builtin_expect(!!(NS_FAILED_impl(rv)), 0)))) {
75423 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.toJSONShouldSkipThis2", "TestParentInterface");
75424 aRv.Throw(NS_ERROR_UNEXPECTED);
75425 return nullptr;
75426 }
75427 }
75428 } else {
75429 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.toJSONShouldSkipThis2");
75430 aRv.Throw(NS_ERROR_UNEXPECTED);
75431 return nullptr;
75432 }
75433 return rvalDecl.forget();
75434}
75435
75436already_AddRefed<TestCallbackInterface>
75437TestJSImplInterfaceJSImpl::GetToJSONShouldSkipThis3(ErrorResult& aRv, JS::Realm* aRealm)
75438{
75439 CallSetup s(this, aRv, "TestJSImplInterface.toJSONShouldSkipThis3", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75440 if (aRv.Failed()) {
75441 return nullptr;
75442 }
75443 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75443); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75443; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75444 BindingCallContext& cx = s.GetCallContext();
75445
75446 JS::Rooted<JS::Value> rval(cx);
75447
75448 JS::Rooted<JSObject *> callback(cx, mCallback);
75449 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75450 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75451 && !InitIds(cx, atomsCache)) ||
75452 !JS_GetPropertyById(cx, callback, atomsCache->toJSONShouldSkipThis3_id, &rval)) {
75453 aRv.Throw(NS_ERROR_UNEXPECTED);
75454 return nullptr;
75455 }
75456 RefPtr<TestCallbackInterface> rvalDecl;
75457 if (rval.isObject()) {
75458 { // scope for tempRoot and tempGlobalRoot if needed
75459 JS::Rooted<JSObject*> tempRoot(cx, &rval.toObject());
75460 JS::Rooted<JSObject*> tempGlobalRoot(cx, JS::CurrentGlobalOrNull(cx));
75461 rvalDecl = new TestCallbackInterface(cx, tempRoot, tempGlobalRoot, GetIncumbentGlobal());
75462 }
75463 } else {
75464 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.toJSONShouldSkipThis3");
75465 aRv.Throw(NS_ERROR_UNEXPECTED);
75466 return nullptr;
75467 }
75468 return rvalDecl.forget();
75469}
75470
75471int8_t
75472TestJSImplInterfaceJSImpl::GetDashed_attribute(ErrorResult& aRv, JS::Realm* aRealm)
75473{
75474 CallSetup s(this, aRv, "TestJSImplInterface.dashed-attribute", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75475 if (aRv.Failed()) {
75476 return int8_t(0);
75477 }
75478 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75478); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75478; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75479 BindingCallContext& cx = s.GetCallContext();
75480
75481 JS::Rooted<JS::Value> rval(cx);
75482
75483 JS::Rooted<JSObject *> callback(cx, mCallback);
75484 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75485 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75486 && !InitIds(cx, atomsCache)) ||
75487 !JS_GetPropertyById(cx, callback, atomsCache->dashed_attribute_id, &rval)) {
75488 aRv.Throw(NS_ERROR_UNEXPECTED);
75489 return int8_t(0);
75490 }
75491 int8_t rvalDecl;
75492 if (!ValueToPrimitive<int8_t, eDefault>(cx, rval, "Return value of TestJSImplInterface.dashed-attribute", &rvalDecl)) {
75493 aRv.Throw(NS_ERROR_UNEXPECTED);
75494 return int8_t(0);
75495 }
75496 return rvalDecl;
75497}
75498
75499bool
75500TestJSImplInterfaceJSImpl::GetNonEnumerableAttr(ErrorResult& aRv, JS::Realm* aRealm)
75501{
75502 CallSetup s(this, aRv, "TestJSImplInterface.nonEnumerableAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75503 if (aRv.Failed()) {
75504 return bool(0);
75505 }
75506 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75506); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75506; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75507 BindingCallContext& cx = s.GetCallContext();
75508
75509 JS::Rooted<JS::Value> rval(cx);
75510
75511 JS::Rooted<JSObject *> callback(cx, mCallback);
75512 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75513 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75514 && !InitIds(cx, atomsCache)) ||
75515 !JS_GetPropertyById(cx, callback, atomsCache->nonEnumerableAttr_id, &rval)) {
75516 aRv.Throw(NS_ERROR_UNEXPECTED);
75517 return bool(0);
75518 }
75519 bool rvalDecl;
75520 if (!ValueToPrimitive<bool, eDefault>(cx, rval, "Return value of TestJSImplInterface.nonEnumerableAttr", &rvalDecl)) {
75521 aRv.Throw(NS_ERROR_UNEXPECTED);
75522 return bool(0);
75523 }
75524 return rvalDecl;
75525}
75526
75527void
75528TestJSImplInterfaceJSImpl::GetAllowSharedArrayBufferViewTypedef(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
75529{
75530 CallSetup s(this, aRv, "TestJSImplInterface.allowSharedArrayBufferViewTypedef", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75531 if (aRv.Failed()) {
75532 return;
75533 }
75534 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75534); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75534; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75535 BindingCallContext& cx = s.GetCallContext();
75536
75537 JS::Rooted<JS::Value> rval(cx);
75538
75539 JS::Rooted<JSObject *> callback(cx, mCallback);
75540 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75541 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75542 && !InitIds(cx, atomsCache)) ||
75543 !JS_GetPropertyById(cx, callback, atomsCache->allowSharedArrayBufferViewTypedef_id, &rval)) {
75544 aRv.Throw(NS_ERROR_UNEXPECTED);
75545 return;
75546 }
75547 RootedSpiderMonkeyInterface<ArrayBufferView> rvalDecl(cx);
75548 if (rval.isObject()) {
75549 if (!rvalDecl.Init(&rval.toObject())) {
75550 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.allowSharedArrayBufferViewTypedef", "ArrayBufferView");
75551 aRv.Throw(NS_ERROR_UNEXPECTED);
75552 return;
75553 }
75554 if (JS::IsLargeArrayBufferView(rvalDecl.Obj())) {
75555 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Return value of TestJSImplInterface.allowSharedArrayBufferViewTypedef");
75556 aRv.Throw(NS_ERROR_UNEXPECTED);
75557 return;
75558 }
75559 if (JS::IsResizableArrayBufferView(rvalDecl.Obj())) {
75560 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Return value of TestJSImplInterface.allowSharedArrayBufferViewTypedef");
75561 aRv.Throw(NS_ERROR_UNEXPECTED);
75562 return;
75563 }
75564 } else {
75565 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.allowSharedArrayBufferViewTypedef");
75566 aRv.Throw(NS_ERROR_UNEXPECTED);
75567 return;
75568 }
75569 aRetVal.set(rvalDecl.Obj());
75570}
75571
75572void
75573TestJSImplInterfaceJSImpl::GetAllowSharedArrayBufferView(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
75574{
75575 CallSetup s(this, aRv, "TestJSImplInterface.allowSharedArrayBufferView", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75576 if (aRv.Failed()) {
75577 return;
75578 }
75579 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75579); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75579; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75580 BindingCallContext& cx = s.GetCallContext();
75581
75582 JS::Rooted<JS::Value> rval(cx);
75583
75584 JS::Rooted<JSObject *> callback(cx, mCallback);
75585 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75586 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75587 && !InitIds(cx, atomsCache)) ||
75588 !JS_GetPropertyById(cx, callback, atomsCache->allowSharedArrayBufferView_id, &rval)) {
75589 aRv.Throw(NS_ERROR_UNEXPECTED);
75590 return;
75591 }
75592 RootedSpiderMonkeyInterface<ArrayBufferView> rvalDecl(cx);
75593 if (rval.isObject()) {
75594 if (!rvalDecl.Init(&rval.toObject())) {
75595 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.allowSharedArrayBufferView", "ArrayBufferView");
75596 aRv.Throw(NS_ERROR_UNEXPECTED);
75597 return;
75598 }
75599 if (JS::IsLargeArrayBufferView(rvalDecl.Obj())) {
75600 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Return value of TestJSImplInterface.allowSharedArrayBufferView");
75601 aRv.Throw(NS_ERROR_UNEXPECTED);
75602 return;
75603 }
75604 if (JS::IsResizableArrayBufferView(rvalDecl.Obj())) {
75605 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Return value of TestJSImplInterface.allowSharedArrayBufferView");
75606 aRv.Throw(NS_ERROR_UNEXPECTED);
75607 return;
75608 }
75609 } else {
75610 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.allowSharedArrayBufferView");
75611 aRv.Throw(NS_ERROR_UNEXPECTED);
75612 return;
75613 }
75614 aRetVal.set(rvalDecl.Obj());
75615}
75616
75617void
75618TestJSImplInterfaceJSImpl::GetAllowSharedNullableArrayBufferView(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
75619{
75620 CallSetup s(this, aRv, "TestJSImplInterface.allowSharedNullableArrayBufferView", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75621 if (aRv.Failed()) {
75622 return;
75623 }
75624 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75624); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75624; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75625 BindingCallContext& cx = s.GetCallContext();
75626
75627 JS::Rooted<JS::Value> rval(cx);
75628
75629 JS::Rooted<JSObject *> callback(cx, mCallback);
75630 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75631 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75632 && !InitIds(cx, atomsCache)) ||
75633 !JS_GetPropertyById(cx, callback, atomsCache->allowSharedNullableArrayBufferView_id, &rval)) {
75634 aRv.Throw(NS_ERROR_UNEXPECTED);
75635 return;
75636 }
75637 RootedSpiderMonkeyInterface<Nullable<ArrayBufferView>> rvalDecl(cx);
75638 if (rval.isObject()) {
75639 if (!rvalDecl.SetValue().Init(&rval.toObject())) {
75640 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.allowSharedNullableArrayBufferView", "ArrayBufferViewOrNull");
75641 aRv.Throw(NS_ERROR_UNEXPECTED);
75642 return;
75643 }
75644 if (JS::IsLargeArrayBufferView(rvalDecl.SetValue().Obj())) {
75645 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Return value of TestJSImplInterface.allowSharedNullableArrayBufferView");
75646 aRv.Throw(NS_ERROR_UNEXPECTED);
75647 return;
75648 }
75649 if (JS::IsResizableArrayBufferView(rvalDecl.SetValue().Obj())) {
75650 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Return value of TestJSImplInterface.allowSharedNullableArrayBufferView");
75651 aRv.Throw(NS_ERROR_UNEXPECTED);
75652 return;
75653 }
75654 } else if (rval.isNullOrUndefined()) {
75655 rvalDecl.SetNull();
75656 } else {
75657 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.allowSharedNullableArrayBufferView");
75658 aRv.Throw(NS_ERROR_UNEXPECTED);
75659 return;
75660 }
75661 aRetVal.set(rvalDecl.IsNull() ? nullptr : rvalDecl.Value().Obj());
75662}
75663
75664void
75665TestJSImplInterfaceJSImpl::GetAllowSharedArrayBuffer(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
75666{
75667 CallSetup s(this, aRv, "TestJSImplInterface.allowSharedArrayBuffer", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75668 if (aRv.Failed()) {
75669 return;
75670 }
75671 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75671); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75671; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75672 BindingCallContext& cx = s.GetCallContext();
75673
75674 JS::Rooted<JS::Value> rval(cx);
75675
75676 JS::Rooted<JSObject *> callback(cx, mCallback);
75677 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75678 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75679 && !InitIds(cx, atomsCache)) ||
75680 !JS_GetPropertyById(cx, callback, atomsCache->allowSharedArrayBuffer_id, &rval)) {
75681 aRv.Throw(NS_ERROR_UNEXPECTED);
75682 return;
75683 }
75684 RootedSpiderMonkeyInterface<ArrayBuffer> rvalDecl(cx);
75685 if (rval.isObject()) {
75686 if (!rvalDecl.Init(&rval.toObject())) {
75687 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.allowSharedArrayBuffer", "ArrayBuffer");
75688 aRv.Throw(NS_ERROR_UNEXPECTED);
75689 return;
75690 }
75691 if (JS::IsLargeArrayBufferMaybeShared(rvalDecl.Obj())) {
75692 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Return value of TestJSImplInterface.allowSharedArrayBuffer");
75693 aRv.Throw(NS_ERROR_UNEXPECTED);
75694 return;
75695 }
75696 if (JS::IsResizableArrayBufferMaybeShared(rvalDecl.Obj())) {
75697 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Return value of TestJSImplInterface.allowSharedArrayBuffer");
75698 aRv.Throw(NS_ERROR_UNEXPECTED);
75699 return;
75700 }
75701 } else {
75702 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.allowSharedArrayBuffer");
75703 aRv.Throw(NS_ERROR_UNEXPECTED);
75704 return;
75705 }
75706 aRetVal.set(rvalDecl.Obj());
75707}
75708
75709void
75710TestJSImplInterfaceJSImpl::GetAllowSharedNullableArrayBuffer(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
75711{
75712 CallSetup s(this, aRv, "TestJSImplInterface.allowSharedNullableArrayBuffer", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75713 if (aRv.Failed()) {
75714 return;
75715 }
75716 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75716); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75716; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75717 BindingCallContext& cx = s.GetCallContext();
75718
75719 JS::Rooted<JS::Value> rval(cx);
75720
75721 JS::Rooted<JSObject *> callback(cx, mCallback);
75722 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75723 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid()
75724 && !InitIds(cx, atomsCache)) ||
75725 !JS_GetPropertyById(cx, callback, atomsCache->allowSharedNullableArrayBuffer_id, &rval)) {
75726 aRv.Throw(NS_ERROR_UNEXPECTED);
75727 return;
75728 }
75729 RootedSpiderMonkeyInterface<Nullable<ArrayBuffer>> rvalDecl(cx);
75730 if (rval.isObject()) {
75731 if (!rvalDecl.SetValue().Init(&rval.toObject())) {
75732 cx.ThrowErrorMessage<MSG_DOES_NOT_IMPLEMENT_INTERFACE>("Return value of TestJSImplInterface.allowSharedNullableArrayBuffer", "ArrayBufferOrNull");
75733 aRv.Throw(NS_ERROR_UNEXPECTED);
75734 return;
75735 }
75736 if (JS::IsLargeArrayBufferMaybeShared(rvalDecl.SetValue().Obj())) {
75737 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_LARGE>("Return value of TestJSImplInterface.allowSharedNullableArrayBuffer");
75738 aRv.Throw(NS_ERROR_UNEXPECTED);
75739 return;
75740 }
75741 if (JS::IsResizableArrayBufferMaybeShared(rvalDecl.SetValue().Obj())) {
75742 cx.ThrowErrorMessage<MSG_TYPEDARRAY_IS_RESIZABLE>("Return value of TestJSImplInterface.allowSharedNullableArrayBuffer");
75743 aRv.Throw(NS_ERROR_UNEXPECTED);
75744 return;
75745 }
75746 } else if (rval.isNullOrUndefined()) {
75747 rvalDecl.SetNull();
75748 } else {
75749 cx.ThrowErrorMessage<MSG_NOT_OBJECT>("Return value of TestJSImplInterface.allowSharedNullableArrayBuffer");
75750 aRv.Throw(NS_ERROR_UNEXPECTED);
75751 return;
75752 }
75753 aRetVal.set(rvalDecl.IsNull() ? nullptr : rvalDecl.Value().Obj());
75754}
75755
75756void
75757TestJSImplInterfaceJSImpl::SetWritableByte(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
75758{
75759 CallSetup s(this, aRv, "TestJSImplInterface.writableByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75760 if (aRv.Failed()) {
75761 return;
75762 }
75763 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75763); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75763; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75764 BindingCallContext& cx = s.GetCallContext();
75765
75766 JS::RootedVector<JS::Value> argv(cx);
75767 if (!argv.resize(1)) {
75768 // That threw an exception on the JSContext, and our CallSetup will do
75769 // the right thing with that.
75770 return;
75771 }
75772 do {
75773 argv[0].setInt32(int32_t(arg));
75774 break;
75775 } while (false);
75776
75777 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 75777); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 75777; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75778 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
75779 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75780 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
75781 !InitIds(cx, atomsCache)) ||
75782 !JS_SetPropertyById(cx, callback, atomsCache->writableByte_id, argv[0])) {
75783 aRv.Throw(NS_ERROR_UNEXPECTED);
75784 return;
75785 }
75786}
75787
75788void
75789TestJSImplInterfaceJSImpl::SetSideEffectFreeByte(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
75790{
75791 CallSetup s(this, aRv, "TestJSImplInterface.sideEffectFreeByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75792 if (aRv.Failed()) {
75793 return;
75794 }
75795 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75795); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75795; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75796 BindingCallContext& cx = s.GetCallContext();
75797
75798 JS::RootedVector<JS::Value> argv(cx);
75799 if (!argv.resize(1)) {
75800 // That threw an exception on the JSContext, and our CallSetup will do
75801 // the right thing with that.
75802 return;
75803 }
75804 do {
75805 argv[0].setInt32(int32_t(arg));
75806 break;
75807 } while (false);
75808
75809 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 75809); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 75809; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75810 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
75811 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75812 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
75813 !InitIds(cx, atomsCache)) ||
75814 !JS_SetPropertyById(cx, callback, atomsCache->sideEffectFreeByte_id, argv[0])) {
75815 aRv.Throw(NS_ERROR_UNEXPECTED);
75816 return;
75817 }
75818}
75819
75820void
75821TestJSImplInterfaceJSImpl::SetDomDependentByte(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
75822{
75823 CallSetup s(this, aRv, "TestJSImplInterface.domDependentByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75824 if (aRv.Failed()) {
75825 return;
75826 }
75827 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75827); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75827; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75828 BindingCallContext& cx = s.GetCallContext();
75829
75830 JS::RootedVector<JS::Value> argv(cx);
75831 if (!argv.resize(1)) {
75832 // That threw an exception on the JSContext, and our CallSetup will do
75833 // the right thing with that.
75834 return;
75835 }
75836 do {
75837 argv[0].setInt32(int32_t(arg));
75838 break;
75839 } while (false);
75840
75841 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 75841); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 75841; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75842 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
75843 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75844 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
75845 !InitIds(cx, atomsCache)) ||
75846 !JS_SetPropertyById(cx, callback, atomsCache->domDependentByte_id, argv[0])) {
75847 aRv.Throw(NS_ERROR_UNEXPECTED);
75848 return;
75849 }
75850}
75851
75852void
75853TestJSImplInterfaceJSImpl::SetWritableShort(int16_t arg, ErrorResult& aRv, JS::Realm* aRealm)
75854{
75855 CallSetup s(this, aRv, "TestJSImplInterface.writableShort", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75856 if (aRv.Failed()) {
75857 return;
75858 }
75859 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75859); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75859; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75860 BindingCallContext& cx = s.GetCallContext();
75861
75862 JS::RootedVector<JS::Value> argv(cx);
75863 if (!argv.resize(1)) {
75864 // That threw an exception on the JSContext, and our CallSetup will do
75865 // the right thing with that.
75866 return;
75867 }
75868 do {
75869 argv[0].setInt32(int32_t(arg));
75870 break;
75871 } while (false);
75872
75873 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 75873); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 75873; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75874 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
75875 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75876 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
75877 !InitIds(cx, atomsCache)) ||
75878 !JS_SetPropertyById(cx, callback, atomsCache->writableShort_id, argv[0])) {
75879 aRv.Throw(NS_ERROR_UNEXPECTED);
75880 return;
75881 }
75882}
75883
75884void
75885TestJSImplInterfaceJSImpl::SetWritableLong(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
75886{
75887 CallSetup s(this, aRv, "TestJSImplInterface.writableLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75888 if (aRv.Failed()) {
75889 return;
75890 }
75891 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75891); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75891; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75892 BindingCallContext& cx = s.GetCallContext();
75893
75894 JS::RootedVector<JS::Value> argv(cx);
75895 if (!argv.resize(1)) {
75896 // That threw an exception on the JSContext, and our CallSetup will do
75897 // the right thing with that.
75898 return;
75899 }
75900 do {
75901 argv[0].setInt32(int32_t(arg));
75902 break;
75903 } while (false);
75904
75905 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 75905); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 75905; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75906 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
75907 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75908 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
75909 !InitIds(cx, atomsCache)) ||
75910 !JS_SetPropertyById(cx, callback, atomsCache->writableLong_id, argv[0])) {
75911 aRv.Throw(NS_ERROR_UNEXPECTED);
75912 return;
75913 }
75914}
75915
75916void
75917TestJSImplInterfaceJSImpl::SetWritableLongLong(int64_t arg, ErrorResult& aRv, JS::Realm* aRealm)
75918{
75919 CallSetup s(this, aRv, "TestJSImplInterface.writableLongLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75920 if (aRv.Failed()) {
75921 return;
75922 }
75923 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75923); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75923; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75924 BindingCallContext& cx = s.GetCallContext();
75925
75926 JS::RootedVector<JS::Value> argv(cx);
75927 if (!argv.resize(1)) {
75928 // That threw an exception on the JSContext, and our CallSetup will do
75929 // the right thing with that.
75930 return;
75931 }
75932 do {
75933 argv[0].set(JS_NumberValue(double(arg)));
75934 break;
75935 } while (false);
75936
75937 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 75937); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 75937; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75938 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
75939 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75940 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
75941 !InitIds(cx, atomsCache)) ||
75942 !JS_SetPropertyById(cx, callback, atomsCache->writableLongLong_id, argv[0])) {
75943 aRv.Throw(NS_ERROR_UNEXPECTED);
75944 return;
75945 }
75946}
75947
75948void
75949TestJSImplInterfaceJSImpl::SetWritableOctet(uint8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
75950{
75951 CallSetup s(this, aRv, "TestJSImplInterface.writableOctet", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75952 if (aRv.Failed()) {
75953 return;
75954 }
75955 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75955); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75955; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75956 BindingCallContext& cx = s.GetCallContext();
75957
75958 JS::RootedVector<JS::Value> argv(cx);
75959 if (!argv.resize(1)) {
75960 // That threw an exception on the JSContext, and our CallSetup will do
75961 // the right thing with that.
75962 return;
75963 }
75964 do {
75965 argv[0].setInt32(int32_t(arg));
75966 break;
75967 } while (false);
75968
75969 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 75969); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 75969; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75970 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
75971 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
75972 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
75973 !InitIds(cx, atomsCache)) ||
75974 !JS_SetPropertyById(cx, callback, atomsCache->writableOctet_id, argv[0])) {
75975 aRv.Throw(NS_ERROR_UNEXPECTED);
75976 return;
75977 }
75978}
75979
75980void
75981TestJSImplInterfaceJSImpl::SetWritableUnsignedShort(uint16_t arg, ErrorResult& aRv, JS::Realm* aRealm)
75982{
75983 CallSetup s(this, aRv, "TestJSImplInterface.writableUnsignedShort", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
75984 if (aRv.Failed()) {
75985 return;
75986 }
75987 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 75987); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 75987; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
75988 BindingCallContext& cx = s.GetCallContext();
75989
75990 JS::RootedVector<JS::Value> argv(cx);
75991 if (!argv.resize(1)) {
75992 // That threw an exception on the JSContext, and our CallSetup will do
75993 // the right thing with that.
75994 return;
75995 }
75996 do {
75997 argv[0].setInt32(int32_t(arg));
75998 break;
75999 } while (false);
76000
76001 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76001); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76001; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76002 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76003 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76004 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76005 !InitIds(cx, atomsCache)) ||
76006 !JS_SetPropertyById(cx, callback, atomsCache->writableUnsignedShort_id, argv[0])) {
76007 aRv.Throw(NS_ERROR_UNEXPECTED);
76008 return;
76009 }
76010}
76011
76012void
76013TestJSImplInterfaceJSImpl::SetWritableUnsignedLong(uint32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
76014{
76015 CallSetup s(this, aRv, "TestJSImplInterface.writableUnsignedLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76016 if (aRv.Failed()) {
76017 return;
76018 }
76019 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76019); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76019; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76020 BindingCallContext& cx = s.GetCallContext();
76021
76022 JS::RootedVector<JS::Value> argv(cx);
76023 if (!argv.resize(1)) {
76024 // That threw an exception on the JSContext, and our CallSetup will do
76025 // the right thing with that.
76026 return;
76027 }
76028 do {
76029 argv[0].setNumber(arg);
76030 break;
76031 } while (false);
76032
76033 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76033); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76033; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76034 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76035 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76036 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76037 !InitIds(cx, atomsCache)) ||
76038 !JS_SetPropertyById(cx, callback, atomsCache->writableUnsignedLong_id, argv[0])) {
76039 aRv.Throw(NS_ERROR_UNEXPECTED);
76040 return;
76041 }
76042}
76043
76044void
76045TestJSImplInterfaceJSImpl::SetWritableUnsignedLongLong(uint64_t arg, ErrorResult& aRv, JS::Realm* aRealm)
76046{
76047 CallSetup s(this, aRv, "TestJSImplInterface.writableUnsignedLongLong", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76048 if (aRv.Failed()) {
76049 return;
76050 }
76051 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76051); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76051; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76052 BindingCallContext& cx = s.GetCallContext();
76053
76054 JS::RootedVector<JS::Value> argv(cx);
76055 if (!argv.resize(1)) {
76056 // That threw an exception on the JSContext, and our CallSetup will do
76057 // the right thing with that.
76058 return;
76059 }
76060 do {
76061 argv[0].set(JS_NumberValue(double(arg)));
76062 break;
76063 } while (false);
76064
76065 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76065); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76065; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76066 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76067 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76068 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76069 !InitIds(cx, atomsCache)) ||
76070 !JS_SetPropertyById(cx, callback, atomsCache->writableUnsignedLongLong_id, argv[0])) {
76071 aRv.Throw(NS_ERROR_UNEXPECTED);
76072 return;
76073 }
76074}
76075
76076void
76077TestJSImplInterfaceJSImpl::SetWritableFloat(float arg, ErrorResult& aRv, JS::Realm* aRealm)
76078{
76079 CallSetup s(this, aRv, "TestJSImplInterface.writableFloat", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76080 if (aRv.Failed()) {
76081 return;
76082 }
76083 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76083); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76083; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76084 BindingCallContext& cx = s.GetCallContext();
76085
76086 JS::RootedVector<JS::Value> argv(cx);
76087 if (!argv.resize(1)) {
76088 // That threw an exception on the JSContext, and our CallSetup will do
76089 // the right thing with that.
76090 return;
76091 }
76092 do {
76093 argv[0].set(JS_NumberValue(double(arg)));
76094 break;
76095 } while (false);
76096
76097 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76097); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76097; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76098 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76099 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76100 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76101 !InitIds(cx, atomsCache)) ||
76102 !JS_SetPropertyById(cx, callback, atomsCache->writableFloat_id, argv[0])) {
76103 aRv.Throw(NS_ERROR_UNEXPECTED);
76104 return;
76105 }
76106}
76107
76108void
76109TestJSImplInterfaceJSImpl::SetWritableUnrestrictedFloat(float arg, ErrorResult& aRv, JS::Realm* aRealm)
76110{
76111 CallSetup s(this, aRv, "TestJSImplInterface.writableUnrestrictedFloat", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76112 if (aRv.Failed()) {
76113 return;
76114 }
76115 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76115); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76115; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76116 BindingCallContext& cx = s.GetCallContext();
76117
76118 JS::RootedVector<JS::Value> argv(cx);
76119 if (!argv.resize(1)) {
76120 // That threw an exception on the JSContext, and our CallSetup will do
76121 // the right thing with that.
76122 return;
76123 }
76124 do {
76125 argv[0].set(JS_NumberValue(double(arg)));
76126 break;
76127 } while (false);
76128
76129 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76129); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76129; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76130 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76131 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76132 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76133 !InitIds(cx, atomsCache)) ||
76134 !JS_SetPropertyById(cx, callback, atomsCache->writableUnrestrictedFloat_id, argv[0])) {
76135 aRv.Throw(NS_ERROR_UNEXPECTED);
76136 return;
76137 }
76138}
76139
76140void
76141TestJSImplInterfaceJSImpl::SetWritableNullableFloat(const Nullable<float>& arg, ErrorResult& aRv, JS::Realm* aRealm)
76142{
76143 CallSetup s(this, aRv, "TestJSImplInterface.writableNullableFloat", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76144 if (aRv.Failed()) {
76145 return;
76146 }
76147 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76147); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76147; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76148 BindingCallContext& cx = s.GetCallContext();
76149
76150 JS::RootedVector<JS::Value> argv(cx);
76151 if (!argv.resize(1)) {
76152 // That threw an exception on the JSContext, and our CallSetup will do
76153 // the right thing with that.
76154 return;
76155 }
76156 do {
76157 if (arg.IsNull()) {
76158 argv[0].setNull();
76159 break;
76160 }
76161 argv[0].set(JS_NumberValue(double(arg.Value())));
76162 break;
76163 } while (false);
76164
76165 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76165); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76165; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76166 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76167 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76168 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76169 !InitIds(cx, atomsCache)) ||
76170 !JS_SetPropertyById(cx, callback, atomsCache->writableNullableFloat_id, argv[0])) {
76171 aRv.Throw(NS_ERROR_UNEXPECTED);
76172 return;
76173 }
76174}
76175
76176void
76177TestJSImplInterfaceJSImpl::SetWritableNullableUnrestrictedFloat(const Nullable<float>& arg, ErrorResult& aRv, JS::Realm* aRealm)
76178{
76179 CallSetup s(this, aRv, "TestJSImplInterface.writableNullableUnrestrictedFloat", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76180 if (aRv.Failed()) {
76181 return;
76182 }
76183 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76183); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76183; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76184 BindingCallContext& cx = s.GetCallContext();
76185
76186 JS::RootedVector<JS::Value> argv(cx);
76187 if (!argv.resize(1)) {
76188 // That threw an exception on the JSContext, and our CallSetup will do
76189 // the right thing with that.
76190 return;
76191 }
76192 do {
76193 if (arg.IsNull()) {
76194 argv[0].setNull();
76195 break;
76196 }
76197 argv[0].set(JS_NumberValue(double(arg.Value())));
76198 break;
76199 } while (false);
76200
76201 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76201); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76201; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76202 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76203 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76204 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76205 !InitIds(cx, atomsCache)) ||
76206 !JS_SetPropertyById(cx, callback, atomsCache->writableNullableUnrestrictedFloat_id, argv[0])) {
76207 aRv.Throw(NS_ERROR_UNEXPECTED);
76208 return;
76209 }
76210}
76211
76212void
76213TestJSImplInterfaceJSImpl::SetWritableDouble(double arg, ErrorResult& aRv, JS::Realm* aRealm)
76214{
76215 CallSetup s(this, aRv, "TestJSImplInterface.writableDouble", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76216 if (aRv.Failed()) {
76217 return;
76218 }
76219 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76219); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76219; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76220 BindingCallContext& cx = s.GetCallContext();
76221
76222 JS::RootedVector<JS::Value> argv(cx);
76223 if (!argv.resize(1)) {
76224 // That threw an exception on the JSContext, and our CallSetup will do
76225 // the right thing with that.
76226 return;
76227 }
76228 do {
76229 argv[0].set(JS_NumberValue(double(arg)));
76230 break;
76231 } while (false);
76232
76233 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76233); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76233; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76234 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76235 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76236 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76237 !InitIds(cx, atomsCache)) ||
76238 !JS_SetPropertyById(cx, callback, atomsCache->writableDouble_id, argv[0])) {
76239 aRv.Throw(NS_ERROR_UNEXPECTED);
76240 return;
76241 }
76242}
76243
76244void
76245TestJSImplInterfaceJSImpl::SetWritableUnrestrictedDouble(double arg, ErrorResult& aRv, JS::Realm* aRealm)
76246{
76247 CallSetup s(this, aRv, "TestJSImplInterface.writableUnrestrictedDouble", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76248 if (aRv.Failed()) {
76249 return;
76250 }
76251 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76251); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76251; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76252 BindingCallContext& cx = s.GetCallContext();
76253
76254 JS::RootedVector<JS::Value> argv(cx);
76255 if (!argv.resize(1)) {
76256 // That threw an exception on the JSContext, and our CallSetup will do
76257 // the right thing with that.
76258 return;
76259 }
76260 do {
76261 argv[0].set(JS_NumberValue(double(arg)));
76262 break;
76263 } while (false);
76264
76265 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76265); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76265; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76266 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76267 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76268 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76269 !InitIds(cx, atomsCache)) ||
76270 !JS_SetPropertyById(cx, callback, atomsCache->writableUnrestrictedDouble_id, argv[0])) {
76271 aRv.Throw(NS_ERROR_UNEXPECTED);
76272 return;
76273 }
76274}
76275
76276void
76277TestJSImplInterfaceJSImpl::SetWritableNullableDouble(const Nullable<double>& arg, ErrorResult& aRv, JS::Realm* aRealm)
76278{
76279 CallSetup s(this, aRv, "TestJSImplInterface.writableNullableDouble", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76280 if (aRv.Failed()) {
76281 return;
76282 }
76283 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76283); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76283; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76284 BindingCallContext& cx = s.GetCallContext();
76285
76286 JS::RootedVector<JS::Value> argv(cx);
76287 if (!argv.resize(1)) {
76288 // That threw an exception on the JSContext, and our CallSetup will do
76289 // the right thing with that.
76290 return;
76291 }
76292 do {
76293 if (arg.IsNull()) {
76294 argv[0].setNull();
76295 break;
76296 }
76297 argv[0].set(JS_NumberValue(double(arg.Value())));
76298 break;
76299 } while (false);
76300
76301 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76301); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76301; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76302 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76303 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76304 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76305 !InitIds(cx, atomsCache)) ||
76306 !JS_SetPropertyById(cx, callback, atomsCache->writableNullableDouble_id, argv[0])) {
76307 aRv.Throw(NS_ERROR_UNEXPECTED);
76308 return;
76309 }
76310}
76311
76312void
76313TestJSImplInterfaceJSImpl::SetWritableNullableUnrestrictedDouble(const Nullable<double>& arg, ErrorResult& aRv, JS::Realm* aRealm)
76314{
76315 CallSetup s(this, aRv, "TestJSImplInterface.writableNullableUnrestrictedDouble", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76316 if (aRv.Failed()) {
76317 return;
76318 }
76319 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76319); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76319; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76320 BindingCallContext& cx = s.GetCallContext();
76321
76322 JS::RootedVector<JS::Value> argv(cx);
76323 if (!argv.resize(1)) {
76324 // That threw an exception on the JSContext, and our CallSetup will do
76325 // the right thing with that.
76326 return;
76327 }
76328 do {
76329 if (arg.IsNull()) {
76330 argv[0].setNull();
76331 break;
76332 }
76333 argv[0].set(JS_NumberValue(double(arg.Value())));
76334 break;
76335 } while (false);
76336
76337 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76337); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76337; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76338 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76339 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76340 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76341 !InitIds(cx, atomsCache)) ||
76342 !JS_SetPropertyById(cx, callback, atomsCache->writableNullableUnrestrictedDouble_id, argv[0])) {
76343 aRv.Throw(NS_ERROR_UNEXPECTED);
76344 return;
76345 }
76346}
76347
76348void
76349TestJSImplInterfaceJSImpl::SetLenientFloatAttr(float arg, ErrorResult& aRv, JS::Realm* aRealm)
76350{
76351 CallSetup s(this, aRv, "TestJSImplInterface.lenientFloatAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76352 if (aRv.Failed()) {
76353 return;
76354 }
76355 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76355); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76355; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76356 BindingCallContext& cx = s.GetCallContext();
76357
76358 JS::RootedVector<JS::Value> argv(cx);
76359 if (!argv.resize(1)) {
76360 // That threw an exception on the JSContext, and our CallSetup will do
76361 // the right thing with that.
76362 return;
76363 }
76364 do {
76365 argv[0].set(JS_NumberValue(double(arg)));
76366 break;
76367 } while (false);
76368
76369 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76369); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76369; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76370 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76371 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76372 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76373 !InitIds(cx, atomsCache)) ||
76374 !JS_SetPropertyById(cx, callback, atomsCache->lenientFloatAttr_id, argv[0])) {
76375 aRv.Throw(NS_ERROR_UNEXPECTED);
76376 return;
76377 }
76378}
76379
76380void
76381TestJSImplInterfaceJSImpl::SetLenientDoubleAttr(double arg, ErrorResult& aRv, JS::Realm* aRealm)
76382{
76383 CallSetup s(this, aRv, "TestJSImplInterface.lenientDoubleAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76384 if (aRv.Failed()) {
76385 return;
76386 }
76387 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76387); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76387; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76388 BindingCallContext& cx = s.GetCallContext();
76389
76390 JS::RootedVector<JS::Value> argv(cx);
76391 if (!argv.resize(1)) {
76392 // That threw an exception on the JSContext, and our CallSetup will do
76393 // the right thing with that.
76394 return;
76395 }
76396 do {
76397 argv[0].set(JS_NumberValue(double(arg)));
76398 break;
76399 } while (false);
76400
76401 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76401); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76401; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76402 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76403 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76404 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76405 !InitIds(cx, atomsCache)) ||
76406 !JS_SetPropertyById(cx, callback, atomsCache->lenientDoubleAttr_id, argv[0])) {
76407 aRv.Throw(NS_ERROR_UNEXPECTED);
76408 return;
76409 }
76410}
76411
76412void
76413TestJSImplInterfaceJSImpl::SetNonNullSelf(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
76414{
76415 CallSetup s(this, aRv, "TestJSImplInterface.nonNullSelf", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76416 if (aRv.Failed()) {
76417 return;
76418 }
76419 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76419); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76419; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76420 BindingCallContext& cx = s.GetCallContext();
76421
76422 JS::RootedVector<JS::Value> argv(cx);
76423 if (!argv.resize(1)) {
76424 // That threw an exception on the JSContext, and our CallSetup will do
76425 // the right thing with that.
76426 return;
76427 }
76428 do {
76429 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
76430 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 76430); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 76430; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76431 aRv.Throw(NS_ERROR_UNEXPECTED);
76432 return;
76433 }
76434 break;
76435 } while (false);
76436
76437 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76437); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76437; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76438 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76439 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76440 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76441 !InitIds(cx, atomsCache)) ||
76442 !JS_SetPropertyById(cx, callback, atomsCache->nonNullSelf_id, argv[0])) {
76443 aRv.Throw(NS_ERROR_UNEXPECTED);
76444 return;
76445 }
76446}
76447
76448void
76449TestJSImplInterfaceJSImpl::SetNullableSelf(TestJSImplInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
76450{
76451 CallSetup s(this, aRv, "TestJSImplInterface.nullableSelf", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76452 if (aRv.Failed()) {
76453 return;
76454 }
76455 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76455); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76455; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76456 BindingCallContext& cx = s.GetCallContext();
76457
76458 JS::RootedVector<JS::Value> argv(cx);
76459 if (!argv.resize(1)) {
76460 // That threw an exception on the JSContext, and our CallSetup will do
76461 // the right thing with that.
76462 return;
76463 }
76464 do {
76465 if (!arg) {
76466 argv[0].setNull();
76467 break;
76468 }
76469 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
76470 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 76470); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 76470; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76471 aRv.Throw(NS_ERROR_UNEXPECTED);
76472 return;
76473 }
76474 break;
76475 } while (false);
76476
76477 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76477); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76477; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76478 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76479 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76480 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76481 !InitIds(cx, atomsCache)) ||
76482 !JS_SetPropertyById(cx, callback, atomsCache->nullableSelf_id, argv[0])) {
76483 aRv.Throw(NS_ERROR_UNEXPECTED);
76484 return;
76485 }
76486}
76487
76488void
76489TestJSImplInterfaceJSImpl::SetNonNullExternal(TestExternalInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
76490{
76491 CallSetup s(this, aRv, "TestJSImplInterface.nonNullExternal", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76492 if (aRv.Failed()) {
76493 return;
76494 }
76495 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76495); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76495; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76496 BindingCallContext& cx = s.GetCallContext();
76497
76498 JS::RootedVector<JS::Value> argv(cx);
76499 if (!argv.resize(1)) {
76500 // That threw an exception on the JSContext, and our CallSetup will do
76501 // the right thing with that.
76502 return;
76503 }
76504 do {
76505 if (!WrapObject(cx, arg, argv[0])) {
76506 aRv.Throw(NS_ERROR_UNEXPECTED);
76507 return;
76508 }
76509 break;
76510 } while (false);
76511
76512 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76512); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76512; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76513 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76514 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76515 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76516 !InitIds(cx, atomsCache)) ||
76517 !JS_SetPropertyById(cx, callback, atomsCache->nonNullExternal_id, argv[0])) {
76518 aRv.Throw(NS_ERROR_UNEXPECTED);
76519 return;
76520 }
76521}
76522
76523void
76524TestJSImplInterfaceJSImpl::SetNullableExternal(TestExternalInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
76525{
76526 CallSetup s(this, aRv, "TestJSImplInterface.nullableExternal", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76527 if (aRv.Failed()) {
76528 return;
76529 }
76530 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76530); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76530; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76531 BindingCallContext& cx = s.GetCallContext();
76532
76533 JS::RootedVector<JS::Value> argv(cx);
76534 if (!argv.resize(1)) {
76535 // That threw an exception on the JSContext, and our CallSetup will do
76536 // the right thing with that.
76537 return;
76538 }
76539 do {
76540 if (!arg) {
76541 argv[0].setNull();
76542 break;
76543 }
76544 if (!WrapObject(cx, arg, argv[0])) {
76545 aRv.Throw(NS_ERROR_UNEXPECTED);
76546 return;
76547 }
76548 break;
76549 } while (false);
76550
76551 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76551); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76551; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76552 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76553 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76554 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76555 !InitIds(cx, atomsCache)) ||
76556 !JS_SetPropertyById(cx, callback, atomsCache->nullableExternal_id, argv[0])) {
76557 aRv.Throw(NS_ERROR_UNEXPECTED);
76558 return;
76559 }
76560}
76561
76562void
76563TestJSImplInterfaceJSImpl::SetNonNullCallbackInterface(TestCallbackInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
76564{
76565 CallSetup s(this, aRv, "TestJSImplInterface.nonNullCallbackInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76566 if (aRv.Failed()) {
76567 return;
76568 }
76569 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76569); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76569; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76570 BindingCallContext& cx = s.GetCallContext();
76571
76572 JS::RootedVector<JS::Value> argv(cx);
76573 if (!argv.resize(1)) {
76574 // That threw an exception on the JSContext, and our CallSetup will do
76575 // the right thing with that.
76576 return;
76577 }
76578 do {
76579 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg));
76580 if (!MaybeWrapObjectValue(cx, argv[0])) {
76581 aRv.Throw(NS_ERROR_UNEXPECTED);
76582 return;
76583 }
76584 break;
76585 } while (false);
76586
76587 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76587); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76587; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76588 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76589 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76590 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76591 !InitIds(cx, atomsCache)) ||
76592 !JS_SetPropertyById(cx, callback, atomsCache->nonNullCallbackInterface_id, argv[0])) {
76593 aRv.Throw(NS_ERROR_UNEXPECTED);
76594 return;
76595 }
76596}
76597
76598void
76599TestJSImplInterfaceJSImpl::SetNullableCallbackInterface(TestCallbackInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
76600{
76601 CallSetup s(this, aRv, "TestJSImplInterface.nullableCallbackInterface", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76602 if (aRv.Failed()) {
76603 return;
76604 }
76605 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76605); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76605; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76606 BindingCallContext& cx = s.GetCallContext();
76607
76608 JS::RootedVector<JS::Value> argv(cx);
76609 if (!argv.resize(1)) {
76610 // That threw an exception on the JSContext, and our CallSetup will do
76611 // the right thing with that.
76612 return;
76613 }
76614 do {
76615 if (arg) {
76616 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg));
76617 if (!MaybeWrapObjectOrNullValue(cx, argv[0])) {
76618 aRv.Throw(NS_ERROR_UNEXPECTED);
76619 return;
76620 }
76621 break;
76622 } else {
76623 argv[0].setNull();
76624 break;
76625 }
76626 } while (false);
76627
76628 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76628); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76628; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76629 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76630 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76631 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76632 !InitIds(cx, atomsCache)) ||
76633 !JS_SetPropertyById(cx, callback, atomsCache->nullableCallbackInterface_id, argv[0])) {
76634 aRv.Throw(NS_ERROR_UNEXPECTED);
76635 return;
76636 }
76637}
76638
76639void
76640TestJSImplInterfaceJSImpl::SetUint8ArrayAttr(const Uint8Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
76641{
76642 CallSetup s(this, aRv, "TestJSImplInterface.uint8ArrayAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76643 if (aRv.Failed()) {
76644 return;
76645 }
76646 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76646); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76646; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76647 BindingCallContext& cx = s.GetCallContext();
76648
76649 JS::RootedVector<JS::Value> argv(cx);
76650 if (!argv.resize(1)) {
76651 // That threw an exception on the JSContext, and our CallSetup will do
76652 // the right thing with that.
76653 return;
76654 }
76655 do {
76656 argv[0].setObject(*arg.Obj());
76657 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
76658 aRv.Throw(NS_ERROR_UNEXPECTED);
76659 return;
76660 }
76661 break;
76662 } while (false);
76663
76664 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76664); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76664; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76665 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76666 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76667 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76668 !InitIds(cx, atomsCache)) ||
76669 !JS_SetPropertyById(cx, callback, atomsCache->uint8ArrayAttr_id, argv[0])) {
76670 aRv.Throw(NS_ERROR_UNEXPECTED);
76671 return;
76672 }
76673}
76674
76675void
76676TestJSImplInterfaceJSImpl::SetJsStringAttr(JS::Handle<JSString*> arg, ErrorResult& aRv, JS::Realm* aRealm)
76677{
76678 CallSetup s(this, aRv, "TestJSImplInterface.jsStringAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76679 if (aRv.Failed()) {
76680 return;
76681 }
76682 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76682); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76682; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76683 BindingCallContext& cx = s.GetCallContext();
76684
76685 JS::RootedVector<JS::Value> argv(cx);
76686 if (!argv.resize(1)) {
76687 // That threw an exception on the JSContext, and our CallSetup will do
76688 // the right thing with that.
76689 return;
76690 }
76691 do {
76692 argv[0].setString(arg);
76693 if (!MaybeWrapStringValue(cx, argv[0])) {
76694 aRv.Throw(NS_ERROR_UNEXPECTED);
76695 return;
76696 }
76697 break;
76698 } while (false);
76699
76700 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76700); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76700; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76701 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76702 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76703 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76704 !InitIds(cx, atomsCache)) ||
76705 !JS_SetPropertyById(cx, callback, atomsCache->jsStringAttr_id, argv[0])) {
76706 aRv.Throw(NS_ERROR_UNEXPECTED);
76707 return;
76708 }
76709}
76710
76711void
76712TestJSImplInterfaceJSImpl::SetEnumAttribute(MyTestEnum arg, ErrorResult& aRv, JS::Realm* aRealm)
76713{
76714 CallSetup s(this, aRv, "TestJSImplInterface.enumAttribute", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76715 if (aRv.Failed()) {
76716 return;
76717 }
76718 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76718); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76718; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76719 BindingCallContext& cx = s.GetCallContext();
76720
76721 JS::RootedVector<JS::Value> argv(cx);
76722 if (!argv.resize(1)) {
76723 // That threw an exception on the JSContext, and our CallSetup will do
76724 // the right thing with that.
76725 return;
76726 }
76727 do {
76728 if (!ToJSValue(cx, arg, argv[0])) {
76729 aRv.Throw(NS_ERROR_UNEXPECTED);
76730 return;
76731 }
76732 break;
76733 } while (false);
76734
76735 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76735); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76735; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76736 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76737 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76738 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76739 !InitIds(cx, atomsCache)) ||
76740 !JS_SetPropertyById(cx, callback, atomsCache->enumAttribute_id, argv[0])) {
76741 aRv.Throw(NS_ERROR_UNEXPECTED);
76742 return;
76743 }
76744}
76745
76746void
76747TestJSImplInterfaceJSImpl::SetWritableUnion(const CanvasPatternOrCanvasGradient& arg, ErrorResult& aRv, JS::Realm* aRealm)
76748{
76749 CallSetup s(this, aRv, "TestJSImplInterface.writableUnion", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76750 if (aRv.Failed()) {
76751 return;
76752 }
76753 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76753); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76753; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76754 BindingCallContext& cx = s.GetCallContext();
76755
76756 JS::RootedVector<JS::Value> argv(cx);
76757 if (!argv.resize(1)) {
76758 // That threw an exception on the JSContext, and our CallSetup will do
76759 // the right thing with that.
76760 return;
76761 }
76762 do {
76763 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
76764 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
76765 aRv.Throw(NS_ERROR_UNEXPECTED);
76766 return;
76767 }
76768 break;
76769 } while (false);
76770
76771 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76771); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76771; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76772 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76773 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76774 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76775 !InitIds(cx, atomsCache)) ||
76776 !JS_SetPropertyById(cx, callback, atomsCache->writableUnion_id, argv[0])) {
76777 aRv.Throw(NS_ERROR_UNEXPECTED);
76778 return;
76779 }
76780}
76781
76782void
76783TestJSImplInterfaceJSImpl::SetWritableUnionContainingNull(const CanvasPatternOrNullOrCanvasGradient& arg, ErrorResult& aRv, JS::Realm* aRealm)
76784{
76785 CallSetup s(this, aRv, "TestJSImplInterface.writableUnionContainingNull", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76786 if (aRv.Failed()) {
76787 return;
76788 }
76789 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76789); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76789; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76790 BindingCallContext& cx = s.GetCallContext();
76791
76792 JS::RootedVector<JS::Value> argv(cx);
76793 if (!argv.resize(1)) {
76794 // That threw an exception on the JSContext, and our CallSetup will do
76795 // the right thing with that.
76796 return;
76797 }
76798 do {
76799 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
76800 if (!arg.ToJSVal(cx, callbackObj, argv[0])) {
76801 aRv.Throw(NS_ERROR_UNEXPECTED);
76802 return;
76803 }
76804 break;
76805 } while (false);
76806
76807 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76807); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76807; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76808 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76809 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76810 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76811 !InitIds(cx, atomsCache)) ||
76812 !JS_SetPropertyById(cx, callback, atomsCache->writableUnionContainingNull_id, argv[0])) {
76813 aRv.Throw(NS_ERROR_UNEXPECTED);
76814 return;
76815 }
76816}
76817
76818void
76819TestJSImplInterfaceJSImpl::SetWritableNullableUnion(const Nullable<CanvasPatternOrCanvasGradient>& arg, ErrorResult& aRv, JS::Realm* aRealm)
76820{
76821 CallSetup s(this, aRv, "TestJSImplInterface.writableNullableUnion", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76822 if (aRv.Failed()) {
76823 return;
76824 }
76825 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76825); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76825; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76826 BindingCallContext& cx = s.GetCallContext();
76827
76828 JS::RootedVector<JS::Value> argv(cx);
76829 if (!argv.resize(1)) {
76830 // That threw an exception on the JSContext, and our CallSetup will do
76831 // the right thing with that.
76832 return;
76833 }
76834 do {
76835 JS::Rooted<JSObject*> callbackObj(cx, CallbackKnownNotGray());
76836 if (arg.IsNull()) {
76837 argv[0].setNull();
76838 break;
76839 }
76840 if (!arg.Value().ToJSVal(cx, callbackObj, argv[0])) {
76841 aRv.Throw(NS_ERROR_UNEXPECTED);
76842 return;
76843 }
76844 break;
76845 } while (false);
76846
76847 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76847); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76847; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76848 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76849 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76850 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76851 !InitIds(cx, atomsCache)) ||
76852 !JS_SetPropertyById(cx, callback, atomsCache->writableNullableUnion_id, argv[0])) {
76853 aRv.Throw(NS_ERROR_UNEXPECTED);
76854 return;
76855 }
76856}
76857
76858void
76859TestJSImplInterfaceJSImpl::SetAttributeRenamedTo(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
76860{
76861 CallSetup s(this, aRv, "TestJSImplInterface.attributeRenamedFrom", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76862 if (aRv.Failed()) {
76863 return;
76864 }
76865 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76865); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76865; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76866 BindingCallContext& cx = s.GetCallContext();
76867
76868 JS::RootedVector<JS::Value> argv(cx);
76869 if (!argv.resize(1)) {
76870 // That threw an exception on the JSContext, and our CallSetup will do
76871 // the right thing with that.
76872 return;
76873 }
76874 do {
76875 argv[0].setInt32(int32_t(arg));
76876 break;
76877 } while (false);
76878
76879 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76879); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76879; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76880 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76881 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76882 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76883 !InitIds(cx, atomsCache)) ||
76884 !JS_SetPropertyById(cx, callback, atomsCache->attributeRenamedTo_id, argv[0])) {
76885 aRv.Throw(NS_ERROR_UNEXPECTED);
76886 return;
76887 }
76888}
76889
76890void
76891TestJSImplInterfaceJSImpl::SetEnforcedByte(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
76892{
76893 CallSetup s(this, aRv, "TestJSImplInterface.enforcedByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76894 if (aRv.Failed()) {
76895 return;
76896 }
76897 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76897); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76897; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76898 BindingCallContext& cx = s.GetCallContext();
76899
76900 JS::RootedVector<JS::Value> argv(cx);
76901 if (!argv.resize(1)) {
76902 // That threw an exception on the JSContext, and our CallSetup will do
76903 // the right thing with that.
76904 return;
76905 }
76906 do {
76907 argv[0].setInt32(int32_t(arg));
76908 break;
76909 } while (false);
76910
76911 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76911); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76911; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76912 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76913 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76914 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76915 !InitIds(cx, atomsCache)) ||
76916 !JS_SetPropertyById(cx, callback, atomsCache->enforcedByte_id, argv[0])) {
76917 aRv.Throw(NS_ERROR_UNEXPECTED);
76918 return;
76919 }
76920}
76921
76922void
76923TestJSImplInterfaceJSImpl::SetEnforcedByteNullable(const Nullable<int8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
76924{
76925 CallSetup s(this, aRv, "TestJSImplInterface.enforcedByteNullable", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76926 if (aRv.Failed()) {
76927 return;
76928 }
76929 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76929); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76929; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76930 BindingCallContext& cx = s.GetCallContext();
76931
76932 JS::RootedVector<JS::Value> argv(cx);
76933 if (!argv.resize(1)) {
76934 // That threw an exception on the JSContext, and our CallSetup will do
76935 // the right thing with that.
76936 return;
76937 }
76938 do {
76939 if (arg.IsNull()) {
76940 argv[0].setNull();
76941 break;
76942 }
76943 argv[0].setInt32(int32_t(arg.Value()));
76944 break;
76945 } while (false);
76946
76947 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76947); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76947; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76948 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76949 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76950 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76951 !InitIds(cx, atomsCache)) ||
76952 !JS_SetPropertyById(cx, callback, atomsCache->enforcedByteNullable_id, argv[0])) {
76953 aRv.Throw(NS_ERROR_UNEXPECTED);
76954 return;
76955 }
76956}
76957
76958void
76959TestJSImplInterfaceJSImpl::SetClampedByte(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
76960{
76961 CallSetup s(this, aRv, "TestJSImplInterface.clampedByte", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76962 if (aRv.Failed()) {
76963 return;
76964 }
76965 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76965); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76965; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76966 BindingCallContext& cx = s.GetCallContext();
76967
76968 JS::RootedVector<JS::Value> argv(cx);
76969 if (!argv.resize(1)) {
76970 // That threw an exception on the JSContext, and our CallSetup will do
76971 // the right thing with that.
76972 return;
76973 }
76974 do {
76975 argv[0].setInt32(int32_t(arg));
76976 break;
76977 } while (false);
76978
76979 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 76979); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 76979; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76980 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
76981 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
76982 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
76983 !InitIds(cx, atomsCache)) ||
76984 !JS_SetPropertyById(cx, callback, atomsCache->clampedByte_id, argv[0])) {
76985 aRv.Throw(NS_ERROR_UNEXPECTED);
76986 return;
76987 }
76988}
76989
76990void
76991TestJSImplInterfaceJSImpl::SetClampedByteNullable(const Nullable<int8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
76992{
76993 CallSetup s(this, aRv, "TestJSImplInterface.clampedByteNullable", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
76994 if (aRv.Failed()) {
76995 return;
76996 }
76997 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 76997); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 76997; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
76998 BindingCallContext& cx = s.GetCallContext();
76999
77000 JS::RootedVector<JS::Value> argv(cx);
77001 if (!argv.resize(1)) {
77002 // That threw an exception on the JSContext, and our CallSetup will do
77003 // the right thing with that.
77004 return;
77005 }
77006 do {
77007 if (arg.IsNull()) {
77008 argv[0].setNull();
77009 break;
77010 }
77011 argv[0].setInt32(int32_t(arg.Value()));
77012 break;
77013 } while (false);
77014
77015 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77015); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77015; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77016 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77017 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77018 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77019 !InitIds(cx, atomsCache)) ||
77020 !JS_SetPropertyById(cx, callback, atomsCache->clampedByteNullable_id, argv[0])) {
77021 aRv.Throw(NS_ERROR_UNEXPECTED);
77022 return;
77023 }
77024}
77025
77026void
77027TestJSImplInterfaceJSImpl::SetDeprecatedAttribute(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77028{
77029 CallSetup s(this, aRv, "TestJSImplInterface.deprecatedAttribute", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77030 if (aRv.Failed()) {
77031 return;
77032 }
77033 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77033); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77033; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77034 BindingCallContext& cx = s.GetCallContext();
77035
77036 JS::RootedVector<JS::Value> argv(cx);
77037 if (!argv.resize(1)) {
77038 // That threw an exception on the JSContext, and our CallSetup will do
77039 // the right thing with that.
77040 return;
77041 }
77042 do {
77043 argv[0].setInt32(int32_t(arg));
77044 break;
77045 } while (false);
77046
77047 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77047); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77047; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77048 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77049 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77050 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77051 !InitIds(cx, atomsCache)) ||
77052 !JS_SetPropertyById(cx, callback, atomsCache->deprecatedAttribute_id, argv[0])) {
77053 aRv.Throw(NS_ERROR_UNEXPECTED);
77054 return;
77055 }
77056}
77057
77058void
77059TestJSImplInterfaceJSImpl::SetAttrWithLenientThis(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77060{
77061 CallSetup s(this, aRv, "TestJSImplInterface.attrWithLenientThis", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77062 if (aRv.Failed()) {
77063 return;
77064 }
77065 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77065); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77065; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77066 BindingCallContext& cx = s.GetCallContext();
77067
77068 JS::RootedVector<JS::Value> argv(cx);
77069 if (!argv.resize(1)) {
77070 // That threw an exception on the JSContext, and our CallSetup will do
77071 // the right thing with that.
77072 return;
77073 }
77074 do {
77075 argv[0].setInt32(int32_t(arg));
77076 break;
77077 } while (false);
77078
77079 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77079); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77079; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77080 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77081 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77082 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77083 !InitIds(cx, atomsCache)) ||
77084 !JS_SetPropertyById(cx, callback, atomsCache->attrWithLenientThis_id, argv[0])) {
77085 aRv.Throw(NS_ERROR_UNEXPECTED);
77086 return;
77087 }
77088}
77089
77090void
77091TestJSImplInterfaceJSImpl::SetThrowingAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
77092{
77093 CallSetup s(this, aRv, "TestJSImplInterface.throwingAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77094 if (aRv.Failed()) {
77095 return;
77096 }
77097 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77097); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77097; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77098 BindingCallContext& cx = s.GetCallContext();
77099
77100 JS::RootedVector<JS::Value> argv(cx);
77101 if (!argv.resize(1)) {
77102 // That threw an exception on the JSContext, and our CallSetup will do
77103 // the right thing with that.
77104 return;
77105 }
77106 do {
77107 argv[0].setBoolean(arg);
77108 break;
77109 } while (false);
77110
77111 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77111); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77111; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77112 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77113 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77114 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77115 !InitIds(cx, atomsCache)) ||
77116 !JS_SetPropertyById(cx, callback, atomsCache->throwingAttr_id, argv[0])) {
77117 aRv.Throw(NS_ERROR_UNEXPECTED);
77118 return;
77119 }
77120}
77121
77122void
77123TestJSImplInterfaceJSImpl::SetThrowingGetterAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
77124{
77125 CallSetup s(this, aRv, "TestJSImplInterface.throwingGetterAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77126 if (aRv.Failed()) {
77127 return;
77128 }
77129 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77129); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77129; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77130 BindingCallContext& cx = s.GetCallContext();
77131
77132 JS::RootedVector<JS::Value> argv(cx);
77133 if (!argv.resize(1)) {
77134 // That threw an exception on the JSContext, and our CallSetup will do
77135 // the right thing with that.
77136 return;
77137 }
77138 do {
77139 argv[0].setBoolean(arg);
77140 break;
77141 } while (false);
77142
77143 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77143); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77143; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77144 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77145 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77146 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77147 !InitIds(cx, atomsCache)) ||
77148 !JS_SetPropertyById(cx, callback, atomsCache->throwingGetterAttr_id, argv[0])) {
77149 aRv.Throw(NS_ERROR_UNEXPECTED);
77150 return;
77151 }
77152}
77153
77154void
77155TestJSImplInterfaceJSImpl::SetThrowingSetterAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
77156{
77157 CallSetup s(this, aRv, "TestJSImplInterface.throwingSetterAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77158 if (aRv.Failed()) {
77159 return;
77160 }
77161 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77161); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77161; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77162 BindingCallContext& cx = s.GetCallContext();
77163
77164 JS::RootedVector<JS::Value> argv(cx);
77165 if (!argv.resize(1)) {
77166 // That threw an exception on the JSContext, and our CallSetup will do
77167 // the right thing with that.
77168 return;
77169 }
77170 do {
77171 argv[0].setBoolean(arg);
77172 break;
77173 } while (false);
77174
77175 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77175); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77175; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77176 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77177 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77178 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77179 !InitIds(cx, atomsCache)) ||
77180 !JS_SetPropertyById(cx, callback, atomsCache->throwingSetterAttr_id, argv[0])) {
77181 aRv.Throw(NS_ERROR_UNEXPECTED);
77182 return;
77183 }
77184}
77185
77186void
77187TestJSImplInterfaceJSImpl::SetCanOOMAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
77188{
77189 CallSetup s(this, aRv, "TestJSImplInterface.canOOMAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77190 if (aRv.Failed()) {
77191 return;
77192 }
77193 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77193); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77193; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77194 BindingCallContext& cx = s.GetCallContext();
77195
77196 JS::RootedVector<JS::Value> argv(cx);
77197 if (!argv.resize(1)) {
77198 // That threw an exception on the JSContext, and our CallSetup will do
77199 // the right thing with that.
77200 return;
77201 }
77202 do {
77203 argv[0].setBoolean(arg);
77204 break;
77205 } while (false);
77206
77207 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77207); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77207; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77208 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77209 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77210 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77211 !InitIds(cx, atomsCache)) ||
77212 !JS_SetPropertyById(cx, callback, atomsCache->canOOMAttr_id, argv[0])) {
77213 aRv.Throw(NS_ERROR_UNEXPECTED);
77214 return;
77215 }
77216}
77217
77218void
77219TestJSImplInterfaceJSImpl::SetCanOOMGetterAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
77220{
77221 CallSetup s(this, aRv, "TestJSImplInterface.canOOMGetterAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77222 if (aRv.Failed()) {
77223 return;
77224 }
77225 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77225); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77225; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77226 BindingCallContext& cx = s.GetCallContext();
77227
77228 JS::RootedVector<JS::Value> argv(cx);
77229 if (!argv.resize(1)) {
77230 // That threw an exception on the JSContext, and our CallSetup will do
77231 // the right thing with that.
77232 return;
77233 }
77234 do {
77235 argv[0].setBoolean(arg);
77236 break;
77237 } while (false);
77238
77239 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77239); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77239; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77240 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77241 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77242 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77243 !InitIds(cx, atomsCache)) ||
77244 !JS_SetPropertyById(cx, callback, atomsCache->canOOMGetterAttr_id, argv[0])) {
77245 aRv.Throw(NS_ERROR_UNEXPECTED);
77246 return;
77247 }
77248}
77249
77250void
77251TestJSImplInterfaceJSImpl::SetCanOOMSetterAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
77252{
77253 CallSetup s(this, aRv, "TestJSImplInterface.canOOMSetterAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77254 if (aRv.Failed()) {
77255 return;
77256 }
77257 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77257); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77257; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77258 BindingCallContext& cx = s.GetCallContext();
77259
77260 JS::RootedVector<JS::Value> argv(cx);
77261 if (!argv.resize(1)) {
77262 // That threw an exception on the JSContext, and our CallSetup will do
77263 // the right thing with that.
77264 return;
77265 }
77266 do {
77267 argv[0].setBoolean(arg);
77268 break;
77269 } while (false);
77270
77271 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77271); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77271; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77272 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77273 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77274 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77275 !InitIds(cx, atomsCache)) ||
77276 !JS_SetPropertyById(cx, callback, atomsCache->canOOMSetterAttr_id, argv[0])) {
77277 aRv.Throw(NS_ERROR_UNEXPECTED);
77278 return;
77279 }
77280}
77281
77282void
77283TestJSImplInterfaceJSImpl::SetCeReactionsAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
77284{
77285 CallSetup s(this, aRv, "TestJSImplInterface.ceReactionsAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77286 if (aRv.Failed()) {
77287 return;
77288 }
77289 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77289); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77289; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77290 BindingCallContext& cx = s.GetCallContext();
77291
77292 JS::RootedVector<JS::Value> argv(cx);
77293 if (!argv.resize(1)) {
77294 // That threw an exception on the JSContext, and our CallSetup will do
77295 // the right thing with that.
77296 return;
77297 }
77298 do {
77299 argv[0].setBoolean(arg);
77300 break;
77301 } while (false);
77302
77303 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77303); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77303; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77304 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77305 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77306 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77307 !InitIds(cx, atomsCache)) ||
77308 !JS_SetPropertyById(cx, callback, atomsCache->ceReactionsAttr_id, argv[0])) {
77309 aRv.Throw(NS_ERROR_UNEXPECTED);
77310 return;
77311 }
77312}
77313
77314void
77315TestJSImplInterfaceJSImpl::SetToJSONShouldSkipThis(JS::Handle<JS::Value> arg, ErrorResult& aRv, JS::Realm* aRealm)
77316{
77317 CallSetup s(this, aRv, "TestJSImplInterface.toJSONShouldSkipThis", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77318 if (aRv.Failed()) {
77319 return;
77320 }
77321 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77321); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77321; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77322 BindingCallContext& cx = s.GetCallContext();
77323
77324 JS::RootedVector<JS::Value> argv(cx);
77325 if (!argv.resize(1)) {
77326 // That threw an exception on the JSContext, and our CallSetup will do
77327 // the right thing with that.
77328 return;
77329 }
77330 do {
77331 JS::ExposeValueToActiveJS(arg);
77332 argv[0].set(arg);
77333 if (!MaybeWrapValue(cx, argv[0])) {
77334 aRv.Throw(NS_ERROR_UNEXPECTED);
77335 return;
77336 }
77337 break;
77338 } while (false);
77339
77340 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77340); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77340; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77341 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77342 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77343 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77344 !InitIds(cx, atomsCache)) ||
77345 !JS_SetPropertyById(cx, callback, atomsCache->toJSONShouldSkipThis_id, argv[0])) {
77346 aRv.Throw(NS_ERROR_UNEXPECTED);
77347 return;
77348 }
77349}
77350
77351void
77352TestJSImplInterfaceJSImpl::SetToJSONShouldSkipThis2(TestParentInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
77353{
77354 CallSetup s(this, aRv, "TestJSImplInterface.toJSONShouldSkipThis2", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77355 if (aRv.Failed()) {
77356 return;
77357 }
77358 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77358); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77358; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77359 BindingCallContext& cx = s.GetCallContext();
77360
77361 JS::RootedVector<JS::Value> argv(cx);
77362 if (!argv.resize(1)) {
77363 // That threw an exception on the JSContext, and our CallSetup will do
77364 // the right thing with that.
77365 return;
77366 }
77367 do {
77368 if (!GetOrCreateDOMReflector(cx, arg, argv[0])) {
77369 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 77369); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 77369; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77370 aRv.Throw(NS_ERROR_UNEXPECTED);
77371 return;
77372 }
77373 break;
77374 } while (false);
77375
77376 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77376); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77376; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77377 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77378 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77379 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77380 !InitIds(cx, atomsCache)) ||
77381 !JS_SetPropertyById(cx, callback, atomsCache->toJSONShouldSkipThis2_id, argv[0])) {
77382 aRv.Throw(NS_ERROR_UNEXPECTED);
77383 return;
77384 }
77385}
77386
77387void
77388TestJSImplInterfaceJSImpl::SetToJSONShouldSkipThis3(TestCallbackInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
77389{
77390 CallSetup s(this, aRv, "TestJSImplInterface.toJSONShouldSkipThis3", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77391 if (aRv.Failed()) {
77392 return;
77393 }
77394 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77394); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77394; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77395 BindingCallContext& cx = s.GetCallContext();
77396
77397 JS::RootedVector<JS::Value> argv(cx);
77398 if (!argv.resize(1)) {
77399 // That threw an exception on the JSContext, and our CallSetup will do
77400 // the right thing with that.
77401 return;
77402 }
77403 do {
77404 argv[0].setObjectOrNull(GetCallbackFromCallbackObject(cx, arg));
77405 if (!MaybeWrapObjectValue(cx, argv[0])) {
77406 aRv.Throw(NS_ERROR_UNEXPECTED);
77407 return;
77408 }
77409 break;
77410 } while (false);
77411
77412 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77412); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77412; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77413 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77414 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77415 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77416 !InitIds(cx, atomsCache)) ||
77417 !JS_SetPropertyById(cx, callback, atomsCache->toJSONShouldSkipThis3_id, argv[0])) {
77418 aRv.Throw(NS_ERROR_UNEXPECTED);
77419 return;
77420 }
77421}
77422
77423void
77424TestJSImplInterfaceJSImpl::SetDashed_attribute(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77425{
77426 CallSetup s(this, aRv, "TestJSImplInterface.dashed-attribute", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77427 if (aRv.Failed()) {
77428 return;
77429 }
77430 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77430); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77430; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77431 BindingCallContext& cx = s.GetCallContext();
77432
77433 JS::RootedVector<JS::Value> argv(cx);
77434 if (!argv.resize(1)) {
77435 // That threw an exception on the JSContext, and our CallSetup will do
77436 // the right thing with that.
77437 return;
77438 }
77439 do {
77440 argv[0].setInt32(int32_t(arg));
77441 break;
77442 } while (false);
77443
77444 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77444); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77444; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77445 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77446 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77447 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77448 !InitIds(cx, atomsCache)) ||
77449 !JS_SetPropertyById(cx, callback, atomsCache->dashed_attribute_id, argv[0])) {
77450 aRv.Throw(NS_ERROR_UNEXPECTED);
77451 return;
77452 }
77453}
77454
77455void
77456TestJSImplInterfaceJSImpl::SetNonEnumerableAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
77457{
77458 CallSetup s(this, aRv, "TestJSImplInterface.nonEnumerableAttr", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77459 if (aRv.Failed()) {
77460 return;
77461 }
77462 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77462); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77462; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77463 BindingCallContext& cx = s.GetCallContext();
77464
77465 JS::RootedVector<JS::Value> argv(cx);
77466 if (!argv.resize(1)) {
77467 // That threw an exception on the JSContext, and our CallSetup will do
77468 // the right thing with that.
77469 return;
77470 }
77471 do {
77472 argv[0].setBoolean(arg);
77473 break;
77474 } while (false);
77475
77476 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77476); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77476; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77477 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77478 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77479 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77480 !InitIds(cx, atomsCache)) ||
77481 !JS_SetPropertyById(cx, callback, atomsCache->nonEnumerableAttr_id, argv[0])) {
77482 aRv.Throw(NS_ERROR_UNEXPECTED);
77483 return;
77484 }
77485}
77486
77487void
77488TestJSImplInterfaceJSImpl::SetAllowSharedArrayBufferViewTypedef(const ArrayBufferView& arg, ErrorResult& aRv, JS::Realm* aRealm)
77489{
77490 CallSetup s(this, aRv, "TestJSImplInterface.allowSharedArrayBufferViewTypedef", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77491 if (aRv.Failed()) {
77492 return;
77493 }
77494 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77494); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77494; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77495 BindingCallContext& cx = s.GetCallContext();
77496
77497 JS::RootedVector<JS::Value> argv(cx);
77498 if (!argv.resize(1)) {
77499 // That threw an exception on the JSContext, and our CallSetup will do
77500 // the right thing with that.
77501 return;
77502 }
77503 do {
77504 argv[0].setObject(*arg.Obj());
77505 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
77506 aRv.Throw(NS_ERROR_UNEXPECTED);
77507 return;
77508 }
77509 break;
77510 } while (false);
77511
77512 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77512); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77512; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77513 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77514 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77515 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77516 !InitIds(cx, atomsCache)) ||
77517 !JS_SetPropertyById(cx, callback, atomsCache->allowSharedArrayBufferViewTypedef_id, argv[0])) {
77518 aRv.Throw(NS_ERROR_UNEXPECTED);
77519 return;
77520 }
77521}
77522
77523void
77524TestJSImplInterfaceJSImpl::SetAllowSharedArrayBufferView(const ArrayBufferView& arg, ErrorResult& aRv, JS::Realm* aRealm)
77525{
77526 CallSetup s(this, aRv, "TestJSImplInterface.allowSharedArrayBufferView", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77527 if (aRv.Failed()) {
77528 return;
77529 }
77530 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77530); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77530; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77531 BindingCallContext& cx = s.GetCallContext();
77532
77533 JS::RootedVector<JS::Value> argv(cx);
77534 if (!argv.resize(1)) {
77535 // That threw an exception on the JSContext, and our CallSetup will do
77536 // the right thing with that.
77537 return;
77538 }
77539 do {
77540 argv[0].setObject(*arg.Obj());
77541 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
77542 aRv.Throw(NS_ERROR_UNEXPECTED);
77543 return;
77544 }
77545 break;
77546 } while (false);
77547
77548 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77548); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77548; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77549 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77550 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77551 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77552 !InitIds(cx, atomsCache)) ||
77553 !JS_SetPropertyById(cx, callback, atomsCache->allowSharedArrayBufferView_id, argv[0])) {
77554 aRv.Throw(NS_ERROR_UNEXPECTED);
77555 return;
77556 }
77557}
77558
77559void
77560TestJSImplInterfaceJSImpl::SetAllowSharedNullableArrayBufferView(const Nullable<ArrayBufferView>& arg, ErrorResult& aRv, JS::Realm* aRealm)
77561{
77562 CallSetup s(this, aRv, "TestJSImplInterface.allowSharedNullableArrayBufferView", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77563 if (aRv.Failed()) {
77564 return;
77565 }
77566 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77566); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77566; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77567 BindingCallContext& cx = s.GetCallContext();
77568
77569 JS::RootedVector<JS::Value> argv(cx);
77570 if (!argv.resize(1)) {
77571 // That threw an exception on the JSContext, and our CallSetup will do
77572 // the right thing with that.
77573 return;
77574 }
77575 do {
77576 if (arg.IsNull()) {
77577 argv[0].setNull();
77578 break;
77579 }
77580 argv[0].setObject(*arg.Value().Obj());
77581 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
77582 aRv.Throw(NS_ERROR_UNEXPECTED);
77583 return;
77584 }
77585 break;
77586 } while (false);
77587
77588 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77588); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77588; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77589 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77590 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77591 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77592 !InitIds(cx, atomsCache)) ||
77593 !JS_SetPropertyById(cx, callback, atomsCache->allowSharedNullableArrayBufferView_id, argv[0])) {
77594 aRv.Throw(NS_ERROR_UNEXPECTED);
77595 return;
77596 }
77597}
77598
77599void
77600TestJSImplInterfaceJSImpl::SetAllowSharedArrayBuffer(const ArrayBuffer& arg, ErrorResult& aRv, JS::Realm* aRealm)
77601{
77602 CallSetup s(this, aRv, "TestJSImplInterface.allowSharedArrayBuffer", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77603 if (aRv.Failed()) {
77604 return;
77605 }
77606 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77606); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77606; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77607 BindingCallContext& cx = s.GetCallContext();
77608
77609 JS::RootedVector<JS::Value> argv(cx);
77610 if (!argv.resize(1)) {
77611 // That threw an exception on the JSContext, and our CallSetup will do
77612 // the right thing with that.
77613 return;
77614 }
77615 do {
77616 argv[0].setObject(*arg.Obj());
77617 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
77618 aRv.Throw(NS_ERROR_UNEXPECTED);
77619 return;
77620 }
77621 break;
77622 } while (false);
77623
77624 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77624); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77624; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77625 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77626 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77627 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77628 !InitIds(cx, atomsCache)) ||
77629 !JS_SetPropertyById(cx, callback, atomsCache->allowSharedArrayBuffer_id, argv[0])) {
77630 aRv.Throw(NS_ERROR_UNEXPECTED);
77631 return;
77632 }
77633}
77634
77635void
77636TestJSImplInterfaceJSImpl::SetAllowSharedNullableArrayBuffer(const Nullable<ArrayBuffer>& arg, ErrorResult& aRv, JS::Realm* aRealm)
77637{
77638 CallSetup s(this, aRv, "TestJSImplInterface.allowSharedNullableArrayBuffer", eRethrowContentExceptions, aRealm, /* aIsJSImplementedWebIDL = */ true);
77639 if (aRv.Failed()) {
77640 return;
77641 }
77642 MOZ_ASSERT(s.GetContext())do { static_assert( mozilla::detail::AssertionConditionType<
decltype(s.GetContext())>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(s.GetContext()))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("s.GetContext()"
, "../TestJSImplGenBinding.cpp", 77642); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "s.GetContext()" ")"); do { *((volatile int
*)__null) = 77642; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77643 BindingCallContext& cx = s.GetCallContext();
77644
77645 JS::RootedVector<JS::Value> argv(cx);
77646 if (!argv.resize(1)) {
77647 // That threw an exception on the JSContext, and our CallSetup will do
77648 // the right thing with that.
77649 return;
77650 }
77651 do {
77652 if (arg.IsNull()) {
77653 argv[0].setNull();
77654 break;
77655 }
77656 argv[0].setObject(*arg.Value().Obj());
77657 if (!MaybeWrapNonDOMObjectValue(cx, argv[0])) {
77658 aRv.Throw(NS_ERROR_UNEXPECTED);
77659 return;
77660 }
77661 break;
77662 } while (false);
77663
77664 MOZ_ASSERT(argv.length() == 1)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(argv.length() == 1)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(argv.length() == 1))), 0))) {
do { } while (false); MOZ_ReportAssertionFailure("argv.length() == 1"
, "../TestJSImplGenBinding.cpp", 77664); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "argv.length() == 1" ")"); do { *((volatile
int*)__null) = 77664; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77665 JS::Rooted<JSObject*> callback(cx, CallbackKnownNotGray());
77666 TestJSImplInterfaceAtoms* atomsCache = GetAtomCache<TestJSImplInterfaceAtoms>(cx);
77667 if ((reinterpret_cast<jsid*>(atomsCache)->isVoid() &&
77668 !InitIds(cx, atomsCache)) ||
77669 !JS_SetPropertyById(cx, callback, atomsCache->allowSharedNullableArrayBuffer_id, argv[0])) {
77670 aRv.Throw(NS_ERROR_UNEXPECTED);
77671 return;
77672 }
77673}
77674
77675
77676NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(TestJSImplInterface)static_assert(std::is_base_of<nsWrapperCache, TestJSImplInterface
>::value, "Class should inherit nsWrapperCache"); TestJSImplInterface
::cycleCollection TestJSImplInterface::_cycleCollectorGlobal(
nsCycleCollectionParticipant::FlagMaybeSingleZoneJSHolder); void
TestJSImplInterface::cycleCollection::Trace( void* p, const TraceCallbacks
& aCallbacks, void* aClosure) { TestJSImplInterface* tmp =
DowncastCCParticipant<TestJSImplInterface>(p); TraceWrapper
(p, aCallbacks, aClosure); (void)tmp; } void TestJSImplInterface
::cycleCollection::TraceWrapper( void* p, const TraceCallbacks
& aCallbacks, void* aClosure) { TestJSImplInterface* tmp =
DowncastCCParticipant<TestJSImplInterface>(p); tmp->
TraceWrapper(aCallbacks, aClosure); }
77677NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(TestJSImplInterface)void TestJSImplInterface::cycleCollection::Unlink(void* p) { TestJSImplInterface
* tmp = DowncastCCParticipant<TestJSImplInterface>(p);
77678 NS_IMPL_CYCLE_COLLECTION_UNLINK(mImpl)ImplCycleCollectionUnlink(tmp->mImpl);
77679 NS_IMPL_CYCLE_COLLECTION_UNLINK(mParent)ImplCycleCollectionUnlink(tmp->mParent);
77680 NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPERtmp->ReleaseWrapper(p);
77681 tmp->ClearWeakReferences();
77682NS_IMPL_CYCLE_COLLECTION_UNLINK_END(void)tmp; }
77683NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(TestJSImplInterface)nsresult TestJSImplInterface::cycleCollection::TraverseNative
( void* p, nsCycleCollectionTraversalCallback& cb) { TestJSImplInterface
* tmp = DowncastCCParticipant<TestJSImplInterface>(p); cb
.DescribeRefCountedNode(tmp->mRefCnt.get(), "TestJSImplInterface"
);
77684 NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mImpl)ImplCycleCollectionTraverse(cb, tmp->mImpl, "mImpl", 0);
77685 NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mParent)ImplCycleCollectionTraverse(cb, tmp->mParent, "mParent", 0
);
77686NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END(void)tmp; return NS_OK; }
77687NS_IMPL_CYCLE_COLLECTING_ADDREF(TestJSImplInterface)MozExternalRefCountType TestJSImplInterface::AddRef(void) { static_assert
(!std::is_destructible_v<TestJSImplInterface>, "Reference-counted class "
"TestJSImplInterface" " should not have a public destructor. "
"Make this class's destructor non-public"); do { static_assert
( mozilla::detail::AssertionConditionType<decltype(int32_t
(mRefCnt) >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(int32_t(mRefCnt) >= 0))),
0))) { do { } while (false); MOZ_ReportAssertionFailure("int32_t(mRefCnt) >= 0"
" (" "illegal refcnt" ")", "../TestJSImplGenBinding.cpp", 77687
); AnnotateMozCrashReason("MOZ_ASSERT" "(" "int32_t(mRefCnt) >= 0"
") (" "illegal refcnt" ")"); do { *((volatile int*)__null) =
77687; __attribute__((nomerge)) ::abort(); } while (false); }
} while (false); _mOwningThread.AssertOwnership("TestJSImplInterface"
" not thread-safe"); nsISupports* base = TestJSImplInterface
::cycleCollection::Upcast(this); nsrefcnt count = mRefCnt.incr
(base); NS_LogAddRef((this), (count), ("TestJSImplInterface")
, (uint32_t)(sizeof(*this))); return count; }
77688NS_IMPL_CYCLE_COLLECTING_RELEASE(TestJSImplInterface)MozExternalRefCountType TestJSImplInterface::Release(void) { do
{ static_assert( mozilla::detail::AssertionConditionType<
decltype(int32_t(mRefCnt) > 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(int32_t(mRefCnt) > 0))), 0
))) { do { } while (false); MOZ_ReportAssertionFailure("int32_t(mRefCnt) > 0"
" (" "dup release" ")", "../TestJSImplGenBinding.cpp", 77688
); AnnotateMozCrashReason("MOZ_ASSERT" "(" "int32_t(mRefCnt) > 0"
") (" "dup release" ")"); do { *((volatile int*)__null) = 77688
; __attribute__((nomerge)) ::abort(); } while (false); } } while
(false); _mOwningThread.AssertOwnership("TestJSImplInterface"
" not thread-safe"); nsISupports* base = TestJSImplInterface
::cycleCollection::Upcast(this); nsrefcnt count = mRefCnt.decr
(base); NS_LogRelease((this), (count), ("TestJSImplInterface"
)); return count; } void TestJSImplInterface::DeleteCycleCollectable
(void) { delete (this); }
77689NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TestJSImplInterface)nsresult TestJSImplInterface::QueryInterface(const nsIID&
aIID, void** aInstancePtr) { do { if (!(aInstancePtr)) { NS_DebugBreak
(NS_DEBUG_ASSERTION, "QueryInterface requires a non-NULL destination!"
, "aInstancePtr", "../TestJSImplGenBinding.cpp", 77689); MOZ_PretendNoReturn
(); } } while (0); nsISupports* foundInterface; if (TopThreeWordsEquals
( aIID, (nsXPCOMCycleCollectionParticipant::COMTypeInfo<nsXPCOMCycleCollectionParticipant
, void>::kIID), (nsCycleCollectionISupports::COMTypeInfo<
nsCycleCollectionISupports, void>::kIID)) && (LowWordEquals
(aIID, (nsXPCOMCycleCollectionParticipant::COMTypeInfo<nsXPCOMCycleCollectionParticipant
, void>::kIID)) || LowWordEquals(aIID, (nsCycleCollectionISupports
::COMTypeInfo<nsCycleCollectionISupports, void>::kIID))
)) { if (LowWordEquals(aIID, (nsXPCOMCycleCollectionParticipant
::COMTypeInfo<nsXPCOMCycleCollectionParticipant, void>::
kIID))) { *aInstancePtr = TestJSImplInterface::cycleCollection
::GetParticipant(); return NS_OK; } if (LowWordEquals(aIID, (
nsCycleCollectionISupports::COMTypeInfo<nsCycleCollectionISupports
, void>::kIID))) { *aInstancePtr = TestJSImplInterface::cycleCollection
::Upcast(this); return NS_OK; } foundInterface = nullptr; } else
77690 NS_WRAPPERCACHE_INTERFACE_MAP_ENTRYif (aIID.Equals((nsWrapperCache::COMTypeInfo<nsWrapperCache
, void>::kIID))) { *aInstancePtr = static_cast<nsWrapperCache
*>(this); return NS_OK; } else
77691 NS_INTERFACE_MAP_ENTRY(nsISupports)if (aIID.Equals(mozilla::detail::kImplementedIID<std::remove_reference_t
<decltype(*this)>, nsISupports>)) foundInterface = static_cast
<nsISupports*>(this); else
77692 NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)if (aIID.Equals(mozilla::detail::kImplementedIID<std::remove_reference_t
<decltype(*this)>, nsISupportsWeakReference>)) foundInterface
= static_cast<nsISupportsWeakReference*>(this); else
77693NS_INTERFACE_MAP_ENDfoundInterface = 0; nsresult status; if (!foundInterface) { do
{ static_assert( mozilla::detail::AssertionConditionType<
decltype(!aIID.Equals((nsISupports::COMTypeInfo<nsISupports
, void>::kIID)))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!aIID.Equals((nsISupports::COMTypeInfo
<nsISupports, void>::kIID))))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("!aIID.Equals((nsISupports::COMTypeInfo<nsISupports, void>::kIID))"
, "../TestJSImplGenBinding.cpp", 77693); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!aIID.Equals((nsISupports::COMTypeInfo<nsISupports, void>::kIID))"
")"); do { *((volatile int*)__null) = 77693; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); status
= NS_NOINTERFACE; } else { (foundInterface)->AddRef(); status
= NS_OK; } *aInstancePtr = foundInterface; return status; }
77694
77695TestJSImplInterface::TestJSImplInterface(JS::Handle<JSObject*> aJSImplObject, JS::Handle<JSObject*> aJSImplGlobal, nsIGlobalObject* aParent)
77696 : mImpl(new TestJSImplInterfaceJSImpl(nullptr, aJSImplObject, aJSImplGlobal, /* aIncumbentGlobal = */ nullptr)),
77697 mParent(aParent)
77698{
77699}
77700
77701
77702TestJSImplInterface::~TestJSImplInterface()
77703{
77704}
77705
77706nsISupports*
77707TestJSImplInterface::GetParentObject() const
77708{
77709 return mParent;
77710}
77711
77712DocGroup*
77713TestJSImplInterface::GetDocGroup() const
77714{
77715 nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(mParent);
77716 if (!window) {
77717 return nullptr;
77718 }
77719 return window->GetDocGroup();
77720}
77721
77722JSObject*
77723TestJSImplInterface::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
77724{
77725 JS::Rooted<JSObject*> obj(aCx, TestJSImplInterface_Binding::Wrap(aCx, this, aGivenProto));
77726 if (!obj) {
77727 return nullptr;
77728 }
77729
77730 // Now define it on our chrome object
77731 JSAutoRealm ar(aCx, mImpl->CallbackGlobalOrNull());
77732 if (!JS_WrapObject(aCx, &obj)) {
77733 return nullptr;
77734 }
77735 JS::Rooted<JSObject*> callback(aCx, mImpl->CallbackOrNull());
77736 if (!JS_DefineProperty(aCx, callback, "__DOM_IMPL__", obj, 0)) {
77737 return nullptr;
77738 }
77739 return obj;
77740}
77741
77742already_AddRefed<TestJSImplInterface>
77743TestJSImplInterface::Constructor(const GlobalObject& global, JSContext* cx, const nsAString& str, uint32_t num, const Nullable<bool>& boolArg, TestInterface* iface, int32_t arg1, const DictForConstructor& dict, JS::Handle<JS::Value> any1, JS::Handle<JSObject*> obj1, JS::Handle<JSObject*> obj2, const Sequence<Dict>& seq, JS::Handle<JS::Value> any2, const Optional<JS::Handle<JSObject*>>& obj3, const Optional<JS::Handle<JSObject*>>& obj4, const Uint8Array& typedArr, const ArrayBuffer& arrayBuf, ErrorResult& aRv, JS::Handle<JSObject*> aGivenProto)
77744{
77745 RefPtr<TestJSImplInterface> impl =
77746 ConstructJSImplementation<TestJSImplInterface>("@mozilla.org/test-js-impl-interface;1", global, aRv);
77747 if (aRv.Failed()) {
77748 return nullptr;
77749 }
77750 // Wrap the object before calling __Init so that __DOM_IMPL__ is available.
77751 JS::Rooted<JSObject*> scopeObj(cx, global.Get());
77752 MOZ_ASSERT(js::IsObjectInContextCompartment(scopeObj, cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(js::IsObjectInContextCompartment(scopeObj, cx))>::
isValid, "invalid assertion condition"); if ((__builtin_expect
(!!(!(!!(js::IsObjectInContextCompartment(scopeObj, cx)))), 0
))) { do { } while (false); MOZ_ReportAssertionFailure("js::IsObjectInContextCompartment(scopeObj, cx)"
, "../TestJSImplGenBinding.cpp", 77752); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(scopeObj, cx)"
")"); do { *((volatile int*)__null) = 77752; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
77753 JS::Rooted<JS::Value> wrappedVal(cx);
77754 if (!GetOrCreateDOMReflector(cx, impl, &wrappedVal, aGivenProto)) {
77755 MOZ_ASSERT(JS_IsExceptionPending(cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(JS_IsExceptionPending(cx))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(JS_IsExceptionPending(cx))))
, 0))) { do { } while (false); MOZ_ReportAssertionFailure("JS_IsExceptionPending(cx)"
, "../TestJSImplGenBinding.cpp", 77755); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "JS_IsExceptionPending(cx)" ")"); do { *((volatile
int*)__null) = 77755; __attribute__((nomerge)) ::abort(); } while
(false); } } while (false)
;
77756 aRv.Throw(NS_ERROR_UNEXPECTED);
77757 return nullptr;
77758 }
77759 // Initialize the object with the constructor arguments.
77760 impl->mImpl->__Init(str, num, boolArg, iface, arg1, dict, any1, obj1, obj2, seq, any2, obj3, obj4, typedArr, arrayBuf, aRv, js::GetNonCCWObjectRealm(scopeObj));
77761 if (aRv.Failed()) {
77762 return nullptr;
77763 }
77764 return impl.forget();
77765}
77766
77767int8_t
77768TestJSImplInterface::GetReadonlyByte(ErrorResult& aRv, JS::Realm* aRealm) const
77769{
77770 return mImpl->GetReadonlyByte(aRv, aRealm);
77771}
77772
77773int8_t
77774TestJSImplInterface::GetWritableByte(ErrorResult& aRv, JS::Realm* aRealm) const
77775{
77776 return mImpl->GetWritableByte(aRv, aRealm);
77777}
77778
77779void
77780TestJSImplInterface::SetWritableByte(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77781{
77782 mImpl->SetWritableByte(arg, aRv, aRealm);
77783}
77784
77785void
77786TestJSImplInterface::PassByte(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77787{
77788 return mImpl->PassByte(arg, aRv, aRealm);
77789}
77790
77791int8_t
77792TestJSImplInterface::ReceiveByte(ErrorResult& aRv, JS::Realm* aRealm)
77793{
77794 return mImpl->ReceiveByte(aRv, aRealm);
77795}
77796
77797void
77798TestJSImplInterface::PassOptionalByte(const Optional<int8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
77799{
77800 return mImpl->PassOptionalByte(arg, aRv, aRealm);
77801}
77802
77803void
77804TestJSImplInterface::PassOptionalByteBeforeRequired(const Optional<int8_t>& arg1, int8_t arg2, ErrorResult& aRv, JS::Realm* aRealm)
77805{
77806 return mImpl->PassOptionalByteBeforeRequired(arg1, arg2, aRv, aRealm);
77807}
77808
77809void
77810TestJSImplInterface::PassOptionalByteWithDefault(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77811{
77812 return mImpl->PassOptionalByteWithDefault(arg, aRv, aRealm);
77813}
77814
77815void
77816TestJSImplInterface::PassOptionalByteWithDefaultBeforeRequired(int8_t arg1, int8_t arg2, ErrorResult& aRv, JS::Realm* aRealm)
77817{
77818 return mImpl->PassOptionalByteWithDefaultBeforeRequired(arg1, arg2, aRv, aRealm);
77819}
77820
77821void
77822TestJSImplInterface::PassNullableByte(const Nullable<int8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
77823{
77824 return mImpl->PassNullableByte(arg, aRv, aRealm);
77825}
77826
77827void
77828TestJSImplInterface::PassOptionalNullableByte(const Optional<Nullable<int8_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
77829{
77830 return mImpl->PassOptionalNullableByte(arg, aRv, aRealm);
77831}
77832
77833void
77834TestJSImplInterface::PassVariadicByte(const Sequence<int8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
77835{
77836 return mImpl->PassVariadicByte(arg, aRv, aRealm);
77837}
77838
77839int8_t
77840TestJSImplInterface::GetSideEffectFreeByte(ErrorResult& aRv, JS::Realm* aRealm) const
77841{
77842 return mImpl->GetSideEffectFreeByte(aRv, aRealm);
77843}
77844
77845void
77846TestJSImplInterface::SetSideEffectFreeByte(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77847{
77848 mImpl->SetSideEffectFreeByte(arg, aRv, aRealm);
77849}
77850
77851int8_t
77852TestJSImplInterface::GetDomDependentByte(ErrorResult& aRv, JS::Realm* aRealm) const
77853{
77854 return mImpl->GetDomDependentByte(aRv, aRealm);
77855}
77856
77857void
77858TestJSImplInterface::SetDomDependentByte(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77859{
77860 mImpl->SetDomDependentByte(arg, aRv, aRealm);
77861}
77862
77863int8_t
77864TestJSImplInterface::GetConstantByte(ErrorResult& aRv, JS::Realm* aRealm) const
77865{
77866 return mImpl->GetConstantByte(aRv, aRealm);
77867}
77868
77869int8_t
77870TestJSImplInterface::GetDeviceStateDependentByte(ErrorResult& aRv, JS::Realm* aRealm) const
77871{
77872 return mImpl->GetDeviceStateDependentByte(aRv, aRealm);
77873}
77874
77875int8_t
77876TestJSImplInterface::ReturnByteSideEffectFree(ErrorResult& aRv, JS::Realm* aRealm)
77877{
77878 return mImpl->ReturnByteSideEffectFree(aRv, aRealm);
77879}
77880
77881int8_t
77882TestJSImplInterface::ReturnDOMDependentByte(ErrorResult& aRv, JS::Realm* aRealm)
77883{
77884 return mImpl->ReturnDOMDependentByte(aRv, aRealm);
77885}
77886
77887int8_t
77888TestJSImplInterface::ReturnConstantByte(ErrorResult& aRv, JS::Realm* aRealm)
77889{
77890 return mImpl->ReturnConstantByte(aRv, aRealm);
77891}
77892
77893int8_t
77894TestJSImplInterface::ReturnDeviceStateDependentByte(ErrorResult& aRv, JS::Realm* aRealm)
77895{
77896 return mImpl->ReturnDeviceStateDependentByte(aRv, aRealm);
77897}
77898
77899int16_t
77900TestJSImplInterface::GetReadonlyShort(ErrorResult& aRv, JS::Realm* aRealm) const
77901{
77902 return mImpl->GetReadonlyShort(aRv, aRealm);
77903}
77904
77905int16_t
77906TestJSImplInterface::GetWritableShort(ErrorResult& aRv, JS::Realm* aRealm) const
77907{
77908 return mImpl->GetWritableShort(aRv, aRealm);
77909}
77910
77911void
77912TestJSImplInterface::SetWritableShort(int16_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77913{
77914 mImpl->SetWritableShort(arg, aRv, aRealm);
77915}
77916
77917void
77918TestJSImplInterface::PassShort(int16_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77919{
77920 return mImpl->PassShort(arg, aRv, aRealm);
77921}
77922
77923int16_t
77924TestJSImplInterface::ReceiveShort(ErrorResult& aRv, JS::Realm* aRealm)
77925{
77926 return mImpl->ReceiveShort(aRv, aRealm);
77927}
77928
77929void
77930TestJSImplInterface::PassOptionalShort(const Optional<int16_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
77931{
77932 return mImpl->PassOptionalShort(arg, aRv, aRealm);
77933}
77934
77935void
77936TestJSImplInterface::PassOptionalShortWithDefault(int16_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77937{
77938 return mImpl->PassOptionalShortWithDefault(arg, aRv, aRealm);
77939}
77940
77941int32_t
77942TestJSImplInterface::GetReadonlyLong(ErrorResult& aRv, JS::Realm* aRealm) const
77943{
77944 return mImpl->GetReadonlyLong(aRv, aRealm);
77945}
77946
77947int32_t
77948TestJSImplInterface::GetWritableLong(ErrorResult& aRv, JS::Realm* aRealm) const
77949{
77950 return mImpl->GetWritableLong(aRv, aRealm);
77951}
77952
77953void
77954TestJSImplInterface::SetWritableLong(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77955{
77956 mImpl->SetWritableLong(arg, aRv, aRealm);
77957}
77958
77959void
77960TestJSImplInterface::PassLong(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77961{
77962 return mImpl->PassLong(arg, aRv, aRealm);
77963}
77964
77965int32_t
77966TestJSImplInterface::ReceiveLong(ErrorResult& aRv, JS::Realm* aRealm)
77967{
77968 return mImpl->ReceiveLong(aRv, aRealm);
77969}
77970
77971void
77972TestJSImplInterface::PassOptionalLong(const Optional<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
77973{
77974 return mImpl->PassOptionalLong(arg, aRv, aRealm);
77975}
77976
77977void
77978TestJSImplInterface::PassOptionalLongWithDefault(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77979{
77980 return mImpl->PassOptionalLongWithDefault(arg, aRv, aRealm);
77981}
77982
77983int64_t
77984TestJSImplInterface::GetReadonlyLongLong(ErrorResult& aRv, JS::Realm* aRealm) const
77985{
77986 return mImpl->GetReadonlyLongLong(aRv, aRealm);
77987}
77988
77989int64_t
77990TestJSImplInterface::GetWritableLongLong(ErrorResult& aRv, JS::Realm* aRealm) const
77991{
77992 return mImpl->GetWritableLongLong(aRv, aRealm);
77993}
77994
77995void
77996TestJSImplInterface::SetWritableLongLong(int64_t arg, ErrorResult& aRv, JS::Realm* aRealm)
77997{
77998 mImpl->SetWritableLongLong(arg, aRv, aRealm);
77999}
78000
78001void
78002TestJSImplInterface::PassLongLong(int64_t arg, ErrorResult& aRv, JS::Realm* aRealm)
78003{
78004 return mImpl->PassLongLong(arg, aRv, aRealm);
78005}
78006
78007int64_t
78008TestJSImplInterface::ReceiveLongLong(ErrorResult& aRv, JS::Realm* aRealm)
78009{
78010 return mImpl->ReceiveLongLong(aRv, aRealm);
78011}
78012
78013void
78014TestJSImplInterface::PassOptionalLongLong(const Optional<int64_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78015{
78016 return mImpl->PassOptionalLongLong(arg, aRv, aRealm);
78017}
78018
78019void
78020TestJSImplInterface::PassOptionalLongLongWithDefault(int64_t arg, ErrorResult& aRv, JS::Realm* aRealm)
78021{
78022 return mImpl->PassOptionalLongLongWithDefault(arg, aRv, aRealm);
78023}
78024
78025uint8_t
78026TestJSImplInterface::GetReadonlyOctet(ErrorResult& aRv, JS::Realm* aRealm) const
78027{
78028 return mImpl->GetReadonlyOctet(aRv, aRealm);
78029}
78030
78031uint8_t
78032TestJSImplInterface::GetWritableOctet(ErrorResult& aRv, JS::Realm* aRealm) const
78033{
78034 return mImpl->GetWritableOctet(aRv, aRealm);
78035}
78036
78037void
78038TestJSImplInterface::SetWritableOctet(uint8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
78039{
78040 mImpl->SetWritableOctet(arg, aRv, aRealm);
78041}
78042
78043void
78044TestJSImplInterface::PassOctet(uint8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
78045{
78046 return mImpl->PassOctet(arg, aRv, aRealm);
78047}
78048
78049uint8_t
78050TestJSImplInterface::ReceiveOctet(ErrorResult& aRv, JS::Realm* aRealm)
78051{
78052 return mImpl->ReceiveOctet(aRv, aRealm);
78053}
78054
78055void
78056TestJSImplInterface::PassOptionalOctet(const Optional<uint8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78057{
78058 return mImpl->PassOptionalOctet(arg, aRv, aRealm);
78059}
78060
78061void
78062TestJSImplInterface::PassOptionalOctetWithDefault(uint8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
78063{
78064 return mImpl->PassOptionalOctetWithDefault(arg, aRv, aRealm);
78065}
78066
78067uint16_t
78068TestJSImplInterface::GetReadonlyUnsignedShort(ErrorResult& aRv, JS::Realm* aRealm) const
78069{
78070 return mImpl->GetReadonlyUnsignedShort(aRv, aRealm);
78071}
78072
78073uint16_t
78074TestJSImplInterface::GetWritableUnsignedShort(ErrorResult& aRv, JS::Realm* aRealm) const
78075{
78076 return mImpl->GetWritableUnsignedShort(aRv, aRealm);
78077}
78078
78079void
78080TestJSImplInterface::SetWritableUnsignedShort(uint16_t arg, ErrorResult& aRv, JS::Realm* aRealm)
78081{
78082 mImpl->SetWritableUnsignedShort(arg, aRv, aRealm);
78083}
78084
78085void
78086TestJSImplInterface::PassUnsignedShort(uint16_t arg, ErrorResult& aRv, JS::Realm* aRealm)
78087{
78088 return mImpl->PassUnsignedShort(arg, aRv, aRealm);
78089}
78090
78091uint16_t
78092TestJSImplInterface::ReceiveUnsignedShort(ErrorResult& aRv, JS::Realm* aRealm)
78093{
78094 return mImpl->ReceiveUnsignedShort(aRv, aRealm);
78095}
78096
78097void
78098TestJSImplInterface::PassOptionalUnsignedShort(const Optional<uint16_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78099{
78100 return mImpl->PassOptionalUnsignedShort(arg, aRv, aRealm);
78101}
78102
78103void
78104TestJSImplInterface::PassOptionalUnsignedShortWithDefault(uint16_t arg, ErrorResult& aRv, JS::Realm* aRealm)
78105{
78106 return mImpl->PassOptionalUnsignedShortWithDefault(arg, aRv, aRealm);
78107}
78108
78109uint32_t
78110TestJSImplInterface::GetReadonlyUnsignedLong(ErrorResult& aRv, JS::Realm* aRealm) const
78111{
78112 return mImpl->GetReadonlyUnsignedLong(aRv, aRealm);
78113}
78114
78115uint32_t
78116TestJSImplInterface::GetWritableUnsignedLong(ErrorResult& aRv, JS::Realm* aRealm) const
78117{
78118 return mImpl->GetWritableUnsignedLong(aRv, aRealm);
78119}
78120
78121void
78122TestJSImplInterface::SetWritableUnsignedLong(uint32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
78123{
78124 mImpl->SetWritableUnsignedLong(arg, aRv, aRealm);
78125}
78126
78127void
78128TestJSImplInterface::PassUnsignedLong(uint32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
78129{
78130 return mImpl->PassUnsignedLong(arg, aRv, aRealm);
78131}
78132
78133uint32_t
78134TestJSImplInterface::ReceiveUnsignedLong(ErrorResult& aRv, JS::Realm* aRealm)
78135{
78136 return mImpl->ReceiveUnsignedLong(aRv, aRealm);
78137}
78138
78139void
78140TestJSImplInterface::PassOptionalUnsignedLong(const Optional<uint32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78141{
78142 return mImpl->PassOptionalUnsignedLong(arg, aRv, aRealm);
78143}
78144
78145void
78146TestJSImplInterface::PassOptionalUnsignedLongWithDefault(uint32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
78147{
78148 return mImpl->PassOptionalUnsignedLongWithDefault(arg, aRv, aRealm);
78149}
78150
78151uint64_t
78152TestJSImplInterface::GetReadonlyUnsignedLongLong(ErrorResult& aRv, JS::Realm* aRealm) const
78153{
78154 return mImpl->GetReadonlyUnsignedLongLong(aRv, aRealm);
78155}
78156
78157uint64_t
78158TestJSImplInterface::GetWritableUnsignedLongLong(ErrorResult& aRv, JS::Realm* aRealm) const
78159{
78160 return mImpl->GetWritableUnsignedLongLong(aRv, aRealm);
78161}
78162
78163void
78164TestJSImplInterface::SetWritableUnsignedLongLong(uint64_t arg, ErrorResult& aRv, JS::Realm* aRealm)
78165{
78166 mImpl->SetWritableUnsignedLongLong(arg, aRv, aRealm);
78167}
78168
78169void
78170TestJSImplInterface::PassUnsignedLongLong(uint64_t arg, ErrorResult& aRv, JS::Realm* aRealm)
78171{
78172 return mImpl->PassUnsignedLongLong(arg, aRv, aRealm);
78173}
78174
78175uint64_t
78176TestJSImplInterface::ReceiveUnsignedLongLong(ErrorResult& aRv, JS::Realm* aRealm)
78177{
78178 return mImpl->ReceiveUnsignedLongLong(aRv, aRealm);
78179}
78180
78181void
78182TestJSImplInterface::PassOptionalUnsignedLongLong(const Optional<uint64_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78183{
78184 return mImpl->PassOptionalUnsignedLongLong(arg, aRv, aRealm);
78185}
78186
78187void
78188TestJSImplInterface::PassOptionalUnsignedLongLongWithDefault(uint64_t arg, ErrorResult& aRv, JS::Realm* aRealm)
78189{
78190 return mImpl->PassOptionalUnsignedLongLongWithDefault(arg, aRv, aRealm);
78191}
78192
78193float
78194TestJSImplInterface::GetWritableFloat(ErrorResult& aRv, JS::Realm* aRealm) const
78195{
78196 return mImpl->GetWritableFloat(aRv, aRealm);
78197}
78198
78199void
78200TestJSImplInterface::SetWritableFloat(float arg, ErrorResult& aRv, JS::Realm* aRealm)
78201{
78202 mImpl->SetWritableFloat(arg, aRv, aRealm);
78203}
78204
78205float
78206TestJSImplInterface::GetWritableUnrestrictedFloat(ErrorResult& aRv, JS::Realm* aRealm) const
78207{
78208 return mImpl->GetWritableUnrestrictedFloat(aRv, aRealm);
78209}
78210
78211void
78212TestJSImplInterface::SetWritableUnrestrictedFloat(float arg, ErrorResult& aRv, JS::Realm* aRealm)
78213{
78214 mImpl->SetWritableUnrestrictedFloat(arg, aRv, aRealm);
78215}
78216
78217Nullable<float>
78218TestJSImplInterface::GetWritableNullableFloat(ErrorResult& aRv, JS::Realm* aRealm) const
78219{
78220 return mImpl->GetWritableNullableFloat(aRv, aRealm);
78221}
78222
78223void
78224TestJSImplInterface::SetWritableNullableFloat(const Nullable<float>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78225{
78226 mImpl->SetWritableNullableFloat(arg, aRv, aRealm);
78227}
78228
78229Nullable<float>
78230TestJSImplInterface::GetWritableNullableUnrestrictedFloat(ErrorResult& aRv, JS::Realm* aRealm) const
78231{
78232 return mImpl->GetWritableNullableUnrestrictedFloat(aRv, aRealm);
78233}
78234
78235void
78236TestJSImplInterface::SetWritableNullableUnrestrictedFloat(const Nullable<float>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78237{
78238 mImpl->SetWritableNullableUnrestrictedFloat(arg, aRv, aRealm);
78239}
78240
78241double
78242TestJSImplInterface::GetWritableDouble(ErrorResult& aRv, JS::Realm* aRealm) const
78243{
78244 return mImpl->GetWritableDouble(aRv, aRealm);
78245}
78246
78247void
78248TestJSImplInterface::SetWritableDouble(double arg, ErrorResult& aRv, JS::Realm* aRealm)
78249{
78250 mImpl->SetWritableDouble(arg, aRv, aRealm);
78251}
78252
78253double
78254TestJSImplInterface::GetWritableUnrestrictedDouble(ErrorResult& aRv, JS::Realm* aRealm) const
78255{
78256 return mImpl->GetWritableUnrestrictedDouble(aRv, aRealm);
78257}
78258
78259void
78260TestJSImplInterface::SetWritableUnrestrictedDouble(double arg, ErrorResult& aRv, JS::Realm* aRealm)
78261{
78262 mImpl->SetWritableUnrestrictedDouble(arg, aRv, aRealm);
78263}
78264
78265Nullable<double>
78266TestJSImplInterface::GetWritableNullableDouble(ErrorResult& aRv, JS::Realm* aRealm) const
78267{
78268 return mImpl->GetWritableNullableDouble(aRv, aRealm);
78269}
78270
78271void
78272TestJSImplInterface::SetWritableNullableDouble(const Nullable<double>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78273{
78274 mImpl->SetWritableNullableDouble(arg, aRv, aRealm);
78275}
78276
78277Nullable<double>
78278TestJSImplInterface::GetWritableNullableUnrestrictedDouble(ErrorResult& aRv, JS::Realm* aRealm) const
78279{
78280 return mImpl->GetWritableNullableUnrestrictedDouble(aRv, aRealm);
78281}
78282
78283void
78284TestJSImplInterface::SetWritableNullableUnrestrictedDouble(const Nullable<double>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78285{
78286 mImpl->SetWritableNullableUnrestrictedDouble(arg, aRv, aRealm);
78287}
78288
78289void
78290TestJSImplInterface::PassFloat(float arg1, float arg2, const Nullable<float>& arg3, const Nullable<float>& arg4, double arg5, double arg6, const Nullable<double>& arg7, const Nullable<double>& arg8, const Sequence<float>& arg9, const Sequence<float>& arg10, const Sequence<Nullable<float>>& arg11, const Sequence<Nullable<float>>& arg12, const Sequence<double>& arg13, const Sequence<double>& arg14, const Sequence<Nullable<double>>& arg15, const Sequence<Nullable<double>>& arg16, ErrorResult& aRv, JS::Realm* aRealm)
78291{
78292 return mImpl->PassFloat(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, aRv, aRealm);
78293}
78294
78295void
78296TestJSImplInterface::PassLenientFloat(float arg1, float arg2, const Nullable<float>& arg3, const Nullable<float>& arg4, double arg5, double arg6, const Nullable<double>& arg7, const Nullable<double>& arg8, const Sequence<float>& arg9, const Sequence<float>& arg10, const Sequence<Nullable<float>>& arg11, const Sequence<Nullable<float>>& arg12, const Sequence<double>& arg13, const Sequence<double>& arg14, const Sequence<Nullable<double>>& arg15, const Sequence<Nullable<double>>& arg16, ErrorResult& aRv, JS::Realm* aRealm)
78297{
78298 return mImpl->PassLenientFloat(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, aRv, aRealm);
78299}
78300
78301float
78302TestJSImplInterface::GetLenientFloatAttr(ErrorResult& aRv, JS::Realm* aRealm) const
78303{
78304 return mImpl->GetLenientFloatAttr(aRv, aRealm);
78305}
78306
78307void
78308TestJSImplInterface::SetLenientFloatAttr(float arg, ErrorResult& aRv, JS::Realm* aRealm)
78309{
78310 mImpl->SetLenientFloatAttr(arg, aRv, aRealm);
78311}
78312
78313double
78314TestJSImplInterface::GetLenientDoubleAttr(ErrorResult& aRv, JS::Realm* aRealm) const
78315{
78316 return mImpl->GetLenientDoubleAttr(aRv, aRealm);
78317}
78318
78319void
78320TestJSImplInterface::SetLenientDoubleAttr(double arg, ErrorResult& aRv, JS::Realm* aRealm)
78321{
78322 mImpl->SetLenientDoubleAttr(arg, aRv, aRealm);
78323}
78324
78325// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78326already_AddRefed<TestJSImplInterface>
78327TestJSImplInterface::ReceiveSelf(ErrorResult& aRv, JS::Realm* aRealm)
78328{
78329 return mImpl->ReceiveSelf(aRv, aRealm);
78330}
78331
78332// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78333already_AddRefed<TestJSImplInterface>
78334TestJSImplInterface::ReceiveNullableSelf(ErrorResult& aRv, JS::Realm* aRealm)
78335{
78336 return mImpl->ReceiveNullableSelf(aRv, aRealm);
78337}
78338
78339// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78340already_AddRefed<TestJSImplInterface>
78341TestJSImplInterface::ReceiveWeakSelf(ErrorResult& aRv, JS::Realm* aRealm)
78342{
78343 return mImpl->ReceiveWeakSelf(aRv, aRealm);
78344}
78345
78346// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78347already_AddRefed<TestJSImplInterface>
78348TestJSImplInterface::ReceiveWeakNullableSelf(ErrorResult& aRv, JS::Realm* aRealm)
78349{
78350 return mImpl->ReceiveWeakNullableSelf(aRv, aRealm);
78351}
78352
78353void
78354TestJSImplInterface::PassSelf(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
78355{
78356 return mImpl->PassSelf(arg, aRv, aRealm);
78357}
78358
78359void
78360TestJSImplInterface::PassNullableSelf(TestJSImplInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
78361{
78362 return mImpl->PassNullableSelf(arg, aRv, aRealm);
78363}
78364
78365// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78366already_AddRefed<TestJSImplInterface>
78367TestJSImplInterface::GetNonNullSelf(ErrorResult& aRv, JS::Realm* aRealm) const
78368{
78369 return mImpl->GetNonNullSelf(aRv, aRealm);
78370}
78371
78372void
78373TestJSImplInterface::SetNonNullSelf(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
78374{
78375 mImpl->SetNonNullSelf(arg, aRv, aRealm);
78376}
78377
78378// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78379already_AddRefed<TestJSImplInterface>
78380TestJSImplInterface::GetNullableSelf(ErrorResult& aRv, JS::Realm* aRealm) const
78381{
78382 return mImpl->GetNullableSelf(aRv, aRealm);
78383}
78384
78385void
78386TestJSImplInterface::SetNullableSelf(TestJSImplInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
78387{
78388 mImpl->SetNullableSelf(arg, aRv, aRealm);
78389}
78390
78391void
78392TestJSImplInterface::PassOptionalSelf(const Optional<TestJSImplInterface*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78393{
78394 return mImpl->PassOptionalSelf(arg, aRv, aRealm);
78395}
78396
78397void
78398TestJSImplInterface::PassOptionalNonNullSelf(const Optional<NonNull<TestJSImplInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78399{
78400 return mImpl->PassOptionalNonNullSelf(arg, aRv, aRealm);
78401}
78402
78403void
78404TestJSImplInterface::PassOptionalSelfWithDefault(TestJSImplInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
78405{
78406 return mImpl->PassOptionalSelfWithDefault(arg, aRv, aRealm);
78407}
78408
78409already_AddRefed<TestNonWrapperCacheInterface>
78410TestJSImplInterface::ReceiveNonWrapperCacheInterface(ErrorResult& aRv, JS::Realm* aRealm)
78411{
78412 return mImpl->ReceiveNonWrapperCacheInterface(aRv, aRealm);
78413}
78414
78415already_AddRefed<TestNonWrapperCacheInterface>
78416TestJSImplInterface::ReceiveNullableNonWrapperCacheInterface(ErrorResult& aRv, JS::Realm* aRealm)
78417{
78418 return mImpl->ReceiveNullableNonWrapperCacheInterface(aRv, aRealm);
78419}
78420
78421void
78422TestJSImplInterface::ReceiveNonWrapperCacheInterfaceSequence(nsTArray<RefPtr<TestNonWrapperCacheInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78423{
78424 return mImpl->ReceiveNonWrapperCacheInterfaceSequence(aRetVal, aRv, aRealm);
78425}
78426
78427void
78428TestJSImplInterface::ReceiveNullableNonWrapperCacheInterfaceSequence(nsTArray<RefPtr<TestNonWrapperCacheInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78429{
78430 return mImpl->ReceiveNullableNonWrapperCacheInterfaceSequence(aRetVal, aRv, aRealm);
78431}
78432
78433void
78434TestJSImplInterface::ReceiveNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<RefPtr<TestNonWrapperCacheInterface>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78435{
78436 return mImpl->ReceiveNonWrapperCacheInterfaceNullableSequence(aRetVal, aRv, aRealm);
78437}
78438
78439void
78440TestJSImplInterface::ReceiveNullableNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<RefPtr<TestNonWrapperCacheInterface>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78441{
78442 return mImpl->ReceiveNullableNonWrapperCacheInterfaceNullableSequence(aRetVal, aRv, aRealm);
78443}
78444
78445// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78446already_AddRefed<TestExternalInterface>
78447TestJSImplInterface::ReceiveExternal(ErrorResult& aRv, JS::Realm* aRealm)
78448{
78449 return mImpl->ReceiveExternal(aRv, aRealm);
78450}
78451
78452// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78453already_AddRefed<TestExternalInterface>
78454TestJSImplInterface::ReceiveNullableExternal(ErrorResult& aRv, JS::Realm* aRealm)
78455{
78456 return mImpl->ReceiveNullableExternal(aRv, aRealm);
78457}
78458
78459// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78460already_AddRefed<TestExternalInterface>
78461TestJSImplInterface::ReceiveWeakExternal(ErrorResult& aRv, JS::Realm* aRealm)
78462{
78463 return mImpl->ReceiveWeakExternal(aRv, aRealm);
78464}
78465
78466// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78467already_AddRefed<TestExternalInterface>
78468TestJSImplInterface::ReceiveWeakNullableExternal(ErrorResult& aRv, JS::Realm* aRealm)
78469{
78470 return mImpl->ReceiveWeakNullableExternal(aRv, aRealm);
78471}
78472
78473void
78474TestJSImplInterface::PassExternal(TestExternalInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
78475{
78476 return mImpl->PassExternal(arg, aRv, aRealm);
78477}
78478
78479void
78480TestJSImplInterface::PassNullableExternal(TestExternalInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
78481{
78482 return mImpl->PassNullableExternal(arg, aRv, aRealm);
78483}
78484
78485// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78486already_AddRefed<TestExternalInterface>
78487TestJSImplInterface::GetNonNullExternal(ErrorResult& aRv, JS::Realm* aRealm) const
78488{
78489 return mImpl->GetNonNullExternal(aRv, aRealm);
78490}
78491
78492void
78493TestJSImplInterface::SetNonNullExternal(TestExternalInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
78494{
78495 mImpl->SetNonNullExternal(arg, aRv, aRealm);
78496}
78497
78498// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78499already_AddRefed<TestExternalInterface>
78500TestJSImplInterface::GetNullableExternal(ErrorResult& aRv, JS::Realm* aRealm) const
78501{
78502 return mImpl->GetNullableExternal(aRv, aRealm);
78503}
78504
78505void
78506TestJSImplInterface::SetNullableExternal(TestExternalInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
78507{
78508 mImpl->SetNullableExternal(arg, aRv, aRealm);
78509}
78510
78511void
78512TestJSImplInterface::PassOptionalExternal(const Optional<TestExternalInterface*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78513{
78514 return mImpl->PassOptionalExternal(arg, aRv, aRealm);
78515}
78516
78517void
78518TestJSImplInterface::PassOptionalNonNullExternal(const Optional<TestExternalInterface*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78519{
78520 return mImpl->PassOptionalNonNullExternal(arg, aRv, aRealm);
78521}
78522
78523void
78524TestJSImplInterface::PassOptionalExternalWithDefault(TestExternalInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
78525{
78526 return mImpl->PassOptionalExternalWithDefault(arg, aRv, aRealm);
78527}
78528
78529// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78530already_AddRefed<TestCallbackInterface>
78531TestJSImplInterface::ReceiveCallbackInterface(ErrorResult& aRv, JS::Realm* aRealm)
78532{
78533 return mImpl->ReceiveCallbackInterface(aRv, aRealm);
78534}
78535
78536// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78537already_AddRefed<TestCallbackInterface>
78538TestJSImplInterface::ReceiveNullableCallbackInterface(ErrorResult& aRv, JS::Realm* aRealm)
78539{
78540 return mImpl->ReceiveNullableCallbackInterface(aRv, aRealm);
78541}
78542
78543// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78544already_AddRefed<TestCallbackInterface>
78545TestJSImplInterface::ReceiveWeakCallbackInterface(ErrorResult& aRv, JS::Realm* aRealm)
78546{
78547 return mImpl->ReceiveWeakCallbackInterface(aRv, aRealm);
78548}
78549
78550// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78551already_AddRefed<TestCallbackInterface>
78552TestJSImplInterface::ReceiveWeakNullableCallbackInterface(ErrorResult& aRv, JS::Realm* aRealm)
78553{
78554 return mImpl->ReceiveWeakNullableCallbackInterface(aRv, aRealm);
78555}
78556
78557void
78558TestJSImplInterface::PassCallbackInterface(TestCallbackInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
78559{
78560 return mImpl->PassCallbackInterface(arg, aRv, aRealm);
78561}
78562
78563void
78564TestJSImplInterface::PassNullableCallbackInterface(TestCallbackInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
78565{
78566 return mImpl->PassNullableCallbackInterface(arg, aRv, aRealm);
78567}
78568
78569// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78570already_AddRefed<TestCallbackInterface>
78571TestJSImplInterface::GetNonNullCallbackInterface(ErrorResult& aRv, JS::Realm* aRealm) const
78572{
78573 return mImpl->GetNonNullCallbackInterface(aRv, aRealm);
78574}
78575
78576void
78577TestJSImplInterface::SetNonNullCallbackInterface(TestCallbackInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
78578{
78579 mImpl->SetNonNullCallbackInterface(arg, aRv, aRealm);
78580}
78581
78582// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
78583already_AddRefed<TestCallbackInterface>
78584TestJSImplInterface::GetNullableCallbackInterface(ErrorResult& aRv, JS::Realm* aRealm) const
78585{
78586 return mImpl->GetNullableCallbackInterface(aRv, aRealm);
78587}
78588
78589void
78590TestJSImplInterface::SetNullableCallbackInterface(TestCallbackInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
78591{
78592 mImpl->SetNullableCallbackInterface(arg, aRv, aRealm);
78593}
78594
78595void
78596TestJSImplInterface::PassOptionalCallbackInterface(const Optional<RefPtr<TestCallbackInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78597{
78598 return mImpl->PassOptionalCallbackInterface(arg, aRv, aRealm);
78599}
78600
78601void
78602TestJSImplInterface::PassOptionalNonNullCallbackInterface(const Optional<OwningNonNull<TestCallbackInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78603{
78604 return mImpl->PassOptionalNonNullCallbackInterface(arg, aRv, aRealm);
78605}
78606
78607void
78608TestJSImplInterface::PassOptionalCallbackInterfaceWithDefault(TestCallbackInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
78609{
78610 return mImpl->PassOptionalCallbackInterfaceWithDefault(arg, aRv, aRealm);
78611}
78612
78613void
78614TestJSImplInterface::ReceiveSequence(nsTArray<int32_t>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78615{
78616 return mImpl->ReceiveSequence(aRetVal, aRv, aRealm);
78617}
78618
78619void
78620TestJSImplInterface::ReceiveNullableSequence(Nullable<nsTArray<int32_t>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78621{
78622 return mImpl->ReceiveNullableSequence(aRetVal, aRv, aRealm);
78623}
78624
78625void
78626TestJSImplInterface::ReceiveSequenceOfNullableInts(nsTArray<Nullable<int32_t>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78627{
78628 return mImpl->ReceiveSequenceOfNullableInts(aRetVal, aRv, aRealm);
78629}
78630
78631void
78632TestJSImplInterface::ReceiveNullableSequenceOfNullableInts(Nullable<nsTArray<Nullable<int32_t>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78633{
78634 return mImpl->ReceiveNullableSequenceOfNullableInts(aRetVal, aRv, aRealm);
78635}
78636
78637void
78638TestJSImplInterface::PassSequence(const Sequence<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78639{
78640 return mImpl->PassSequence(arg, aRv, aRealm);
78641}
78642
78643void
78644TestJSImplInterface::PassNullableSequence(const Nullable<Sequence<int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78645{
78646 return mImpl->PassNullableSequence(arg, aRv, aRealm);
78647}
78648
78649void
78650TestJSImplInterface::PassSequenceOfNullableInts(const Sequence<Nullable<int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78651{
78652 return mImpl->PassSequenceOfNullableInts(arg, aRv, aRealm);
78653}
78654
78655void
78656TestJSImplInterface::PassOptionalSequenceOfNullableInts(const Optional<Sequence<Nullable<int32_t>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78657{
78658 return mImpl->PassOptionalSequenceOfNullableInts(arg, aRv, aRealm);
78659}
78660
78661void
78662TestJSImplInterface::PassOptionalNullableSequenceOfNullableInts(const Optional<Nullable<Sequence<Nullable<int32_t>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78663{
78664 return mImpl->PassOptionalNullableSequenceOfNullableInts(arg, aRv, aRealm);
78665}
78666
78667void
78668TestJSImplInterface::ReceiveCastableObjectSequence(nsTArray<RefPtr<TestJSImplInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78669{
78670 return mImpl->ReceiveCastableObjectSequence(aRetVal, aRv, aRealm);
78671}
78672
78673void
78674TestJSImplInterface::ReceiveCallbackObjectSequence(nsTArray<RefPtr<TestCallbackInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78675{
78676 return mImpl->ReceiveCallbackObjectSequence(aRetVal, aRv, aRealm);
78677}
78678
78679void
78680TestJSImplInterface::ReceiveNullableCastableObjectSequence(nsTArray<RefPtr<TestJSImplInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78681{
78682 return mImpl->ReceiveNullableCastableObjectSequence(aRetVal, aRv, aRealm);
78683}
78684
78685void
78686TestJSImplInterface::ReceiveNullableCallbackObjectSequence(nsTArray<RefPtr<TestCallbackInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78687{
78688 return mImpl->ReceiveNullableCallbackObjectSequence(aRetVal, aRv, aRealm);
78689}
78690
78691void
78692TestJSImplInterface::ReceiveCastableObjectNullableSequence(Nullable<nsTArray<RefPtr<TestJSImplInterface>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78693{
78694 return mImpl->ReceiveCastableObjectNullableSequence(aRetVal, aRv, aRealm);
78695}
78696
78697void
78698TestJSImplInterface::ReceiveNullableCastableObjectNullableSequence(Nullable<nsTArray<RefPtr<TestJSImplInterface>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78699{
78700 return mImpl->ReceiveNullableCastableObjectNullableSequence(aRetVal, aRv, aRealm);
78701}
78702
78703void
78704TestJSImplInterface::ReceiveWeakCastableObjectSequence(nsTArray<RefPtr<TestJSImplInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78705{
78706 return mImpl->ReceiveWeakCastableObjectSequence(aRetVal, aRv, aRealm);
78707}
78708
78709void
78710TestJSImplInterface::ReceiveWeakNullableCastableObjectSequence(nsTArray<RefPtr<TestJSImplInterface>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78711{
78712 return mImpl->ReceiveWeakNullableCastableObjectSequence(aRetVal, aRv, aRealm);
78713}
78714
78715void
78716TestJSImplInterface::ReceiveWeakCastableObjectNullableSequence(Nullable<nsTArray<RefPtr<TestJSImplInterface>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78717{
78718 return mImpl->ReceiveWeakCastableObjectNullableSequence(aRetVal, aRv, aRealm);
78719}
78720
78721void
78722TestJSImplInterface::ReceiveWeakNullableCastableObjectNullableSequence(Nullable<nsTArray<RefPtr<TestJSImplInterface>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78723{
78724 return mImpl->ReceiveWeakNullableCastableObjectNullableSequence(aRetVal, aRv, aRealm);
78725}
78726
78727void
78728TestJSImplInterface::PassCastableObjectSequence(const Sequence<OwningNonNull<TestJSImplInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78729{
78730 return mImpl->PassCastableObjectSequence(arg, aRv, aRealm);
78731}
78732
78733void
78734TestJSImplInterface::PassNullableCastableObjectSequence(const Sequence<RefPtr<TestJSImplInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78735{
78736 return mImpl->PassNullableCastableObjectSequence(arg, aRv, aRealm);
78737}
78738
78739void
78740TestJSImplInterface::PassCastableObjectNullableSequence(const Nullable<Sequence<OwningNonNull<TestJSImplInterface>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78741{
78742 return mImpl->PassCastableObjectNullableSequence(arg, aRv, aRealm);
78743}
78744
78745void
78746TestJSImplInterface::PassNullableCastableObjectNullableSequence(const Nullable<Sequence<RefPtr<TestJSImplInterface>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78747{
78748 return mImpl->PassNullableCastableObjectNullableSequence(arg, aRv, aRealm);
78749}
78750
78751void
78752TestJSImplInterface::PassOptionalSequence(const Optional<Sequence<int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78753{
78754 return mImpl->PassOptionalSequence(arg, aRv, aRealm);
78755}
78756
78757void
78758TestJSImplInterface::PassOptionalSequenceWithDefaultValue(const Sequence<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78759{
78760 return mImpl->PassOptionalSequenceWithDefaultValue(arg, aRv, aRealm);
78761}
78762
78763void
78764TestJSImplInterface::PassOptionalNullableSequence(const Optional<Nullable<Sequence<int32_t>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78765{
78766 return mImpl->PassOptionalNullableSequence(arg, aRv, aRealm);
78767}
78768
78769void
78770TestJSImplInterface::PassOptionalNullableSequenceWithDefaultValue(const Nullable<Sequence<int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78771{
78772 return mImpl->PassOptionalNullableSequenceWithDefaultValue(arg, aRv, aRealm);
78773}
78774
78775void
78776TestJSImplInterface::PassOptionalNullableSequenceWithDefaultValue2(const Nullable<Sequence<int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78777{
78778 return mImpl->PassOptionalNullableSequenceWithDefaultValue2(arg, aRv, aRealm);
78779}
78780
78781void
78782TestJSImplInterface::PassOptionalObjectSequence(const Optional<Sequence<OwningNonNull<TestJSImplInterface>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78783{
78784 return mImpl->PassOptionalObjectSequence(arg, aRv, aRealm);
78785}
78786
78787void
78788TestJSImplInterface::PassExternalInterfaceSequence(const Sequence<RefPtr<TestExternalInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78789{
78790 return mImpl->PassExternalInterfaceSequence(arg, aRv, aRealm);
78791}
78792
78793void
78794TestJSImplInterface::PassNullableExternalInterfaceSequence(const Sequence<RefPtr<TestExternalInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78795{
78796 return mImpl->PassNullableExternalInterfaceSequence(arg, aRv, aRealm);
78797}
78798
78799void
78800TestJSImplInterface::ReceiveStringSequence(nsTArray<nsString>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78801{
78802 return mImpl->ReceiveStringSequence(aRetVal, aRv, aRealm);
78803}
78804
78805void
78806TestJSImplInterface::ReceiveByteStringSequence(nsTArray<nsCString>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78807{
78808 return mImpl->ReceiveByteStringSequence(aRetVal, aRv, aRealm);
78809}
78810
78811void
78812TestJSImplInterface::ReceiveUTF8StringSequence(nsTArray<nsCString>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78813{
78814 return mImpl->ReceiveUTF8StringSequence(aRetVal, aRv, aRealm);
78815}
78816
78817void
78818TestJSImplInterface::ReceiveAnySequence(nsTArray<JS::Value>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78819{
78820 return mImpl->ReceiveAnySequence(aRetVal, aRv, aRealm);
78821}
78822
78823void
78824TestJSImplInterface::ReceiveNullableAnySequence(Nullable<nsTArray<JS::Value>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78825{
78826 return mImpl->ReceiveNullableAnySequence(aRetVal, aRv, aRealm);
78827}
78828
78829void
78830TestJSImplInterface::ReceiveObjectSequence(nsTArray<JSObject*>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78831{
78832 return mImpl->ReceiveObjectSequence(aRetVal, aRv, aRealm);
78833}
78834
78835void
78836TestJSImplInterface::ReceiveNullableObjectSequence(nsTArray<JSObject*>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78837{
78838 return mImpl->ReceiveNullableObjectSequence(aRetVal, aRv, aRealm);
78839}
78840
78841void
78842TestJSImplInterface::PassSequenceOfSequences(const Sequence<Sequence<int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78843{
78844 return mImpl->PassSequenceOfSequences(arg, aRv, aRealm);
78845}
78846
78847void
78848TestJSImplInterface::PassSequenceOfSequencesOfSequences(const Sequence<Sequence<Sequence<int32_t>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78849{
78850 return mImpl->PassSequenceOfSequencesOfSequences(arg, aRv, aRealm);
78851}
78852
78853void
78854TestJSImplInterface::PassRecord(const Record<nsString, int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78855{
78856 return mImpl->PassRecord(arg, aRv, aRealm);
78857}
78858
78859void
78860TestJSImplInterface::PassNullableRecord(const Nullable<Record<nsString, int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78861{
78862 return mImpl->PassNullableRecord(arg, aRv, aRealm);
78863}
78864
78865void
78866TestJSImplInterface::PassRecordOfNullableInts(const Record<nsString, Nullable<int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78867{
78868 return mImpl->PassRecordOfNullableInts(arg, aRv, aRealm);
78869}
78870
78871void
78872TestJSImplInterface::PassOptionalRecordOfNullableInts(const Optional<Record<nsString, Nullable<int32_t>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78873{
78874 return mImpl->PassOptionalRecordOfNullableInts(arg, aRv, aRealm);
78875}
78876
78877void
78878TestJSImplInterface::PassOptionalNullableRecordOfNullableInts(const Optional<Nullable<Record<nsString, Nullable<int32_t>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78879{
78880 return mImpl->PassOptionalNullableRecordOfNullableInts(arg, aRv, aRealm);
78881}
78882
78883void
78884TestJSImplInterface::PassCastableObjectRecord(const Record<nsString, OwningNonNull<TestInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78885{
78886 return mImpl->PassCastableObjectRecord(arg, aRv, aRealm);
78887}
78888
78889void
78890TestJSImplInterface::PassNullableCastableObjectRecord(const Record<nsString, RefPtr<TestInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78891{
78892 return mImpl->PassNullableCastableObjectRecord(arg, aRv, aRealm);
78893}
78894
78895void
78896TestJSImplInterface::PassCastableObjectNullableRecord(const Nullable<Record<nsString, OwningNonNull<TestInterface>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78897{
78898 return mImpl->PassCastableObjectNullableRecord(arg, aRv, aRealm);
78899}
78900
78901void
78902TestJSImplInterface::PassNullableCastableObjectNullableRecord(const Nullable<Record<nsString, RefPtr<TestInterface>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78903{
78904 return mImpl->PassNullableCastableObjectNullableRecord(arg, aRv, aRealm);
78905}
78906
78907void
78908TestJSImplInterface::PassOptionalRecord(const Optional<Record<nsString, int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78909{
78910 return mImpl->PassOptionalRecord(arg, aRv, aRealm);
78911}
78912
78913void
78914TestJSImplInterface::PassOptionalNullableRecord(const Optional<Nullable<Record<nsString, int32_t>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78915{
78916 return mImpl->PassOptionalNullableRecord(arg, aRv, aRealm);
78917}
78918
78919void
78920TestJSImplInterface::PassOptionalNullableRecordWithDefaultValue(const Nullable<Record<nsString, int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78921{
78922 return mImpl->PassOptionalNullableRecordWithDefaultValue(arg, aRv, aRealm);
78923}
78924
78925void
78926TestJSImplInterface::PassOptionalObjectRecord(const Optional<Record<nsString, OwningNonNull<TestInterface>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78927{
78928 return mImpl->PassOptionalObjectRecord(arg, aRv, aRealm);
78929}
78930
78931void
78932TestJSImplInterface::PassExternalInterfaceRecord(const Record<nsString, RefPtr<TestExternalInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78933{
78934 return mImpl->PassExternalInterfaceRecord(arg, aRv, aRealm);
78935}
78936
78937void
78938TestJSImplInterface::PassNullableExternalInterfaceRecord(const Record<nsString, RefPtr<TestExternalInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78939{
78940 return mImpl->PassNullableExternalInterfaceRecord(arg, aRv, aRealm);
78941}
78942
78943void
78944TestJSImplInterface::PassStringRecord(const Record<nsString, nsString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78945{
78946 return mImpl->PassStringRecord(arg, aRv, aRealm);
78947}
78948
78949void
78950TestJSImplInterface::PassByteStringRecord(const Record<nsString, nsCString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78951{
78952 return mImpl->PassByteStringRecord(arg, aRv, aRealm);
78953}
78954
78955void
78956TestJSImplInterface::PassUTF8StringRecord(const Record<nsString, nsCString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78957{
78958 return mImpl->PassUTF8StringRecord(arg, aRv, aRealm);
78959}
78960
78961void
78962TestJSImplInterface::PassRecordOfRecords(const Record<nsString, Record<nsString, int32_t>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
78963{
78964 return mImpl->PassRecordOfRecords(arg, aRv, aRealm);
78965}
78966
78967void
78968TestJSImplInterface::ReceiveRecord(Record<nsString, int32_t>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78969{
78970 return mImpl->ReceiveRecord(aRetVal, aRv, aRealm);
78971}
78972
78973void
78974TestJSImplInterface::ReceiveNullableRecord(Nullable<Record<nsString, int32_t>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78975{
78976 return mImpl->ReceiveNullableRecord(aRetVal, aRv, aRealm);
78977}
78978
78979void
78980TestJSImplInterface::ReceiveRecordOfNullableInts(Record<nsString, Nullable<int32_t>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78981{
78982 return mImpl->ReceiveRecordOfNullableInts(aRetVal, aRv, aRealm);
78983}
78984
78985void
78986TestJSImplInterface::ReceiveNullableRecordOfNullableInts(Nullable<Record<nsString, Nullable<int32_t>>>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78987{
78988 return mImpl->ReceiveNullableRecordOfNullableInts(aRetVal, aRv, aRealm);
78989}
78990
78991void
78992TestJSImplInterface::ReceiveAnyRecord(Record<nsString, JS::Value>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
78993{
78994 return mImpl->ReceiveAnyRecord(aRetVal, aRv, aRealm);
78995}
78996
78997void
78998TestJSImplInterface::PassArrayBuffer(const ArrayBuffer& arg, ErrorResult& aRv, JS::Realm* aRealm)
78999{
79000 return mImpl->PassArrayBuffer(arg, aRv, aRealm);
79001}
79002
79003void
79004TestJSImplInterface::PassNullableArrayBuffer(const Nullable<ArrayBuffer>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79005{
79006 return mImpl->PassNullableArrayBuffer(arg, aRv, aRealm);
79007}
79008
79009void
79010TestJSImplInterface::PassOptionalArrayBuffer(const Optional<ArrayBuffer>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79011{
79012 return mImpl->PassOptionalArrayBuffer(arg, aRv, aRealm);
79013}
79014
79015void
79016TestJSImplInterface::PassOptionalNullableArrayBuffer(const Optional<Nullable<ArrayBuffer>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79017{
79018 return mImpl->PassOptionalNullableArrayBuffer(arg, aRv, aRealm);
79019}
79020
79021void
79022TestJSImplInterface::PassOptionalNullableArrayBufferWithDefaultValue(const Nullable<ArrayBuffer>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79023{
79024 return mImpl->PassOptionalNullableArrayBufferWithDefaultValue(arg, aRv, aRealm);
79025}
79026
79027void
79028TestJSImplInterface::PassArrayBufferView(const ArrayBufferView& arg, ErrorResult& aRv, JS::Realm* aRealm)
79029{
79030 return mImpl->PassArrayBufferView(arg, aRv, aRealm);
79031}
79032
79033void
79034TestJSImplInterface::PassInt8Array(const Int8Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
79035{
79036 return mImpl->PassInt8Array(arg, aRv, aRealm);
79037}
79038
79039void
79040TestJSImplInterface::PassInt16Array(const Int16Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
79041{
79042 return mImpl->PassInt16Array(arg, aRv, aRealm);
79043}
79044
79045void
79046TestJSImplInterface::PassInt32Array(const Int32Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
79047{
79048 return mImpl->PassInt32Array(arg, aRv, aRealm);
79049}
79050
79051void
79052TestJSImplInterface::PassUint8Array(const Uint8Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
79053{
79054 return mImpl->PassUint8Array(arg, aRv, aRealm);
79055}
79056
79057void
79058TestJSImplInterface::PassUint16Array(const Uint16Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
79059{
79060 return mImpl->PassUint16Array(arg, aRv, aRealm);
79061}
79062
79063void
79064TestJSImplInterface::PassUint32Array(const Uint32Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
79065{
79066 return mImpl->PassUint32Array(arg, aRv, aRealm);
79067}
79068
79069void
79070TestJSImplInterface::PassUint8ClampedArray(const Uint8ClampedArray& arg, ErrorResult& aRv, JS::Realm* aRealm)
79071{
79072 return mImpl->PassUint8ClampedArray(arg, aRv, aRealm);
79073}
79074
79075void
79076TestJSImplInterface::PassFloat32Array(const Float32Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
79077{
79078 return mImpl->PassFloat32Array(arg, aRv, aRealm);
79079}
79080
79081void
79082TestJSImplInterface::PassFloat64Array(const Float64Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
79083{
79084 return mImpl->PassFloat64Array(arg, aRv, aRealm);
79085}
79086
79087void
79088TestJSImplInterface::PassSequenceOfArrayBuffers(const Sequence<ArrayBuffer>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79089{
79090 return mImpl->PassSequenceOfArrayBuffers(arg, aRv, aRealm);
79091}
79092
79093void
79094TestJSImplInterface::PassSequenceOfNullableArrayBuffers(const Sequence<Nullable<ArrayBuffer>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79095{
79096 return mImpl->PassSequenceOfNullableArrayBuffers(arg, aRv, aRealm);
79097}
79098
79099void
79100TestJSImplInterface::PassRecordOfArrayBuffers(const Record<nsString, ArrayBuffer>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79101{
79102 return mImpl->PassRecordOfArrayBuffers(arg, aRv, aRealm);
79103}
79104
79105void
79106TestJSImplInterface::PassRecordOfNullableArrayBuffers(const Record<nsString, Nullable<ArrayBuffer>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79107{
79108 return mImpl->PassRecordOfNullableArrayBuffers(arg, aRv, aRealm);
79109}
79110
79111void
79112TestJSImplInterface::PassVariadicTypedArray(const Sequence<Float32Array>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79113{
79114 return mImpl->PassVariadicTypedArray(arg, aRv, aRealm);
79115}
79116
79117void
79118TestJSImplInterface::PassVariadicNullableTypedArray(const Sequence<Nullable<Float32Array>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79119{
79120 return mImpl->PassVariadicNullableTypedArray(arg, aRv, aRealm);
79121}
79122
79123void
79124TestJSImplInterface::ReceiveUint8Array(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
79125{
79126 return mImpl->ReceiveUint8Array(aRetVal, aRv, aRealm);
79127}
79128
79129void
79130TestJSImplInterface::GetUint8ArrayAttr(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm) const
79131{
79132 return mImpl->GetUint8ArrayAttr(aRetVal, aRv, aRealm);
79133}
79134
79135void
79136TestJSImplInterface::SetUint8ArrayAttr(const Uint8Array& arg, ErrorResult& aRv, JS::Realm* aRealm)
79137{
79138 mImpl->SetUint8ArrayAttr(arg, aRv, aRealm);
79139}
79140
79141void
79142TestJSImplInterface::PassString(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79143{
79144 return mImpl->PassString(arg, aRv, aRealm);
79145}
79146
79147void
79148TestJSImplInterface::PassNullableString(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79149{
79150 return mImpl->PassNullableString(arg, aRv, aRealm);
79151}
79152
79153void
79154TestJSImplInterface::PassOptionalString(const Optional<nsAString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79155{
79156 return mImpl->PassOptionalString(arg, aRv, aRealm);
79157}
79158
79159void
79160TestJSImplInterface::PassOptionalStringWithDefaultValue(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79161{
79162 return mImpl->PassOptionalStringWithDefaultValue(arg, aRv, aRealm);
79163}
79164
79165void
79166TestJSImplInterface::PassOptionalNullableString(const Optional<nsAString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79167{
79168 return mImpl->PassOptionalNullableString(arg, aRv, aRealm);
79169}
79170
79171void
79172TestJSImplInterface::PassOptionalNullableStringWithDefaultValue(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79173{
79174 return mImpl->PassOptionalNullableStringWithDefaultValue(arg, aRv, aRealm);
79175}
79176
79177void
79178TestJSImplInterface::PassVariadicString(const Sequence<nsString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79179{
79180 return mImpl->PassVariadicString(arg, aRv, aRealm);
79181}
79182
79183void
79184TestJSImplInterface::PassByteString(const nsCString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79185{
79186 return mImpl->PassByteString(arg, aRv, aRealm);
79187}
79188
79189void
79190TestJSImplInterface::PassNullableByteString(const nsCString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79191{
79192 return mImpl->PassNullableByteString(arg, aRv, aRealm);
79193}
79194
79195void
79196TestJSImplInterface::PassOptionalByteString(const Optional<nsCString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79197{
79198 return mImpl->PassOptionalByteString(arg, aRv, aRealm);
79199}
79200
79201void
79202TestJSImplInterface::PassOptionalByteStringWithDefaultValue(const nsCString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79203{
79204 return mImpl->PassOptionalByteStringWithDefaultValue(arg, aRv, aRealm);
79205}
79206
79207void
79208TestJSImplInterface::PassOptionalNullableByteString(const Optional<nsCString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79209{
79210 return mImpl->PassOptionalNullableByteString(arg, aRv, aRealm);
79211}
79212
79213void
79214TestJSImplInterface::PassOptionalNullableByteStringWithDefaultValue(const nsCString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79215{
79216 return mImpl->PassOptionalNullableByteStringWithDefaultValue(arg, aRv, aRealm);
79217}
79218
79219void
79220TestJSImplInterface::PassVariadicByteString(const Sequence<nsCString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79221{
79222 return mImpl->PassVariadicByteString(arg, aRv, aRealm);
79223}
79224
79225void
79226TestJSImplInterface::PassUnionByteString(const ByteStringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79227{
79228 return mImpl->PassUnionByteString(arg, aRv, aRealm);
79229}
79230
79231void
79232TestJSImplInterface::PassOptionalUnionByteString(const Optional<ByteStringOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79233{
79234 return mImpl->PassOptionalUnionByteString(arg, aRv, aRealm);
79235}
79236
79237void
79238TestJSImplInterface::PassOptionalUnionByteStringWithDefaultValue(const ByteStringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79239{
79240 return mImpl->PassOptionalUnionByteStringWithDefaultValue(arg, aRv, aRealm);
79241}
79242
79243void
79244TestJSImplInterface::PassUTF8String(const nsACString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79245{
79246 return mImpl->PassUTF8String(arg, aRv, aRealm);
79247}
79248
79249void
79250TestJSImplInterface::PassNullableUTF8String(const nsACString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79251{
79252 return mImpl->PassNullableUTF8String(arg, aRv, aRealm);
79253}
79254
79255void
79256TestJSImplInterface::PassOptionalUTF8String(const Optional<nsACString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79257{
79258 return mImpl->PassOptionalUTF8String(arg, aRv, aRealm);
79259}
79260
79261void
79262TestJSImplInterface::PassOptionalUTF8StringWithDefaultValue(const nsACString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79263{
79264 return mImpl->PassOptionalUTF8StringWithDefaultValue(arg, aRv, aRealm);
79265}
79266
79267void
79268TestJSImplInterface::PassOptionalNullableUTF8String(const Optional<nsACString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79269{
79270 return mImpl->PassOptionalNullableUTF8String(arg, aRv, aRealm);
79271}
79272
79273void
79274TestJSImplInterface::PassOptionalNullableUTF8StringWithDefaultValue(const nsACString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79275{
79276 return mImpl->PassOptionalNullableUTF8StringWithDefaultValue(arg, aRv, aRealm);
79277}
79278
79279void
79280TestJSImplInterface::PassVariadicUTF8String(const Sequence<nsCString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79281{
79282 return mImpl->PassVariadicUTF8String(arg, aRv, aRealm);
79283}
79284
79285void
79286TestJSImplInterface::PassUnionUTF8String(const UTF8StringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79287{
79288 return mImpl->PassUnionUTF8String(arg, aRv, aRealm);
79289}
79290
79291void
79292TestJSImplInterface::PassOptionalUnionUTF8String(const Optional<UTF8StringOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79293{
79294 return mImpl->PassOptionalUnionUTF8String(arg, aRv, aRealm);
79295}
79296
79297void
79298TestJSImplInterface::PassOptionalUnionUTF8StringWithDefaultValue(const UTF8StringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79299{
79300 return mImpl->PassOptionalUnionUTF8StringWithDefaultValue(arg, aRv, aRealm);
79301}
79302
79303void
79304TestJSImplInterface::PassSVS(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79305{
79306 return mImpl->PassSVS(arg, aRv, aRealm);
79307}
79308
79309void
79310TestJSImplInterface::PassNullableSVS(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79311{
79312 return mImpl->PassNullableSVS(arg, aRv, aRealm);
79313}
79314
79315void
79316TestJSImplInterface::PassOptionalSVS(const Optional<nsAString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79317{
79318 return mImpl->PassOptionalSVS(arg, aRv, aRealm);
79319}
79320
79321void
79322TestJSImplInterface::PassOptionalSVSWithDefaultValue(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79323{
79324 return mImpl->PassOptionalSVSWithDefaultValue(arg, aRv, aRealm);
79325}
79326
79327void
79328TestJSImplInterface::PassOptionalNullableSVS(const Optional<nsAString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79329{
79330 return mImpl->PassOptionalNullableSVS(arg, aRv, aRealm);
79331}
79332
79333void
79334TestJSImplInterface::PassOptionalNullableSVSWithDefaultValue(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79335{
79336 return mImpl->PassOptionalNullableSVSWithDefaultValue(arg, aRv, aRealm);
79337}
79338
79339void
79340TestJSImplInterface::PassVariadicSVS(const Sequence<nsString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79341{
79342 return mImpl->PassVariadicSVS(arg, aRv, aRealm);
79343}
79344
79345void
79346TestJSImplInterface::ReceiveSVS(nsString& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
79347{
79348 return mImpl->ReceiveSVS(aRetVal, aRv, aRealm);
79349}
79350
79351void
79352TestJSImplInterface::PassJSString(JS::Handle<JSString*> arg, ErrorResult& aRv, JS::Realm* aRealm)
79353{
79354 return mImpl->PassJSString(arg, aRv, aRealm);
79355}
79356
79357void
79358TestJSImplInterface::PassOptionalJSStringWithDefaultValue(JS::Handle<JSString*> arg, ErrorResult& aRv, JS::Realm* aRealm)
79359{
79360 return mImpl->PassOptionalJSStringWithDefaultValue(arg, aRv, aRealm);
79361}
79362
79363void
79364TestJSImplInterface::ReceiveJSString(JS::MutableHandle<JSString*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
79365{
79366 return mImpl->ReceiveJSString(aRetVal, aRv, aRealm);
79367}
79368
79369void
79370TestJSImplInterface::GetReadonlyJSStringAttr(JS::MutableHandle<JSString*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm) const
79371{
79372 return mImpl->GetReadonlyJSStringAttr(aRetVal, aRv, aRealm);
79373}
79374
79375void
79376TestJSImplInterface::GetJsStringAttr(JS::MutableHandle<JSString*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm) const
79377{
79378 return mImpl->GetJsStringAttr(aRetVal, aRv, aRealm);
79379}
79380
79381void
79382TestJSImplInterface::SetJsStringAttr(JS::Handle<JSString*> arg, ErrorResult& aRv, JS::Realm* aRealm)
79383{
79384 mImpl->SetJsStringAttr(arg, aRv, aRealm);
79385}
79386
79387void
79388TestJSImplInterface::PassEnum(MyTestEnum arg, ErrorResult& aRv, JS::Realm* aRealm)
79389{
79390 return mImpl->PassEnum(arg, aRv, aRealm);
79391}
79392
79393void
79394TestJSImplInterface::PassNullableEnum(const Nullable<MyTestEnum>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79395{
79396 return mImpl->PassNullableEnum(arg, aRv, aRealm);
79397}
79398
79399void
79400TestJSImplInterface::PassOptionalEnum(const Optional<MyTestEnum>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79401{
79402 return mImpl->PassOptionalEnum(arg, aRv, aRealm);
79403}
79404
79405void
79406TestJSImplInterface::PassEnumWithDefault(MyTestEnum arg, ErrorResult& aRv, JS::Realm* aRealm)
79407{
79408 return mImpl->PassEnumWithDefault(arg, aRv, aRealm);
79409}
79410
79411void
79412TestJSImplInterface::PassOptionalNullableEnum(const Optional<Nullable<MyTestEnum>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79413{
79414 return mImpl->PassOptionalNullableEnum(arg, aRv, aRealm);
79415}
79416
79417void
79418TestJSImplInterface::PassOptionalNullableEnumWithDefaultValue(const Nullable<MyTestEnum>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79419{
79420 return mImpl->PassOptionalNullableEnumWithDefaultValue(arg, aRv, aRealm);
79421}
79422
79423void
79424TestJSImplInterface::PassOptionalNullableEnumWithDefaultValue2(const Nullable<MyTestEnum>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79425{
79426 return mImpl->PassOptionalNullableEnumWithDefaultValue2(arg, aRv, aRealm);
79427}
79428
79429MyTestEnum
79430TestJSImplInterface::ReceiveEnum(ErrorResult& aRv, JS::Realm* aRealm)
79431{
79432 return mImpl->ReceiveEnum(aRv, aRealm);
79433}
79434
79435Nullable<MyTestEnum>
79436TestJSImplInterface::ReceiveNullableEnum(ErrorResult& aRv, JS::Realm* aRealm)
79437{
79438 return mImpl->ReceiveNullableEnum(aRv, aRealm);
79439}
79440
79441MyTestEnum
79442TestJSImplInterface::GetEnumAttribute(ErrorResult& aRv, JS::Realm* aRealm) const
79443{
79444 return mImpl->GetEnumAttribute(aRv, aRealm);
79445}
79446
79447void
79448TestJSImplInterface::SetEnumAttribute(MyTestEnum arg, ErrorResult& aRv, JS::Realm* aRealm)
79449{
79450 mImpl->SetEnumAttribute(arg, aRv, aRealm);
79451}
79452
79453MyTestEnum
79454TestJSImplInterface::GetReadonlyEnumAttribute(ErrorResult& aRv, JS::Realm* aRealm) const
79455{
79456 return mImpl->GetReadonlyEnumAttribute(aRv, aRealm);
79457}
79458
79459void
79460TestJSImplInterface::PassCallback(MyTestCallback& arg, ErrorResult& aRv, JS::Realm* aRealm)
79461{
79462 return mImpl->PassCallback(arg, aRv, aRealm);
79463}
79464
79465void
79466TestJSImplInterface::PassNullableCallback(MyTestCallback* arg, ErrorResult& aRv, JS::Realm* aRealm)
79467{
79468 return mImpl->PassNullableCallback(arg, aRv, aRealm);
79469}
79470
79471void
79472TestJSImplInterface::PassOptionalCallback(const Optional<OwningNonNull<MyTestCallback>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79473{
79474 return mImpl->PassOptionalCallback(arg, aRv, aRealm);
79475}
79476
79477void
79478TestJSImplInterface::PassOptionalNullableCallback(const Optional<RefPtr<MyTestCallback>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79479{
79480 return mImpl->PassOptionalNullableCallback(arg, aRv, aRealm);
79481}
79482
79483void
79484TestJSImplInterface::PassOptionalNullableCallbackWithDefaultValue(MyTestCallback* arg, ErrorResult& aRv, JS::Realm* aRealm)
79485{
79486 return mImpl->PassOptionalNullableCallbackWithDefaultValue(arg, aRv, aRealm);
79487}
79488
79489already_AddRefed<MyTestCallback>
79490TestJSImplInterface::ReceiveCallback(ErrorResult& aRv, JS::Realm* aRealm)
79491{
79492 return mImpl->ReceiveCallback(aRv, aRealm);
79493}
79494
79495already_AddRefed<MyTestCallback>
79496TestJSImplInterface::ReceiveNullableCallback(ErrorResult& aRv, JS::Realm* aRealm)
79497{
79498 return mImpl->ReceiveNullableCallback(aRv, aRealm);
79499}
79500
79501void
79502TestJSImplInterface::PassOptionalNullableTreatAsNullCallbackWithDefaultValue(TestTreatAsNullCallback* arg, ErrorResult& aRv, JS::Realm* aRealm)
79503{
79504 return mImpl->PassOptionalNullableTreatAsNullCallbackWithDefaultValue(arg, aRv, aRealm);
79505}
79506
79507void
79508TestJSImplInterface::PassAny(JS::Handle<JS::Value> arg, ErrorResult& aRv, JS::Realm* aRealm)
79509{
79510 return mImpl->PassAny(arg, aRv, aRealm);
79511}
79512
79513void
79514TestJSImplInterface::PassVariadicAny(const Sequence<JS::Value>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79515{
79516 return mImpl->PassVariadicAny(arg, aRv, aRealm);
79517}
79518
79519void
79520TestJSImplInterface::PassOptionalAny(JS::Handle<JS::Value> arg, ErrorResult& aRv, JS::Realm* aRealm)
79521{
79522 return mImpl->PassOptionalAny(arg, aRv, aRealm);
79523}
79524
79525void
79526TestJSImplInterface::PassAnyDefaultNull(JS::Handle<JS::Value> arg, ErrorResult& aRv, JS::Realm* aRealm)
79527{
79528 return mImpl->PassAnyDefaultNull(arg, aRv, aRealm);
79529}
79530
79531void
79532TestJSImplInterface::PassSequenceOfAny(const Sequence<JS::Value>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79533{
79534 return mImpl->PassSequenceOfAny(arg, aRv, aRealm);
79535}
79536
79537void
79538TestJSImplInterface::PassNullableSequenceOfAny(const Nullable<Sequence<JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79539{
79540 return mImpl->PassNullableSequenceOfAny(arg, aRv, aRealm);
79541}
79542
79543void
79544TestJSImplInterface::PassOptionalSequenceOfAny(const Optional<Sequence<JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79545{
79546 return mImpl->PassOptionalSequenceOfAny(arg, aRv, aRealm);
79547}
79548
79549void
79550TestJSImplInterface::PassOptionalNullableSequenceOfAny(const Optional<Nullable<Sequence<JS::Value>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79551{
79552 return mImpl->PassOptionalNullableSequenceOfAny(arg, aRv, aRealm);
79553}
79554
79555void
79556TestJSImplInterface::PassOptionalSequenceOfAnyWithDefaultValue(const Nullable<Sequence<JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79557{
79558 return mImpl->PassOptionalSequenceOfAnyWithDefaultValue(arg, aRv, aRealm);
79559}
79560
79561void
79562TestJSImplInterface::PassSequenceOfSequenceOfAny(const Sequence<Sequence<JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79563{
79564 return mImpl->PassSequenceOfSequenceOfAny(arg, aRv, aRealm);
79565}
79566
79567void
79568TestJSImplInterface::PassSequenceOfNullableSequenceOfAny(const Sequence<Nullable<Sequence<JS::Value>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79569{
79570 return mImpl->PassSequenceOfNullableSequenceOfAny(arg, aRv, aRealm);
79571}
79572
79573void
79574TestJSImplInterface::PassNullableSequenceOfNullableSequenceOfAny(const Nullable<Sequence<Nullable<Sequence<JS::Value>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79575{
79576 return mImpl->PassNullableSequenceOfNullableSequenceOfAny(arg, aRv, aRealm);
79577}
79578
79579void
79580TestJSImplInterface::PassOptionalNullableSequenceOfNullableSequenceOfAny(const Optional<Nullable<Sequence<Nullable<Sequence<JS::Value>>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79581{
79582 return mImpl->PassOptionalNullableSequenceOfNullableSequenceOfAny(arg, aRv, aRealm);
79583}
79584
79585void
79586TestJSImplInterface::PassRecordOfAny(const Record<nsString, JS::Value>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79587{
79588 return mImpl->PassRecordOfAny(arg, aRv, aRealm);
79589}
79590
79591void
79592TestJSImplInterface::PassNullableRecordOfAny(const Nullable<Record<nsString, JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79593{
79594 return mImpl->PassNullableRecordOfAny(arg, aRv, aRealm);
79595}
79596
79597void
79598TestJSImplInterface::PassOptionalRecordOfAny(const Optional<Record<nsString, JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79599{
79600 return mImpl->PassOptionalRecordOfAny(arg, aRv, aRealm);
79601}
79602
79603void
79604TestJSImplInterface::PassOptionalNullableRecordOfAny(const Optional<Nullable<Record<nsString, JS::Value>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79605{
79606 return mImpl->PassOptionalNullableRecordOfAny(arg, aRv, aRealm);
79607}
79608
79609void
79610TestJSImplInterface::PassOptionalRecordOfAnyWithDefaultValue(const Nullable<Record<nsString, JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79611{
79612 return mImpl->PassOptionalRecordOfAnyWithDefaultValue(arg, aRv, aRealm);
79613}
79614
79615void
79616TestJSImplInterface::PassRecordOfRecordOfAny(const Record<nsString, Record<nsString, JS::Value>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79617{
79618 return mImpl->PassRecordOfRecordOfAny(arg, aRv, aRealm);
79619}
79620
79621void
79622TestJSImplInterface::PassRecordOfNullableRecordOfAny(const Record<nsString, Nullable<Record<nsString, JS::Value>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79623{
79624 return mImpl->PassRecordOfNullableRecordOfAny(arg, aRv, aRealm);
79625}
79626
79627void
79628TestJSImplInterface::PassNullableRecordOfNullableRecordOfAny(const Nullable<Record<nsString, Nullable<Record<nsString, JS::Value>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79629{
79630 return mImpl->PassNullableRecordOfNullableRecordOfAny(arg, aRv, aRealm);
79631}
79632
79633void
79634TestJSImplInterface::PassOptionalNullableRecordOfNullableRecordOfAny(const Optional<Nullable<Record<nsString, Nullable<Record<nsString, JS::Value>>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79635{
79636 return mImpl->PassOptionalNullableRecordOfNullableRecordOfAny(arg, aRv, aRealm);
79637}
79638
79639void
79640TestJSImplInterface::PassOptionalNullableRecordOfNullableSequenceOfAny(const Optional<Nullable<Record<nsString, Nullable<Sequence<JS::Value>>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79641{
79642 return mImpl->PassOptionalNullableRecordOfNullableSequenceOfAny(arg, aRv, aRealm);
79643}
79644
79645void
79646TestJSImplInterface::PassOptionalNullableSequenceOfNullableRecordOfAny(const Optional<Nullable<Sequence<Nullable<Record<nsString, JS::Value>>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79647{
79648 return mImpl->PassOptionalNullableSequenceOfNullableRecordOfAny(arg, aRv, aRealm);
79649}
79650
79651void
79652TestJSImplInterface::ReceiveAny(JS::MutableHandle<JS::Value> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
79653{
79654 return mImpl->ReceiveAny(aRetVal, aRv, aRealm);
79655}
79656
79657void
79658TestJSImplInterface::PassObject(JS::Handle<JSObject*> arg, ErrorResult& aRv, JS::Realm* aRealm)
79659{
79660 return mImpl->PassObject(arg, aRv, aRealm);
79661}
79662
79663void
79664TestJSImplInterface::PassVariadicObject(const Sequence<JSObject*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79665{
79666 return mImpl->PassVariadicObject(arg, aRv, aRealm);
79667}
79668
79669void
79670TestJSImplInterface::PassNullableObject(JS::Handle<JSObject*> arg, ErrorResult& aRv, JS::Realm* aRealm)
79671{
79672 return mImpl->PassNullableObject(arg, aRv, aRealm);
79673}
79674
79675void
79676TestJSImplInterface::PassVariadicNullableObject(const Sequence<JSObject*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79677{
79678 return mImpl->PassVariadicNullableObject(arg, aRv, aRealm);
79679}
79680
79681void
79682TestJSImplInterface::PassOptionalObject(const Optional<JS::Handle<JSObject*>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79683{
79684 return mImpl->PassOptionalObject(arg, aRv, aRealm);
79685}
79686
79687void
79688TestJSImplInterface::PassOptionalNullableObject(const Optional<JS::Handle<JSObject*>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79689{
79690 return mImpl->PassOptionalNullableObject(arg, aRv, aRealm);
79691}
79692
79693void
79694TestJSImplInterface::PassOptionalNullableObjectWithDefaultValue(JS::Handle<JSObject*> arg, ErrorResult& aRv, JS::Realm* aRealm)
79695{
79696 return mImpl->PassOptionalNullableObjectWithDefaultValue(arg, aRv, aRealm);
79697}
79698
79699void
79700TestJSImplInterface::PassSequenceOfObject(const Sequence<JSObject*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79701{
79702 return mImpl->PassSequenceOfObject(arg, aRv, aRealm);
79703}
79704
79705void
79706TestJSImplInterface::PassSequenceOfNullableObject(const Sequence<JSObject*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79707{
79708 return mImpl->PassSequenceOfNullableObject(arg, aRv, aRealm);
79709}
79710
79711void
79712TestJSImplInterface::PassNullableSequenceOfObject(const Nullable<Sequence<JSObject*>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79713{
79714 return mImpl->PassNullableSequenceOfObject(arg, aRv, aRealm);
79715}
79716
79717void
79718TestJSImplInterface::PassOptionalNullableSequenceOfNullableSequenceOfObject(const Optional<Nullable<Sequence<Nullable<Sequence<JSObject*>>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79719{
79720 return mImpl->PassOptionalNullableSequenceOfNullableSequenceOfObject(arg, aRv, aRealm);
79721}
79722
79723void
79724TestJSImplInterface::PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(const Optional<Nullable<Sequence<Nullable<Sequence<JSObject*>>>>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79725{
79726 return mImpl->PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(arg, aRv, aRealm);
79727}
79728
79729void
79730TestJSImplInterface::PassRecordOfObject(const Record<nsString, JSObject*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79731{
79732 return mImpl->PassRecordOfObject(arg, aRv, aRealm);
79733}
79734
79735void
79736TestJSImplInterface::ReceiveObject(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
79737{
79738 return mImpl->ReceiveObject(aRetVal, aRv, aRealm);
79739}
79740
79741void
79742TestJSImplInterface::ReceiveNullableObject(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
79743{
79744 return mImpl->ReceiveNullableObject(aRetVal, aRv, aRealm);
79745}
79746
79747void
79748TestJSImplInterface::PassUnion(const ObjectOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79749{
79750 return mImpl->PassUnion(arg, aRv, aRealm);
79751}
79752
79753void
79754TestJSImplInterface::PassUnion2(const LongOrBoolean& arg, ErrorResult& aRv, JS::Realm* aRealm)
79755{
79756 return mImpl->PassUnion2(arg, aRv, aRealm);
79757}
79758
79759void
79760TestJSImplInterface::PassUnion3(const ObjectOrLongOrBoolean& arg, ErrorResult& aRv, JS::Realm* aRealm)
79761{
79762 return mImpl->PassUnion3(arg, aRv, aRealm);
79763}
79764
79765void
79766TestJSImplInterface::PassUnion4(const NodeOrLongOrBoolean& arg, ErrorResult& aRv, JS::Realm* aRealm)
79767{
79768 return mImpl->PassUnion4(arg, aRv, aRealm);
79769}
79770
79771void
79772TestJSImplInterface::PassUnion5(const ObjectOrBoolean& arg, ErrorResult& aRv, JS::Realm* aRealm)
79773{
79774 return mImpl->PassUnion5(arg, aRv, aRealm);
79775}
79776
79777void
79778TestJSImplInterface::PassUnion6(const ObjectOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79779{
79780 return mImpl->PassUnion6(arg, aRv, aRealm);
79781}
79782
79783void
79784TestJSImplInterface::PassUnion7(const ObjectOrStringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79785{
79786 return mImpl->PassUnion7(arg, aRv, aRealm);
79787}
79788
79789void
79790TestJSImplInterface::PassUnion8(const ObjectOrStringOrBoolean& arg, ErrorResult& aRv, JS::Realm* aRealm)
79791{
79792 return mImpl->PassUnion8(arg, aRv, aRealm);
79793}
79794
79795void
79796TestJSImplInterface::PassUnion9(const ObjectOrStringOrLongOrBoolean& arg, ErrorResult& aRv, JS::Realm* aRealm)
79797{
79798 return mImpl->PassUnion9(arg, aRv, aRealm);
79799}
79800
79801void
79802TestJSImplInterface::PassUnion10(const EventInitOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79803{
79804 return mImpl->PassUnion10(arg, aRv, aRealm);
79805}
79806
79807void
79808TestJSImplInterface::PassUnion11(const CustomEventInitOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79809{
79810 return mImpl->PassUnion11(arg, aRv, aRealm);
79811}
79812
79813void
79814TestJSImplInterface::PassUnion12(const EventInitOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79815{
79816 return mImpl->PassUnion12(arg, aRv, aRealm);
79817}
79818
79819void
79820TestJSImplInterface::PassUnion13(const ObjectOrLongOrNull& arg, ErrorResult& aRv, JS::Realm* aRealm)
79821{
79822 return mImpl->PassUnion13(arg, aRv, aRealm);
79823}
79824
79825void
79826TestJSImplInterface::PassUnion14(const ObjectOrLongOrNull& arg, ErrorResult& aRv, JS::Realm* aRealm)
79827{
79828 return mImpl->PassUnion14(arg, aRv, aRealm);
79829}
79830
79831void
79832TestJSImplInterface::PassUnion15(const LongSequenceOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79833{
79834 return mImpl->PassUnion15(arg, aRv, aRealm);
79835}
79836
79837void
79838TestJSImplInterface::PassUnion16(const Optional<LongSequenceOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79839{
79840 return mImpl->PassUnion16(arg, aRv, aRealm);
79841}
79842
79843void
79844TestJSImplInterface::PassUnion17(const LongSequenceOrNullOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79845{
79846 return mImpl->PassUnion17(arg, aRv, aRealm);
79847}
79848
79849void
79850TestJSImplInterface::PassUnion18(const ObjectSequenceOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79851{
79852 return mImpl->PassUnion18(arg, aRv, aRealm);
79853}
79854
79855void
79856TestJSImplInterface::PassUnion19(const Optional<ObjectSequenceOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79857{
79858 return mImpl->PassUnion19(arg, aRv, aRealm);
79859}
79860
79861void
79862TestJSImplInterface::PassUnion20(const ObjectSequenceOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79863{
79864 return mImpl->PassUnion20(arg, aRv, aRealm);
79865}
79866
79867void
79868TestJSImplInterface::PassUnion21(const StringLongRecordOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79869{
79870 return mImpl->PassUnion21(arg, aRv, aRealm);
79871}
79872
79873void
79874TestJSImplInterface::PassUnion22(const StringObjectRecordOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79875{
79876 return mImpl->PassUnion22(arg, aRv, aRealm);
79877}
79878
79879void
79880TestJSImplInterface::PassUnion23(const ImageDataSequenceOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79881{
79882 return mImpl->PassUnion23(arg, aRv, aRealm);
79883}
79884
79885void
79886TestJSImplInterface::PassUnion24(const ImageDataOrNullSequenceOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79887{
79888 return mImpl->PassUnion24(arg, aRv, aRealm);
79889}
79890
79891void
79892TestJSImplInterface::PassUnion25(const ImageDataSequenceSequenceOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79893{
79894 return mImpl->PassUnion25(arg, aRv, aRealm);
79895}
79896
79897void
79898TestJSImplInterface::PassUnion26(const ImageDataOrNullSequenceSequenceOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79899{
79900 return mImpl->PassUnion26(arg, aRv, aRealm);
79901}
79902
79903void
79904TestJSImplInterface::PassUnion27(const StringSequenceOrEventInit& arg, ErrorResult& aRv, JS::Realm* aRealm)
79905{
79906 return mImpl->PassUnion27(arg, aRv, aRealm);
79907}
79908
79909void
79910TestJSImplInterface::PassUnion28(const EventInitOrStringSequence& arg, ErrorResult& aRv, JS::Realm* aRealm)
79911{
79912 return mImpl->PassUnion28(arg, aRv, aRealm);
79913}
79914
79915void
79916TestJSImplInterface::PassUnionWithCallback(const EventHandlerNonNullOrNullOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79917{
79918 return mImpl->PassUnionWithCallback(arg, aRv, aRealm);
79919}
79920
79921void
79922TestJSImplInterface::PassUnionWithByteString(const ByteStringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79923{
79924 return mImpl->PassUnionWithByteString(arg, aRv, aRealm);
79925}
79926
79927void
79928TestJSImplInterface::PassUnionWithUTF8String(const UTF8StringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79929{
79930 return mImpl->PassUnionWithUTF8String(arg, aRv, aRealm);
79931}
79932
79933void
79934TestJSImplInterface::PassUnionWithRecord(const StringStringRecordOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
79935{
79936 return mImpl->PassUnionWithRecord(arg, aRv, aRealm);
79937}
79938
79939void
79940TestJSImplInterface::PassUnionWithRecordAndSequence(const StringStringRecordOrStringSequence& arg, ErrorResult& aRv, JS::Realm* aRealm)
79941{
79942 return mImpl->PassUnionWithRecordAndSequence(arg, aRv, aRealm);
79943}
79944
79945void
79946TestJSImplInterface::PassUnionWithSequenceAndRecord(const StringSequenceOrStringStringRecord& arg, ErrorResult& aRv, JS::Realm* aRealm)
79947{
79948 return mImpl->PassUnionWithSequenceAndRecord(arg, aRv, aRealm);
79949}
79950
79951void
79952TestJSImplInterface::PassUnionWithSVS(const USVStringOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79953{
79954 return mImpl->PassUnionWithSVS(arg, aRv, aRealm);
79955}
79956
79957void
79958TestJSImplInterface::PassUnionWithNullable(const ObjectOrNullOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
79959{
79960 return mImpl->PassUnionWithNullable(arg, aRv, aRealm);
79961}
79962
79963void
79964TestJSImplInterface::PassNullableUnion(const Nullable<ObjectOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79965{
79966 return mImpl->PassNullableUnion(arg, aRv, aRealm);
79967}
79968
79969void
79970TestJSImplInterface::PassOptionalUnion(const Optional<ObjectOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79971{
79972 return mImpl->PassOptionalUnion(arg, aRv, aRealm);
79973}
79974
79975void
79976TestJSImplInterface::PassOptionalNullableUnion(const Optional<Nullable<ObjectOrLong>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79977{
79978 return mImpl->PassOptionalNullableUnion(arg, aRv, aRealm);
79979}
79980
79981void
79982TestJSImplInterface::PassOptionalNullableUnionWithDefaultValue(const Nullable<ObjectOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
79983{
79984 return mImpl->PassOptionalNullableUnionWithDefaultValue(arg, aRv, aRealm);
79985}
79986
79987void
79988TestJSImplInterface::PassUnionWithArrayBuffer(const UTF8StringOrArrayBuffer& arg, ErrorResult& aRv, JS::Realm* aRealm)
79989{
79990 return mImpl->PassUnionWithArrayBuffer(arg, aRv, aRealm);
79991}
79992
79993void
79994TestJSImplInterface::PassUnionWithArrayBufferOrNull(const UTF8StringOrArrayBufferOrNull& arg, ErrorResult& aRv, JS::Realm* aRealm)
79995{
79996 return mImpl->PassUnionWithArrayBufferOrNull(arg, aRv, aRealm);
79997}
79998
79999void
80000TestJSImplInterface::PassUnionWithTypedArrays(const ArrayBufferViewOrArrayBuffer& arg, ErrorResult& aRv, JS::Realm* aRealm)
80001{
80002 return mImpl->PassUnionWithTypedArrays(arg, aRv, aRealm);
80003}
80004
80005void
80006TestJSImplInterface::PassUnionWithTypedArraysOrNull(const ArrayBufferViewOrArrayBufferOrNull& arg, ErrorResult& aRv, JS::Realm* aRealm)
80007{
80008 return mImpl->PassUnionWithTypedArraysOrNull(arg, aRv, aRealm);
80009}
80010
80011void
80012TestJSImplInterface::PassUnionWithString(const StringOrObject& arg, ErrorResult& aRv, JS::Realm* aRealm)
80013{
80014 return mImpl->PassUnionWithString(arg, aRv, aRealm);
80015}
80016
80017void
80018TestJSImplInterface::PassUnionWithEnum(const SupportedTypeOrObject& arg, ErrorResult& aRv, JS::Realm* aRealm)
80019{
80020 return mImpl->PassUnionWithEnum(arg, aRv, aRealm);
80021}
80022
80023void
80024TestJSImplInterface::PassUnionWithObject(const ObjectOrLong& arg, ErrorResult& aRv, JS::Realm* aRealm)
80025{
80026 return mImpl->PassUnionWithObject(arg, aRv, aRealm);
80027}
80028
80029void
80030TestJSImplInterface::PassUnionWithDefaultValue1(const DoubleOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80031{
80032 return mImpl->PassUnionWithDefaultValue1(arg, aRv, aRealm);
80033}
80034
80035void
80036TestJSImplInterface::PassUnionWithDefaultValue2(const DoubleOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80037{
80038 return mImpl->PassUnionWithDefaultValue2(arg, aRv, aRealm);
80039}
80040
80041void
80042TestJSImplInterface::PassUnionWithDefaultValue3(const DoubleOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80043{
80044 return mImpl->PassUnionWithDefaultValue3(arg, aRv, aRealm);
80045}
80046
80047void
80048TestJSImplInterface::PassUnionWithDefaultValue4(const FloatOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80049{
80050 return mImpl->PassUnionWithDefaultValue4(arg, aRv, aRealm);
80051}
80052
80053void
80054TestJSImplInterface::PassUnionWithDefaultValue5(const FloatOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80055{
80056 return mImpl->PassUnionWithDefaultValue5(arg, aRv, aRealm);
80057}
80058
80059void
80060TestJSImplInterface::PassUnionWithDefaultValue6(const FloatOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80061{
80062 return mImpl->PassUnionWithDefaultValue6(arg, aRv, aRealm);
80063}
80064
80065void
80066TestJSImplInterface::PassUnionWithDefaultValue7(const UnrestrictedDoubleOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80067{
80068 return mImpl->PassUnionWithDefaultValue7(arg, aRv, aRealm);
80069}
80070
80071void
80072TestJSImplInterface::PassUnionWithDefaultValue8(const UnrestrictedDoubleOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80073{
80074 return mImpl->PassUnionWithDefaultValue8(arg, aRv, aRealm);
80075}
80076
80077void
80078TestJSImplInterface::PassUnionWithDefaultValue9(const UnrestrictedDoubleOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80079{
80080 return mImpl->PassUnionWithDefaultValue9(arg, aRv, aRealm);
80081}
80082
80083void
80084TestJSImplInterface::PassUnionWithDefaultValue10(const UnrestrictedDoubleOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80085{
80086 return mImpl->PassUnionWithDefaultValue10(arg, aRv, aRealm);
80087}
80088
80089void
80090TestJSImplInterface::PassUnionWithDefaultValue11(const UnrestrictedFloatOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80091{
80092 return mImpl->PassUnionWithDefaultValue11(arg, aRv, aRealm);
80093}
80094
80095void
80096TestJSImplInterface::PassUnionWithDefaultValue12(const UnrestrictedFloatOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80097{
80098 return mImpl->PassUnionWithDefaultValue12(arg, aRv, aRealm);
80099}
80100
80101void
80102TestJSImplInterface::PassUnionWithDefaultValue13(const UnrestrictedFloatOrString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80103{
80104 return mImpl->PassUnionWithDefaultValue13(arg, aRv, aRealm);
80105}
80106
80107void
80108TestJSImplInterface::PassUnionWithDefaultValue14(const DoubleOrByteString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80109{
80110 return mImpl->PassUnionWithDefaultValue14(arg, aRv, aRealm);
80111}
80112
80113void
80114TestJSImplInterface::PassUnionWithDefaultValue15(const DoubleOrByteString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80115{
80116 return mImpl->PassUnionWithDefaultValue15(arg, aRv, aRealm);
80117}
80118
80119void
80120TestJSImplInterface::PassUnionWithDefaultValue16(const DoubleOrByteString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80121{
80122 return mImpl->PassUnionWithDefaultValue16(arg, aRv, aRealm);
80123}
80124
80125void
80126TestJSImplInterface::PassUnionWithDefaultValue17(const DoubleOrSupportedType& arg, ErrorResult& aRv, JS::Realm* aRealm)
80127{
80128 return mImpl->PassUnionWithDefaultValue17(arg, aRv, aRealm);
80129}
80130
80131void
80132TestJSImplInterface::PassUnionWithDefaultValue18(const DoubleOrSupportedType& arg, ErrorResult& aRv, JS::Realm* aRealm)
80133{
80134 return mImpl->PassUnionWithDefaultValue18(arg, aRv, aRealm);
80135}
80136
80137void
80138TestJSImplInterface::PassUnionWithDefaultValue19(const DoubleOrSupportedType& arg, ErrorResult& aRv, JS::Realm* aRealm)
80139{
80140 return mImpl->PassUnionWithDefaultValue19(arg, aRv, aRealm);
80141}
80142
80143void
80144TestJSImplInterface::PassUnionWithDefaultValue20(const DoubleOrUSVString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80145{
80146 return mImpl->PassUnionWithDefaultValue20(arg, aRv, aRealm);
80147}
80148
80149void
80150TestJSImplInterface::PassUnionWithDefaultValue21(const DoubleOrUSVString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80151{
80152 return mImpl->PassUnionWithDefaultValue21(arg, aRv, aRealm);
80153}
80154
80155void
80156TestJSImplInterface::PassUnionWithDefaultValue22(const DoubleOrUSVString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80157{
80158 return mImpl->PassUnionWithDefaultValue22(arg, aRv, aRealm);
80159}
80160
80161void
80162TestJSImplInterface::PassUnionWithDefaultValue23(const DoubleOrUTF8String& arg, ErrorResult& aRv, JS::Realm* aRealm)
80163{
80164 return mImpl->PassUnionWithDefaultValue23(arg, aRv, aRealm);
80165}
80166
80167void
80168TestJSImplInterface::PassUnionWithDefaultValue24(const DoubleOrUTF8String& arg, ErrorResult& aRv, JS::Realm* aRealm)
80169{
80170 return mImpl->PassUnionWithDefaultValue24(arg, aRv, aRealm);
80171}
80172
80173void
80174TestJSImplInterface::PassUnionWithDefaultValue25(const DoubleOrUTF8String& arg, ErrorResult& aRv, JS::Realm* aRealm)
80175{
80176 return mImpl->PassUnionWithDefaultValue25(arg, aRv, aRealm);
80177}
80178
80179void
80180TestJSImplInterface::PassNullableUnionWithDefaultValue1(const Nullable<DoubleOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80181{
80182 return mImpl->PassNullableUnionWithDefaultValue1(arg, aRv, aRealm);
80183}
80184
80185void
80186TestJSImplInterface::PassNullableUnionWithDefaultValue2(const Nullable<DoubleOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80187{
80188 return mImpl->PassNullableUnionWithDefaultValue2(arg, aRv, aRealm);
80189}
80190
80191void
80192TestJSImplInterface::PassNullableUnionWithDefaultValue3(const Nullable<DoubleOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80193{
80194 return mImpl->PassNullableUnionWithDefaultValue3(arg, aRv, aRealm);
80195}
80196
80197void
80198TestJSImplInterface::PassNullableUnionWithDefaultValue4(const Nullable<FloatOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80199{
80200 return mImpl->PassNullableUnionWithDefaultValue4(arg, aRv, aRealm);
80201}
80202
80203void
80204TestJSImplInterface::PassNullableUnionWithDefaultValue5(const Nullable<FloatOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80205{
80206 return mImpl->PassNullableUnionWithDefaultValue5(arg, aRv, aRealm);
80207}
80208
80209void
80210TestJSImplInterface::PassNullableUnionWithDefaultValue6(const Nullable<FloatOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80211{
80212 return mImpl->PassNullableUnionWithDefaultValue6(arg, aRv, aRealm);
80213}
80214
80215void
80216TestJSImplInterface::PassNullableUnionWithDefaultValue7(const Nullable<UnrestrictedDoubleOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80217{
80218 return mImpl->PassNullableUnionWithDefaultValue7(arg, aRv, aRealm);
80219}
80220
80221void
80222TestJSImplInterface::PassNullableUnionWithDefaultValue8(const Nullable<UnrestrictedDoubleOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80223{
80224 return mImpl->PassNullableUnionWithDefaultValue8(arg, aRv, aRealm);
80225}
80226
80227void
80228TestJSImplInterface::PassNullableUnionWithDefaultValue9(const Nullable<UnrestrictedDoubleOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80229{
80230 return mImpl->PassNullableUnionWithDefaultValue9(arg, aRv, aRealm);
80231}
80232
80233void
80234TestJSImplInterface::PassNullableUnionWithDefaultValue10(const Nullable<UnrestrictedFloatOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80235{
80236 return mImpl->PassNullableUnionWithDefaultValue10(arg, aRv, aRealm);
80237}
80238
80239void
80240TestJSImplInterface::PassNullableUnionWithDefaultValue11(const Nullable<UnrestrictedFloatOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80241{
80242 return mImpl->PassNullableUnionWithDefaultValue11(arg, aRv, aRealm);
80243}
80244
80245void
80246TestJSImplInterface::PassNullableUnionWithDefaultValue12(const Nullable<UnrestrictedFloatOrString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80247{
80248 return mImpl->PassNullableUnionWithDefaultValue12(arg, aRv, aRealm);
80249}
80250
80251void
80252TestJSImplInterface::PassNullableUnionWithDefaultValue13(const Nullable<DoubleOrByteString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80253{
80254 return mImpl->PassNullableUnionWithDefaultValue13(arg, aRv, aRealm);
80255}
80256
80257void
80258TestJSImplInterface::PassNullableUnionWithDefaultValue14(const Nullable<DoubleOrByteString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80259{
80260 return mImpl->PassNullableUnionWithDefaultValue14(arg, aRv, aRealm);
80261}
80262
80263void
80264TestJSImplInterface::PassNullableUnionWithDefaultValue15(const Nullable<DoubleOrByteString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80265{
80266 return mImpl->PassNullableUnionWithDefaultValue15(arg, aRv, aRealm);
80267}
80268
80269void
80270TestJSImplInterface::PassNullableUnionWithDefaultValue16(const Nullable<DoubleOrByteString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80271{
80272 return mImpl->PassNullableUnionWithDefaultValue16(arg, aRv, aRealm);
80273}
80274
80275void
80276TestJSImplInterface::PassNullableUnionWithDefaultValue17(const Nullable<DoubleOrSupportedType>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80277{
80278 return mImpl->PassNullableUnionWithDefaultValue17(arg, aRv, aRealm);
80279}
80280
80281void
80282TestJSImplInterface::PassNullableUnionWithDefaultValue18(const Nullable<DoubleOrSupportedType>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80283{
80284 return mImpl->PassNullableUnionWithDefaultValue18(arg, aRv, aRealm);
80285}
80286
80287void
80288TestJSImplInterface::PassNullableUnionWithDefaultValue19(const Nullable<DoubleOrSupportedType>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80289{
80290 return mImpl->PassNullableUnionWithDefaultValue19(arg, aRv, aRealm);
80291}
80292
80293void
80294TestJSImplInterface::PassNullableUnionWithDefaultValue20(const Nullable<DoubleOrSupportedType>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80295{
80296 return mImpl->PassNullableUnionWithDefaultValue20(arg, aRv, aRealm);
80297}
80298
80299void
80300TestJSImplInterface::PassNullableUnionWithDefaultValue21(const Nullable<DoubleOrUSVString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80301{
80302 return mImpl->PassNullableUnionWithDefaultValue21(arg, aRv, aRealm);
80303}
80304
80305void
80306TestJSImplInterface::PassNullableUnionWithDefaultValue22(const Nullable<DoubleOrUSVString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80307{
80308 return mImpl->PassNullableUnionWithDefaultValue22(arg, aRv, aRealm);
80309}
80310
80311void
80312TestJSImplInterface::PassNullableUnionWithDefaultValue23(const Nullable<DoubleOrUSVString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80313{
80314 return mImpl->PassNullableUnionWithDefaultValue23(arg, aRv, aRealm);
80315}
80316
80317void
80318TestJSImplInterface::PassNullableUnionWithDefaultValue24(const Nullable<DoubleOrUSVString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80319{
80320 return mImpl->PassNullableUnionWithDefaultValue24(arg, aRv, aRealm);
80321}
80322
80323void
80324TestJSImplInterface::PassNullableUnionWithDefaultValue25(const Nullable<DoubleOrUTF8String>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80325{
80326 return mImpl->PassNullableUnionWithDefaultValue25(arg, aRv, aRealm);
80327}
80328
80329void
80330TestJSImplInterface::PassNullableUnionWithDefaultValue26(const Nullable<DoubleOrUTF8String>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80331{
80332 return mImpl->PassNullableUnionWithDefaultValue26(arg, aRv, aRealm);
80333}
80334
80335void
80336TestJSImplInterface::PassNullableUnionWithDefaultValue27(const Nullable<DoubleOrUTF8String>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80337{
80338 return mImpl->PassNullableUnionWithDefaultValue27(arg, aRv, aRealm);
80339}
80340
80341void
80342TestJSImplInterface::PassNullableUnionWithDefaultValue28(const Nullable<DoubleOrUTF8String>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80343{
80344 return mImpl->PassNullableUnionWithDefaultValue28(arg, aRv, aRealm);
80345}
80346
80347void
80348TestJSImplInterface::PassSequenceOfUnions(const Sequence<OwningCanvasPatternOrCanvasGradient>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80349{
80350 return mImpl->PassSequenceOfUnions(arg, aRv, aRealm);
80351}
80352
80353void
80354TestJSImplInterface::PassSequenceOfUnions2(const Sequence<OwningObjectOrLong>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80355{
80356 return mImpl->PassSequenceOfUnions2(arg, aRv, aRealm);
80357}
80358
80359void
80360TestJSImplInterface::PassVariadicUnion(const Sequence<OwningCanvasPatternOrCanvasGradient>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80361{
80362 return mImpl->PassVariadicUnion(arg, aRv, aRealm);
80363}
80364
80365void
80366TestJSImplInterface::PassSequenceOfNullableUnions(const Sequence<Nullable<OwningCanvasPatternOrCanvasGradient>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80367{
80368 return mImpl->PassSequenceOfNullableUnions(arg, aRv, aRealm);
80369}
80370
80371void
80372TestJSImplInterface::PassVariadicNullableUnion(const Sequence<Nullable<OwningCanvasPatternOrCanvasGradient>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80373{
80374 return mImpl->PassVariadicNullableUnion(arg, aRv, aRealm);
80375}
80376
80377void
80378TestJSImplInterface::PassRecordOfUnions(const Record<nsString, OwningCanvasPatternOrCanvasGradient>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80379{
80380 return mImpl->PassRecordOfUnions(arg, aRv, aRealm);
80381}
80382
80383void
80384TestJSImplInterface::ReceiveUnion(OwningCanvasPatternOrCanvasGradient& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
80385{
80386 return mImpl->ReceiveUnion(aRetVal, aRv, aRealm);
80387}
80388
80389void
80390TestJSImplInterface::ReceiveUnion2(OwningObjectOrLong& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
80391{
80392 return mImpl->ReceiveUnion2(aRetVal, aRv, aRealm);
80393}
80394
80395void
80396TestJSImplInterface::ReceiveUnionContainingNull(OwningCanvasPatternOrNullOrCanvasGradient& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
80397{
80398 return mImpl->ReceiveUnionContainingNull(aRetVal, aRv, aRealm);
80399}
80400
80401void
80402TestJSImplInterface::ReceiveNullableUnion(Nullable<OwningCanvasPatternOrCanvasGradient>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
80403{
80404 return mImpl->ReceiveNullableUnion(aRetVal, aRv, aRealm);
80405}
80406
80407void
80408TestJSImplInterface::ReceiveNullableUnion2(Nullable<OwningObjectOrLong>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
80409{
80410 return mImpl->ReceiveNullableUnion2(aRetVal, aRv, aRealm);
80411}
80412
80413void
80414TestJSImplInterface::GetWritableUnion(OwningCanvasPatternOrCanvasGradient& aRetVal, ErrorResult& aRv, JS::Realm* aRealm) const
80415{
80416 return mImpl->GetWritableUnion(aRetVal, aRv, aRealm);
80417}
80418
80419void
80420TestJSImplInterface::SetWritableUnion(const CanvasPatternOrCanvasGradient& arg, ErrorResult& aRv, JS::Realm* aRealm)
80421{
80422 mImpl->SetWritableUnion(arg, aRv, aRealm);
80423}
80424
80425void
80426TestJSImplInterface::GetWritableUnionContainingNull(OwningCanvasPatternOrNullOrCanvasGradient& aRetVal, ErrorResult& aRv, JS::Realm* aRealm) const
80427{
80428 return mImpl->GetWritableUnionContainingNull(aRetVal, aRv, aRealm);
80429}
80430
80431void
80432TestJSImplInterface::SetWritableUnionContainingNull(const CanvasPatternOrNullOrCanvasGradient& arg, ErrorResult& aRv, JS::Realm* aRealm)
80433{
80434 mImpl->SetWritableUnionContainingNull(arg, aRv, aRealm);
80435}
80436
80437void
80438TestJSImplInterface::GetWritableNullableUnion(Nullable<OwningCanvasPatternOrCanvasGradient>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm) const
80439{
80440 return mImpl->GetWritableNullableUnion(aRetVal, aRv, aRealm);
80441}
80442
80443void
80444TestJSImplInterface::SetWritableNullableUnion(const Nullable<CanvasPatternOrCanvasGradient>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80445{
80446 mImpl->SetWritableNullableUnion(arg, aRv, aRealm);
80447}
80448
80449void
80450TestJSImplInterface::PassPromise(Promise& arg, ErrorResult& aRv, JS::Realm* aRealm)
80451{
80452 return mImpl->PassPromise(arg, aRv, aRealm);
80453}
80454
80455void
80456TestJSImplInterface::PassOptionalPromise(const Optional<OwningNonNull<Promise>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80457{
80458 return mImpl->PassOptionalPromise(arg, aRv, aRealm);
80459}
80460
80461void
80462TestJSImplInterface::PassPromiseSequence(const Sequence<OwningNonNull<Promise>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80463{
80464 return mImpl->PassPromiseSequence(arg, aRv, aRealm);
80465}
80466
80467// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
80468already_AddRefed<Promise>
80469TestJSImplInterface::ReceivePromise(ErrorResult& aRv, JS::Realm* aRealm)
80470{
80471 return mImpl->ReceivePromise(aRv, aRealm);
80472}
80473
80474// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
80475already_AddRefed<Promise>
80476TestJSImplInterface::ReceiveAddrefedPromise(ErrorResult& aRv, JS::Realm* aRealm)
80477{
80478 return mImpl->ReceiveAddrefedPromise(aRv, aRealm);
80479}
80480
80481void
80482TestJSImplInterface::MethodRenamedTo(ErrorResult& aRv, JS::Realm* aRealm)
80483{
80484 return mImpl->MethodRenamedTo(aRv, aRealm);
80485}
80486
80487void
80488TestJSImplInterface::MethodRenamedTo(int8_t argument, ErrorResult& aRv, JS::Realm* aRealm)
80489{
80490 return mImpl->MethodRenamedTo(argument, aRv, aRealm);
80491}
80492
80493int8_t
80494TestJSImplInterface::GetAttributeGetterRenamedTo(ErrorResult& aRv, JS::Realm* aRealm) const
80495{
80496 return mImpl->GetAttributeGetterRenamedTo(aRv, aRealm);
80497}
80498
80499int8_t
80500TestJSImplInterface::GetAttributeRenamedTo(ErrorResult& aRv, JS::Realm* aRealm) const
80501{
80502 return mImpl->GetAttributeRenamedTo(aRv, aRealm);
80503}
80504
80505void
80506TestJSImplInterface::SetAttributeRenamedTo(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80507{
80508 mImpl->SetAttributeRenamedTo(arg, aRv, aRealm);
80509}
80510
80511void
80512TestJSImplInterface::PassDictionary(const Dict& x, ErrorResult& aRv, JS::Realm* aRealm)
80513{
80514 return mImpl->PassDictionary(x, aRv, aRealm);
80515}
80516
80517void
80518TestJSImplInterface::PassDictionary2(const Dict& x, ErrorResult& aRv, JS::Realm* aRealm)
80519{
80520 return mImpl->PassDictionary2(x, aRv, aRealm);
80521}
80522
80523void
80524TestJSImplInterface::ReceiveDictionary(Dict& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
80525{
80526 return mImpl->ReceiveDictionary(aRetVal, aRv, aRealm);
80527}
80528
80529void
80530TestJSImplInterface::ReceiveNullableDictionary(Nullable<Dict>& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
80531{
80532 return mImpl->ReceiveNullableDictionary(aRetVal, aRv, aRealm);
80533}
80534
80535void
80536TestJSImplInterface::PassOtherDictionary(const GrandparentDict& x, ErrorResult& aRv, JS::Realm* aRealm)
80537{
80538 return mImpl->PassOtherDictionary(x, aRv, aRealm);
80539}
80540
80541void
80542TestJSImplInterface::PassSequenceOfDictionaries(const Sequence<Dict>& x, ErrorResult& aRv, JS::Realm* aRealm)
80543{
80544 return mImpl->PassSequenceOfDictionaries(x, aRv, aRealm);
80545}
80546
80547void
80548TestJSImplInterface::PassRecordOfDictionaries(const Record<nsString, GrandparentDict>& x, ErrorResult& aRv, JS::Realm* aRealm)
80549{
80550 return mImpl->PassRecordOfDictionaries(x, aRv, aRealm);
80551}
80552
80553void
80554TestJSImplInterface::PassDictionaryOrLong(const Dict& x, ErrorResult& aRv, JS::Realm* aRealm)
80555{
80556 return mImpl->PassDictionaryOrLong(x, aRv, aRealm);
80557}
80558
80559void
80560TestJSImplInterface::PassDictionaryOrLong(int32_t x, ErrorResult& aRv, JS::Realm* aRealm)
80561{
80562 return mImpl->PassDictionaryOrLong(x, aRv, aRealm);
80563}
80564
80565void
80566TestJSImplInterface::PassDictContainingDict(const DictContainingDict& arg, ErrorResult& aRv, JS::Realm* aRealm)
80567{
80568 return mImpl->PassDictContainingDict(arg, aRv, aRealm);
80569}
80570
80571void
80572TestJSImplInterface::PassDictContainingSequence(const DictContainingSequence& arg, ErrorResult& aRv, JS::Realm* aRealm)
80573{
80574 return mImpl->PassDictContainingSequence(arg, aRv, aRealm);
80575}
80576
80577void
80578TestJSImplInterface::ReceiveDictContainingSequence(DictContainingSequence& aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
80579{
80580 return mImpl->ReceiveDictContainingSequence(aRetVal, aRv, aRealm);
80581}
80582
80583void
80584TestJSImplInterface::PassVariadicDictionary(const Sequence<Dict>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80585{
80586 return mImpl->PassVariadicDictionary(arg, aRv, aRealm);
80587}
80588
80589void
80590TestJSImplInterface::DontEnforceRangeOrClamp(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80591{
80592 return mImpl->DontEnforceRangeOrClamp(arg, aRv, aRealm);
80593}
80594
80595void
80596TestJSImplInterface::DoEnforceRange(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80597{
80598 return mImpl->DoEnforceRange(arg, aRv, aRealm);
80599}
80600
80601void
80602TestJSImplInterface::DoEnforceRangeNullable(const Nullable<int8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80603{
80604 return mImpl->DoEnforceRangeNullable(arg, aRv, aRealm);
80605}
80606
80607void
80608TestJSImplInterface::DoClamp(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80609{
80610 return mImpl->DoClamp(arg, aRv, aRealm);
80611}
80612
80613void
80614TestJSImplInterface::DoClampNullable(const Nullable<int8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80615{
80616 return mImpl->DoClampNullable(arg, aRv, aRealm);
80617}
80618
80619int8_t
80620TestJSImplInterface::GetEnforcedByte(ErrorResult& aRv, JS::Realm* aRealm) const
80621{
80622 return mImpl->GetEnforcedByte(aRv, aRealm);
80623}
80624
80625void
80626TestJSImplInterface::SetEnforcedByte(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80627{
80628 mImpl->SetEnforcedByte(arg, aRv, aRealm);
80629}
80630
80631Nullable<int8_t>
80632TestJSImplInterface::GetEnforcedByteNullable(ErrorResult& aRv, JS::Realm* aRealm) const
80633{
80634 return mImpl->GetEnforcedByteNullable(aRv, aRealm);
5
Calling 'TestJSImplInterfaceJSImpl::GetEnforcedByteNullable'
80635}
80636
80637void
80638TestJSImplInterface::SetEnforcedByteNullable(const Nullable<int8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80639{
80640 mImpl->SetEnforcedByteNullable(arg, aRv, aRealm);
80641}
80642
80643int8_t
80644TestJSImplInterface::GetClampedByte(ErrorResult& aRv, JS::Realm* aRealm) const
80645{
80646 return mImpl->GetClampedByte(aRv, aRealm);
80647}
80648
80649void
80650TestJSImplInterface::SetClampedByte(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80651{
80652 mImpl->SetClampedByte(arg, aRv, aRealm);
80653}
80654
80655Nullable<int8_t>
80656TestJSImplInterface::GetClampedByteNullable(ErrorResult& aRv, JS::Realm* aRealm) const
80657{
80658 return mImpl->GetClampedByteNullable(aRv, aRealm);
80659}
80660
80661void
80662TestJSImplInterface::SetClampedByteNullable(const Nullable<int8_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80663{
80664 mImpl->SetClampedByteNullable(arg, aRv, aRealm);
80665}
80666
80667void
80668TestJSImplInterface::ExerciseTypedefInterfaces1(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
80669{
80670 return mImpl->ExerciseTypedefInterfaces1(arg, aRv, aRealm);
80671}
80672
80673// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
80674already_AddRefed<TestJSImplInterface>
80675TestJSImplInterface::ExerciseTypedefInterfaces2(TestJSImplInterface* arg, ErrorResult& aRv, JS::Realm* aRealm)
80676{
80677 return mImpl->ExerciseTypedefInterfaces2(arg, aRv, aRealm);
80678}
80679
80680void
80681TestJSImplInterface::ExerciseTypedefInterfaces3(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
80682{
80683 return mImpl->ExerciseTypedefInterfaces3(arg, aRv, aRealm);
80684}
80685
80686int8_t
80687TestJSImplInterface::GetDeprecatedAttribute(ErrorResult& aRv, JS::Realm* aRealm) const
80688{
80689 return mImpl->GetDeprecatedAttribute(aRv, aRealm);
80690}
80691
80692void
80693TestJSImplInterface::SetDeprecatedAttribute(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80694{
80695 mImpl->SetDeprecatedAttribute(arg, aRv, aRealm);
80696}
80697
80698int8_t
80699TestJSImplInterface::DeprecatedMethod(ErrorResult& aRv, JS::Realm* aRealm)
80700{
80701 return mImpl->DeprecatedMethod(aRv, aRealm);
80702}
80703
80704void
80705TestJSImplInterface::DeprecatedMethodWithContext(JS::Handle<JS::Value> arg, ErrorResult& aRv, JS::Realm* aRealm)
80706{
80707 return mImpl->DeprecatedMethodWithContext(arg, aRv, aRealm);
80708}
80709
80710bool
80711TestJSImplInterface::Overload1(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
80712{
80713 return mImpl->Overload1(arg, aRv, aRealm);
80714}
80715
80716// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
80717already_AddRefed<TestJSImplInterface>
80718TestJSImplInterface::Overload1(const nsAString& strs, TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
80719{
80720 return mImpl->Overload1(strs, arg, aRv, aRealm);
80721}
80722
80723void
80724TestJSImplInterface::Overload2(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
80725{
80726 return mImpl->Overload2(arg, aRv, aRealm);
80727}
80728
80729void
80730TestJSImplInterface::Overload2(const Dict& arg, ErrorResult& aRv, JS::Realm* aRealm)
80731{
80732 return mImpl->Overload2(arg, aRv, aRealm);
80733}
80734
80735void
80736TestJSImplInterface::Overload2(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
80737{
80738 return mImpl->Overload2(arg, aRv, aRealm);
80739}
80740
80741void
80742TestJSImplInterface::Overload2(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80743{
80744 return mImpl->Overload2(arg, aRv, aRealm);
80745}
80746
80747void
80748TestJSImplInterface::Overload3(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
80749{
80750 return mImpl->Overload3(arg, aRv, aRealm);
80751}
80752
80753void
80754TestJSImplInterface::Overload3(MyTestCallback& arg, ErrorResult& aRv, JS::Realm* aRealm)
80755{
80756 return mImpl->Overload3(arg, aRv, aRealm);
80757}
80758
80759void
80760TestJSImplInterface::Overload3(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
80761{
80762 return mImpl->Overload3(arg, aRv, aRealm);
80763}
80764
80765void
80766TestJSImplInterface::Overload4(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
80767{
80768 return mImpl->Overload4(arg, aRv, aRealm);
80769}
80770
80771void
80772TestJSImplInterface::Overload4(TestCallbackInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
80773{
80774 return mImpl->Overload4(arg, aRv, aRealm);
80775}
80776
80777void
80778TestJSImplInterface::Overload4(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80779{
80780 return mImpl->Overload4(arg, aRv, aRealm);
80781}
80782
80783void
80784TestJSImplInterface::Overload5(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80785{
80786 return mImpl->Overload5(arg, aRv, aRealm);
80787}
80788
80789void
80790TestJSImplInterface::Overload5(MyTestEnum arg, ErrorResult& aRv, JS::Realm* aRealm)
80791{
80792 return mImpl->Overload5(arg, aRv, aRealm);
80793}
80794
80795void
80796TestJSImplInterface::Overload6(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80797{
80798 return mImpl->Overload6(arg, aRv, aRealm);
80799}
80800
80801void
80802TestJSImplInterface::Overload6(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
80803{
80804 return mImpl->Overload6(arg, aRv, aRealm);
80805}
80806
80807void
80808TestJSImplInterface::Overload7(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80809{
80810 return mImpl->Overload7(arg, aRv, aRealm);
80811}
80812
80813void
80814TestJSImplInterface::Overload7(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
80815{
80816 return mImpl->Overload7(arg, aRv, aRealm);
80817}
80818
80819void
80820TestJSImplInterface::Overload7(const nsCString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80821{
80822 return mImpl->Overload7(arg, aRv, aRealm);
80823}
80824
80825void
80826TestJSImplInterface::Overload8(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80827{
80828 return mImpl->Overload8(arg, aRv, aRealm);
80829}
80830
80831void
80832TestJSImplInterface::Overload8(TestJSImplInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
80833{
80834 return mImpl->Overload8(arg, aRv, aRealm);
80835}
80836
80837void
80838TestJSImplInterface::Overload9(const Nullable<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80839{
80840 return mImpl->Overload9(arg, aRv, aRealm);
80841}
80842
80843void
80844TestJSImplInterface::Overload9(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80845{
80846 return mImpl->Overload9(arg, aRv, aRealm);
80847}
80848
80849void
80850TestJSImplInterface::Overload10(const Nullable<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80851{
80852 return mImpl->Overload10(arg, aRv, aRealm);
80853}
80854
80855void
80856TestJSImplInterface::Overload10(JS::Handle<JSObject*> arg, ErrorResult& aRv, JS::Realm* aRealm)
80857{
80858 return mImpl->Overload10(arg, aRv, aRealm);
80859}
80860
80861void
80862TestJSImplInterface::Overload11(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80863{
80864 return mImpl->Overload11(arg, aRv, aRealm);
80865}
80866
80867void
80868TestJSImplInterface::Overload11(const nsAString& arg, ErrorResult& aRv, JS::Realm* aRealm)
80869{
80870 return mImpl->Overload11(arg, aRv, aRealm);
80871}
80872
80873void
80874TestJSImplInterface::Overload12(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80875{
80876 return mImpl->Overload12(arg, aRv, aRealm);
80877}
80878
80879void
80880TestJSImplInterface::Overload12(const Nullable<bool>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80881{
80882 return mImpl->Overload12(arg, aRv, aRealm);
80883}
80884
80885void
80886TestJSImplInterface::Overload13(const Nullable<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80887{
80888 return mImpl->Overload13(arg, aRv, aRealm);
80889}
80890
80891void
80892TestJSImplInterface::Overload13(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
80893{
80894 return mImpl->Overload13(arg, aRv, aRealm);
80895}
80896
80897void
80898TestJSImplInterface::Overload14(const Optional<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80899{
80900 return mImpl->Overload14(arg, aRv, aRealm);
80901}
80902
80903void
80904TestJSImplInterface::Overload14(TestInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
80905{
80906 return mImpl->Overload14(arg, aRv, aRealm);
80907}
80908
80909void
80910TestJSImplInterface::Overload15(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80911{
80912 return mImpl->Overload15(arg, aRv, aRealm);
80913}
80914
80915void
80916TestJSImplInterface::Overload15(const Optional<NonNull<TestInterface>>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80917{
80918 return mImpl->Overload15(arg, aRv, aRealm);
80919}
80920
80921void
80922TestJSImplInterface::Overload16(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
80923{
80924 return mImpl->Overload16(arg, aRv, aRealm);
80925}
80926
80927void
80928TestJSImplInterface::Overload16(const Optional<TestInterface*>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80929{
80930 return mImpl->Overload16(arg, aRv, aRealm);
80931}
80932
80933void
80934TestJSImplInterface::Overload17(const Sequence<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80935{
80936 return mImpl->Overload17(arg, aRv, aRealm);
80937}
80938
80939void
80940TestJSImplInterface::Overload17(const Record<nsString, int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80941{
80942 return mImpl->Overload17(arg, aRv, aRealm);
80943}
80944
80945void
80946TestJSImplInterface::Overload18(const Record<nsString, nsString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80947{
80948 return mImpl->Overload18(arg, aRv, aRealm);
80949}
80950
80951void
80952TestJSImplInterface::Overload18(const Sequence<nsString>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80953{
80954 return mImpl->Overload18(arg, aRv, aRealm);
80955}
80956
80957void
80958TestJSImplInterface::Overload19(const Sequence<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80959{
80960 return mImpl->Overload19(arg, aRv, aRealm);
80961}
80962
80963void
80964TestJSImplInterface::Overload19(const Dict& arg, ErrorResult& aRv, JS::Realm* aRealm)
80965{
80966 return mImpl->Overload19(arg, aRv, aRealm);
80967}
80968
80969void
80970TestJSImplInterface::Overload20(const Dict& arg, ErrorResult& aRv, JS::Realm* aRealm)
80971{
80972 return mImpl->Overload20(arg, aRv, aRealm);
80973}
80974
80975void
80976TestJSImplInterface::Overload20(const Sequence<int32_t>& arg, ErrorResult& aRv, JS::Realm* aRealm)
80977{
80978 return mImpl->Overload20(arg, aRv, aRealm);
80979}
80980
80981void
80982TestJSImplInterface::PassVariadicThirdArg(const nsAString& arg1, int32_t arg2, const Sequence<OwningNonNull<TestJSImplInterface>>& arg3, ErrorResult& aRv, JS::Realm* aRealm)
80983{
80984 return mImpl->PassVariadicThirdArg(arg1, arg2, arg3, aRv, aRealm);
80985}
80986
80987bool
80988TestJSImplInterface::GetPrefable1(ErrorResult& aRv, JS::Realm* aRealm) const
80989{
80990 return mImpl->GetPrefable1(aRv, aRealm);
80991}
80992
80993bool
80994TestJSImplInterface::GetPrefable2(ErrorResult& aRv, JS::Realm* aRealm) const
80995{
80996 return mImpl->GetPrefable2(aRv, aRealm);
80997}
80998
80999bool
81000TestJSImplInterface::GetPrefable3(ErrorResult& aRv, JS::Realm* aRealm) const
81001{
81002 return mImpl->GetPrefable3(aRv, aRealm);
81003}
81004
81005bool
81006TestJSImplInterface::GetPrefable4(ErrorResult& aRv, JS::Realm* aRealm) const
81007{
81008 return mImpl->GetPrefable4(aRv, aRealm);
81009}
81010
81011bool
81012TestJSImplInterface::GetPrefable5(ErrorResult& aRv, JS::Realm* aRealm) const
81013{
81014 return mImpl->GetPrefable5(aRv, aRealm);
81015}
81016
81017bool
81018TestJSImplInterface::GetPrefable6(ErrorResult& aRv, JS::Realm* aRealm) const
81019{
81020 return mImpl->GetPrefable6(aRv, aRealm);
81021}
81022
81023bool
81024TestJSImplInterface::GetPrefable7(ErrorResult& aRv, JS::Realm* aRealm) const
81025{
81026 return mImpl->GetPrefable7(aRv, aRealm);
81027}
81028
81029bool
81030TestJSImplInterface::GetPrefable8(ErrorResult& aRv, JS::Realm* aRealm) const
81031{
81032 return mImpl->GetPrefable8(aRv, aRealm);
81033}
81034
81035bool
81036TestJSImplInterface::GetPrefable9(ErrorResult& aRv, JS::Realm* aRealm) const
81037{
81038 return mImpl->GetPrefable9(aRv, aRealm);
81039}
81040
81041void
81042TestJSImplInterface::Prefable10(ErrorResult& aRv, JS::Realm* aRealm)
81043{
81044 return mImpl->Prefable10(aRv, aRealm);
81045}
81046
81047void
81048TestJSImplInterface::Prefable11(ErrorResult& aRv, JS::Realm* aRealm)
81049{
81050 return mImpl->Prefable11(aRv, aRealm);
81051}
81052
81053bool
81054TestJSImplInterface::GetPrefable12(ErrorResult& aRv, JS::Realm* aRealm) const
81055{
81056 return mImpl->GetPrefable12(aRv, aRealm);
81057}
81058
81059void
81060TestJSImplInterface::Prefable13(ErrorResult& aRv, JS::Realm* aRealm)
81061{
81062 return mImpl->Prefable13(aRv, aRealm);
81063}
81064
81065bool
81066TestJSImplInterface::GetPrefable14(ErrorResult& aRv, JS::Realm* aRealm) const
81067{
81068 return mImpl->GetPrefable14(aRv, aRealm);
81069}
81070
81071bool
81072TestJSImplInterface::GetPrefable15(ErrorResult& aRv, JS::Realm* aRealm) const
81073{
81074 return mImpl->GetPrefable15(aRv, aRealm);
81075}
81076
81077bool
81078TestJSImplInterface::GetPrefable16(ErrorResult& aRv, JS::Realm* aRealm) const
81079{
81080 return mImpl->GetPrefable16(aRv, aRealm);
81081}
81082
81083void
81084TestJSImplInterface::Prefable17(ErrorResult& aRv, JS::Realm* aRealm)
81085{
81086 return mImpl->Prefable17(aRv, aRealm);
81087}
81088
81089void
81090TestJSImplInterface::Prefable18(ErrorResult& aRv, JS::Realm* aRealm)
81091{
81092 return mImpl->Prefable18(aRv, aRealm);
81093}
81094
81095void
81096TestJSImplInterface::Prefable19(ErrorResult& aRv, JS::Realm* aRealm)
81097{
81098 return mImpl->Prefable19(aRv, aRealm);
81099}
81100
81101void
81102TestJSImplInterface::Prefable20(ErrorResult& aRv, JS::Realm* aRealm)
81103{
81104 return mImpl->Prefable20(aRv, aRealm);
81105}
81106
81107bool
81108TestJSImplInterface::GetConditionalOnSecureContext1(ErrorResult& aRv, JS::Realm* aRealm) const
81109{
81110 return mImpl->GetConditionalOnSecureContext1(aRv, aRealm);
81111}
81112
81113bool
81114TestJSImplInterface::GetConditionalOnSecureContext2(ErrorResult& aRv, JS::Realm* aRealm) const
81115{
81116 return mImpl->GetConditionalOnSecureContext2(aRv, aRealm);
81117}
81118
81119bool
81120TestJSImplInterface::GetConditionalOnSecureContext3(ErrorResult& aRv, JS::Realm* aRealm) const
81121{
81122 return mImpl->GetConditionalOnSecureContext3(aRv, aRealm);
81123}
81124
81125bool
81126TestJSImplInterface::GetConditionalOnSecureContext4(ErrorResult& aRv, JS::Realm* aRealm) const
81127{
81128 return mImpl->GetConditionalOnSecureContext4(aRv, aRealm);
81129}
81130
81131void
81132TestJSImplInterface::ConditionalOnSecureContext5(ErrorResult& aRv, JS::Realm* aRealm)
81133{
81134 return mImpl->ConditionalOnSecureContext5(aRv, aRealm);
81135}
81136
81137void
81138TestJSImplInterface::ConditionalOnSecureContext6(ErrorResult& aRv, JS::Realm* aRealm)
81139{
81140 return mImpl->ConditionalOnSecureContext6(aRv, aRealm);
81141}
81142
81143void
81144TestJSImplInterface::ConditionalOnSecureContext7(ErrorResult& aRv, JS::Realm* aRealm)
81145{
81146 return mImpl->ConditionalOnSecureContext7(aRv, aRealm);
81147}
81148
81149void
81150TestJSImplInterface::ConditionalOnSecureContext8(ErrorResult& aRv, JS::Realm* aRealm)
81151{
81152 return mImpl->ConditionalOnSecureContext8(aRv, aRealm);
81153}
81154
81155int32_t
81156TestJSImplInterface::GetAttrWithLenientThis(ErrorResult& aRv, JS::Realm* aRealm) const
81157{
81158 return mImpl->GetAttrWithLenientThis(aRv, aRealm);
81159}
81160
81161void
81162TestJSImplInterface::SetAttrWithLenientThis(int32_t arg, ErrorResult& aRv, JS::Realm* aRealm)
81163{
81164 mImpl->SetAttrWithLenientThis(arg, aRv, aRealm);
81165}
81166
81167void
81168TestJSImplInterface::PassRenamedInterface(nsRenamedInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
81169{
81170 return mImpl->PassRenamedInterface(arg, aRv, aRealm);
81171}
81172
81173// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
81174already_AddRefed<TestJSImplInterface>
81175TestJSImplInterface::GetPutForwardsAttr(ErrorResult& aRv, JS::Realm* aRealm) const
81176{
81177 return mImpl->GetPutForwardsAttr(aRv, aRealm);
81178}
81179
81180// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
81181already_AddRefed<TestJSImplInterface>
81182TestJSImplInterface::GetPutForwardsAttr2(ErrorResult& aRv, JS::Realm* aRealm) const
81183{
81184 return mImpl->GetPutForwardsAttr2(aRv, aRealm);
81185}
81186
81187// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
81188already_AddRefed<TestJSImplInterface>
81189TestJSImplInterface::GetPutForwardsAttr3(ErrorResult& aRv, JS::Realm* aRealm) const
81190{
81191 return mImpl->GetPutForwardsAttr3(aRv, aRealm);
81192}
81193
81194void
81195TestJSImplInterface::ThrowingMethod(ErrorResult& aRv, JS::Realm* aRealm)
81196{
81197 return mImpl->ThrowingMethod(aRv, aRealm);
81198}
81199
81200bool
81201TestJSImplInterface::GetThrowingAttr(ErrorResult& aRv, JS::Realm* aRealm) const
81202{
81203 return mImpl->GetThrowingAttr(aRv, aRealm);
81204}
81205
81206void
81207TestJSImplInterface::SetThrowingAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
81208{
81209 mImpl->SetThrowingAttr(arg, aRv, aRealm);
81210}
81211
81212bool
81213TestJSImplInterface::GetThrowingGetterAttr(ErrorResult& aRv, JS::Realm* aRealm) const
81214{
81215 return mImpl->GetThrowingGetterAttr(aRv, aRealm);
81216}
81217
81218void
81219TestJSImplInterface::SetThrowingGetterAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
81220{
81221 mImpl->SetThrowingGetterAttr(arg, aRv, aRealm);
81222}
81223
81224bool
81225TestJSImplInterface::GetThrowingSetterAttr(ErrorResult& aRv, JS::Realm* aRealm) const
81226{
81227 return mImpl->GetThrowingSetterAttr(aRv, aRealm);
81228}
81229
81230void
81231TestJSImplInterface::SetThrowingSetterAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
81232{
81233 mImpl->SetThrowingSetterAttr(arg, aRv, aRealm);
81234}
81235
81236void
81237TestJSImplInterface::CanOOMMethod(ErrorResult& aRv, JS::Realm* aRealm)
81238{
81239 return mImpl->CanOOMMethod(aRv, aRealm);
81240}
81241
81242bool
81243TestJSImplInterface::GetCanOOMAttr(ErrorResult& aRv, JS::Realm* aRealm) const
81244{
81245 return mImpl->GetCanOOMAttr(aRv, aRealm);
81246}
81247
81248void
81249TestJSImplInterface::SetCanOOMAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
81250{
81251 mImpl->SetCanOOMAttr(arg, aRv, aRealm);
81252}
81253
81254bool
81255TestJSImplInterface::GetCanOOMGetterAttr(ErrorResult& aRv, JS::Realm* aRealm) const
81256{
81257 return mImpl->GetCanOOMGetterAttr(aRv, aRealm);
81258}
81259
81260void
81261TestJSImplInterface::SetCanOOMGetterAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
81262{
81263 mImpl->SetCanOOMGetterAttr(arg, aRv, aRealm);
81264}
81265
81266bool
81267TestJSImplInterface::GetCanOOMSetterAttr(ErrorResult& aRv, JS::Realm* aRealm) const
81268{
81269 return mImpl->GetCanOOMSetterAttr(aRv, aRealm);
81270}
81271
81272void
81273TestJSImplInterface::SetCanOOMSetterAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
81274{
81275 mImpl->SetCanOOMSetterAttr(arg, aRv, aRealm);
81276}
81277
81278void
81279TestJSImplInterface::CeReactionsMethod(ErrorResult& aRv, JS::Realm* aRealm)
81280{
81281 return mImpl->CeReactionsMethod(aRv, aRealm);
81282}
81283
81284void
81285TestJSImplInterface::CeReactionsMethodOverload(ErrorResult& aRv, JS::Realm* aRealm)
81286{
81287 return mImpl->CeReactionsMethodOverload(aRv, aRealm);
81288}
81289
81290void
81291TestJSImplInterface::CeReactionsMethodOverload(const nsAString& bar, ErrorResult& aRv, JS::Realm* aRealm)
81292{
81293 return mImpl->CeReactionsMethodOverload(bar, aRv, aRealm);
81294}
81295
81296bool
81297TestJSImplInterface::GetCeReactionsAttr(ErrorResult& aRv, JS::Realm* aRealm) const
81298{
81299 return mImpl->GetCeReactionsAttr(aRv, aRealm);
81300}
81301
81302void
81303TestJSImplInterface::SetCeReactionsAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
81304{
81305 mImpl->SetCeReactionsAttr(arg, aRv, aRealm);
81306}
81307
81308void
81309TestJSImplInterface::PassArgsWithDefaults(const Optional<int32_t>& arg1, TestInterface* arg2, const Dict& arg3, double arg4, const Optional<float>& arg5, ErrorResult& aRv, JS::Realm* aRealm)
81310{
81311 return mImpl->PassArgsWithDefaults(arg1, arg2, arg3, arg4, arg5, aRv, aRealm);
81312}
81313
81314void
81315TestJSImplInterface::GetToJSONShouldSkipThis(JS::MutableHandle<JS::Value> aRetVal, ErrorResult& aRv, JS::Realm* aRealm) const
81316{
81317 return mImpl->GetToJSONShouldSkipThis(aRetVal, aRv, aRealm);
81318}
81319
81320void
81321TestJSImplInterface::SetToJSONShouldSkipThis(JS::Handle<JS::Value> arg, ErrorResult& aRv, JS::Realm* aRealm)
81322{
81323 mImpl->SetToJSONShouldSkipThis(arg, aRv, aRealm);
81324}
81325
81326// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
81327already_AddRefed<TestParentInterface>
81328TestJSImplInterface::GetToJSONShouldSkipThis2(ErrorResult& aRv, JS::Realm* aRealm) const
81329{
81330 return mImpl->GetToJSONShouldSkipThis2(aRv, aRealm);
81331}
81332
81333void
81334TestJSImplInterface::SetToJSONShouldSkipThis2(TestParentInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
81335{
81336 mImpl->SetToJSONShouldSkipThis2(arg, aRv, aRealm);
81337}
81338
81339// Return a raw pointer here to avoid refcounting, but make sure it's safe (the object should be kept alive by the callee).
81340already_AddRefed<TestCallbackInterface>
81341TestJSImplInterface::GetToJSONShouldSkipThis3(ErrorResult& aRv, JS::Realm* aRealm) const
81342{
81343 return mImpl->GetToJSONShouldSkipThis3(aRv, aRealm);
81344}
81345
81346void
81347TestJSImplInterface::SetToJSONShouldSkipThis3(TestCallbackInterface& arg, ErrorResult& aRv, JS::Realm* aRealm)
81348{
81349 mImpl->SetToJSONShouldSkipThis3(arg, aRv, aRealm);
81350}
81351
81352void
81353TestJSImplInterface::ToJSON(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm)
81354{
81355 return mImpl->ToJSON(aRetVal, aRv, aRealm);
81356}
81357
81358int8_t
81359TestJSImplInterface::GetDashed_attribute(ErrorResult& aRv, JS::Realm* aRealm) const
81360{
81361 return mImpl->GetDashed_attribute(aRv, aRealm);
81362}
81363
81364void
81365TestJSImplInterface::SetDashed_attribute(int8_t arg, ErrorResult& aRv, JS::Realm* aRealm)
81366{
81367 mImpl->SetDashed_attribute(arg, aRv, aRealm);
81368}
81369
81370void
81371TestJSImplInterface::Dashed_method(ErrorResult& aRv, JS::Realm* aRealm)
81372{
81373 return mImpl->Dashed_method(aRv, aRealm);
81374}
81375
81376bool
81377TestJSImplInterface::GetNonEnumerableAttr(ErrorResult& aRv, JS::Realm* aRealm) const
81378{
81379 return mImpl->GetNonEnumerableAttr(aRv, aRealm);
81380}
81381
81382void
81383TestJSImplInterface::SetNonEnumerableAttr(bool arg, ErrorResult& aRv, JS::Realm* aRealm)
81384{
81385 mImpl->SetNonEnumerableAttr(arg, aRv, aRealm);
81386}
81387
81388void
81389TestJSImplInterface::NonEnumerableMethod(ErrorResult& aRv, JS::Realm* aRealm)
81390{
81391 return mImpl->NonEnumerableMethod(aRv, aRealm);
81392}
81393
81394void
81395TestJSImplInterface::GetAllowSharedArrayBufferViewTypedef(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm) const
81396{
81397 return mImpl->GetAllowSharedArrayBufferViewTypedef(aRetVal, aRv, aRealm);
81398}
81399
81400void
81401TestJSImplInterface::SetAllowSharedArrayBufferViewTypedef(const ArrayBufferView& arg, ErrorResult& aRv, JS::Realm* aRealm)
81402{
81403 mImpl->SetAllowSharedArrayBufferViewTypedef(arg, aRv, aRealm);
81404}
81405
81406void
81407TestJSImplInterface::GetAllowSharedArrayBufferView(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm) const
81408{
81409 return mImpl->GetAllowSharedArrayBufferView(aRetVal, aRv, aRealm);
81410}
81411
81412void
81413TestJSImplInterface::SetAllowSharedArrayBufferView(const ArrayBufferView& arg, ErrorResult& aRv, JS::Realm* aRealm)
81414{
81415 mImpl->SetAllowSharedArrayBufferView(arg, aRv, aRealm);
81416}
81417
81418void
81419TestJSImplInterface::GetAllowSharedNullableArrayBufferView(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm) const
81420{
81421 return mImpl->GetAllowSharedNullableArrayBufferView(aRetVal, aRv, aRealm);
81422}
81423
81424void
81425TestJSImplInterface::SetAllowSharedNullableArrayBufferView(const Nullable<ArrayBufferView>& arg, ErrorResult& aRv, JS::Realm* aRealm)
81426{
81427 mImpl->SetAllowSharedNullableArrayBufferView(arg, aRv, aRealm);
81428}
81429
81430void
81431TestJSImplInterface::GetAllowSharedArrayBuffer(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm) const
81432{
81433 return mImpl->GetAllowSharedArrayBuffer(aRetVal, aRv, aRealm);
81434}
81435
81436void
81437TestJSImplInterface::SetAllowSharedArrayBuffer(const ArrayBuffer& arg, ErrorResult& aRv, JS::Realm* aRealm)
81438{
81439 mImpl->SetAllowSharedArrayBuffer(arg, aRv, aRealm);
81440}
81441
81442void
81443TestJSImplInterface::GetAllowSharedNullableArrayBuffer(JS::MutableHandle<JSObject*> aRetVal, ErrorResult& aRv, JS::Realm* aRealm) const
81444{
81445 return mImpl->GetAllowSharedNullableArrayBuffer(aRetVal, aRv, aRealm);
81446}
81447
81448void
81449TestJSImplInterface::SetAllowSharedNullableArrayBuffer(const Nullable<ArrayBuffer>& arg, ErrorResult& aRv, JS::Realm* aRealm)
81450{
81451 mImpl->SetAllowSharedNullableArrayBuffer(arg, aRv, aRealm);
81452}
81453
81454void
81455TestJSImplInterface::PassAllowSharedArrayBufferViewTypedef(const ArrayBufferView& foo, ErrorResult& aRv, JS::Realm* aRealm)
81456{
81457 return mImpl->PassAllowSharedArrayBufferViewTypedef(foo, aRv, aRealm);
81458}
81459
81460void
81461TestJSImplInterface::PassAllowSharedArrayBufferView(const ArrayBufferView& foo, ErrorResult& aRv, JS::Realm* aRealm)
81462{
81463 return mImpl->PassAllowSharedArrayBufferView(foo, aRv, aRealm);
81464}
81465
81466void
81467TestJSImplInterface::PassAllowSharedNullableArrayBufferView(const Nullable<ArrayBufferView>& foo, ErrorResult& aRv, JS::Realm* aRealm)
81468{
81469 return mImpl->PassAllowSharedNullableArrayBufferView(foo, aRv, aRealm);
81470}
81471
81472void
81473TestJSImplInterface::PassAllowSharedArrayBuffer(const ArrayBuffer& foo, ErrorResult& aRv, JS::Realm* aRealm)
81474{
81475 return mImpl->PassAllowSharedArrayBuffer(foo, aRv, aRealm);
81476}
81477
81478void
81479TestJSImplInterface::PassAllowSharedNullableArrayBuffer(const Nullable<ArrayBuffer>& foo, ErrorResult& aRv, JS::Realm* aRealm)
81480{
81481 return mImpl->PassAllowSharedNullableArrayBuffer(foo, aRv, aRealm);
81482}
81483
81484void
81485TestJSImplInterface::PassUnionArrayBuffer(const StringOrArrayBuffer& foo, ErrorResult& aRv, JS::Realm* aRealm)
81486{
81487 return mImpl->PassUnionArrayBuffer(foo, aRv, aRealm);
81488}
81489
81490void
81491TestJSImplInterface::PassUnionAllowSharedArrayBuffer(const StringOrMaybeSharedArrayBuffer& foo, ErrorResult& aRv, JS::Realm* aRealm)
81492{
81493 return mImpl->PassUnionAllowSharedArrayBuffer(foo, aRv, aRealm);
81494}
81495
81496bool
81497TestJSImplInterface::_Create(JSContext* cx, unsigned argc, JS::Value* vp)
81498{
81499 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
81500 if (!args.requireAtLeast(cx, "TestJSImplInterface._create", 2)) {
81501 return false;
81502 }
81503 BindingCallContext callCx(cx, "TestJSImplInterface._create");
81504 if (!args[0].isObject()) {
81505 return callCx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
81506 }
81507 if (!args[1].isObject()) {
81508 return callCx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 2");
81509 }
81510
81511 // GlobalObject will go through wrappers as needed for us, and
81512 // is simpler than the right UnwrapArg incantation.
81513 GlobalObject global(cx, &args[0].toObject());
81514 if (global.Failed()) {
81515 return false;
81516 }
81517 nsCOMPtr<nsIGlobalObject> globalHolder = do_QueryInterface(global.GetAsSupports());
81518 MOZ_ASSERT(globalHolder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(globalHolder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(globalHolder))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("globalHolder", "../TestJSImplGenBinding.cpp"
, 81518); AnnotateMozCrashReason("MOZ_ASSERT" "(" "globalHolder"
")"); do { *((volatile int*)__null) = 81518; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
81519 JS::Rooted<JSObject*> arg(cx, &args[1].toObject());
81520 JS::Rooted<JSObject*> argGlobal(cx, JS::CurrentGlobalOrNull(cx));
81521 RefPtr<TestJSImplInterface> impl = new TestJSImplInterface(arg, argGlobal, globalHolder);
81522 MOZ_ASSERT(js::IsObjectInContextCompartment(arg, cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(js::IsObjectInContextCompartment(arg, cx))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(js::IsObjectInContextCompartment(arg, cx)))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("js::IsObjectInContextCompartment(arg, cx)"
, "../TestJSImplGenBinding.cpp", 81522); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(arg, cx)"
")"); do { *((volatile int*)__null) = 81522; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
81523 return GetOrCreateDOMReflector(cx, impl, args.rval());
81524}
81525
81526
81527NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(TestJSImplNoInterfaceObject)static_assert(std::is_base_of<nsWrapperCache, TestJSImplNoInterfaceObject
>::value, "Class should inherit nsWrapperCache"); TestJSImplNoInterfaceObject
::cycleCollection TestJSImplNoInterfaceObject::_cycleCollectorGlobal
( nsCycleCollectionParticipant::FlagMaybeSingleZoneJSHolder);
void TestJSImplNoInterfaceObject::cycleCollection::Trace( void
* p, const TraceCallbacks& aCallbacks, void* aClosure) { TestJSImplNoInterfaceObject
* tmp = DowncastCCParticipant<TestJSImplNoInterfaceObject>
(p); TraceWrapper(p, aCallbacks, aClosure); (void)tmp; } void
TestJSImplNoInterfaceObject::cycleCollection::TraceWrapper( void
* p, const TraceCallbacks& aCallbacks, void* aClosure) { TestJSImplNoInterfaceObject
* tmp = DowncastCCParticipant<TestJSImplNoInterfaceObject>
(p); tmp->TraceWrapper(aCallbacks, aClosure); }
81528NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(TestJSImplNoInterfaceObject)void TestJSImplNoInterfaceObject::cycleCollection::Unlink(void
* p) { TestJSImplNoInterfaceObject* tmp = DowncastCCParticipant
<TestJSImplNoInterfaceObject>(p);
81529 NS_IMPL_CYCLE_COLLECTION_UNLINK(mImpl)ImplCycleCollectionUnlink(tmp->mImpl);
81530 NS_IMPL_CYCLE_COLLECTION_UNLINK(mParent)ImplCycleCollectionUnlink(tmp->mParent);
81531 NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPERtmp->ReleaseWrapper(p);
81532 tmp->ClearWeakReferences();
81533NS_IMPL_CYCLE_COLLECTION_UNLINK_END(void)tmp; }
81534NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(TestJSImplNoInterfaceObject)nsresult TestJSImplNoInterfaceObject::cycleCollection::TraverseNative
( void* p, nsCycleCollectionTraversalCallback& cb) { TestJSImplNoInterfaceObject
* tmp = DowncastCCParticipant<TestJSImplNoInterfaceObject>
(p); cb.DescribeRefCountedNode(tmp->mRefCnt.get(), "TestJSImplNoInterfaceObject"
);
81535 NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mImpl)ImplCycleCollectionTraverse(cb, tmp->mImpl, "mImpl", 0);
81536 NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mParent)ImplCycleCollectionTraverse(cb, tmp->mParent, "mParent", 0
);
81537NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END(void)tmp; return NS_OK; }
81538NS_IMPL_CYCLE_COLLECTING_ADDREF(TestJSImplNoInterfaceObject)MozExternalRefCountType TestJSImplNoInterfaceObject::AddRef(void
) { static_assert(!std::is_destructible_v<TestJSImplNoInterfaceObject
>, "Reference-counted class " "TestJSImplNoInterfaceObject"
" should not have a public destructor. " "Make this class's destructor non-public"
); do { static_assert( mozilla::detail::AssertionConditionType
<decltype(int32_t(mRefCnt) >= 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(int32_t(mRefCnt) >= 0))),
0))) { do { } while (false); MOZ_ReportAssertionFailure("int32_t(mRefCnt) >= 0"
" (" "illegal refcnt" ")", "../TestJSImplGenBinding.cpp", 81538
); AnnotateMozCrashReason("MOZ_ASSERT" "(" "int32_t(mRefCnt) >= 0"
") (" "illegal refcnt" ")"); do { *((volatile int*)__null) =
81538; __attribute__((nomerge)) ::abort(); } while (false); }
} while (false); _mOwningThread.AssertOwnership("TestJSImplNoInterfaceObject"
" not thread-safe"); nsISupports* base = TestJSImplNoInterfaceObject
::cycleCollection::Upcast(this); nsrefcnt count = mRefCnt.incr
(base); NS_LogAddRef((this), (count), ("TestJSImplNoInterfaceObject"
), (uint32_t)(sizeof(*this))); return count; }
81539NS_IMPL_CYCLE_COLLECTING_RELEASE(TestJSImplNoInterfaceObject)MozExternalRefCountType TestJSImplNoInterfaceObject::Release(
void) { do { static_assert( mozilla::detail::AssertionConditionType
<decltype(int32_t(mRefCnt) > 0)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(int32_t(mRefCnt) > 0))), 0
))) { do { } while (false); MOZ_ReportAssertionFailure("int32_t(mRefCnt) > 0"
" (" "dup release" ")", "../TestJSImplGenBinding.cpp", 81539
); AnnotateMozCrashReason("MOZ_ASSERT" "(" "int32_t(mRefCnt) > 0"
") (" "dup release" ")"); do { *((volatile int*)__null) = 81539
; __attribute__((nomerge)) ::abort(); } while (false); } } while
(false); _mOwningThread.AssertOwnership("TestJSImplNoInterfaceObject"
" not thread-safe"); nsISupports* base = TestJSImplNoInterfaceObject
::cycleCollection::Upcast(this); nsrefcnt count = mRefCnt.decr
(base); NS_LogRelease((this), (count), ("TestJSImplNoInterfaceObject"
)); return count; } void TestJSImplNoInterfaceObject::DeleteCycleCollectable
(void) { delete (this); }
81540NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TestJSImplNoInterfaceObject)nsresult TestJSImplNoInterfaceObject::QueryInterface(const nsIID
& aIID, void** aInstancePtr) { do { if (!(aInstancePtr)) {
NS_DebugBreak(NS_DEBUG_ASSERTION, "QueryInterface requires a non-NULL destination!"
, "aInstancePtr", "../TestJSImplGenBinding.cpp", 81540); MOZ_PretendNoReturn
(); } } while (0); nsISupports* foundInterface; if (TopThreeWordsEquals
( aIID, (nsXPCOMCycleCollectionParticipant::COMTypeInfo<nsXPCOMCycleCollectionParticipant
, void>::kIID), (nsCycleCollectionISupports::COMTypeInfo<
nsCycleCollectionISupports, void>::kIID)) && (LowWordEquals
(aIID, (nsXPCOMCycleCollectionParticipant::COMTypeInfo<nsXPCOMCycleCollectionParticipant
, void>::kIID)) || LowWordEquals(aIID, (nsCycleCollectionISupports
::COMTypeInfo<nsCycleCollectionISupports, void>::kIID))
)) { if (LowWordEquals(aIID, (nsXPCOMCycleCollectionParticipant
::COMTypeInfo<nsXPCOMCycleCollectionParticipant, void>::
kIID))) { *aInstancePtr = TestJSImplNoInterfaceObject::cycleCollection
::GetParticipant(); return NS_OK; } if (LowWordEquals(aIID, (
nsCycleCollectionISupports::COMTypeInfo<nsCycleCollectionISupports
, void>::kIID))) { *aInstancePtr = TestJSImplNoInterfaceObject
::cycleCollection::Upcast(this); return NS_OK; } foundInterface
= nullptr; } else
81541 NS_WRAPPERCACHE_INTERFACE_MAP_ENTRYif (aIID.Equals((nsWrapperCache::COMTypeInfo<nsWrapperCache
, void>::kIID))) { *aInstancePtr = static_cast<nsWrapperCache
*>(this); return NS_OK; } else
81542 NS_INTERFACE_MAP_ENTRY(nsISupports)if (aIID.Equals(mozilla::detail::kImplementedIID<std::remove_reference_t
<decltype(*this)>, nsISupports>)) foundInterface = static_cast
<nsISupports*>(this); else
81543 NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)if (aIID.Equals(mozilla::detail::kImplementedIID<std::remove_reference_t
<decltype(*this)>, nsISupportsWeakReference>)) foundInterface
= static_cast<nsISupportsWeakReference*>(this); else
81544NS_INTERFACE_MAP_ENDfoundInterface = 0; nsresult status; if (!foundInterface) { do
{ static_assert( mozilla::detail::AssertionConditionType<
decltype(!aIID.Equals((nsISupports::COMTypeInfo<nsISupports
, void>::kIID)))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(!aIID.Equals((nsISupports::COMTypeInfo
<nsISupports, void>::kIID))))), 0))) { do { } while (false
); MOZ_ReportAssertionFailure("!aIID.Equals((nsISupports::COMTypeInfo<nsISupports, void>::kIID))"
, "../TestJSImplGenBinding.cpp", 81544); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "!aIID.Equals((nsISupports::COMTypeInfo<nsISupports, void>::kIID))"
")"); do { *((volatile int*)__null) = 81544; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false); status
= NS_NOINTERFACE; } else { (foundInterface)->AddRef(); status
= NS_OK; } *aInstancePtr = foundInterface; return status; }
81545
81546TestJSImplNoInterfaceObject::TestJSImplNoInterfaceObject(JS::Handle<JSObject*> aJSImplObject, JS::Handle<JSObject*> aJSImplGlobal, nsIGlobalObject* aParent)
81547 : mImpl(new TestJSImplNoInterfaceObjectJSImpl(nullptr, aJSImplObject, aJSImplGlobal, /* aIncumbentGlobal = */ nullptr)),
81548 mParent(aParent)
81549{
81550}
81551
81552
81553TestJSImplNoInterfaceObject::~TestJSImplNoInterfaceObject()
81554{
81555}
81556
81557nsISupports*
81558TestJSImplNoInterfaceObject::GetParentObject() const
81559{
81560 return mParent;
81561}
81562
81563JSObject*
81564TestJSImplNoInterfaceObject::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
81565{
81566 JS::Rooted<JSObject*> obj(aCx, TestJSImplNoInterfaceObject_Binding::Wrap(aCx, this, aGivenProto));
81567 if (!obj) {
81568 return nullptr;
81569 }
81570
81571 // Now define it on our chrome object
81572 JSAutoRealm ar(aCx, mImpl->CallbackGlobalOrNull());
81573 if (!JS_WrapObject(aCx, &obj)) {
81574 return nullptr;
81575 }
81576 JS::Rooted<JSObject*> callback(aCx, mImpl->CallbackOrNull());
81577 if (!JS_DefineProperty(aCx, callback, "__DOM_IMPL__", obj, 0)) {
81578 return nullptr;
81579 }
81580 return obj;
81581}
81582
81583bool
81584TestJSImplNoInterfaceObject::_Create(JSContext* cx, unsigned argc, JS::Value* vp)
81585{
81586 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
81587 if (!args.requireAtLeast(cx, "TestJSImplNoInterfaceObject._create", 2)) {
81588 return false;
81589 }
81590 BindingCallContext callCx(cx, "TestJSImplNoInterfaceObject._create");
81591 if (!args[0].isObject()) {
81592 return callCx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 1");
81593 }
81594 if (!args[1].isObject()) {
81595 return callCx.ThrowErrorMessage<MSG_NOT_OBJECT>("Argument 2");
81596 }
81597
81598 // GlobalObject will go through wrappers as needed for us, and
81599 // is simpler than the right UnwrapArg incantation.
81600 GlobalObject global(cx, &args[0].toObject());
81601 if (global.Failed()) {
81602 return false;
81603 }
81604 nsCOMPtr<nsIGlobalObject> globalHolder = do_QueryInterface(global.GetAsSupports());
81605 MOZ_ASSERT(globalHolder)do { static_assert( mozilla::detail::AssertionConditionType<
decltype(globalHolder)>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(globalHolder))), 0))) { do {
} while (false); MOZ_ReportAssertionFailure("globalHolder", "../TestJSImplGenBinding.cpp"
, 81605); AnnotateMozCrashReason("MOZ_ASSERT" "(" "globalHolder"
")"); do { *((volatile int*)__null) = 81605; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
81606 JS::Rooted<JSObject*> arg(cx, &args[1].toObject());
81607 JS::Rooted<JSObject*> argGlobal(cx, JS::CurrentGlobalOrNull(cx));
81608 RefPtr<TestJSImplNoInterfaceObject> impl = new TestJSImplNoInterfaceObject(arg, argGlobal, globalHolder);
81609 MOZ_ASSERT(js::IsObjectInContextCompartment(arg, cx))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(js::IsObjectInContextCompartment(arg, cx))>::isValid
, "invalid assertion condition"); if ((__builtin_expect(!!(!(
!!(js::IsObjectInContextCompartment(arg, cx)))), 0))) { do { }
while (false); MOZ_ReportAssertionFailure("js::IsObjectInContextCompartment(arg, cx)"
, "../TestJSImplGenBinding.cpp", 81609); AnnotateMozCrashReason
("MOZ_ASSERT" "(" "js::IsObjectInContextCompartment(arg, cx)"
")"); do { *((volatile int*)__null) = 81609; __attribute__((
nomerge)) ::abort(); } while (false); } } while (false)
;
81610 return GetOrCreateDOMReflector(cx, impl, args.rval());
81611}
81612
81613
81614} // namespace dom
81615
81616
81617} // namespace mozilla

/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/PrimitiveConversions.h

1/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2/* vim: set ts=8 sts=2 et sw=2 tw=80: */
3/* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7/**
8 * Conversions from jsval to primitive values
9 */
10
11#ifndef mozilla_dom_PrimitiveConversions_h
12#define mozilla_dom_PrimitiveConversions_h
13
14#include <limits>
15#include <math.h>
16#include <stdint.h>
17
18#include "js/Conversions.h"
19#include "js/RootingAPI.h"
20#include "mozilla/Assertions.h"
21#include "mozilla/FloatingPoint.h"
22#include "mozilla/dom/BindingCallContext.h"
23
24namespace mozilla::dom {
25
26template <typename T>
27struct TypeName {};
28
29template <>
30struct TypeName<int8_t> {
31 static const char* value() { return "byte"; }
32};
33template <>
34struct TypeName<uint8_t> {
35 static const char* value() { return "octet"; }
36};
37template <>
38struct TypeName<int16_t> {
39 static const char* value() { return "short"; }
40};
41template <>
42struct TypeName<uint16_t> {
43 static const char* value() { return "unsigned short"; }
44};
45template <>
46struct TypeName<int32_t> {
47 static const char* value() { return "long"; }
48};
49template <>
50struct TypeName<uint32_t> {
51 static const char* value() { return "unsigned long"; }
52};
53template <>
54struct TypeName<int64_t> {
55 static const char* value() { return "long long"; }
56};
57template <>
58struct TypeName<uint64_t> {
59 static const char* value() { return "unsigned long long"; }
60};
61
62enum ConversionBehavior { eDefault, eEnforceRange, eClamp };
63
64template <typename T, ConversionBehavior B>
65struct PrimitiveConversionTraits {};
66
67template <typename T>
68struct DisallowedConversion {
69 typedef int jstype;
70 typedef int intermediateType;
71
72 private:
73 static inline bool converter(JSContext* cx, JS::Handle<JS::Value> v,
74 const char* sourceDescription, jstype* retval) {
75 MOZ_CRASH("This should never be instantiated!")do { do { } while (false); MOZ_ReportCrash("" "This should never be instantiated!"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/PrimitiveConversions.h"
, 75); AnnotateMozCrashReason("MOZ_CRASH(" "This should never be instantiated!"
")"); do { *((volatile int*)__null) = 75; __attribute__((nomerge
)) ::abort(); } while (false); } while (false)
;
76 }
77};
78
79struct PrimitiveConversionTraits_smallInt {
80 // The output of JS::ToInt32 is determined as follows:
81 // 1) The value is converted to a double
82 // 2) Anything that's not a finite double returns 0
83 // 3) The double is rounded towards zero to the nearest integer
84 // 4) The resulting integer is reduced mod 2^32. The output of this
85 // operation is an integer in the range [0, 2^32).
86 // 5) If the resulting number is >= 2^31, 2^32 is subtracted from it.
87 //
88 // The result of all this is a number in the range [-2^31, 2^31)
89 //
90 // WebIDL conversions for the 8-bit, 16-bit, and 32-bit integer types
91 // are defined in the same way, except that step 4 uses reduction mod
92 // 2^8 and 2^16 for the 8-bit and 16-bit types respectively, and step 5
93 // is only done for the signed types.
94 //
95 // C/C++ define integer conversion semantics to unsigned types as taking
96 // your input integer mod (1 + largest value representable in the
97 // unsigned type). Since 2^32 is zero mod 2^8, 2^16, and 2^32,
98 // converting to the unsigned int of the relevant width will correctly
99 // perform step 4; in particular, the 2^32 possibly subtracted in step 5
100 // will become 0.
101 //
102 // Once we have step 4 done, we're just going to assume 2s-complement
103 // representation and cast directly to the type we really want.
104 //
105 // So we can cast directly for all unsigned types and for int32_t; for
106 // the smaller-width signed types we need to cast through the
107 // corresponding unsigned type.
108 typedef int32_t jstype;
109 typedef int32_t intermediateType;
110 static inline bool converter(JSContext* cx, JS::Handle<JS::Value> v,
111 const char* sourceDescription, jstype* retval) {
112 return JS::ToInt32(cx, v, retval);
113 }
114};
115template <>
116struct PrimitiveConversionTraits<int8_t, eDefault>
117 : PrimitiveConversionTraits_smallInt {
118 typedef uint8_t intermediateType;
119};
120template <>
121struct PrimitiveConversionTraits<uint8_t, eDefault>
122 : PrimitiveConversionTraits_smallInt {};
123template <>
124struct PrimitiveConversionTraits<int16_t, eDefault>
125 : PrimitiveConversionTraits_smallInt {
126 typedef uint16_t intermediateType;
127};
128template <>
129struct PrimitiveConversionTraits<uint16_t, eDefault>
130 : PrimitiveConversionTraits_smallInt {};
131template <>
132struct PrimitiveConversionTraits<int32_t, eDefault>
133 : PrimitiveConversionTraits_smallInt {};
134template <>
135struct PrimitiveConversionTraits<uint32_t, eDefault>
136 : PrimitiveConversionTraits_smallInt {};
137
138template <>
139struct PrimitiveConversionTraits<int64_t, eDefault> {
140 typedef int64_t jstype;
141 typedef int64_t intermediateType;
142 static inline bool converter(JSContext* cx, JS::Handle<JS::Value> v,
143 const char* sourceDescription, jstype* retval) {
144 return JS::ToInt64(cx, v, retval);
145 }
146};
147
148template <>
149struct PrimitiveConversionTraits<uint64_t, eDefault> {
150 typedef uint64_t jstype;
151 typedef uint64_t intermediateType;
152 static inline bool converter(JSContext* cx, JS::Handle<JS::Value> v,
153 const char* sourceDescription, jstype* retval) {
154 return JS::ToUint64(cx, v, retval);
155 }
156};
157
158template <typename T>
159struct PrimitiveConversionTraits_Limits {
160 static inline T min() { return std::numeric_limits<T>::min(); }
161 static inline T max() { return std::numeric_limits<T>::max(); }
162};
163
164template <>
165struct PrimitiveConversionTraits_Limits<int64_t> {
166 static inline int64_t min() { return -(1LL << 53) + 1; }
167 static inline int64_t max() { return (1LL << 53) - 1; }
168};
169
170template <>
171struct PrimitiveConversionTraits_Limits<uint64_t> {
172 static inline uint64_t min() { return 0; }
173 static inline uint64_t max() { return (1LL << 53) - 1; }
174};
175
176template <typename T, typename U,
177 bool (*Enforce)(U cx, const char* sourceDescription, const double& d,
178 T* retval)>
179struct PrimitiveConversionTraits_ToCheckedIntHelper {
180 typedef T jstype;
181 typedef T intermediateType;
182
183 static inline bool converter(U cx, JS::Handle<JS::Value> v,
184 const char* sourceDescription, jstype* retval) {
185 double intermediate;
186 if (!JS::ToNumber(cx, v, &intermediate)) {
17
Assuming the condition is false
18
Taking false branch
187 return false;
188 }
189
190 return Enforce(cx, sourceDescription, intermediate, retval);
19
Calling 'PrimitiveConversionTraits_EnforceRange<signed char>'
23
Returning from 'PrimitiveConversionTraits_EnforceRange<signed char>'
24
Returning without writing to '*retval'
191 }
192};
193
194template <typename T>
195inline bool PrimitiveConversionTraits_EnforceRange(
196 BindingCallContext& cx, const char* sourceDescription, const double& d,
197 T* retval) {
198 static_assert(std::numeric_limits<T>::is_integer,
199 "This can only be applied to integers!");
200
201 if (!std::isfinite(d)) {
20
Assuming the condition is true
21
Taking true branch
202 return cx.ThrowErrorMessage<MSG_ENFORCE_RANGE_NON_FINITE>(
22
Returning without writing to '*retval'
203 sourceDescription, TypeName<T>::value());
204 }
205
206 bool neg = (d < 0);
207 double rounded = floor(neg ? -d : d);
208 rounded = neg ? -rounded : rounded;
209 if (rounded < PrimitiveConversionTraits_Limits<T>::min() ||
210 rounded > PrimitiveConversionTraits_Limits<T>::max()) {
211 return cx.ThrowErrorMessage<MSG_ENFORCE_RANGE_OUT_OF_RANGE>(
212 sourceDescription, TypeName<T>::value());
213 }
214
215 *retval = static_cast<T>(rounded);
216 return true;
217}
218
219template <typename T>
220struct PrimitiveConversionTraits<T, eEnforceRange>
221 : public PrimitiveConversionTraits_ToCheckedIntHelper<
222 T, BindingCallContext&, PrimitiveConversionTraits_EnforceRange<T> > {
223};
224
225template <typename T>
226inline bool PrimitiveConversionTraits_Clamp(JSContext* cx,
227 const char* sourceDescription,
228 const double& d, T* retval) {
229 static_assert(std::numeric_limits<T>::is_integer,
230 "This can only be applied to integers!");
231
232 if (std::isnan(d)) {
233 *retval = 0;
234 return true;
235 }
236 if (d >= PrimitiveConversionTraits_Limits<T>::max()) {
237 *retval = PrimitiveConversionTraits_Limits<T>::max();
238 return true;
239 }
240 if (d <= PrimitiveConversionTraits_Limits<T>::min()) {
241 *retval = PrimitiveConversionTraits_Limits<T>::min();
242 return true;
243 }
244
245 MOZ_ASSERT(std::isfinite(d))do { static_assert( mozilla::detail::AssertionConditionType<
decltype(std::isfinite(d))>::isValid, "invalid assertion condition"
); if ((__builtin_expect(!!(!(!!(std::isfinite(d)))), 0))) { do
{ } while (false); MOZ_ReportAssertionFailure("std::isfinite(d)"
, "/var/lib/jenkins/workspace/firefox-scan-build/obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom/PrimitiveConversions.h"
, 245); AnnotateMozCrashReason("MOZ_ASSERT" "(" "std::isfinite(d)"
")"); do { *((volatile int*)__null) = 245; __attribute__((nomerge
)) ::abort(); } while (false); } } while (false)
;
246
247 // Banker's rounding (round ties towards even).
248 // We move away from 0 by 0.5f and then truncate. That gets us the right
249 // answer for any starting value except plus or minus N.5. With a starting
250 // value of that form, we now have plus or minus N+1. If N is odd, this is
251 // the correct result. If N is even, plus or minus N is the correct result.
252 double toTruncate = (d < 0) ? d - 0.5 : d + 0.5;
253
254 T truncated = static_cast<T>(toTruncate);
255
256 if (truncated == toTruncate) {
257 /*
258 * It was a tie (since moving away from 0 by 0.5 gave us the exact integer
259 * we want). Since we rounded away from 0, we either already have an even
260 * number or we have an odd number but the number we want is one closer to
261 * 0. So just unconditionally masking out the ones bit should do the trick
262 * to get us the value we want.
263 */
264 truncated &= ~1;
265 }
266
267 *retval = truncated;
268 return true;
269}
270
271template <typename T>
272struct PrimitiveConversionTraits<T, eClamp>
273 : public PrimitiveConversionTraits_ToCheckedIntHelper<
274 T, JSContext*, PrimitiveConversionTraits_Clamp<T> > {};
275
276template <ConversionBehavior B>
277struct PrimitiveConversionTraits<bool, B> : public DisallowedConversion<bool> {
278};
279
280template <>
281struct PrimitiveConversionTraits<bool, eDefault> {
282 typedef bool jstype;
283 typedef bool intermediateType;
284 static inline bool converter(JSContext* /* unused */, JS::Handle<JS::Value> v,
285 const char* sourceDescription, jstype* retval) {
286 *retval = JS::ToBoolean(v);
287 return true;
288 }
289};
290
291template <ConversionBehavior B>
292struct PrimitiveConversionTraits<float, B>
293 : public DisallowedConversion<float> {};
294
295template <ConversionBehavior B>
296struct PrimitiveConversionTraits<double, B>
297 : public DisallowedConversion<double> {};
298
299struct PrimitiveConversionTraits_float {
300 typedef double jstype;
301 typedef double intermediateType;
302 static inline bool converter(JSContext* cx, JS::Handle<JS::Value> v,
303 const char* sourceDescription, jstype* retval) {
304 return JS::ToNumber(cx, v, retval);
305 }
306};
307
308template <>
309struct PrimitiveConversionTraits<float, eDefault>
310 : PrimitiveConversionTraits_float {};
311template <>
312struct PrimitiveConversionTraits<double, eDefault>
313 : PrimitiveConversionTraits_float {};
314
315template <typename T, ConversionBehavior B, typename U>
316bool ValueToPrimitive(U& cx, JS::Handle<JS::Value> v,
317 const char* sourceDescription, T* retval) {
318 typename PrimitiveConversionTraits<T, B>::jstype t;
15
't' declared without an initial value
319 if (!PrimitiveConversionTraits<T, B>::converter(cx, v, sourceDescription, &t))
16
Calling 'PrimitiveConversionTraits_ToCheckedIntHelper::converter'
25
Returning from 'PrimitiveConversionTraits_ToCheckedIntHelper::converter'
26
Assuming the condition is false
27
Taking false branch
320 return false;
321
322 *retval = static_cast<T>(
28
Assigned value is garbage or undefined
323 static_cast<typename PrimitiveConversionTraits<T, B>::intermediateType>(
324 t));
325 return true;
326}
327
328} // namespace mozilla::dom
329
330#endif /* mozilla_dom_PrimitiveConversions_h */